1/*! 2 * Fotorama 4.3.4.1 | http://fotorama.io/license/ 3 */ 4(function(e,t,n,r,i){"use strict";function c(e){var t="bez_"+r.makeArray(arguments).join("_").replace(".","p");if(typeof r["easing"][t]!=="function"){var n=function(e,t){var n=[null,null],r=[null,null],i=[null,null],s=function(s,o){i[o]=3*e[o];r[o]=3*(t[o]-e[o])-i[o];n[o]=1-i[o]-r[o];return s*(i[o]+s*(r[o]+s*n[o]))},o=function(e){return i[0]+e*(2*r[0]+3*n[0]*e)},u=function(e){var t=e,n=0,r;while(++n<14){r=s(t,0)-e;if(Math.abs(r)<.001)break;t-=r/o(t)}return t};return function(e){return s(u(e),1)}};r["easing"][t]=function(t,r,i,s,o){return s*n([e[0],e[1]],[e[2],e[3]])(r/o)+i}}return t}function qt(){}function Rt(e,t,n){return Math.max(isNaN(t)?-Infinity:t,Math.min(isNaN(n)?Infinity:n,e))}function Ut(e){return e.match(/ma/)&&e.match(/-?\d+(?!d)/g)[e.match(/3d/)?12:4]}function zt(e){if(xt){return+Ut(e.css("transform"))}else{return+e.css("left").replace("px","")}}function Wt(e,t){var n={};if(xt){n.transform="translate3d("+(e+(t?.001:0))+"px,0,0)"}else{n.left=e}return n}function Xt(e){return{"transition-duration":e+"ms"}}function Vt(e,t){return+String(e).replace(t||"px","")||i}function $t(e){return/%$/.test(e)&&Vt(e,"%")}function Jt(e){return(!!Vt(e)||!!Vt(e,"%"))&&e}function Kt(e,t,n,r){return(e-(r||0))*(t+(n||0))}function Qt(e,t,n,r){return-Math.round(e/(t+(n||0))-(r||0))}function Gt(e){var t=e.data();if(t.tEnd)return;var n=e[0],r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"};n.addEventListener(r[o.prefixed("transition")],function(e){t.tProp&&e.propertyName.match(t.tProp)&&t.onEndFn()},false);t.tEnd=true}function Yt(e,t,n,r){var i,s=e.data();if(s){s.onEndFn=function(){if(i)return;i=true;clearTimeout(s.tT);n()};s.tProp=t;clearTimeout(s.tT);s.tT=setTimeout(function(){s.onEndFn()},r*1.5);Gt(e)}}function Zt(e,t,n){if(e.length){var r=e.data();if(xt){e.css(Xt(0));r.onEndFn=qt;clearTimeout(r.tT)}else{e.stop()}var i=en(t,function(){return zt(e)});e.css(Wt(i,n));return i}}function en(){var e;for(var t=0,n=arguments.length;t<n;t++){e=t?arguments[t]():arguments[t];if(typeof e==="number"){break}}return e}function tn(e,t){return Math.round(e+(t-e)/1.5)}function nn(){nn.p=nn.p||(n.protocol==="https://"?"https://":"http://");return nn.p}function rn(e){var n=t.createElement("a");n.href=e;return n}function sn(e,t){if(typeof e!=="string")return e;e=rn(e);var n,r;if(e.host.match(/youtube\.com/)&&e.search){n=e.search.split("v=")[1];if(n){var i=n.indexOf("&");if(i!==-1){n=n.substring(0,i)}r="youtube"}}else if(e.host.match(/youtube\.com|youtu\.be/)){n=e.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,"");r="youtube"}else if(e.host.match(/vimeo\.com/)){r="vimeo";n=e.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,"")}if((!n||!r)&&t){n=e.href;r="custom"}return n?{id:n,type:r}:false}function on(e,t,n){var i,s,o=e.video;if(o.type==="youtube"){s=nn()+"img.youtube.com/vi/"+o.id+"/default.jpg";i=s.replace(/\/default.jpg$/,"/hqdefault.jpg");e.thumbsReady=true}else if(o.type==="vimeo"){r.ajax({url:nn()+"vimeo.com/api/v2/video/"+o.id+".json",dataType:"jsonp",success:function(r){e.thumbsReady=true;un(t,{img:r[0].thumbnail_large,thumb:r[0].thumbnail_small},e.i,n)}})}else{e.thumbsReady=true}return{img:i,thumb:s}}function un(e,t,n,i){for(var s=0,o=e.length;s<o;s++){var u=e[s];if(u.i===n&&u.thumbsReady){var a={videoReady:true};a[Bt]=a[Ft]=a[jt]=false;i.splice(s,1,r.extend({},u,a,t));break}}}function an(e){function n(e,t,n){var s=e.children("img").eq(0),o=e.attr("href"),u=e.attr("src"),a=s.attr("src"),f=t.video,l=n?sn(o,f===true):false;if(l){o=false}else{l=f}i(e,s,r.extend(t,{video:l,img:t.img||o||u||a,thumb:t.thumb||a||u||o}))}function i(e,t,n){var i=n.thumb&&n.img!==n.thumb,s=Vt(n.width||e.attr("width")),o=Vt(n.height||e.attr("height"));r.extend(n,{width:s,height:o,thumbratio:xn(n.thumbratio||Vt(n.thumbwidth||t&&t.attr("width")||i||s)/Vt(n.thumbheight||t&&t.attr("height")||i||o))})}var t=[];e.children().each(function(){var e=r(this),s=Sn(r.extend(e.data(),{id:e.attr("id")}));if(e.is("a, img")){n(e,s,true)}else if(!e.is(":empty")){i(e,null,r.extend(s,{html:this,_html:e.html()}))}else return;t.push(s)});return t}function fn(e){return e.offsetWidth===0&&e.offsetHeight===0}function ln(e){return!r.contains(t.documentElement,e)}function cn(e,t,n){if(e()){t()}else{setTimeout(function(){cn(e,t)},n||100)}}function hn(e){n.replace(n.protocol+"//"+n.host+n.pathname.replace(/^\/?/,"/")+n.search+"#"+e)}function pn(e,t,n){var r=e.data(),i=r.measures;if(i&&(!r.l||r.l.W!==i.width||r.l.H!==i.height||r.l.r!==i.ratio||r.l.w!==t.w||r.l.h!==t.h||r.l.m!==n)){var s=i.width,o=i.height,u=t.w/t.h,a=i.ratio>=u,f=n==="scaledown",l=n==="contain",c=n==="cover";if(a&&(f||l)||!a&&c){s=Rt(t.w,0,f?s:Infinity);o=s/i.ratio}else if(a&&c||!a&&(f||l)){o=Rt(t.h,0,f?o:Infinity);s=o*i.ratio}e.css({width:Math.ceil(s),height:Math.ceil(o),marginLeft:Math.floor(-s/2),marginTop:Math.floor(-o/2)});r.l={W:i.width,H:i.height,r:i.ratio,w:t.w,h:t.h,m:n}}return true}function dn(e,t){var n=e[0];if(n.styleSheet){n.styleSheet.cssText=t}else{e.html(t)}
4}function vn(e,t,n){return t===n?false:e<=t?"left":e>=n?"right":"left right"}function mn(e,t,n,r){if(!n)return false;if(!isNaN(e))return e-(r?0:1);var i;for(var s=0,o=t.length;s<o;s++){var u=t[s];if(u.id===e){i=s;break}}return i}function gn(e,t,n){n=n||{};e.each(function(){var e=r(this),i=e.data(),s;if(i.clickOn)return;i.clickOn=true;r.extend(_n(e,{onStart:function(e){s=e;(n.onStart||qt).call(this,e)},onMove:n.onMove||qt,onEnd:function(e){if(e.moved||n.tail.checked)return;t.call(this,s)}}),n.tail)})}function yn(e,t){return'<div class="'+e+'">'+(t||"")+"</div>"}function bn(e){var t=e.length;while(t){var n=Math.floor(Math.random()*t--);var r=e[t];e[t]=e[n];e[n]=r}return e}function wn(e){return Object.prototype.toString.call(e)=="[object Array]"&&r.map(e,function(e){return r.extend({},e)})}function En(e,t){gt.scrollLeft(e).scrollTop(t)}function Sn(e){if(e){var t={};r.each(e,function(e,n){t[e.toLowerCase()]=n});return t}}function xn(e){if(!e)return;var t=+e;if(!isNaN(t)){return t}else{t=e.split("/");return+t[0]/+t[1]||i}}function Tn(e,t){var n=Math.round(t.pos),i=t.onEnd||qt;if(typeof t.overPos!=="undefined"&&t.overPos!==t.pos){n=t.overPos;i=function(){Tn(e,r.extend({},t,{overPos:t.pos,time:Math.max(Ot,t.time/2)}))}}var s=r.extend(Wt(n,t._001),{width:t.width});if(xt){e.css(r.extend(Xt(t.time),s));if(t.time>10){Yt(e,"transform",i,t.time)}else{i()}}else{e.stop().animate(s,t.time,It,i)}}function Nn(e,t,n,i,s,o){var u=typeof o!=="undefined";if(!u){s.push(arguments);Array.prototype.push.call(arguments,s.length);if(s.length>1)return}e=e||r(e);t=t||r(t);var a=e[0],f=t[0],l=i.method==="crossfade",c=function(){if(!c.done){c.done=true;var e=(u||s.shift())&&s.shift();e&&Nn.apply(this,e);(i.onEnd||qt)(!!e)}},h=i.time/(o||1);n.not(e.addClass(W).removeClass(z)).not(t.addClass(z).removeClass(W)).removeClass(W+" "+z);e.stop();t.stop();l&&f&&e.fadeTo(0,0);e.fadeTo(l?h:1,1,l&&c);t.fadeTo(h,0,c);a&&l||f||c()}function Mn(e){var t=(e.touches||[])[0]||e;e._x=t.pageX;e._y=t.clientY}function _n(n,i){function v(e){l=r(e.target);u.checked=p=d=false;if(a||u.flow||e.touches&&e.touches.length>1||e.which>1||Cn&&Cn.type!==e.type&&Ln||(p=i.select&&l.is(i.select,s)))return p;h=e.type.match(/^t/);d=l.is("a, a *",s);Mn(e);f=Cn=e;kn=e.type.replace(/down|start/,"move").replace(/Down/,"Move");c=u.control;(i.onStart||qt).call(s,e,{control:c,$target:l});a=u.flow=true;if(!h||u.go){e.preventDefault()}}function m(e){if(e.touches&&e.touches.length>1||Lt&&!e.isPrimary||kn!==e.type||!a){a&&g();return}Mn(e);var t=Math.abs(e._x-f._x),n=Math.abs(e._y-f._y),r=t-n,o=(u.go||u.x||r>0)&&!u.noSwipe,l=r<0;if(h&&!u.checked){if(a=o){e.preventDefault()}}else{e.preventDefault();(i.onMove||qt).call(s,e,{touch:h})}u.checked=u.checked||o||l}function g(e){var t=a;u.control=a=false;if(t){u.flow=false}if(!t||d&&!u.checked)return;e&&e.preventDefault();Ln=true;clearTimeout(An);An=setTimeout(function(){Ln=false},1e3);(i.onEnd||qt).call(s,{moved:u.checked,$target:l,control:c,touch:h,startEvent:f,aborted:!e})}function y(){if(u.flow)return;clearTimeout(o);o=setTimeout(function(){u.flow=true},10)}function b(){if(!u.flow)return;clearTimeout(o);o=setTimeout(function(){u.flow=false},At)}var s=n[0],o,u={},a,f,l,c,h,p,d;if(Lt){s[On]("MSPointerDown",v,false);t[On]("MSPointerMove",m,false);t[On]("MSPointerCancel",g,false);t[On]("MSPointerUp",g,false)}else{if(s[On]){s[On]("touchstart",v,false);s[On]("touchmove",m,false);s[On]("touchend",g,false);t[On]("touchstart",y,false);t[On]("touchend",b,false);t[On]("touchcancel",b,false);e[On]("scroll",b,false)}n.on("mousedown",v);yt.on("mousemove",m).on("mouseup",g)}n.on("click","a",function(e){u.checked&&e.preventDefault()});return u}function Dn(e,t){function w(i){o=u=i._x;h=r.now();c=[[h,o]];a=f=s.noMove?0:Zt(e,t.getPos&&t.getPos(),t._001);(t.onStart||qt).call(n,i)}function E(e,t){d=i.min;v=i.max;m=i.snap;g=e.altKey;b=false;y=t.control;if(!y){w(e)}}function S(i,h){if(y){y=false;w(i)}if(!s.noSwipe){u=i._x;c.push([r.now(),u]);f=a-(o-u);l=vn(f,d,v);if(f<=d){f=tn(f,d)}else if(f>=v){f=tn(f,v)}if(!s.noMove){e.css(Wt(f,t._001));if(!b){b=true;h.touch||Lt||e.addClass(st)}(t.onMove||qt).call(n,i,{pos:f,edge:l})}}}function x(i){if(y)return;i.touch||Lt||e.removeClass(st);p=(new Date).getTime();var s=p-At,o,l,h,b=null,w,E,S,x,T,N=Ot,C,k=t.friction;for(var L=c.length-1;L>=0;L--){o=c[L][0];l=Math.abs(o-s);if(b===null||l<h){b=o;w=c[L][1]}else if(b===s||l>h){break}h=l}x=Rt(f,d,v);var A=w-u,O=A>=0,M=p-b,_=M>At,D=!_&&f!==a&&x===f;if(m){x=Rt(Math[D?O?"floor":"ceil":"round"](f/m)*m,d,v);d=v=x}if(D&&(m||x===f)){C=-(A/M);
4N*=Rt(Math.abs(C),t.timeLow,t.timeHigh);E=Math.round(f+C*N/k);if(!m){x=E}if(!O&&E>v||O&&E<d){S=O?d:v;T=E-S;if(!m){x=S}T=Rt(x+T*.03,S-50,S+50);N=Math.abs((f-T)/(C/k))}}N*=g?10:1;(t.onEnd||qt).call(n,r.extend(i,{pos:f,newPos:x,overPos:T,time:N,moved:_&&m||i.moved}))}var n=e[0],i=e.data(),s={},o,u,a,f,l,c,h,p,d,v,m,g,y,b;s=r.extend(_n(t.$wrap,{onStart:E,onMove:S,onEnd:x,select:t.select,control:t.control}),s);return s}function Pn(){r.each(r.Fotorama.instances,function(e,t){t.index=e})}function Hn(e){r.Fotorama.instances.push(e);Pn()}function Bn(e){r.Fotorama.instances.splice(e.index,1);Pn()}var s={};var o=function(e,t,n){function T(e){a.cssText=e}function N(e,t){return T(c.join(e+";")+(t||""))}function C(e,t){return typeof e===t}function k(e,t){return!!~(""+e).indexOf(t)}function L(e,t){for(var r in e){var i=e[r];if(!k(i,"-")&&a[i]!==n){return t=="pfx"?i:true}}return false}function A(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n){if(r===false)return e[i];if(C(s,"function")){return s.bind(r||t)}return s}}return false}function O(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+p.join(r+" ")+r).split(" ");if(C(t,"string")||C(t,"undefined")){return L(i,t)}else{i=(e+" "+d.join(r+" ")+r).split(" ");return A(i,t,n)}}var r="2.6.2",i={},s=t.documentElement,o="modernizr",u=t.createElement(o),a=u.style,f,l={}.toString,c=" -webkit- -moz- -o- -ms- ".split(" "),h="Webkit Moz O ms",p=h.split(" "),d=h.toLowerCase().split(" "),v={},m={},g={},y=[],b=y.slice,w,E=function(e,n,r,i){var u,a,f,l,c=t.createElement("div"),h=t.body,p=h||t.createElement("body");if(parseInt(r,10)){while(r--){f=t.createElement("div");f.id=i?i[r]:o+(r+1);c.appendChild(f)}}u=["­",'<style id="s',o,'">',e,"</style>"].join("");c.id=o;(h?c:p).innerHTML+=u;p.appendChild(c);if(!h){p.style.background="";p.style.overflow="hidden";l=s.style.overflow;s.style.overflow="hidden";s.appendChild(p)}a=n(c,e);if(!h){p.parentNode.removeChild(p);s.style.overflow=l}else{c.parentNode.removeChild(c)}return!!a},S={}.hasOwnProperty,x;if(!C(S,"undefined")&&!C(S.call,"undefined")){x=function(e,t){return S.call(e,t)}}else{x=function(e,t){return t in e&&C(e.constructor.prototype[t],"undefined")}}if(!Function.prototype.bind){Function.prototype.bind=function(t){var n=this;if(typeof n!="function"){throw new TypeError}var r=b.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e;var o=n.apply(s,r.concat(b.call(arguments)));if(Object(o)===o){return o}return s}else{return n.apply(t,r.concat(b.call(arguments)))}};return i}}v["csstransforms3d"]=function(){var e=!!O("perspective");return e};for(var M in v){if(x(v,M)){w=M.toLowerCase();i[w]=v[M]();y.push((i[w]?"":"no-")+w)}}i.addTest=function(e,t){if(typeof e=="object"){for(var r in e){if(x(e,r)){i.addTest(r,e[r])}}}else{e=e.toLowerCase();if(i[e]!==n){return i}t=typeof t=="function"?t():t;if(typeof enableClasses!=="undefined"&&enableClasses){s.className+=" "+(t?"":"no-")+e}i[e]=t}return i};T("");u=f=null;i._version=r;i._prefixes=c;i._domPrefixes=d;i._cssomPrefixes=p;i.testProp=function(e){return L([e])};i.testAllProps=O;i.testStyles=E;i.prefixed=function(e,t,n){if(!t){return O(e,"pfx")}else{return O(e,t,n)}};return i}(e,t);var u={ok:false,is:function(){return false},request:function(){},cancel:function(){},event:"",prefix:""},a="webkit moz o ms khtml".split(" ");if(typeof t.cancelFullScreen!="undefined"){u.ok=true}else{for(var f=0,l=a.length;f<l;f++){u.prefix=a[f];if(typeof t[u.prefix+"CancelFullScreen"]!="undefined"){u.ok=true;break}}}if(u.ok){u.event=u.prefix+"fullscreenchange";u.is=function(){switch(this.prefix){case"":return t.fullScreen;case"webkit":return t.webkitIsFullScreen;default:return t[this.prefix+"FullScreen"]}};u.request=function(e){return this.prefix===""?e.requestFullScreen():e[this.prefix+"RequestFullScreen"]()};u.cancel=function(e){return this.prefix===""?t.cancelFullScreen():t[this.prefix+"CancelFullScreen"]()}}var h="fotorama",p="fullscreen",d=h+"__wrap",v=d+"--css3",m=d+"--video",g=d+"--fade",y=d+"--slide",b=d+"--no-controls",w=d+"--no-shadows",E=d+"--pan-y",S=h+"__stage",x=S+"__frame",T=x+"--video",N=S+"__shaft",C=S+"--only-active",k=h+"__grab",L=h+"__pointer",A=h+"__arr",O=A+"--disabled",M=A+"--prev",_=A+"--next",D=A+"__arr",P=h+"__nav",H=P+"-wrap",B=P+"__shaft",j=P+"--dots",F=P+"--thumbs",I=P+"__frame",q=
4I+"--dot",R=I+"--thumb",U=h+"__fade",z=U+"-front",W=U+"-rear",X=h+"__shadow",V=X+"s",$=V+"--left",J=V+"--right",K=h+"__active",Q=h+"__select",G=h+"--hidden",Y=h+"--fullscreen",Z=h+"__fullscreen-icon",et=h+"__error",tt=h+"__loading",nt=h+"__loaded",rt=nt+"--full",it=nt+"--img",st=h+"__grabbing",ot=h+"__img",ut=ot+"--full",at=h+"__dot",ft=h+"__thumb",lt=ft+"-border",ct=h+"__html",ht=h+"__video",pt=ht+"-play",dt=ht+"-close",vt=h+"__caption",mt=h+"__oooo";var gt=r(e),yt=r(t),bt,wt,Et=n.hash.replace("#","")==="quirks",St=o.csstransforms3d,xt=St&&!Et,Tt=St||t.compatMode==="CSS1Compat",Nt=u.ok,Ct=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),kt=!xt||Ct,Lt=e.navigator.msPointerEnabled,At=250,Ot=300,Mt=5e3,_t=0,Dt=64,Pt=500,Ht=333,Bt="$stageFrame",jt="$navDotFrame",Ft="$navThumbFrame",It=c([.1,0,.25,1]);var Cn,kn,Ln,An,On="addEventListener";jQuery.Fotorama=function(e,s){function Sr(){r.each(c,function(e,t){if(!t.i){t.i=U++;var n=sn(t.video,true);if(n){var r={};t.video=n;if(!t.img&&!t.thumb){r=on(t,c,o)}else{t.thumbsReady=true}un(c,{img:r.img,thumb:r.thumb},t.i,o)}}})}function xr(e){var t="keydown."+h,n="keydown."+h+a,r="resize."+h+a;if(e){yt.on(n,function(e){if(jn&&e.keyCode===27){e.preventDefault();mi(jn,true,true)}else if(o.fullScreen||s.keyboard&&!o.index){if(e.keyCode===27){e.preventDefault();o.cancelFullScreen()}else if(e.keyCode===39||e.keyCode===40&&o.fullScreen){e.preventDefault();o.show({index:">",slow:e.altKey,direct:true})}else if(e.keyCode===37||e.keyCode===38&&o.fullScreen){e.preventDefault();o.show({index:"<",slow:e.altKey,direct:true})}}});if(!o.index){yt.off(t).on(t,"textarea, input, select",function(e){!wt.hasClass(p)&&e.stopPropagation()})}gt.on(r,o.resize)}else{yt.off(n);gt.off(r)}}function Tr(t){if(t===Tr.f)return;if(t){e.html("").addClass(h+" "+f).append(ht).before(X).before(st);Hn(o)}else{ht.detach();X.detach();st.detach();e.html(z.urtext).removeClass(f);Bn(o)}xr(t);Tr.f=t}function Nr(){c=o.data=c||wn(s.data)||an(e);W=o.size=c.length;!xi.ok&&s.shuffle&&bn(c);Sr();Fn=Mr(Fn);W&&Tr(true)}function Cr(){var e=W<2||jn;ur.noMove=e||Zn;ur.noSwipe=e||!s.swipe;Ct.toggleClass(k,!ur.noMove&&!ur.noSwipe);Lt&&ht.toggleClass(E,!ur.noSwipe)}function kr(e){if(e===true)e="";s.autoplay=Math.max(+e||Mt,nr*1.5)}function Lr(e){return e?"add":"remove"}function Ar(){o.options=s=Sn(s);Zn=s.transition==="crossfade"||s.transition==="dissolve";$n=s.loop&&(W>2||Zn);nr=+s.transitionduration||Ot;var e={add:[],remove:[]};if(W>1){Jn=s.nav;Qn=s.navposition==="top";e.remove.push(Q);Wt.toggle(s.arrows);ei()}else{Jn=false;Wt.hide()}if(s.autoplay)kr(s.autoplay);er=Vt(s.thumbwidth)||Dt;tr=Vt(s.thumbheight)||Dt;Cr();ai(s,true);Kn=Jn==="thumbs";if(Kn){$r(W,"navThumb");nn=fn;br=Ft;dn(X,r.Fotorama.jst.style({w:er,h:tr,m:_t,s:a,q:!Tt}));Yt.addClass(F).removeClass(j)}else if(Jn==="dots"){$r(W,"navDot");nn=rn;br=jt;Yt.addClass(j).removeClass(F)}else{Jn=false;Yt.removeClass(F+" "+j)}if(Jn){if(Qn){Gt.insertBefore(Et)}else{Gt.insertAfter(Et)}Gr.nav=false;Gr(nn,tn,"nav")}Gn=s.allowfullscreen;if(Gn){An.appendTo(Et);Yn=Nt&&Gn==="native"}else{An.detach();Yn=false}e[Lr(Zn)].push(g);e[Lr(!Zn)].push(y);rr=s.shadows&&!kt;e[Lr(!rr)].push(w);Xr();ht.addClass(e.add.join(" ")).removeClass(e.remove.join(" "));ir=r.extend({},s)}function Or(e){return e<0?(W+e%W)%W:e>=W?e%W:e}function Mr(e){return Rt(e,0,W-1)}function _r(e){return $n?Or(e):Mr(e)}function Dr(e){return e>0||$n?e-1:false}function Pr(e){return e<W-1||$n?e+1:false}function Hr(){Cn.min=$n?-Infinity:-Kt(W-1,sr.w,_t,Rn);Cn.max=$n?Infinity:-Kt(0,sr.w,_t,Rn);Cn.snap=sr.w+_t}function Br(){kn.min=Math.min(0,sr.w-tn.width());kn.max=0;tn.toggleClass(k,!(ar.noMove=kn.min===kn.max))}function jr(e,t,n){if(typeof e==="number"){e=new Array(e);var i=true}return r.each(e,function(e,r){if(i)r=e;if(typeof r==="number"){var s=c[Or(r)];if(s){var o="$"+t+"Frame",u=s[o];n.call(this,e,r,s,u,o,u&&u.data())}}})}function Fr(e,t,n,r){if(!or||or==="*"&&r===Vn){e=Jt(s.width)||Jt(e)||Pt;t=Jt(s.height)||Jt(t)||Ht;o.resize({width:e,ratio:s.ratio||n||e/t},0,r===Vn?true:"*")}}function Ir(e,t,n,i,u){jr(e,t,function(e,a,f,l,h,p){function E(e){var t=Or(a);fi(e,{index:t,src:b,frame:c[t]})}function S(){m.remove();r.Fotorama.cache[b]="error";if((!f.html||t!=="stage")&&w&&w!==b){f[y]=b=w;Ir([a],t,n,i,true)}else{if(b&&!f.html){l.trigger("f:error").removeClass(tt).addClass(et);E("error")}else if(t==="stage"){l.trigger("f:load").removeClass(tt+" "+et).addClass(nt);E("load");Fr()}p.state="error";if(W>1&&!f.html&&!f.deleted&&!f.video&&!d){f.deleted=true;o.splice(a,1)}}}function x(){var e=v.width,o=v.height,u=e/o;g.measures={width:e,height:o,ratio:u};Fr(e,o,u,a);m.off("load error").addClass(ot+(d?" "+ut:"")).prependTo(l);pn(m,n||sr,i||f.fit||s.fit);r.Fotorama.cache[b]="loaded";p.state="loaded";setTimeout(function(){l.trigger("f:load").removeClass(tt+" "+et).addClass(nt+" "+(d?rt:it));if(t==="stage"){E("load")}},5)}function T(){var e=10;cn(function(){return!gr||!(e--)&&!kt},function(){x()})}if(!l)return;var d=o.fullScreen&&f.full&&!p.$full&&t==="stage";if(p.$img&&!u&&!d)return;var v=new Image,m=r(v),g=m.data();p[d?"$full":"$img"]=m;var y=t==="stage"?d?"full":"img":"thumb",b=f[y],w=d?null:f[t==="stage"?"thumb":"img"];if(t==="navThumb")l=p.$wrap;if(!b){S();return}if(!r.Fotorama.cache[b]){r.Fotorama.cache[b]="*";m.on("load",T).on("error",S)}else{(function N(){if(r.Fotorama.cache[b]==="error"){S()}else if(r.Fotorama.cache[b]==="loaded"){setTimeout(T,0)}else{setTimeout(N,100)}})()}v.src=b})}function Wr(e){Xr(true);qr.appendTo(e);zr=0;Ur();Rr=setInterval(Ur,200)}function Xr(e){e||qr.detach();clearInterval(Rr)}function Vr(){var e=o.activeFrame[Bt];if(e&&!e.data().state){Wr(e);e.on("f:load f:error",function(){e.off("f:load f:error");Xr()})}}function $r(e,t){jr(e,t,function(e,n,i,o,u,a){if(o)return;o=i[u]=ht[u].clone();a=o.data();a.data=i;if(t==="stage"){if(i.html){r('<div class="'+ct+'"></div>').append(i._html?r(i.html).removeAttr("id").html(i._html):i.html).appendTo(o)}if(s.captions&&i.caption){r('<div class="'+vt+'"></div>').append(i.caption).appendTo(o)}i.video&&o.addClass(T).append(Mn.clone());It=It.add(o)}else if(t==="navDot"){rn=rn.add(o)}else if(t==="navThumb"){a.$wrap=o.children(":first");fn=fn.add(o);if(i.video){o.append(Mn.clone())}}})}function Jr(e,t,n){return e&&e.length&&pn(e,t,n)}function Kr(e){jr(e,"stage",function(e,t,n,i,o,u){if(!i)return;vr[Bt][Or(t)]=i.css(r.extend({left:Zn?0:Kt(t,sr.w,_t,Rn)},Zn&&Xt(0)));if(ln(i[0])){i.appendTo(Ct);mi(n.$video)}var a=n.fit||s.fit;Jr(u.$img,sr,a);Jr(u.$full,sr,a)})}function Qr(e,t){if(Jn!=="thumbs"||isNaN(e))return;var n=-e,i=-e+sr.w;fn.each(function(){var e=r(this),s=e.data(),o=s.eq,u={h:tr},a="cover";u.w=s.w;if(s.l+s.w<n||s.l>i||Jr(s.$img,u,a))return;t&&Ir([o],"navThumb",u,a)})}function Gr(e,t,n){if(!Gr[n]){var i=n==="nav"&&Kn,s=0;t.append(e.filter(function(){var e,t=r(this),n=t.data();for(var i=0,s=c.length;i<s;i++){if(n.data===c[i]){e=true;n.eq=i;break}}return e||t.remove()&&false}).sort(function(e,t){return r(e).data().eq-r(t).data().eq}).each(function(){if(!i)return;var e=r(this),t=e.data(),n=Math.round(tr*t.data.thumbratio)||er;t.l=s;t.w=n;e.css({width:n});s+=n+_t}));Gr[n]=true}}function Yr(e){return e-wr>sr.w/3}function Zr(e){return!$n&&(!(Fn+e)||!(Fn-W+e))&&!jn}function ei(){Wt.each(function(e){r(this).toggleClass(O,Zr(e))})}function ti(e){var t=e.data(),n,r;if(Kn){n=t.l;r=t.w}else{n=e.position().left;r=e.width()}return{c:n+r/2,min:-n+_t*10,max:-n+sr.w-r-_t*10}}function ni(e){var t=o.activeFrame[br].data();Tn(Ln,{time:e*.9,pos:t.l,width:t.w-_t*2})}function ri(e){var t=c[e.guessIndex][br];if(t){var n=kn.min!==kn.max,r=n&&ti(o.activeFrame[br]),i=n&&(e.keep&&ri.l?ri.l:Rt((e.coo||sr.w/2)-ti(t).c,r.min,r.max)),s=n&&Rt(i,kn.min,kn.max),u=e.time*.9;Tn(tn,{time:u,pos:s||0,onEnd:function(){Qr(s,true)}});if(u)Qr(s);
4vi(Yt,vn(s,kn.min,kn.max));ri.l=i}}function ii(){si(br);dr[br].push(o.activeFrame[br].addClass(K))}function si(e){var t=dr[e];while(t.length){t.shift().removeClass(K)}}function oi(e){var t=vr[e];r.each(qn,function(e,n){delete t[n]});r.each(t,function(e,n){delete t[e];n.detach()})}function ui(e){Rn=Un=Fn;var t=o.activeFrame,n=t[Bt];if(n){si(Bt);dr[Bt].push(n.addClass(K));e||o.show.onEnd(true);Zt(Ct,0,true);oi(Bt);Kr(qn);Hr();Br()}}function ai(e,t){e&&r.extend(sr,{width:e.width||sr.width,height:e.height,minwidth:e.minwidth,maxwidth:e.maxwidth,minheight:e.minheight,maxheight:e.maxheight,ratio:xn(e.ratio)})&&!t&&r.extend(s,{width:sr.width,height:sr.height,minwidth:sr.minwidth,maxwidth:sr.maxwidth,minheight:sr.minheight,maxheight:sr.maxheight,ratio:sr.ratio})}function fi(t,n,r){e.trigger(h+":"+t,[o,n]);if(!o.prevent[t]){(r||qt)()}else{delete o.prevent[t]}}function li(){clearTimeout(ci.t);gr=1;if(s.stopautoplayontouch){o.stopAutoplay()}else{hr=true}}function ci(){ci.t=setTimeout(function(){gr=0},Ot+At)}function hi(){hr=!!(jn||pr)}function pi(){clearTimeout(pi.t);if(!s.autoplay||hr){if(o.autoplay){o.autoplay=false;fi("stopautoplay")}return}if(!o.autoplay){o.autoplay=true;fi("startautoplay")}var e=Fn;var t=o.activeFrame[Bt].data();cn(function(){return t.state||e!==Fn},function(){pi.t=setTimeout(function(){if(hr||e!==Fn)return;o.show($n?">":Or(Fn+1))},s.autoplay)})}function di(){if(o.fullScreen){o.fullScreen=false;if(Nt){u.cancel(l)}wt.removeClass(p);bt.removeClass(p);e.removeClass(Y).insertAfter(st);sr=r.extend({},mr);mi(jn,true,true);wi("x",false);o.resize();Ir(qn,"stage");En(lr,fr);fi("fullscreenexit")}}function vi(e,t){if(rr){e.removeClass($+" "+J);t&&!jn&&e.addClass(t.replace(/^|\s/g," "+V+"--"))}}function mi(e,t,n){if(t){ht.removeClass(m);jn=false;Cr()}if(e&&e!==jn){e.remove();fi("unloadvideo")}if(n){hi();pi()}}function gi(e){ht.toggleClass(b,e)}function yi(e){if(ur.flow)return;var t=e?e.pageX:yi.x,n=e&&!Zr(Yr(t))&&s.click;if(yi.p!==n&&(Zn||!s.swipe)&&Et.toggleClass(L,n)){yi.p=n;yi.x=t}}function bi(e,t){var n=e.target,u=r(n);if(u.hasClass(pt)){o.playVideo()}else if(n===On){o[(o.fullScreen?"cancel":"request")+"FullScreen"]()}else if(jn){n===Pn&&mi(jn,true,true)}else{fi("stagetap",i,function(){if(t){gi()}else if(s.click){o.show({index:e.shiftKey||!Yr(e._x)?"<":">",slow:e.altKey,direct:true})}})}}function wi(e,t){ur[e]=ar[e]=t}function Ei(e,t){var n=r(this).data().eq;o.show({index:n,slow:e.altKey,direct:true,coo:e._x-Yt.offset().left,time:t})}function Si(){Nr();Ar();if(!xi.ok){var e;if((e=s.startindex)||s.hash&&n.hash){Vn=mn(e||n.hash.replace(/^#/,""),c,o.index===0||e,e)}Fn=Rn=Un=zn=Vn=_r(Vn)||0}if(W){if(jn){mi(jn,true)}qn=[];oi(Bt);o.show({index:Fn,time:0});o.resize()}else{o.destroy()}}function xi(){if(!xi.ok){xi.ok=true;fi("ready")}}bt=bt||r("html");wt=wt||r("body");var o=this,a=r.now(),f=h+a,l=e[0],c,U=1,z=e.data(),W,X=r("<style></style>"),st=r(yn(G)),ht=r(yn(d)),Et=r(yn(S)).appendTo(ht),St=Et[0],Ct=r(yn(N)).appendTo(Et),It=r(),Ut=r(yn(A+" "+M,yn(D))),zt=r(yn(A+" "+_,yn(D))),Wt=Ut.add(zt).appendTo(Et),Gt=r(yn(H)),Yt=r(yn(P)).appendTo(Gt),tn=r(yn(B)).appendTo(Yt),nn,rn=r(),fn=r(),Cn=Ct.data(),kn=tn.data(),Ln=r(yn(lt)).appendTo(tn),An=r(yn(Z)),On=An[0],Mn=r(yn(pt)),_n=r(yn(dt)).appendTo(Et),Pn=_n[0],jn,Fn=false,In,qn,Rn,Un,zn,Wn,Xn,Vn,$n,Jn,Kn,Qn,Gn,Yn,Zn,er,tr,nr,rr,ir={},sr={},or,ur={},ar={},fr,lr,cr,hr,pr,dr={},vr={},mr,gr,yr,br,wr=0,Er=[];ht[Bt]=r(yn(x));ht[Ft]=r(yn(I+" "+R,yn(ft)));ht[jt]=r(yn(I+" "+q,yn(at)));dr[Bt]=[];dr[Ft]=[];dr[jt]=[];vr[Bt]={};o.prevent={};if(xt){ht.addClass(v)}z.fotorama=this;var qr=r(yn("",yn(mt))),Rr,Ur=function(){qr.attr("class",mt+" "+mt+"--"+zr);zr++;if(zr>4)zr=0},zr;o.startAutoplay=function(e){if(o.autoplay)return this;hr=pr=false;kr(e||s.autoplay);pi();return this};o.stopAutoplay=function(){if(o.autoplay){hr=pr=true;pi()}return this};o.show=function(e){var t;if(typeof e!=="object"){t=e;e={}}else{t=e.index}t=t===">"?Un+1:t==="<"?Un-1:t==="<<"?0:t===">>"?W-1:t;t=isNaN(t)?mn(t,c,true):t;t=typeof t==="undefined"?Fn||0:t;o.activeIndex=Fn=_r(t);Wn=Dr(Fn);Xn=Pr(Fn);qn=[Fn,Wn,Xn];Un=$n?t:Fn;var n=Math.abs(zn-Un),r=en(e.time,function(){return Math.min(nr*(1+(n-1)/12),nr*2)}),i=e.overPos;if(e.slow)r*=10;o.activeFrame=In=c[Fn];mi(jn,In.i!==c[Or(Rn)].i);$r(qn,"stage");Kr([Un,Dr(Un),Pr(Un)]);wi("go",true);fi("show",e.direct);var u=o.show.onEnd=function(t){if(u.ok)return;u.ok=true;Vr();Ir(qn,"stage");t||ui(true);fi("showend",e.direct);wi("go",false);yi();hi();pi()};if(!Zn){Tn(Ct,{pos:-Kt(Un,sr.w,_t,Rn),overPos:i,time:r,onEnd:u,_001:true})}else{var a=In[Bt],f=Fn!==zn?c[zn][Bt]:null;Nn(a,f,It,{time:r,method:s.transition,onEnd:u},Er)}ei();if(Jn){ii();var l=Mr(Fn+Rt(Un-zn,-1,1));ri({time:r,coo:l!==Fn&&e.coo,guessIndex:typeof e.coo!=="undefined"?l:Fn});if(Kn)ni(r)}cr=typeof zn!=="undefined"&&zn!==Fn;zn=Fn;s.hash&&cr&&!o.eq&&hn(In.id||Fn+1);return this};o.requestFullScreen=function(){if(Gn&&!o.fullScreen){fr=gt.scrollTop();lr=gt.scrollLeft();En(0,0);wi("x",true);mr=r.extend({},sr);e.addClass(Y).appendTo(wt.addClass(p));bt.addClass(p);mi(jn,true,true);o.fullScreen=true;if(Yn){u.request(l)}o.resize();Ir(qn,"stage");fi("fullscreenenter")}return this};o.cancelFullScreen=function(){if(Yn&&u.is()){u.cancel(t)}else{di()}return this};if(t.addEventListener){t.addEventListener(u.event,function(){if(c&&!u.is()&&
4!jn){di()}},false)}o.resize=function(t){if(!c)return this;ai(!o.fullScreen?Sn(t):{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null},o.fullScreen);var n=arguments[1]||0,r=arguments[2],i=sr.width,s=sr.height,u=sr.ratio,a=e.height()-(Jn?Yt.height():0);if(Jt(i)){ht.css({width:i,minWidth:sr.minwidth,maxWidth:sr.maxwidth});i=sr.w=ht.width();s=$t(s)/100*a||Vt(s);s=s||u&&i/u;if(s){i=Math.round(i);s=sr.h=Math.round(Rt(s,$t(sr.minheight)/100*a||Vt(sr.minheight),$t(sr.maxheight)/100*a||Vt(sr.maxheight)));ui();Et.addClass(C).stop().animate({width:i,height:s},n,function(){Et.removeClass(C)});if(Jn){Yt.stop().animate({width:i},n);ri({guessIndex:Fn,time:n,keep:true});if(Kn&&Gr.nav)ni(n)}or=r||true;xi()}}wr=Et.offset().left;return this};o.setOptions=function(e){r.extend(s,e);Si();return this};o.shuffle=function(){c&&bn(c)&&Si();return this};o.destroy=function(){o.cancelFullScreen();o.stopAutoplay();c=o.data=null;Tr();qn=[];oi(Bt);return this};o.playVideo=function(){var e=o.activeFrame,t=e.video,n=Fn;if(typeof t==="object"&&e.videoReady){Yn&&o.fullScreen&&o.cancelFullScreen();cn(function(){return!u.is()||n!==Fn},function(){if(n===Fn){e.$video=e.$video||r(r.Fotorama.jst.video(t));e.$video.appendTo(e[Bt]);ht.addClass(m);jn=e.$video;Cr();fi("loadvideo")}})}return this};o.stopVideo=function(){mi(jn,true,true);return this};Et.on("mousemove",yi);ur=Dn(Ct,{onStart:li,onMove:function(e,t){vi(Et,t.edge)},onEnd:function(e){vi(Et);ci();var t=(Lt&&!yr||e.touch)&&s.arrows;if(e.moved||t&&e.pos!==e.newPos){var n=Qt(e.newPos,sr.w,_t,Rn);o.show({index:n,time:Zn?nr:e.time,overPos:e.overPos,direct:true})}else if(!e.aborted){bi(e.startEvent,t)}},getPos:function(){return-Kt(Un,sr.w,_t,Rn)},_001:true,timeLow:1,timeHigh:1,friction:2,select:"."+Q+", ."+Q+" *",$wrap:Et});ar=Dn(tn,{onStart:li,onMove:function(e,t){vi(Yt,t.edge)},onEnd:function(e){function t(){ri.l=e.newPos;hi();pi();Qr(e.newPos,true)}ci();if(!e.moved){var n=e.$target.closest("."+I,tn)[0];n&&Ei.call(n,e.startEvent)}else if(e.pos!==e.newPos){Tn(tn,{time:e.time,pos:e.newPos,overPos:e.overPos,onEnd:t});Qr(e.newPos);vi(Yt,vn(e.newPos,kn.min,kn.max))}else{t()}},timeLow:.5,timeHigh:2,friction:5,$wrap:Yt});ht.hover(function(){setTimeout(function(){if(gr)return;yr=true;gi(!yr)},0)},function(){if(!yr)return;yr=false;gi(!yr)});gn(Wt,function(e){e.preventDefault();if(jn){mi(jn,true,true)}else{ci();o.show({index:Wt.index(this)?">":"<",slow:e.altKey,direct:true})}},{onStart:function(){li();ur.control=true},tail:ur});r.each("load push pop shift unshift reverse sort splice".split(" "),function(e,t){o[t]=function(){c=c||[];if(t!=="load"){Array.prototype[t].apply(c,arguments)}else if(arguments[0]&&typeof arguments[0]==="object"&&arguments[0].length){c=arguments[0]}Si();return o}});Si()};r.fn.fotorama=function(e){return this.each(function(){var t=this,n=r(this),i=n.data(),s=i.fotorama;if(!s){cn(function(){return!fn(t)},function(){i.urtext=n.html();new r.Fotorama(n,r.extend({},{width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,nav:"dots",navposition:"bottom",thumbwidth:Dt,thumbheight:Dt,arrows:true,click:true,swipe:true,allowfullscreen:false,fit:"contain",transition:"slide",transitionduration:Ot,captions:true,hash:false,startindex:0,autoplay:false,stopautoplayontouch:true,keyboard:false,loop:false,shuffle:false,shadows:true},e,i))})}else{s.setOptions(e)}})};r.Fotorama.instances=[];r.Fotorama.cache={};r=r||{};r.Fotorama=r.Fotorama||{};r.Fotorama.jst=r.Fotorama.jst||{};r.Fotorama.jst.style=function(e){var t,n="",r=s.escape;n+=".fotorama"+((t=e.s)==null?"":t)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+((t=e.m)==null?"":t)+"px;\nheight:"+((t=e.h)==null?"":t)+"px}\n.fotorama"+((t=e.s)==null?"":t)+" .fotorama__thumb-border{\nheight:"+((t=e.h-e.m*(e.q?0:2))==null?"":t)+"px;\nborder-width:"+((t=e.m)==null?"":t)+"px;\nmargin-top:"+((t=e.m)==null?"":t)+"px}";return n};r.Fotorama.jst.video=function(e){function o(){n+=i.call(arguments,"")}var t,n="",r=s.escape,i=Array.prototype.join;n+='<div class="fotorama__video"><iframe src="';o(e.type=="youtube"?"http://youtube.com/embed/"+e.id+"?autoplay=1&showinfo=0&theme=light&autohide=1&rel=0&wmode=opaque":e.type=="vimeo"?"http://player.vimeo.com/video/"+e.id+"?autoplay=1&badge=0":e.id);n+='" frameborder="0" allowfullscreen></iframe></div>';return n};r(function(){r("."+h+':not([data-auto="false"])').fotorama()})})(window,document,location,jQuery)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.