$(document).ready(function() {
	
	if ($.browser.webkit) {
		$("#top").css("left","1px");
		$("html").css("overflow-x","hidden");
	}
	
	$(".srList li").each(function(index, domEle) {
		if (!($(domEle).children(".srPic").length != 0)) {
			$(domEle).addClass("srFullWidth");	
		}
	});
	
	if ($("#hb1").length == 0) {
		$("#wrapperLeft").removeAttr("id").attr("id","wrapperSubLeft");
		$("#wrapperRight").removeAttr("id").attr("id","wrapperSubRight");
		$("#wrapperCenter").removeAttr("id").attr("id","wrapperSubCenter");
	}
	else {
		$("#subTop").removeAttr("id").attr("id","top");
		$("#subContentIn").removeAttr("id").attr("id","contentIn");
		$("#subContent").removeAttr("id").attr("id","content");
	}
	
	if ($(".prodContent").length != 0) {
		$(".miniGallery").children("h3").css("display","none");
	}
	
	if ($("#leftMenu:empty") && $("#hb1").length != 0) {
		$("#leftMenu").remove();	
	}
	
	// CUFON
	
	Cufon.replace(".sf-menu a, #leftMenu h2, #leftMenu ul, #fullWidth h1, #contactDesc", {hover:true});
	
	Cufon.replace(".sf-menu a", { 
		hover: true,
		hoverables: {
			textShadow:'0px 1px #BE3D3F',
			color:'#F2C6C7'
		} 
	});	
	
	// DROP-DOWN MENU
	
	$('ul.sf-menu').superfish({ 
		delay:100, 
		animation:{opacity:'show',height:'show'},
		speed:'fast',
		autoArrows:false,
		dropShadows: false,
		onShow: function() { Cufon.refresh(); },
		onHide: function() { Cufon.refresh(); }
	}); 	
	
});
