$(function() {
	var config = {    
	     sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
	     interval: 100, // number = milliseconds for onMouseOver polling interval    
	     over: showSub, // function = onMouseOver callback (REQUIRED)    
	     timeout: 500, // number = milliseconds delay before onMouseOut    
	     out: hideSub // function = onMouseOut callback (REQUIRED)    
	};
	$('.sub').css({overflow:"hidden", display: "none", visibility: "hidden"});
	$("#nav>li").hoverIntent(config);
	
	function showSub() {
		$(this).find(".sub").css({visibility: "visible"}).show("normal");
	}
	
	function hideSub() {
		$(this).find(".sub").hide("normal", function(){
			$(this).css({visibility: "hidden"});
		});
	}
	
});
