/*
 * Copyright ¡ò 2002-2010 Yorkbbs.ca All Rights Reserved.
 * http://www.yorkbbs.ca/
 *
 * Date: 2010-8-23 15:46:42
 */
$(function(){
	 var len  = $(".num > li").length;
	 var index = 0;
	 var adTimer;
	 $(".num li").mouseover(function(){
		index  =   $(".num li").index(this);
		showImg(index);
	 }).eq(0).mouseover();
	 $('.FLASH').hover(function(){
			 clearInterval(adTimer);
		 }, function(){
			 adTimer = setInterval(function(){
				showImg(index)
				index++;
				if(index==len){index=0;}
			 }, 3000);
	 }).trigger("mouseleave");
})
function showImg(index){
	var adHeight = $(".FLASH").height();
	$(".slider").stop(true,false).animate({top : -adHeight*index},1000);
	$(".num li").removeClass("on").eq(index).addClass("on");
}


