You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 lines
1.7 KiB

13 years ago
/*! ResponsiveSlides.js v1.10. (c) 2011-2012 Viljami Salminen & Bastian Gutschke. MIT License. http://responsive-slides.viljamis.com */
13 years ago
(function(d,m,n){d.fn.responsiveSlides=function(k){var b=d.extend({auto:!0,pagination:!1,fade:1E3,maxwidth:"none",speed:4E3},k);return this.each(function(){n++;var e=d(this),l,o,g=0,f=e.children();d("img",this);var u=f.size(),c="rslides"+n,v="rslides "+c,h=c+"_on",p=c+"_s",c=c+"_tabs",q=parseFloat(b.fade),c=d('<ul class="rslides_tabs '+c+'" />'),r={"float":"left",position:"relative"},w={"float":"none",position:"absolute"},s=function(a){f.stop().fadeOut(q,function(){d(this).removeClass(h).css(w)}).eq(a).fadeIn(q,
function(){d(this).addClass(h).css(r);g=a})};if(1<f.size()){f.each(function(a){this.id=p+a});e.css("max-width",b.maxwidth).addClass(v);f.hide().eq(0).addClass(h).css(r).show();if(!0===b.pagination){var i=[];f.each(function(a){a+=1;i.push("<li>");i.push('<a href="#" class="'+p+a+'">'+a+"</a>");i.push("</li>")});c.append(i.join(""));var j=c.find("a");e.after(c)}!0===b.auto&&(l=function(){o=setInterval(function(){var a=g+1<u?g+1:0;!0===b.pagination&&j.closest("li").removeClass("rslides_here").eq(a).addClass("rslides_here");
s(a)},parseFloat(b.speed))},l());!0===b.pagination&&j.on("ontouchstart"in m?"touchstart":"click",function(a){a.preventDefault();clearInterval(o);b.auto===true&&l();a=j.index(this);if(g!==a){if(d("."+h+":animated").length)return false;j.closest("li").removeClass("rslides_here").eq(a).addClass("rslides_here");s(a)}}).eq(0).closest("li").addClass("rslides_here")}if("undefined"===typeof document.body.style.maxWidth&&k&&k.maxwidth){var t=function(){e.css("width","100%");e.width()>b.maxwidth&&e.css("width",
b.maxwidth)};t();d(m).on("resize",function(){t()})}})}})(jQuery,this,0);