$(function(){
	var movemen;
	if($i('movementresult')){
		new simplescroll('movementresult', {start_delay:0, speed: 40, delay:2000, direction:1, scrollItemCount:1, movecount:1});
	}
	$(".subnav ul").each(function(){if($(this).height()>36) $(this).css("height","36px")})
	$("#movementresult strong").each(function(){if($(this).width() > 49) $(this).css("width","49px")})
	$(".hotbrand dl").eq(0).addClass("mouseover");
	$(".hotbrand dl").each(function(i){
		$(this).find("dd").addClass("n_"+(i+1));
		$(this).find("sub").html(i+1);
	});
	$(".hotbrand dl").mouseover(function(){
		$(".hotbrand dl").eq(0).removeClass("mouseover");
		$(this).addClass("mouseover");
	});
	$(".hotbrand dl").mouseout(function(){
		$(this).removeClass("mouseover");
		$(".hotbrand dl").eq(0).addClass("mouseover");
	});
	$(".superstock dl").mouseover(function(){
		$(this).addClass("mouseover");
	});
	$(".superstock dl").mouseout(function(){
		$(this).removeClass("mouseover");
	});
	$(".movement li").mouseover(function(){
		$(this).addClass("mouseover");
	});
	$(".movement li").mouseout(function(){
		$(this).removeClass("mouseover");
	});
	$(".consumer dl").hover(function(){
		$(this).addClass("thison");
	},function(){
		$(this).removeClass("thison");
	});
	if($("#recommendbrand li").size() == 18){
		$("#recommendbrand li:lt(9)").wrapAll(document.createElement("div"));
		$("#recommendbrand li:gt(8)").wrapAll(document.createElement("div"));
		$("#recommendbrand div").eq(0).css({"z-index":"10"});
		setInterval(fadeanimate,6000);
	}
	if(document.documentElement.clientWidth < 1200){$("#pk_congratulate").hide()}
	$("#pk_congratulate").css({position:"absolute",top:"115px",left:"50%",zIndex:"0",width:"1200px",marginLeft:"-600px"});
	$("#pk_congratulate div").html($("#pk_congratulate div").html()+"<span class='ad_closed' style='display:block;padding-left:14px;width:80px;height:15px;line-height:15px;cursor:pointer;background:url(http://i3.dukuai.com/ui/style/09/ico/f02412.gif) no-repeat 0 2px;overflow:hidden;' title='¹Ø±Õ' onclick='$(this).parent().hide()'>¹Ø±Õ</span>")
	$("#pk_congratulate div").eq(0).css("float","left");
	$("#pk_congratulate div").eq(0).css("float","right");
	$(window).resize(function(){
		if(document.documentElement.clientWidth < 1200){$("#pk_congratulate").hide()}
		else{$("#pk_congratulate").show()}
	});
})
function fadeanimate(){
	var d_one = $("#recommendbrand div").eq(0);
	var d_two = $("#recommendbrand div").eq(1);
	if(d_one.css("z-index") > d_two.css("z-index")){
		d_one.fadeTo(2000,0,function(){d_two.css("z-index","10");d_one.css({"z-index":"1","opacity":"1"});});
	}else{
		d_two.fadeTo(2000,0,function(){d_one.css("z-index","10");d_two.css({"z-index":"1","opacity":"1"})});
	}
}
