//http://www.search-this.com/examples/drop-down-menu/

$(document).ready(function(){


	//http://cherne.net/brian/resources/jquery.hoverIntent.html
	var config = {    
		 sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 100, // number = milliseconds for onMouseOver polling interval    
		 over: showNav, // function = onMouseOver callback (REQUIRED)    
		 timeout: 250, // number = milliseconds delay before onMouseOut. should be the same as .animate 
		 out: hideNav // function = onMouseOut callback (REQUIRED)    
	};
	
		  function showNav() {
			$('.menu-first', this).addClass('slide-down'); 
			$('.menu-first .topNavLink', this).addClass('topNavLinkOver'); 
			//$('.menu-first .topNavLink', this).removeClass('navOn'); 
			$('.down-list', this).animate({"height": "toggle", "opacity": "toggle"}, 250);
		   // $('.down-list', this).slideDown(100);
		   // $('.down-list', this).fadeIn(250);
		  } 
	
		  function hideNav() {
			obj = this;
			$('.down-list', this).slideUp(1, function(){ $('.menu-first', obj).removeClass('slide-down'); });
			$('.menu-first .topNavLink', this).removeClass('topNavLinkOver'); 
			//$(thisPage).addClass('navOn');
		  }
	
		$('.dropdown-menu').hoverIntent(config);
		
});