$(document).ready(function() {
	$("div.right-content > p > img").unwrap();
	
	$(this).find("ul#nav > li").each(function () {  
										
		var maxSubNavWidth = 0;
		var maxSubSubNavWidth = 0;
		
		$(this).children("ul.sub-nav").css("display", "block");
		
		$(this).find("ul.sub-sub-nav").css("display", "block");
		
		//alert($(this).width());
		
		$(this).find("ul.sub-nav > li > a").each(function () {
	
			if($(this).width() > maxSubNavWidth)
			{
				maxSubNavWidth = $(this).width();
			}
			
      	});
		
		
		$(this).find("ul.sub-nav > li > ul.sub-sub-nav > li > a").each(function () {
			
			if($(this).width() > maxSubSubNavWidth)
			{
				maxSubSubNavWidth = $(this).width();
			}
			
      	});
		
		
		$(this).find("ul.sub-nav > li > a").width(maxSubNavWidth);
		
		$(this).find("ul.sub-sub-nav > li > a").width(maxSubSubNavWidth);
		
		$(this).children("ul.sub-nav").css("display", "none");
		
		$(this).find("ul.sub-sub-nav").css("display", "none");
		
	
	}); 
	
	
	
	
	
	
	$("ul#nav > li").mouseenter(function() {  
										
		$(this).children("ul.sub-nav").css("display", "block");
		
		$(this).children("ul#nav > li > a").addClass("hover");							
	});
	 
	
	//When mouse is removed  
	$("ul#nav > li").mouseleave(function(){
									  
		$(this).children("ul.sub-nav").css("display", "none");
		
		$(this).children("ul#nav > li > a").removeClass("hover");
		 //$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'})  
	});  
	
	
	
	$("ul.sub-nav > li").mouseenter(function(){  
		
		$(this).children("ul.sub-sub-nav").css("display", "block");
		
		
		$(this).children("ul.sub-nav > li > a").addClass("hover");
		
		//$(this).stop().animate({height:'150px'},{queue:false, duration:600, easing: 'easeOutBounce'})  
	});  
	
	//When mouse is removed  
	$("ul.sub-nav > li").mouseleave(function(){
									  
		$(this).children("ul.sub-sub-nav").css("display", "none");
		
		$(this).children("ul.sub-nav > li > a").removeClass("hover");
		 //$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'})  
	});
});



















