// JavaScript Document
var t=0
var time=4000;	
var speed=800; 
var move=510;	
function d(){   
	var s=parseInt($("#pro").width());
	document.getElementById("end").innerHTML=$("#pro span").last().html();
	//alert($("#end").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(){
	$(".lightBox a").colorbox();
	setTimeout("d()",time);
	var allIndex=0;
	var allNum=$(".left a").length;
	var menuArray=$(".left a");
	var conArray=$(".right .con");
	$(conArray[0]).css("display","block");
	$(".left a").click(function(){
		allIndex=$(this).index();
		for(var i=0; i<allNum; i++){
			if(i==allIndex){
				$(conArray[allIndex]).css("display","block");
				$(menuArray[allIndex]).addClass("hover");
			}else{
				$(conArray[i]).css("display","none");
				$(menuArray[i]).removeClass("hover");
			}
		}
	});
})



