(function(e){e.fn.Slide=function(t){var n=e.extend({},e.fn.Slide.deflunt,t),r=1,i=e("."+n.claNav+" li",e(this)),s=e("."+n.claNav+" .next",e(this)),o=e("."+n.claNav+" .prev",e(this)),u=e("."+n.claCon,e(this)),a=u.children().size(),f=u.children().first().height(),l=u.children().first().width(),c,h;return n.effect=="scroolY"||n.effect=="scroolTxt"?h=f:n.effect=="scroolX"||n.effect=="scroolLoop"?(u.css("width",a*l),h=l):n.effect=="fade"&&u.children().first().css("z-index","1"),this.each(function(){var t=e(this),f=function(){e.fn.Slide.effect[n.effect](u,i,r,h,n),r++,r*n.steps>=a&&(r=0)};s.click(function(s){e.fn.Slide.effectLoop.scroolLeft(u,i,r,h,n,function(){for(var e=0;e<n.steps;e++)u.find("div:first",t).appendTo(u);u.css({left:"0"})}),s.preventDefault()}),o.click(function(t){for(var s=0;s<n.steps;s++)u.find("div:last").prependTo(u);u.css({left:-r*n.steps*l}),e.fn.Slide.effectLoop.scroolRight(u,i,r,h,n),t.preventDefault()}),n.autoPlay&&(c=setInterval(f,n.timer),u.hover(function(){c&&clearInterval(c)},function(){c&&clearInterval(c),c=setInterval(f,n.timer)})),i.hover(function(){c&&clearInterval(c),r=i.index(this),window.setTimeout(function(){e.fn.Slide.effect[n.effect](u,i,r,h,n)},200)},function(){c&&clearInterval(c),c=setInterval(f,n.timer)})})},e.fn.Slide.deflunt={effect:"scroolY",autoPlay:!0,speed:"normal",timer:1e3,defIndex:0,claNav:"JQ-slide-nav",claCon:"JQ-slide-content",steps:1},e.fn.Slide.effectLoop={scroolLeft:function(e,t,n,r,i,s){e.animate({left:-n*i.steps*r},i.speed,s),t&&t.eq(n).addClass("current").siblings().removeClass("current")},scroolRight:function(e,t,n,r,i,s){e.stop().animate({left:0},i.speed,s)}},e.fn.Slide.effect={fade:function(e,t,n,r,i){e.children().eq(n).stop().animate({opacity:1},i.speed).css({"z-index":"1"}).siblings().animate({opacity:0},i.speed).css({"z-index":"0"}),t.eq(n).addClass("current").siblings().removeClass("current")},scroolTxt:function(e,t,n,r,i){e.animate({"margin-top":-i.steps*r},i.speed,function(){for(var t=0;t<i.steps;t++)e.find("div:first").appendTo(e);e.css({"margin-top":"0"})})},scroolX:function(e,t,n,r,i,s){e.stop().animate({left:-n*i.steps*r},i.speed,s),t&&(t.eq(n).addClass("current").siblings().removeClass("current"),typeof Q.pages.focuscallback=="function"&&Q.pages.focuscallback(n))},scroolY:function(e,t,n,r,i){e.stop().animate({top:-n*i.steps*r},i.speed),t&&t.eq(n).addClass("current").siblings().removeClass("current")}}})(jQuery);