
// JavaScript Document
var RotatePlay = {}
var iIndex=0;
var iMaxCount=-1;
var second=5000;
var handel=null;
RotatePlay.BindHandel=function(){
	iMaxCount=$(".hotwrapper li").length
	$(".ShowImg .In").hide();
	$(".ShowImg .In").eq(0).show();
	$(".hotwrapper li").bind({
		mouseover:function(){
			iIndex =$(".hotwrapper li").index($(this));
			RotatePlay.Stop();
			RotatePlay.Show();
			},
		mouseout:function(){
			RotatePlay.Play();
			}
		})
	}
RotatePlay.Play=function(){
handel=setInterval(AutoShow,second);
	}
RotatePlay.Stop=function(){
	clearInterval(handel)
	}
RotatePlay.Show=function(){
	$(".ShowImg .In").hide();
	$(".ShowImg .In").eq(iIndex).fadeIn("slow");
	$(".hotwrapper li").removeClass("on")
	$(".hotwrapper li").eq(iIndex).addClass("on")
	}
function AutoShow()
{

	if(iIndex+1==iMaxCount)
	{
		iIndex=0;
	}
	else
	{
		iIndex+=1;
	}
	RotatePlay.Show();
}

$(document).ready(function(){
RotatePlay.BindHandel();
RotatePlay.Play();

}); 


