$(document).ready(function(){

$("#topNav a").hover(
	function(){	  
	if($(this).attr("rel")=='sub'){
		
		var attri = $(this).attr('id');
		attrim = 'm'+attri;
		$("#"+attrim).show();
		$("#"+attri).css({"background-color":"#373d4d", "color":"#ffffff"})


		
	}
	//$("#lservices").css({"background-color":"#373d4d", "color":"#ffffff"})
	
	; 

},
	function(){	 
	if($(this).attr("rel")=='sub'){
		var attri = $(this).attr('id');
		attrim = 'm'+attri;

		$("#"+attrim).hide();

	$("#"+attri).css({"background-color":"#f9faf5", "color":"#3a3a3c"})
	}

}

)
$(".megamenu").hover(
	
		function(){	  
	
	
	 $(this).show();
	 var attri = $(this).attr('id');
		attrim = attri.substring(1);
	
	$("#"+attrim).css({"background-color":"#373d4d", "color":"#ffffff"}); 

},
	function(){	 
	$(".megamenu").hide();
	var attri = $(this).attr('id');
		attrim = attri.substring(1);
	$("#"+attrim).css({"background-color":"#f9faf5", "color":"#3a3a3c"})

}


)


Cufon.replace('h1,.ntitle');
});
