Matthew McFarling
12 years ago
2 changed files with 2 additions and 8 deletions
@ -1,8 +1,2 @@
|
||||
/*! http://responsiveslides.com v1.54 by @viljamis */ |
||||
(function(c,I,B){c.fn.responsiveSlides=function(l){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},l);return this.each(function(){B++;var f=c(this),s,r,t,m,p,q,n=0,e=f.children(),C=e.size(),h=parseFloat(a.speed),D=parseFloat(a.timeout),u=parseFloat(a.maxwidth),g=a.namespace,d=g+B,E=g+"_nav "+d+"_nav",v=g+"_here",j=d+"_on", |
||||
w=d+"_s",k=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),x={"float":"left",position:"relative",opacity:1,zIndex:2},y={"float":"none",position:"absolute",opacity:0,zIndex:1},F=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;s=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<s.length;c++)if("string"===typeof b[s[c]+a])return!0;return!1}(),z=function(b){a.before(b);F?(e.removeClass(j).css(y).eq(b).addClass(j).css(x), |
||||
n=b,setTimeout(function(){a.after(b)},h)):e.stop().fadeOut(h,function(){c(this).removeClass(j).css(y).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(j).css(x);a.after(b);n=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-0.5}),f.empty().append(e));e.each(function(a){this.id=w+a});f.addClass(g+" "+d);l&&l.maxwidth&&f.css("max-width",u);e.hide().css(y).eq(0).addClass(j).css(x).show();F&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+ |
||||
h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.size()){if(D<h+100)return;if(a.pager&&!a.manualControls){var A=[];e.each(function(a){a+=1;A+="<li><a href='#' class='"+w+a+"'>"+a+"</a></li>"});k.append(A);l.navContainer?c(a.navContainer).append(k):f.after(k)}a.manualControls&&(k=c(a.manualControls),k.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&k.find("li").each(function(a){c(this).addClass(w+(a+1))});if(a.pager||a.manualControls)q= |
||||
k.find("a"),r=function(a){q.closest("li").removeClass(v).eq(a).addClass(v)};a.auto&&(t=function(){p=setInterval(function(){e.stop(!0,!0);var b=n+1<C?n+1:0;(a.pager||a.manualControls)&&r(b);z(b)},D)},t());m=function(){a.auto&&(clearInterval(p),t())};a.pause&&f.hover(function(){clearInterval(p)},function(){m()});if(a.pager||a.manualControls)q.bind("click",function(b){b.preventDefault();a.pauseControls||m();b=q.index(this);n===b||c("."+j).queue("fx").length||(r(b),z(b))}).eq(0).closest("li").addClass(v), |
||||
a.pauseControls&&q.hover(function(){clearInterval(p)},function(){m()});if(a.nav){g="<a href='#' class='"+E+" prev'>"+a.prevText+"</a><a href='#' class='"+E+" next'>"+a.nextText+"</a>";l.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),G=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+j);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<C?n+1:0;z(c(this)[0]===G[0]?b:d);if(a.pager||a.manualControls)r(c(this)[0]===G[0]?b:d);a.pauseControls||m()}}); |
||||
a.pauseControls&&d.hover(function(){clearInterval(p)},function(){m()})}}if("undefined"===typeof document.body.style.maxWidth&&l.maxwidth){var H=function(){f.css("width","100%");f.width()>u&&f.css("width",u)};H();c(I).bind("resize",function(){H()})}})}})(jQuery,this,0); |
||||
(function(e,t,n){e.fn.responsiveSlides=function(r){var s=e.extend({auto:true,speed:500,timeout:4e3,pager:false,nav:false,random:false,pause:false,pauseControls:true,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:e.noop,after:e.noop},r);return this.each(function(){n++;var o=e(this),u,a,f,l,c,h,p=0,d=o.children(),v=d.size(),m=parseFloat(s.speed),g=parseFloat(s.timeout),y=parseFloat(s.maxwidth),b=s.namespace,w=b+n,E=b+"_nav "+w+"_nav",S=b+"_here",x=w+"_on",T=w+"_s",N=e("<ul class='"+b+"_tabs "+w+"_tabs' />"),C={"float":"left",position:"relative",opacity:1,zIndex:2},k={"float":"none",position:"absolute",opacity:0,zIndex:1},L=function(){var e=document.body||document.documentElement;var t=e.style;var n="transition";if(typeof t[n]==="string"){return true}u=["Moz","Webkit","Khtml","O","ms"];n=n.charAt(0).toUpperCase()+n.substr(1);var r;for(r=0;r<u.length;r++){if(typeof t[u[r]+n]==="string"){return true}}return false}(),A=function(t){s.before(t);if(L){d.removeClass(x).css(k).eq(t).addClass(x).css(C);p=t;setTimeout(function(){s.after(t)},m)}else{d.stop().fadeOut(m,function(){e(this).removeClass(x).css(k).css("opacity",1)}).eq(t).fadeIn(m,function(){e(this).addClass(x).css(C);s.after(t);p=t})}};if(s.random){d.sort(function(){return Math.round(Math.random())-.5});o.empty().append(d)}d.each(function(e){this.id=T+e});o.addClass(b+" "+w);if(r&&r.maxwidth){o.css("max-width",y)}d.hide().css(k).eq(0).addClass(x).css(C).show();if(L){d.show().css({"-webkit-transition":"opacity "+m+"ms ease-in-out","-moz-transition":"opacity "+m+"ms ease-in-out","-o-transition":"opacity "+m+"ms ease-in-out",transition:"opacity "+m+"ms ease-in-out"})}if(d.size()>1){if(g<m+100){return}if(s.pager&&!s.manualControls){var O=[];d.each(function(e){var t=e+1;O+="<li>"+"<a href='#' class='"+T+t+"'>"+t+"</a>"+"</li>"});N.append(O);if(r.navContainer){e(s.navContainer).append(N)}else{o.after(N)}}if(s.manualControls){N=e(s.manualControls);N.addClass(b+"_tabs "+w+"_tabs")}if(s.pager||s.manualControls){N.find("li").each(function(t){e(this).addClass(T+(t+1))})}if(s.pager||s.manualControls){h=N.find("a");a=function(e){h.closest("li").removeClass(S).eq(e).addClass(S)}}if(s.auto){f=function(){c=setInterval(function(){d.stop(true,true);var e=p+1<v?p+1:0;if(s.pager||s.manualControls){a(e)}A(e)},g)};f()}l=function(){if(s.auto){clearInterval(c);f()}};if(s.pause){o.hover(function(){clearInterval(c)},function(){l()})}if(s.pager||s.manualControls){h.bind("click",function(t){t.preventDefault();if(!s.pauseControls){l()}var n=h.index(this);if(p===n||e("."+x).queue("fx").length){return}a(n);A(n)}).eq(0).closest("li").addClass(S);if(s.pauseControls){h.hover(function(){clearInterval(c)},function(){l()})}}if(s.nav){var M="<a href='#' class='"+E+" prev'>"+s.prevText+"</a>"+"<a href='#' class='"+E+" next'>"+s.nextText+"</a>";if(r.navContainer){e(s.navContainer).append(M)}else{o.after(M)}var _=e("."+w+"_nav"),D=_.filter(".prev");_.bind("click",function(t){t.preventDefault();var n=e("."+x);if(n.queue("fx").length){return}var r=d.index(n),i=r-1<0?v-1:r-1,o=r+1<v?p+1:0;A(e(this)[0]===D[0]?i:o);if(s.pager||s.manualControls){a(e(this)[0]===D[0]?i:o)}if(!s.pauseControls){l()}});if(s.pauseControls){_.hover(function(){clearInterval(c)},function(){l()})}}}if(typeof document.body.style.maxWidth==="undefined"&&r.maxwidth){var P=function(){o.css("width","100%");if(o.width()>y){o.css("width",y)}};P();e(t).bind("resize",function(){P()})}})}})(jQuery,this,0) |
Loading…
Reference in new issue