/* jQuery */
jQuery(document).ready(function() {
						   
	/* Subscribe/Social Media tabs */
	jQuery('#subscribe').tabs({ event: 'mouseover', selected: -1 });
	/*
	jQuery('#subscribeTab img.newsletter')
		.mouseover(function() { 
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_newsletter_over.jpg');
		})
		.mouseout(function() {
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_newsletter.jpg');
		});
	jQuery('#subscribeTab img.facebook')
		.mouseover(function() { 
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_facebook_over.jpg');
		})
		.mouseout(function() {
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_facebook.jpg');
		});
	jQuery('#subscribeTab img.twitter')
		.mouseover(function() { 
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_twitter_over.jpg');
		})
		.mouseout(function() {
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_twitter.jpg');
		});
	jQuery('#subscribeTab img.rss')
		.mouseover(function() { 
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_rss_over.jpg');
		})
		.mouseout(function() {
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_rss.jpg');
		});
	jQuery('#subscribeTab img.alerts')
		.mouseover(function() { 
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_text_over.jpg');
		})
		.mouseout(function() {
			jQuery(this).attr("src", 'http://www.goerie.com/graphics/social/header/icon_text.jpg');
		});	
	*/
	
	
						   
	/* Logo */
	jQuery("#logo").click(function(){
		window.open('http://www.goerie.com');			  
	});	  
	/* Logo End */
						   
						   
						   
	/* Navigation */    
	function showMenu(){
		jQuery(this).addClass("hovering");
	}
	function hideMenu(){
		jQuery(this).removeClass("hovering");
	}
	var navConfig = {    
		 over: showMenu,  
		 timeout: 200,   
		 out: hideMenu,
		 interval: 200
	};	
	jQuery("ul#sectionsMenu li.section").hoverIntent(navConfig);
	/* Navigation End */
	
	
	
	/* Search Input Box */
	jQuery('#allSearchRadio').click(function(){
		jQuery('#busSearch').hide();				
		jQuery('#allSearch').show();								 				
	});
	jQuery('#busSearchRadio').click(function(){
		jQuery('#allSearch').hide();				
		jQuery('#busSearch').show();								 				
	});	
	
	var clearMePrevious = "";
		
	// clear input on focus
	jQuery(".keywords").focus(function(){
		if(jQuery(this).val()==jQuery(this).attr("title")){
			clearMePrevious = jQuery(this).val();
			jQuery(this).val("");
		}
	});
		
	// if field is empty afterward, add text again
	jQuery(".keywords").blur(function(){
		if(jQuery(this).val()==""){
			jQuery(this).val(clearMePrevious);
		}
	});

	/* Search Input Box End */

});
/* jQuery End */



/* Search */
function blSubmitForm(){
	document.forms.blAdvancedSearch.s.value+'';''+document.forms.blAdvancedSearch.LocString.value+'';
	document.blAdvancedSearch.submit();
}
/* Search End */



/* Open Window */
function openWindow(url){
	window.location.href=url;
}
function openURL(url){
	window.open(url);
}
/* Open Window End */



/* Popup Window */
function popupWindow(width, height, url, name){
	window.open(url,name,"menubar=no,width="+width+",height="+height+",toolbar=no");
}
function popUp(url) {
	var newwindow;
	newwindow=(window.open(url,null,'height=600,width=525,scrollbars=1',false));
	if(window.focus){newwindow.focus()}
	//newwindow.moveTo(300,150);
}
/* Popup Window End */	
