//ͼƭ�����޷�϶�����л� function dy_scroll(wraper,prev,next,img,speed1,or) { var wraper = $(wraper); var prev = $(prev); var next = $(next); var img = $(img).find('ul'); var w = img.find('li').width(); var w_len = $(img).find('ul li').length; var s = speed1; next.css('opacity',0.5); prev.css('opacity',0.5); next.mouseenter(function() { $(this).css('opacity',1) }).mouseleave(function() { $(this).css('opacity',0.5) }); prev.mouseenter(function() { $(this).css('opacity',1) }).mouseleave(function() { $(this).css('opacity',0.5) }); $(img).find("ul").css("width",w*w_len) next.click(function() { img.stop().animate({'margin-left':-w},function() { img.find('li').eq(0).appendto(img); img.css({'margin-left':0}); }); }); prev.click(function() { img.find('li:last').prependto(img); img.css({'margin-left':-w}); img.stop().animate({'margin-left':0}); }); if (or == true) { ad = setinterval(function() { next.click();},s*2000); wraper.hover(function(){clearinterval(ad);},function(){ad = setinterval(function() { next.click();},s*2000);}); } } dy_scroll('.gsggtxt','.prev','.next','.gsgglist',5,true); //dy_scroll('.gqfcimg','.prev1','.next1','.gqfclist',3,true); // trueϊ�զ����ţ����ӵ˲�����false��ĭ�ϲ��զ�