|
|
|
/*! http://responsive-slides.viljamis.com v1.21 by @viljamis */
|
|
|
|
(function(c,y,r){c.fn.responsiveSlides=function(l){var b=c.extend({auto:!0,pagination:!1,nav:!1,prevText:"Previous",nextText:"Next",fade:1E3,maxwidth:"none",speed:4E3},l);return this.each(function(){r++;var g=c(this),h=0,e=g.children(),s=e.size(),t=parseFloat(b.fade),d="rslides"+r,m="rslides "+d,f=d+"_on",u=d+"_s",n=c('<ul class="rslides_tabs '+(d+"_tabs")+'" />'),v={"float":"left",position:"relative"},z={"float":"none",position:"absolute"},i=function(a){e.stop().fadeOut(t,function(){c(this).removeClass(f).css(z)}).eq(a).fadeIn(t,
|
|
|
|
function(){c(this).addClass(f).css(v);h=a})};if(1<e.size()){e.each(function(a){this.id=u+a});g.css("max-width",b.maxwidth).addClass(m);e.hide().eq(0).addClass(f).css(v).show();if(!0===b.pagination){var j=[];e.each(function(a){a+=1;j.push("<li>");j.push('<a href="#" class="'+u+a+'">'+a+"</a>");j.push("</li>")});n.append(j.join(""));var o=n.find("a");g.after(n)}var k=function(a){o.closest("li").removeClass("rslides_here").eq(a).addClass("rslides_here")};if(!0===b.auto){var p,w;p=function(){w=setInterval(function(){var a=
|
|
|
|
h+1<s?h+1:0;!0===b.pagination&&k(a);i(a)},parseFloat(b.speed))};p()}var q=function(){!0===b.auto&&(clearInterval(w),p())};!0===b.pagination&&o.on("click",function(a){a.preventDefault();q();a=o.index(this);if(h!==a){if(c("."+f+":animated").length)return!1;k(a);i(a)}}).eq(0).closest("li").addClass("rslides_here")}!0===b.nav&&(g.after('<a href="#" title="'+b.prevText+'" class="'+d+'_nav prev">'+b.prevText+'</a><a href="#" title="'+b.nextText+'" class="'+d+'_nav next">'+b.nextText+"</a>"),m=c("."+d+"_nav.prev"),
|
|
|
|
d=c("."+d+"_nav.next"),m.on("click",function(a){a.preventDefault();a=e.index(c("."+f))-1;if(c("."+f+":animated").length)return!1;q();i(a);!0===b.pagination&&k(a)}),d.on("click",function(a){a.preventDefault();a=e.index(c("."+f))+1<s?h+1:0;if(c("."+f+":animated").length)return!1;q();i(a);!0===b.pagination&&k(a)}));if("undefined"===typeof document.body.style.maxWidth&&l&&l.maxwidth){var x=function(){g.css("width","100%");g.width()>b.maxwidth&&g.css("width",b.maxwidth)};x();c(y).on("resize",function(){x()})}})}})(jQuery,
|
|
|
|
this,0);
|