$(document).ready(function(){
		$("#menu a").mouseover(function(){
			$(".drop").css({ display: "none" });
			if($(this).attr("rel") != ""){
				$("#sub_menu").stop();
				$("#sub_menu").removeClass().addClass($(this).attr("rel"));
				$("#"+$(this).attr("rel")).fadeIn();
				$("#sub_menu").animate({ height: "66px" });	
			}
			
		});
		
		$("#menu a").mouseout(function(){
			if($(this).attr("rel") != ""){
				$("#sub_menu").stop();
				$(".drop").css({ display: "none"});
				$("#sub_menu").animate({ height: "0px" });	
			}
			
			$("#sub_menu").mouseover(function(){				
				$("#"+$("#sub_menu").attr("class")).css({ display: "block"});
				$("#sub_menu").stop();
				$("#sub_menu").animate({ height: "66px" });							
			});
		});
		
		
		$("#sub_menu").mouseout(function(){
			$("#sub_menu").stop();							 
			$(".drop").css({ display: "none"});
			$("#sub_menu").animate({ height: "0px" });							
		});
});

// Detecting the size of the window and resize the content div
$(document).ready(function(){ 
	if(navigator.appName.search(/Internet Explorer/i) == -1){
		if($(window).height() > 768)
		{
			$("#content_section").css({ paddingTop: "120px !important" });	
		}
	}
	$('div#logo').pngFix( );
});
