// JavaScript Document
var t=0
var time=4000;	
var speed=500; 
var move=556;	
function d(){   
	var s=parseInt($("#pro").width());
	document.getElementById("end").innerHTML=$("#pro span").last().html();
	$("#copy").css({"display": "none"});
	t=t-move; 
	if(t>-s){
		$("#pro").animate({left: t}, speed); 
	}else {
		$("#copy").css({left: "0px",display: "block"});
		$("#copy").animate({left: -move+"px"}, speed); 
		$("#pro").css({left: move+"px"});
		$("#pro").animate({left: "0px"}, speed); 
		t=0;
	}
	setTimeout("d()",time);
	
}

$(function (){
	setTimeout("d()",time);
	var tt=0; 
	var ss=parseInt($("#pro2").width());//内容宽度。
	var rr=parseInt($(".box").width());//最外围窗口宽度。
	var move2=187;	//移动距离。
	var time2="slow"
	//alert(s);
	$("#right").click(function(){ 
		if(ss+tt-move2<rr) {
		}else{
		tt=tt-move2;
		$("#pro2").animate({left: tt}, time2);
		}
	});
	$("#left").click(function(){  
		if(tt>-move2) {
		}else{
		tt=tt+move2;	
		$("#pro2").animate({left: tt}, time2);  
		}
	}); 
	$(".hoverTxt").fadeTo(100,0.70)
	$(".banner").hover(
		function(){
			$(this).children(".border").children(".hoverTxt").animate({top: 0}, 300); 
		},
		function(){
			$(this).children(".border").children(".hoverTxt").animate({top: 24}, 300); 
		}
	)
});



