var timer ; var thisimg = 0; var maximg = 2; var imgsize = 1000; function imgrotation(){ //$('.imagelist').fadeToggle(3000, "easeInOutQuad"); nextimg = getnextimg(thisimg); imgsize = nextimg * -1000; $('.imagelist').animate({left:imgsize},{duration:500,easing:"linear"}); thisimg = nextimg; } function getnextimg(ix) { if(ix + 1 > maximg) return 0; return ix+1; } $(function(){ timer = setInterval(imgrotation, 3000); $("#bgmain_box img").mouseover(function(){ //alert("aaa"); clearInterval(timer); }); $("#bgmain_box img").mouseout(function(){ //alert("aaa"); timer = setInterval(imgrotation, 3000); }); $("#header_menu a").click(function(){ $(this).blur(); }); //When mouse rolls over $("#header_menu .list_9").mouseover(function(){ $(this).stop().animate({height:'380px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_8").mouseover(function(){ $(this).stop().animate({height:'342px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_7").mouseover(function(){ $(this).stop().animate({height:'304px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_6").mouseover(function(){ $(this).stop().animate({height:'266px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_5").mouseover(function(){ $(this).stop().animate({height:'228px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_4").mouseover(function(){ $(this).stop().animate({height:'190px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_3").mouseover(function(){ $(this).stop().animate({height:'150px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse rolls over $("#header_menu .list_2").mouseover(function(){ $(this).stop().animate({height:'114px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); $("#header_menu .list_1").mouseover(function(){ $(this).stop().animate({height:'76px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); //When mouse is removed $("#header_menu li").mouseout(function(){ $(this).stop().animate({height:'38px'},{queue:false, duration:600, easing: 'easeOutBounce'}) }); });