$(document).ready(function() {
	
	//On Hover Over 'sub' item
	function subHover(){
		$(this).find("#navDrop").stop().fadeTo('fast', 1).show(); //Find sub and fade it in
		
		$(this).find("#navDrop a").hover(function() { //On hover...
			$(this).addClass('dropItemHover');
		} , function() { //on hover out...
			$(this).removeClass('dropItemHover');
		});
	}
	//On Hover Out
	function subHoverOut(){
		$(this).find("#navDrop a").hover
		$(this).find("#navDrop").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	}	
	
	/**************************************************/
	
	//Set custom HoverIntent configurations for 'sub' bg-color change
	var configSubHover = {
		 sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)
		 interval: 0, // number = milliseconds for onMouseOver polling interval
		 over: subHover, // function = onMouseOver callback (REQUIRED)
		 timeout: 300, // number = milliseconds delay before onMouseOut
		 out: subHoverOut // function = onMouseOut callback (REQUIRED)
	};
	
	$("#e-commerce").hoverIntent(configSubHover); //Trigger Hover intent with custom configurations

});
