$(function(){

	function megaHoverOver(){
		$(this).find(".sub").stop().fadeTo('fast', 0.8).show();
		
	}
	
	function megaHoverOut(){ 
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  $(this).hide(); 
	  });

	}

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

	$("ul#nav li .sub").css({'opacity':'0'});
	$("ul#nav li").hoverIntent(config);

	$(".nav_line1").each(function(){
		$(".sub" , this).hide();	
		$(this).hover(function(){
				$(".nav_name" , this).addClass("andon");	
			},
			function(){
				$(".nav_name" , this).removeClass("andon");
		});		
	});	
	$(".nav_line2").each(function(){
		$(this).hover(function(){
				$(".nav_name" , this).addClass("andon");
			},
			function(){
				$(".nav_name" , this).removeClass("andon");
		});	
	});	
})
