(function(c){function e(a){a.current=+b(a).first().data("index");a.nav&&(c("."+a.nav.selected,a.nav.container).removeClass(a.nav.selected),c(a.nav.container).children().eq(a.current).addClass(a.nav.selected));if(a.moveTo>=0&&a.current!==a.moveTo)f[a.transition].run(a);else if(a.moveTo=-1,a.delay)a.target.cycleTimeout=setTimeout(function(){c.fn.rotor.change(a)},a.delay)}function b(a){return a.slideExpr?c(a.slideExpr,a.target):a.target.children()}c.fn.rotor=function(a){return this.each(function(){var d=
c.extend({},c.fn.rotor.defaults,a||{});d.target=c(this);d.length=b(d).length;d.current=0;d.moveTo=-1;d.cyclePause=0;d.standardWidth=b(d).first().width();d.standardHeight=b(d).first().height();this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=0;d.shuffle&&jQuery().shuffle&&b(d).shuffle();f[d.transition].init(d);d.nav&&d.nav.container&&b(d).each(function(a){c(this).data("index",a);c('<li class="'+(a===0?d.nav.selected:"")+'" title="'+c(d.nav.title,this).text()+'"></li>').appendTo(d.nav.container).click(function(){if(!c(this).is("."+
d.nav.selected))d.moveTo=a,c.fn.rotor.change(d,{speed:d.nav.speed,easing:d.nav.easing})})});d.nav&&d.nav.next&&d.nav.next.click(function(){c.fn.rotor.move.next(d);return!1});d.nav&&d.nav.prev&&d.nav.prev.click(function(){c.fn.rotor.move.prev(d);return!1});d.pause&&c(this).hover(function(){d.cyclePause=1},function(){d.cyclePause=0});d.ticker&&c(this).hover(function(){c(":animated",this).addClass("paused").pause()},function(){c(".paused",this).removeClass("paused").resume()});d.swipe&&jQuery().swipe&&
b(d).swipe({allowPageScroll:"vertical",swipeStatus:function(a,b,e){(b==="end"||b==="cancel")&&c.fn.rotor.move.swipe(d,e)}});if(d.delay)this.cycleTimeout=setTimeout(function(){c.fn.rotor.change(d)},d.startdelay||d.delay)})};c.fn.rotor.move={next:function(a){var b=a.direction==="left"?"right":a.direction,b=a.direction==="up"?"down":b;c.fn.rotor.change(a,{direction:b,speed:a.nav.speed,easing:a.nav.easing})},prev:function(a){var b=a.direction==="right"?"left":a.direction,b=a.direction==="down"?"up":b;
c.fn.rotor.change(a,{direction:b,speed:a.nav.speed,easing:a.nav.easing})},swipe:function(a,b){b=="left"?c.fn.rotor.move.prev(a):b=="right"&&c.fn.rotor.move.next(a)}};c.fn.rotor.change=function(a,b){if(a.cyclePause){if(a.delay)a.target.cycleTimeout=setTimeout(function(){c.fn.rotor.change(a)},a.delay);return!1}clearTimeout(a.target.cycleTimeout);f[a.transition].run(a,b)};var f={move:{init:function(a){a.direction==="down"||a.direction==="up"?b(a).css("float","none"):(a.target.css("width",a.length*b(a).first().outerWidth()+
"px"),b(a).css("float","left"))},run:function(a,d){var f=d&&d.direction?d.direction:a.direction,g=d&&d.speed?d.speed:a.speed,i=d&&d.easing?d.easing:a.easing,j=b(a).first().width(),k=b(a).first().height();f==="left"?(g=a.ticker?g*j/a.standardWidth:g,b(a).first().animate({"margin-left":-j+"px"},g,i,function(){c(this).appendTo(a.target).css("margin-left",0);e(a)})):f==="right"?(g=a.ticker?g*j/a.standardWidth:g,b(a).last().css("margin-left",-j+"px").prependTo(a.target).animate({"margin-left":0},g,i,function(){e(a)})):
f==="up"?(g=a.ticker?g*k/a.standardHeight:g,b(a).first().animate({"margin-top":-k+"px"},g,i,function(){c(this).appendTo(a.target).css("margin-top",0);e(a)})):f==="down"&&(g=a.ticker?g*k/a.standardHeight:g,b(a).last().css("margin-top",-k+"px").prependTo(a.target).animate({"margin-top":0},g,i,function(){e(a)}))}},fade:{init:function(a){b(a).css({position:"absolute",top:0,left:0,"z-index":function(){return c(this).index()}});b(a).first().nextAll().hide()},run:function(a,d){var f=d&&d.direction?d.direction:
a.direction,g=d&&d.speed?d.speed:a.speed,i=d&&d.easing?d.easing:a.easing,j=+b(a).first().data("index"),k=a.moveTo<0&&f==="right"?j>0?--j:a.length-1:a.moveTo;b(a).first().fadeOut(g,i,function(){c(this).appendTo(a.target);k>=0&&b(a).filter(function(){return c(this).data("index")==k}).prevAll().appendTo(a.target);b(a).first().fadeIn(g,i,function(){e(a)})})}}};c.fn.rotor.defaults={delay:8E3,speed:300,pause:!0,transition:"fade",direction:"left",easing:"swing",nav:{speed:150,easing:"swing"}}})(this.jQuery);
window.log=function(){log.history=log.history||[];log.history.push(arguments);this.console&&console.log(Array.prototype.slice.call(arguments))};(function(c){var e=c.write;c.write=function(b){log("document.write(): ",arguments);/docwriteregexwhitelist/.test(b)&&e.apply(c,arguments)}})(document);
(function(c){c.fn.shuffle=function(){var e=this.get(),b=c.map(e,function(){var b=Math.floor(Math.random()*e.length),a=c(e[b]).clone(!0)[0];e.splice(b,1);return a});this.each(function(e){c(this).replaceWith(c(b[e]))});return c(b)}})(jQuery);
jQuery.cookie=function(c,e,b){if(arguments.length>1&&String(e)!=="[object Object]"){b=jQuery.extend({},b);if(e===null||e===void 0)b.expires=-1;if(typeof b.expires==="number"){var f=b.expires,a=b.expires=new Date;a.setDate(a.getDate()+f)}e=String(e);return document.cookie=[encodeURIComponent(c),"=",b.raw?e:encodeURIComponent(e),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join("")}b=e||{};a=b.raw?function(a){return a}:
decodeURIComponent;return(f=RegExp("(?:^|; )"+encodeURIComponent(c)+"=([^;]*)").exec(document.cookie))?a(f[1]):null};
(function(){var c=jQuery,e=1,b=c.fn.animate,f={};c.fn.animate=function(a,d,s,g){var i=c.speed(d,s,g);i.complete=i.old;return this.each(function(){this["jQuery.pause"]||(this["jQuery.pause"]=e++);var d=c.extend({},i);b.apply(c(this),[a,c.extend({},d)]);f[this["jQuery.pause"]]={run:!0,prop:a,opt:d,start:(new Date).getTime(),done:0}})};c.fn.pause=function(){return this.each(function(){this["jQuery.pause"]||(this["jQuery.pause"]=e++);var a=f[this["jQuery.pause"]];if(a&&a.run)a.done+=(new Date).getTime()-
a.start,a.done>a.opt.duration?delete f[this["jQuery.pause"]]:(c(this).stop(),a.run=!1)})};c.fn.resume=function(){return this.each(function(){this["jQuery.pause"]||(this["jQuery.pause"]=e++);var a=f[this["jQuery.pause"]];if(a&&!a.run)a.opt.duration-=a.done,a.done=0,a.run=!0,a.start=(new Date).getTime(),b.apply(c(this),[a.prop,c.extend({},a.opt)])})}})();
(function(c){c.fn.swipe=function(e){if(!this)return!1;var b={fingers:1,threshold:75,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,click:null,triggerOnTouchEnd:!0,allowPageScroll:"auto"},f="left",a="right",d="up",s="down",g="none",i="horizontal",j="vertical",k="auto",z="start",w="move",v="end",o="cancel",h="start";if(e.allowPageScroll==void 0&&(e.swipe!=void 0||e.swipeStatus!=void 0))e.allowPageScroll=g;e&&c.extend(b,e);return this.each(function(){var e,p,t,
u;function A(a){h=z;n=a.touches.length;distance=0;direction=null;n==b.fingers?(t=e=a.touches[0].pageX,u=p=a.touches[0].pageY,b.swipeStatus&&q(a,h)):r(a)}function B(c){if(!(h==v||h==o)){e=c.touches[0].pageX;p=c.touches[0].pageY;direction=x();n=c.touches.length;h=w;var l=direction;if(b.allowPageScroll==g)c.preventDefault();else{var m=b.allowPageScroll==k;switch(l){case f:(b.swipeLeft&&m||!m&&b.allowPageScroll!=i)&&c.preventDefault();break;case a:(b.swipeRight&&m||!m&&b.allowPageScroll!=i)&&c.preventDefault();
break;case d:(b.swipeUp&&m||!m&&b.allowPageScroll!=j)&&c.preventDefault();break;case s:(b.swipeDown&&m||!m&&b.allowPageScroll!=j)&&c.preventDefault()}}n==b.fingers?(distance=y(),b.swipeStatus&&q(c,h,direction,distance),!b.triggerOnTouchEnd&&distance>=b.threshold&&(h=v,q(c,h),r(c))):(h=o,q(c,h),r(c))}}function C(a){a.preventDefault();distance=y();direction=x();b.triggerOnTouchEnd?(h=v,n==b.fingers&&e!=0?distance>=b.threshold||(h=o):h=o,q(a,h),r(a)):h==w&&(h=o,q(a,h),r(a))}function r(){p=e=u=t=n=0}
function q(c,e){b.swipeStatus&&b.swipeStatus.call(l,c,e,direction||null,distance||0);e==o&&b.click&&n==1&&(isNaN(distance)||distance==0)&&b.click.call(l,c,c.target);if(e==v)switch(b.swipe&&b.swipe.call(l,c,direction,distance),direction){case f:b.swipeLeft&&b.swipeLeft.call(l,c,direction,distance);break;case a:b.swipeRight&&b.swipeRight.call(l,c,direction,distance);break;case d:b.swipeUp&&b.swipeUp.call(l,c,direction,distance);break;case s:b.swipeDown&&b.swipeDown.call(l,c,direction,distance)}}function y(){return Math.round(Math.sqrt(Math.pow(e-
t,2)+Math.pow(p-u,2)))}function x(){var b;b=Math.atan2(p-u,t-e);b=Math.round(b*180/Math.PI);b<0&&(b=360-Math.abs(b));return b<=45&&b>=0?f:b<=360&&b>=315?f:b>=135&&b<=225?a:b>45&&b<135?s:d}var l=c(this),n=0;t=0;u=0;e=0;p=0;try{this.addEventListener("touchstart",A,!1),this.addEventListener("touchmove",B,!1),this.addEventListener("touchend",C,!1),this.addEventListener("touchcancel",r,!1)}catch(D){}})}})(jQuery);


