//jQuery Plugin: Drop Shadow Text
// call like this: $(element).textDropShadow();
(function($) {
 $.fn.textDropShadow = function(){
	 $(this).html('<span class="jq-shadow">'+$(this).html()+'</span><span>'+$(this).html()+'</span>');
	 return $(this);
 }
})(jQuery);



// javascript method: "pxToEm"
//eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){k.9.7=5.9.7=4(a){3 b=p;2(b.j==5)b=d(b);2(!a)3 a=$(\'g\');2($(a).6()>0){3 c=b*(1/(d($(a).r("n-6"))))+\'m\';8 c}l 8\'i: o h q f s a e t\'}})(u);',31,31,'||if|var|function|String|size|pxToEm|return|prototype||||parseInt|DOM|is|body|scope|Error|constructor|Number|else|em|font|Provided|this|argument|css|not|element|jQuery'.split('|'),0,{}));




// hover fix plugin
/*jQuery.fn.fixHover.js : for all elements, add hover class on mouseover and remove on mouseout */
jQuery.fn.fixHover = function(){
	$(this).each(function(){
		var hoverClasses = ' hover';
		if($(this).attr('class')){		
			var classes = $(this).attr('class');
			var classArray = classes.split(' ');
			$(classArray).each(function(){
				hoverClasses += ' ' + this + 'Hover';
			});
		}
		$(this).hover(
		function(){
			if(classes) $(this).attr('class', classes + hoverClasses);
			else $(this).addClass('hover');
		},
		function(){
			if(classes) $(this).attr('class', classes);
			else $(this).removeClass('hover');
		}
		);
	});
}





/*-------------------------------------------------------------------- 
 * JQuery Plugin: "EqualHeights"
 * by:
   Scott Jehl (scott@filamentgroup.com) 
   Todd Parker (todd@filamentgroup.com)
   http://www.filamentgroup.com
 *
 * Copyright (c) 2007 Filament Group
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 *
 * Description: Compares the heights of the first-children of a provided element 
 								  and sets their min-height to the tallest height. Sets in em units by default if pxToEm() method is available.
 * Dependencies: jQuery library, pxToEm method								  
 * Usage Example: $(element).equalHeights();
   						      Optional: to set min-height in px, pass a true argument: $(element).equalHeights(true);
 * Version: 1.0, 08.02.2007
 * Changelog:
 *  08.02.2007 initial Version 1.0
--------------------------------------------------------------------*/



$.fn.equalHeights = function(px) {
	$(this).each(function(){
		var currentTallest = 0;
		$(this).children().each(function(i){
				if($(this).height() > currentTallest) { currentTallest = $(this).height(); }
		});
		if(!px || !Number.prototype.pxToEm) currentTallest = currentTallest.pxToEm($(this)); //use ems unless px is specified or 
		// for ie6, set height since min-height isn't supported
		var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);
		if ($.browser.msie && (ie6)) { $(this).children().css({'height': currentTallest}); }
		$(this).children().css({'min-height': currentTallest}); 
	});
	return $(this);
};

document.documentElement.className = "js";

/*-------------------------------------------------------------------------------
 * jQuery Website Screen Behavior Layer
 * Author: Scott Jehl, scottjehl.com
 * Created: April 08
 * Notes:
-------------------------------------------------------------------------------*/
$(function(){
		//add enhanced class to body
		$('body').addClass('jq-enhanced');

		//create faux radios that control actual radios 
/*
		$('#jq-download input:radio').each(function(){
			var state = ($(this).is(':checked')) ? ' jq-checked' : '';
			$(this).after('<a href="#" class="jq-radioToggle '+$(this).attr('name')+state+'">'+$(this).attr('value')+'</a>').hide();
		});
*/

/*
		$('.jq-radioToggle, #jq-download label').click(function(){
			$('#jq-download input:radio').each(function(){
				alert($(this).id);
				$(this).removeClass('jq-checked');
				
				//$(this).after('<a href="#" class="jq-radioToggle '+$(this).attr('name')+state+'">'+$(this).attr('value')+'</a>').hide();
			});

						
				return false;
		});
*/

/*
    $(".jq-radioToggle:first").click(function () {
      $(".jq-radioToggle:last").removeClass('jq-checked');
  	  $(".jq-radioToggle:first").addClass('jq-checked');
	  $(".jq-radioToggle:first").trigger('click');
	  return false;
    });
    $(".jq-radioToggle:last").click(function () {
      $(".jq-radioToggle:first").removeClass('jq-checked');
	  $(".jq-radioToggle:last").addClass('jq-checked');
	  $(".jq-radioToggle:last").trigger('click');
	  return false;
    });

*/

		$('.jq-radioToggle, #jq-download label').click(function(){
				$(".jq-radioToggle:last").removeClass('jq-checked');
				var thisToggle = $(this).is('.jq-radioToggle') ? $(this) : $(this).prev();
				var checkBox = thisToggle.prev();
				checkBox.trigger('click');
				$('.jq-radioToggle').removeClass('jq-checked');
				thisToggle.addClass('jq-checked');
		
				return false;
		});


	//nav drop shads
		$('#jq-secondaryNavigation a, #jq-footerNavigation a').each(function(){$(this).textDropShadow();});

		
	
		
});

