// JavaScript Document
$(function(){
 
	
	function imgscroll(){
	$("#tebiecehua .img_scroll").animate({left:"-"+tuwen_scroll.childWidth+"px"}, "slow",function(){
		$("#tebiecehua .img_scroll .tuwen:first").appendTo($("#tebiecehua .img_scroll"));
		$("#tebiecehua .img_scroll").css("left",0);
		});
	}

	var tuwen_scroll={};
	tuwen_scroll.child=$("#tebiecehua .img_scroll .tuwen").length;
	tuwen_scroll.childWidth=169;
	tuwen_scroll.scroll=$("#tebiecehua .img_scroll ");
	tuwen_scroll.scroll.width(tuwen_scroll.childWidth*tuwen_scroll.child);

		
	tuwen_scroll.timer=setInterval(function(){imgscroll()},3000);
	 
	 $("#tebiecehua .prev_btn a,#tebiecehua .next_btn a").focus(function(){$(this).blur();})
	 
	 $("#tebiecehua").hover(function(){
			clearInterval(tuwen_scroll.timer);
	 },function(){
			tuwen_scroll.timer=setInterval(function(){imgscroll()},3000);
	 })
	
	$("#tebiecehua .prev_btn a").click(function(){
		if($("#tebiecehua .img_scroll:animated").length==0){
			imgscroll();
		}
		return false;
		});
	$("#tebiecehua .next_btn a").click(function(){
		if($("#tebiecehua .img_scroll:animated").length==0){
			$("#tebiecehua .img_scroll").css("left","-"+tuwen_scroll.childWidth+"px");																				
			$("#tebiecehua .img_scroll .tuwen:last").prependTo($("#tebiecehua .img_scroll"));																
			$("#tebiecehua .img_scroll").animate({left: "0"}, "slow",function(){});
		}
		return false;					
	});



});


var imporatant_timer,imporatant_scroll;
$(function(){
$("#important-sign").hover(function(){clearInterval(imporatant_timer)				
},function(){imporatant_scroll()})
imporatant_scroll=function(){
imporatant_timer=setInterval(function(){
	$("#important-sign ul").animate({top:"-24px"},{duration:300,complete:function(){
	$("li:first",this).appendTo(this)
	$(this).css("top","0");
	}})
	},3000);
}

imporatant_scroll();
});


// JavaScript Document
$(function(){
 
	
	function imgscroll(){
	$("#shipin .img_scroll").animate({left:"-"+tuwen_scroll.childWidth+"px"}, "slow",function(){
		$("#shipin .img_scroll .tuwen:first").appendTo($("#shipin .img_scroll"));
		$("#shipin .img_scroll").css("left",0);
		});
	}

	var tuwen_scroll={};
	tuwen_scroll.child=$("#shipin .img_scroll .tuwen").length;
	tuwen_scroll.childWidth=142;
	tuwen_scroll.scroll=$("#shipin .img_scroll ");
	tuwen_scroll.scroll.width(tuwen_scroll.childWidth*tuwen_scroll.child);

		
	tuwen_scroll.timer=setInterval(function(){imgscroll()},3000);
	 
	 $("#shipin .prev_btn a,#shipin .next_btn a").focus(function(){$(this).blur();})
	 
	 $("#shipin").hover(function(){
			clearInterval(tuwen_scroll.timer);
	 },function(){
			tuwen_scroll.timer=setInterval(function(){imgscroll()},3000);
	 })
	
	$("#shipin .prev_btn a").click(function(){
		if($("#shipin .img_scroll:animated").length==0){
			imgscroll();
		}
		return false;
		});
	$("#shipin .next_btn a").click(function(){
		if($("#shipin .img_scroll:animated").length==0){
			$("#shipin .img_scroll").css("left","-"+tuwen_scroll.childWidth+"px");																				
			$("#shipin .img_scroll .tuwen:last").prependTo($("#shipin .img_scroll"));																
			$("#shipin .img_scroll").animate({left: "0"}, "slow",function(){});
		}
		return false;					
	});



});

// JavaScript Document
$(function(){
 
	
	function imgscroll2(){
	$("#chanpin .img_scroll").animate({top:"-"+nr_scroll.childHeight+"px"}, "slow",function(){
		$("#chanpin .img_scroll .nr:first").appendTo($("#chanpin .img_scroll"));
		$("#chanpin .img_scroll").css("top",0);
		});
	}

	var nr_scroll={};
	nr_scroll.child=$("#chanpin .img_scroll .nr").length;
	nr_scroll.childHeight=65;
	nr_scroll.scroll=$("#chanpin .img_scroll ");
	nr_scroll.scroll.height(nr_scroll.childHeight*nr_scroll.child);

		
	nr_scroll.timer=setInterval(function(){imgscroll2()},3000);
	 
	 $("#chanpin .prev_btn a,#chanpin .next_btn a").focus(function(){$(this).blur();})
	 
	 $("#chanpin").hover(function(){
			clearInterval(nr_scroll.timer);
	 },function(){
			nr_scroll.timer=setInterval(function(){imgscroll2()},3000);
	 })
	
	$("#chanpin .prev_btn a").click(function(){
		if($("#chanpin .img_scroll:animated").length==0){
			imgscroll2();
		}
		return false;
		});
	$("#chanpin .next_btn a").click(function(){
		if($("#chanpin .img_scroll:animated").length==0){
			$("#chanpin .img_scroll").css("top","-"+nr_scroll.childHeight+"px");																				
			$("#chanpin .img_scroll .nr:last").prependTo($("#chanpin .img_scroll"));																
			$("#chanpin .img_scroll").animate({top: "0"}, "slow",function(){});
		}
		return false;					
	});



});

