$(document).ready(function(){
	
	/*
	 * ok this isn't nav... it's the javascript for the share button rollover
	 */	
	$('#share_img').hover(function() {
		$(this).attr('src', '/img/btns/share_btn_o.gif');
	}, function() {
		$(this).attr('src', '/img/btns/share_btn_n.gif');
	});

	
	/*
	 * remove the no_js class so the dropdowns won't be displayed via CSS:
	 */
	$('.dropMenu').css("display","none");
	$('#main_nav li').removeClass("no_js");	
	
	var hoverheaderconfig = {    
	     sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
	     interval: 30, // number = milliseconds for onMouseOver polling interval    
	     over: topNavOpen, // function = onMouseOver callback (REQUIRED)    
	     timeout: 200, // number = milliseconds delay before onMouseOut    
	     out: topNavClose // function = onMouseOut callback (REQUIRED)    
	};

	$('#header').hoverIntent(hoverheaderconfig);

	function topNavOpen() {
		$('#top_nav_dropdown').slideDown(150);
	}
	
	function topNavClose() {
		$('#top_nav_dropdown').slideUp(100);
	}

	var hoverconfig = {    
	     sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
	     interval: 30, // number = milliseconds for onMouseOver polling interval    
	     over: openMenu, // function = onMouseOver callback (REQUIRED)    
	     timeout: 100, // number = milliseconds delay before onMouseOut    
	     out: closeMenu // function = onMouseOut callback (REQUIRED)    
	};

	$('.subnavWrap').hoverIntent( hoverconfig );

	function openMenu() {
		$(this).children('.dropMenu').slideDown(150);
	//	$(this).children('.tier_arrow').hide();
	}
	
	function closeMenu() {
	//	$(this).children('.tier_arrow').show();
		$(this).children('.dropMenu').slideUp(50);
	}


	
});