(function(){function q(a,b){var c=[],m=a[0].opt.gridwidth,k=a[0].opt.visibilityLevels;Array.isArray(this.gridWidth)&&(m=m[0]);a.find("> ul > li").each(function(e){if(this.hasAttribute("data-filmstrip")){var d=l(this),n={transition:"fade",masterspeed:300};0===e&&(n.fstransition="fade",n.fsmasterspeed=300);c[c.length]=new r(a[0],b,m,k,d.data(n),JSON.parse(this.getAttribute("data-filmstrip")))}});this.slider=a;this.strips=c;a.one("revolution.slide.onloaded",this.onLoaded.bind(this)).on("revolution.slide.onbeforeswap", this.beforeSwap.bind(this)).on("revolution.slide.onafterswap",this.afterSwap.bind(this))}function v(a){var b={};b[a.direction]=a.resetPosition;punchgs.TweenLite.set(a.strip,b);t.call(a)}function t(){var a={ease:punchgs.Linear.easeNone,onComplete:v,onCompleteParams:[this]};a[this.direction]=this.moveTo;this.carousel?this.tween?this.tween.resume():this.tween=punchgs.TweenLite.to(this.strip,this.time,a):punchgs.TweenLite.to(this.strip,this.time,a)}function u(a){var b=document.createElement("img");b.className= "rs-addon-strip-img";b.setAttribute("data-lazyload",a.url);a.alt&&b.setAttribute("alt",a.alt);b.src=f+"/public/assets/images/transparent.png";return b}function r(a,b,c,m,k,e){for(var d,n=e.imgs,h=n.length,f=document.createDocumentFragment(),p="left-to-right"===e.direction||"top-to-bottom"===e.direction,g=0;2>g;g++)if(p)for(d=h;d--;)f.appendChild(u(n[d]));else for(d=0;dg;g++)(b=gb&&(b=2):b=10,speeds[g]=b;this.times=speeds;l.data(k[0],"rs-addon-strip-"+ k[0].getAttribute("data-index"),this)}var l,p,f;window.RsFilmstripAddOn=function(a,b,c,m){a&&b&&(l=a,p=l(window),f=c,"/"===f.substr(f.length-1)&&(f=f.slice(0,-1)),l.event.special.rsStripDestroyed={remove:function(a){a.handler()}},new q(b,m))};q.prototype={onLoaded:function(){if(!this.checkRemoved())for(var a=this.strips.length,b=0;bc;c++)if(a>=this.levels[c]){this.time=this.times[c];b=!0;break}b||(this.time=this.times[3]);"x"===this.direction?(b=this.strip.clientWidth,this.strip.style.height=this.slider.clientHeight+"px",this.reverse?(this.moveTo=-(b/2-a),this.resetPosition=-(b-a)):(this.moveTo=-(b/2),this.resetPosition=0)):(a=this.strip.clientHeight,this.reverse?(b=this.slider.clientHeight,this.moveTo=-(a/2-b),this.resetPosition=-(a-b)): (this.moveTo=-(a/2),this.resetPosition=0));this.running?this.start():this.carousel&&(a={},a[this.direction]=this.resetPosition,punchgs.TweenLite.set(this.strip,a))},destroy:function(){clearTimeout(this.timer);clearTimeout(this.resize);punchgs.TweenLite.killTweensOf(this.strip);l.removeData(this.slide[0],"rs-addon-strip-"+this.slide[0].getAttribute("data-index"));for(var a in this)this.hasOwnProperty(a)&&delete this[a]}}})();