/*! ResponsiveSlides.js v1.54 * https://responsiveslides.com * https://viljamis.com * * Copyright (c) 2011-2012 @viljamis * Available under the MIT license */
!function(t,a,n){t.fn.responsiveSlides=function(e){var s=t.extend({auto:!0,speed:500,timeout:4e3,pager:!0,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"",nextText:"",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:t.noop,after:t.noop},e);return this.each((function(){n++;var o,i,r,l,u,c,d=t(this),f=0,p=d.children(),v=p.size(),h=parseFloat(s.speed),m=parseFloat(s.timeout),C=parseFloat(s.maxwidth),x=s.namespace,b=x+n,y=x+"_nav "+b+"_nav",g=x+"_here",w=b+"_on",_=b+"_s",I=t("<ul class='"+x+"_tabs "+b+"_tabs' />"),q={float:"left",position:"relative",opacity:1,zIndex:2},z={float:"none",position:"absolute",opacity:0,zIndex:1},T=function(){var t,a=(document.body||document.documentElement).style,n="transition";if("string"==typeof a[n])return!0;for(o=["Moz","Webkit","Khtml","O","ms"],n=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<o.length;t++)if("string"==typeof a[o[t]+n])return!0;return!1}(),k=function(a){s.before(a),T?(p.removeClass(w).css(z).eq(a).addClass(w).css(q),f=a,setTimeout((function(){s.after(a)}),h)):p.stop().fadeOut(h,(function(){t(this).removeClass(w).css(z).css("opacity",1)})).eq(a).fadeIn(h,(function(){t(this).addClass(w).css(q),s.after(a),f=a}))};if(s.random&&(p.sort((function(){return Math.round(Math.random())-.5})),d.empty().append(p)),p.each((function(t){this.id=_+t})),d.addClass(x+" "+b),e&&e.maxwidth&&d.css("max-width",C),p.hide().css(z).eq(0).addClass(w).css(q).show(),T&&p.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"}),p.size()>1){if(m<h+100)return;if(s.pager&&!s.manualControls){var F=[];p.each((function(a){var n=t(this).attr("title");F+="<li><a href='#' class='"+_+(a+1)+"'>"+n+"</a></li>"})),I.append(F),e.navContainer?t(s.navContainer).append(I):d.after(I)}if(s.manualControls&&(I=t(s.manualControls)).addClass(x+"_tabs "+b+"_tabs"),(s.pager||s.manualControls)&&I.find("li").each((function(a){t(this).addClass(_+(a+1))})),(s.pager||s.manualControls)&&(c=I.find("a"),i=function(t){c.closest("li").removeClass(g).eq(t).addClass(g)}),s.auto&&(r=function(){u=setInterval((function(){p.stop(!0,!0);var t=f+1<v?f+1:0;(s.pager||s.manualControls)&&i(t),k(t)}),m)})(),l=function(){s.auto&&(clearInterval(u),r())},s.pause&&d.hover((function(){clearInterval(u)}),(function(){l()})),(s.pager||s.manualControls)&&(c.bind("click",(function(a){a.preventDefault(),s.pauseControls||l();var n=c.index(this);f===n||t("."+w).queue("fx").length||(i(n),k(n))})).eq(0).closest("li").addClass(g),s.pauseControls&&c.hover((function(){clearInterval(u)}),(function(){l()}))),s.nav){var M="<div class='nav-control'><a href='#' class='"+y+" prev'>"+s.prevText+"</a><a href='#' class='"+y+" next'>"+s.nextText+"</a></div>";e.navContainer?t(s.navContainer).append(M):d.after(M);var D=t("."+b+"_nav"),O=D.filter(".prev");D.bind("click",(function(a){a.preventDefault();var n=t("."+w);if(!n.queue("fx").length){var e=p.index(n),o=e-1,r=e+1<v?f+1:0;k(t(this)[0]===O[0]?o:r),(s.pager||s.manualControls)&&i(t(this)[0]===O[0]?o:r),s.pauseControls||l()}})),s.pauseControls&&D.hover((function(){clearInterval(u)}),(function(){l()}))}}if(void 0===document.body.style.maxWidth&&e.maxwidth){var W=function(){d.css("width","100%"),d.width()>C&&d.css("width",C)};W(),t(a).bind("resize",(function(){W()}))}}))}}(jQuery,this,0);