/* The following is used to comply with XHTML Strict ruels of now Target attributes for anchor elements */
function externalLinks() {
	jQuery('a[rel~="external"]').click(function(){
		jQuery(this).attr({
			"target":"_blank"
		});
	});
}

//When Document is Loaded and Ready
jQuery(document).ready(function(){

	//Run to set up external links
	externalLinks();
	
	//Set Functionality to Clear Search Form when clicked
	defaultValue = jQuery('#SearchForm_SearchForm_Search').val();  
	jQuery('#SearchForm_SearchForm_Search').click(function() {
		if( this.value == defaultValue ) {
	    	jQuery(this).val("");
		}
	});
	
	
	function toggleMega(){
		jQuery(this).find('ul').toggleClass("hovering").slideToggle();

	}

	var megaConfig = {
		interval: 200,
	    sensitivity: 7,
	    over: toggleMega,
	    timeout: 300,
	    out: toggleMega
	};

	jQuery("li.mega").hoverIntent(megaConfig);
	
			
		
});
