/*! sly 1.2.2 - 18th nov 2013 | https://github.com/darsain/sly */ (function(k,b,ba){function la(f,h,va){var z,r,qa,s,ra,b,sa,ma;function aa(){var b=0,l=w.length;e.old=k.extend({},e);y=h?0:e[c.horizontal?"width":"height"]();s=k[c.horizontal?"width":"height"]();t=h?f:u[c.horizontal?"outerwidth":"outerheight"]();w.length=0;e.start=0;e.end=math.max(t-y,0);if(c){b=n.length;f=u.children(c.itemselector);n.length=0;var a=na(u,c.horizontal?"paddingleft":"paddingtop"),ta=na(u,c.horizontal?"paddingright":"paddingbottom"),h="border-box"===k(f).css("boxsizing"),m="none"!==f.css("float"), s=0,r=f.length-1,z;t=0;f.each(function(b,l){var d=k(l),e=d[c.horizontal?"outerwidth":"outerheight"](),f=na(d,c.horizontal?"marginleft":"margintop"),d=na(d,c.horizontal?"marginright":"marginbottom"),g=e+f+d,p=!f||!d,h={};h.el=l;h.size=p?e:g;h.half=h.size/2;h.start=t+(p?f:0);h.center=h.start-math.round(y/2-h.size/2);h.end=h.start-y+h.size;b||(t+=a);t+=g;c.horizontal||m||d&&(f&&0p&&p<=e.end&&(p=l.start, w.push(p),p+=y,p>e.end&&p=n.length||0===b&&0=n.length?n.length-1:0,!b):(oa(c.startat),d[l?"tocenter":"tostart"](c.startat)),i(l&&n.length?n[g.activeitem].center:v(e.dest,e.start,e.end))): d.initialized?i(v(e.dest,e.start,e.end)):i(c.startat,1);a("load")}function i(b,l,fa){if(c&&a.released&&!fa){fa=ua(b);var f=b>e.start&&be.end?b=e.end+(b-e.end)/6:bmath.abs(ma)?e.cur=s:e.cur+=ma*(a.released?c.swingspeed:c.syncspeed)):(r=math.min(+new date-z,c.speed),e.cur=qa+ra*jquery.easing[c.easing](r/c.speed,r,0,1,c.speed)),s===e.cur?(e.cur=s,a.tweese=u=0):u=ha(va),a("move"),h||(j? u[0].style[j]=ia+(c.horizontal?"translatex":"translatey")+"("+-e.cur+"px)":u[0].style[c.horizontal?"left":"top"]=-math.round(e.cur)+"px"),!u&&a.released&&a("moveend"),ca()):(u=ha(va),a.released&&a("movestart"))}function ca(){d.length&&(q.cur=e.start===e.end?0:((a.init&&!a.slidee?e.dest:e.cur)-e.start)/(e.end-e.start)*q.end,q.cur=v(math.round(q.cur),q.start,q.end),r.hpos!==q.cur&&(r.hpos=q.cur,j?d[0].style[j]=ia+(c.horizontal?"translatex":"translatey")+"("+q.cur+"px)":d[0].style[c.horizontal?"left": "top"]=q.cur+"px"))}function ea(){p.speed&&e.cur!==(0b?b+n.length:b)}function oa(b,l){var a= pa(b);if(!c||0>a)return!1;if(r.active!==a||l)f.eq(g.activeitem).removeclass(c.activeclass),f.eq(a).addclass(c.activeclass),r.active=g.activeitem=a,da(),a("active",a);return a}function ua(b){b=v(o(b)?b:e.dest,e.start,e.end);var a={},c=t?0:y/2;if(!h)for(var d=0,f=w.length;d=e.end||d===w.length-1){a.activepage=w.length-1;break}if(b<=w[d]+c){a.activepage=d;break}}if(c){for(var f=d=c=!1,g=0,h=n.length;g=e.end,d=b?1:l?2:3;r.slideeposstate!==d&&(r.slideeposstate=d,w.is("button,input")&&w.prop("disabled",b),x.is("button,input")&&x.prop("disabled",l),w.add(ba)[b?"addclass":"removeclass"](c.disabledclass),x.add(y)[l?"addclass":"removeclass"](c.disabledclass));r.fwdbwdstate!==d&&a.released&&(r.fwdbwdstate=d,ba.is("button,input")&& ba.prop("disabled",b),y.is("button,input")&&y.prop("disabled",l));c&&(b=0===g.activeitem,l=g.activeitem>=n.length-1,d=b?1:l?2:3,r.itemsbuttonstate!==d&&(r.itemsbuttonstate=d,z.is("button,input")&&z.prop("disabled",b),$.is("button,input")&&$.prop("disabled",l),z[b?"addclass":"removeclass"](c.disabledclass),$[l?"addclass":"removeclass"](c.disabledclass)))}function ga(b,a,d){b=xa(b);a=xa(a);if(-1a?b:d?a+1:a,f=b>a;b===g.activeitem?r.active=g.activeitem=d?f?a+1:a:f?a:a-1:g.activeitem>c&&g.activeitemb.which))l||m(b,1),ja(f),a.init=1,a.$source=k(b.target),a.touch=l,a.pointer=l?b.originalevent.touches[0]:b,a.initx=a.pointer.pagex,a.inity=a.pointer.pagey,a.initpos=g?e.cur:q.cur,a.start=+new date,a.time=0,a.path=0,a.delta=0,a.locked=0,a.history=[0,0,0,0],a.pathtolock=g?l?30:10:0,a.initloc= a[c.horizontal?"initx":"inity"],a.deltamin=g?-a.initloc:-q.cur,a.deltamax=g?document[c.horizontal?"width":"height"]-a.initloc:q.end-q.cur,ca.on(l?ma:na,oa),d.pause(1),(g?u:d).addclass(c.draggedclass),a("movestart"),g&&(pa=setinterval(wa,10))}}function oa(b){a.released="mouseup"===b.type||"touchend"===b.type;a.pointer=a.touch?b.originalevent[a.released?"changedtouches":"touches"][0]:b;a.pathx=a.pointer.pagex-a.initx;a.pathy=a.pointer.pagey-a.inity;a.path=math.sqrt(math.pow(a.pathx,2)+math.pow(a.pathy, 2));a.delta=v(c.horizontal?a.pathx:a.pathy,a.deltamin,a.deltamax);if(!a.locked&&a.path>a.pathtolock)if(a.locked=1,c.horizontal?math.abs(a.pathx)math.abs(a.pathy))a.released=1;else if(a.slidee)a.$source.on(da,qa);a.released?(a.touch||m(b),clearinterval(pa),ca.off(a.touch?ma:na,oa),(a.slidee?u:d).removeclass(c.draggedclass),d.resume(1),e.cur===e.dest&&a.init&&a("moveend"),a.init=0,c.releaseswing&&a.slidee&&(a.swing=300*((a.delta-a.history[0])/40),a.delta+=a.swing, a.tweese=10math.abs(x.delta)?x.finaldelta=0:(x.finaldelta=math.round(x.delta/1),x.delta%=1);return x.finaldelta}function ya(b){c.scrollby&&e.start!==e.end&&(m(b,1),d.slideby(c.scrollby*xa(b.originalevent)))}function za(b){c.clickbar&&b.target===k[0]&&(m(b),i(ia((c.horizontal?b.pagex-k.offset().left:b.pagey-k.offset().top)-n/2)))}function $a(b){if(c.keyboardnavby)switch(b.which){case c.horizontal?37:38:m(b);d["pages"===c.keyboardnavby?"prevpage": "prev"]();break;case c.horizontal?39:40:m(b),d["pages"===c.keyboardnavby?"nextpage":"next"]()}}function ab(b){~k.inarray(this.nodename,la)||k(this).is(c.interactive)?b.stoppropagation():this.parentnode===u[0]&&d.activate(this)}function bb(){this.parentnode===v[0]&&d.activatepage(ga.index(this))}function cb(b){if(c.pauseonhover)d["mouseenter"===b.type?"pause":"resume"](2)}function a(b,a){if(g[b]){za=g[b].length;for(p=aa.length=0;p=g.lastitem?d.tostart(f,e):f<=g.firstitem?d.toend(f,e):a.released&&!d.ispaused&&d.resume())};d.activatepage=function(b,a){o(b)&&i(w[v(b,0,w.length- 1)],a)};d.resume=function(b){!c.cycleby||(!c.cycleinterval||"items"===c.cycleby&&!n[0]||b=n.length-1?0:g.activeitem+1);break;case "pages":d.activatepage(g.activepage>=w.length-1?0:g.activepage+1)}},c.cycleinterval))};d.pause=function(b){bk?k:f}var m="sly",ka=b.cancelanimationframe||b.cancelrequestanimationframe,ha=b.requestanimationframe,j,ia,ca=k(document),ua="touchstart."+m+" mousedown."+m,na="mousemove."+m+" mouseup."+m,ma="touchmove."+m+" touchend."+m,da="click."+m,ta="mousedown."+m,la=["input", "select","button","textarea"],aa=[],ya;(function(f){for(var h=["moz","webkit","o"],k=0,m=0,r=h.length;m"+(f+1)+""},forward:null,backward:null,prev:null,next:null,prevpage:null,nextpage:null,cycleby:null,cycleinterval:5e3,pauseonhover:0,startpaused:0,moveby:300,speed:0,easing:"swing",startat:0,keyboardnavby:null, draggedclass:"dragged",activeclass:"active",disabledclass:"disabled"}})(jquery,window);