$(document).ready(function(){
	 
	

	
	$(".sSub").each(function(){
		var newWidth = $(this).width() - 20;
		$(this).prev().css("width",newWidth);
		$(this).css("display","none");
		
		
	});
	 
	$(".sNavWrap").hover(function(){
		 
		if ($(this).children().children().attr("id")=="card_title"){
			$(".sHead #card_title").each(function(){
				$(this).css("-moz-border-radius-topleft","0px");
				$(this).css("-moz-border-radius-bottomleft","0px");
				$(this).css("border-top-left-radius","0px");
				$(this).css("border-bottom-left-radius","0px");
			});
			
			$(this).css("-moz-border-radius-bottomleft","0px");
			$(this).css("border-bottom-left-radius","0px");
		}
		
		if ($(this).children().children().attr("id")=="nou_title"){
			$(".sHead #nou_title").each(function(){
				$(this).css("-moz-border-radius-topright","0px");
				$(this).css("-moz-border-radius-bottomright","0px");
				$(this).css("border-top-right-radius","0px");
				$(this).css("border-bottom-right-radius","0px");
			});
			
			$(this).css("-moz-border-radius-bottomright","0px");
			$(this).css("border-bottom-right-radius","0px");
		}
		
		if ($.browser.msie && $.browser.version.substr(0,1)<8){var minusPX = "34";}
		else{var minusPX = "33";}
		
		var newHeight = (32 - $(this).children().children(".sSub").height() ) - minusPX +"px";
		 
		$(this).animate({
			top: newHeight
		}, 32, function() {
			$(this).children().children(".sSub").show();
		}).stop(true, true);
		$(this).children().children(".sSub").slideDown(32);
	},function(){
		
		if ($(this).children().children().attr("id")=="card_title"){
			 $(".sHead #card_title").each(function(){
				$(this).css("-moz-border-radius-topleft","10px");
				$(this).css("-moz-border-radius-bottomleft","10px");
				$(this).css("border-top-left-radius","10px");
				$(this).css("border-bottom-left-radius","10px");
			});
			
			$(this).css("-moz-border-radius-bottomleft","10px");
			$(this).css("border-bottom-left-radius","10px");
			 
		}
		
		if ($(this).children().children().attr("id")=="nou_title"){
			 $(".sHead #nou_title").each(function(){
				$(this).css("-moz-border-radius-topright","10px");
				$(this).css("-moz-border-radius-bottomright","10px");
				$(this).css("border-top-right-radius","10px");
				$(this).css("border-bottom-right-radius","10px");
			});
			
			$(this).css("-moz-border-radius-bottomright","10px");
			$(this).css("border-bottom-right-radius","10px");
		}
		
      	$(this).animate({
			top: '0px'
		}, 32, function() {
			$(this).children().children(".sSub").hide();
		}).stop(true, true);
		$(this).children().children(".sSub").slideUp(32);
    });
	
	
	
});  
 
