<!-------------------------------¹ã¸æ---------------------------------->

 if(srcimg.length!=1)
	 {
		for(var i=1;i<=srcimg.length;i++)
		 { 
			$('.num').append("<li>"+i+"</li>");
		  } 
	 }
	 
jQuery.fn.loadthumb = function(options) {
	options = $.extend({
		 srcimg : "",altimg:"",titleimg:"",hrefa: ""
	},options);
	var _self = this;
	_self.hide();
	var img = new Image();
	$(img).load(function(){
		_self.attr("src", options.srcimg); 
		_self.attr("alt",options.altimg);
	    _self.attr("title",options.titleimg);
		_self.fadeIn("slow");			
	}).attr("src", options.srcimg);
	//.atte("src",options.src)load 	 
	_self.parent().attr("href",options.hrefa);
	return _self;
}
 	
$(document).ready(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();	
	 //.
	  if(len!=0)
	 {
		 $('.ad').hover(function(){
				 clearInterval(adTimer);
			 },function(){
				 adTimer = setInterval(function(){
					index++;
					if(index==len){index=0;}
					showImg(index);				
				  } , 5000);
		 }).trigger("mouseleave");
	 }
});
 
function showImg(index){
		$(".ad img").loadthumb({srcimg:srcimg[index],altimg:altimg[index],titleimg:titleimg[index],hrefa:hrefa[index] });
		$(".num li").removeClass("on").eq(index).addClass("on");
}
<!---------------------------------------------------------------->
