$(function(){
  var i=1,turnbigpic,turnsmallpic
  $.fn.fnturnpic=function()
  {
	if(i<10){i++;}else{i=1;}
	$(this).turnimg(i,300)
  }
  $.fn.turnimg=function(i,time){
	var j=1,px="-318",bigstr;
	this.each(function()
	{ 
	  if(i==j)
	  {
		if($(this).html()=="")
		{
		  bigstr='<a href="'+$(this).attr("href")+'">\
					<img src="'+$(this).attr("src")+'" title="'+$(this).attr("title")+'"/>\
				  </a>\
				  <h3><a href="'+$(this).attr("href")+'">'+$(this).attr("title")+'</a></h3>\
				  <p>±êÇ©£º'+$(this).attr("area")+'</p>\
				  <div class="bg"></div>'
		  $(this).html(bigstr);
		}
		$('.focusbox .scrollimg .scrollimg_div').animate({top:px*i+318+"px"},500);
	  }
	  j++
	});
	j=1
	$('.focusbox .scrollimg_tigger li a').each(function()
	{ 
	  if(i==j)
	  {
		$('.focusbox .scrollimg_tigger li a').attr("class","");
		$(this).attr("class","on");
	  }
	  j++
	});
  }
  $('.focusbox .scrollimg_tigger li a').mouseover(function()
  {
	clearTimeout(turnsmallpic);clearTimeout(turnbigpic);i=$(this).attr("rel")
	turnsmallpic=setTimeout("$('.focusbox .scrollimg .scrollimg_div').turnimg("+i+",150)",300)
  });
  $(".scrollimg2_tigger ul li a img").mouseout(function()
  {
	clearTimeout(turnbigpic)
	turnbigpic=setInterval("$('.focusbox .scrollimg .scrollimg_div').fnturnpic()",3000);
  });
  turnbigpic=setInterval("$('.focusbox .scrollimg .scrollimg_div').fnturnpic()",3000);
});