﻿    function showImg(contaner,i){
		$(contaner+" .item").eq(i).fadeIn(0).siblings(".item").fadeOut(0);
		if($(contaner+" .tabs>.title>li").length>0)
 		$(contaner+" .tabs>.title>li").eq(i).fadeIn(0).siblings("li").fadeOut(0);
 		$(contaner+" .tabs span").eq(i).addClass("hov").siblings().removeClass("hov");
	}
    function settab(contaner,showtime,settime,items)
    {
    	$(contaner+" .tabs span:lt(5)").mouseover(function () {       
            var showtime = $(contaner+" .tabs span:lt(5)").index(this);
            showImg(contaner,showtime);
        });
        settime = setInterval(function () {
     	   	showImg(contaner,showtime)
            showtime++;
            if (showtime == items) { showtime = 0; }
        }, 3000);
     	$(contaner).hover(function () {
            if (settime) clearInterval(settime);
        	}, function () {
            settime = setInterval(function () {
         	   this.showImg(contaner,showtime)
                showtime++;
                if (showtime == items) { showtime = 0; }
            }, 3000);
        });
    }
     
     $(function () {
         var settime1;
         var settime2;
         settab(".img_scroll", 0, settime1, 5);
  
     })  

