 $(document).ready(function(){
	$("ul.subnav").hide(); 
	$("li.parent").hover(		
			function() { 
			 
					$(this).children("ul").css('width', ($(this).width()+30) + "px"); 
					var move = $(this).width()/2-$(this).children("ul").width()/2;
					var y = $(this).offset().top +55;
					var x = $(this).offset().left+move;
					$(this).children("ul").css('display', 'inline-block'); 
					$(this).children("ul").css('position', 'absolute'); 
					$(this).children("ul").css('top', y + "px"); 
					$(this).children("ul").css('left', x + "px"); 
					
					$(this).addClass('hov');
					
					if ($(this).children("ul").size() > 0){
		
						$(this).append("<span class=\"cover\"></span>");
						$("span.cover").css("width", $(this).width()-1);
						$("span.cover").css('top', (y-2) + "px"); 
						$("span.cover").css('left', (x-move-1) + "px"); 
						
						$(".last span.cover").css("width", $(this).width()-3);
						$(".first span.cover").css("width", $(this).width()-5);
						$(".first span.cover").css('left', (x-move+3) + "px");
						
						
						
						$(this).children("ul").addClass('display');
					}
				},	
			function() { 
					
 					$(this).children("ul").css('display', 'none'); 
					$(this).removeClass('hov');
					 $("span.cover").remove();
					
					
					});
	 		 
  });
 
 
  