jQuery(function($){
	var index = 0;
	//ı	
	$("#play span").hover(function(){
		if(MyTime){
			clearInterval(MyTime);
		}
		index  =  $("#play span").index(this);
		MyTime = setTimeout(function(){
		ChangeImages(index);
		$('#pic').stop();
		} , 300);

	}, function(){
		clearInterval(MyTime);
		MyTime = setInterval(function(){
		index++;
		if(index>60){index=0;}
		ChangeImages(index);
		} , 8000);
	});
	// ֹͣʼ.
	 $('.stop').hover(function(){
			  if(MyTime){
				 clearInterval(MyTime);
			  }
	 },function(){
				MyTime = setInterval(function(){
				index++;
				if(index>60){index=0;}
				ChangeImages(index);
			  } , 8000);
	 });
	//ҳť.
	$('#next').click(function(){
				index++;
				if(index>60){index=0;}								
				ChangeImages(index);
				})
	$('#pre').click(function(){
				index--;
				if(index<0){index=60;}								
				ChangeImages(index);
				})
	 
	//Զ
	var MyTime = setInterval(function(){
	    index++;
		ChangeImages(index);
		if(index==60){index=-1;}
	} , 8000);
});
function ChangeImages(i) {
$('#play > span').removeClass("current").eq(i).addClass("current").blur();
$("#msg li").hide().eq(i).fadeIn('normal');
$("#pic img").hide().eq(i).fadeIn('slow');
}
