From 744986b6b081c2f1e562ec25988a22a5e5970767 Mon Sep 17 00:00:00 2001 From: Nazarn96 Date: Mon, 1 Apr 2019 09:55:47 +0300 Subject: [PATCH] [backport] issue - 21507 --- lib/web/fotorama/fotorama.js | 12 ++++++++++-- lib/web/fotorama/fotorama.min.js | 5 +---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index 4062c501cb798..9c8c86a65b94d 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -1455,16 +1455,24 @@ fotoramaVersion = '4.6.4'; } } else { stopEvent(e); - (options.onMove || noop).call(el, e, {touch: touchFLAG}); + if (movedEnough(xDiff,yDiff)) { + (options.onMove || noop).call(el, e, {touch: touchFLAG}); + } } - if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) { + if (!moved && movedEnough(xDiff, yDiff) && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) + { moved = true; } tail.checked = tail.checked || xWin || yWin; } + + function movedEnough(xDiff, yDiff) { + return xDiff > yDiff && xDiff > 1.5; + } + function onEnd(e) { (options.onTouchEnd || noop)(); diff --git a/lib/web/fotorama/fotorama.min.js b/lib/web/fotorama/fotorama.min.js index e8eb9fbda63ef..f416d57488925 100644 --- a/lib/web/fotorama/fotorama.min.js +++ b/lib/web/fotorama/fotorama.min.js @@ -1,4 +1 @@ -/*! - * Fotorama 4.6.4 | http://fotorama.io/license/ - */ -fotoramaVersion="4.6.4";(function(bo,k,a3,bV,aP){var ag="fotorama",bH="fotorama__fullscreen",ae=ag+"__wrap",ah=ae+"--css2",aX=ae+"--css3",bt=ae+"--video",ar=ae+"--fade",aw=ae+"--slide",P=ae+"--no-controls",aM=ae+"--no-shadows",U=ae+"--pan-y",a0=ae+"--rtl",az=ae+"--only-active",bN=ae+"--no-captions",f=ae+"--toggle-arrows",a7=ag+"__stage",x=a7+"__frame",l=x+"--video",B=a7+"__shaft",aB=ag+"__grab",bC=ag+"__pointer",aK=ag+"__arr",F=aK+"--disabled",bc=aK+"--prev",r=aK+"--next",bO=ag+"__nav",bq=bO+"-wrap",aH=bO+"__shaft",b=bq+"--vertical",ax=bq+"--list",bZ=bq+"--horizontal",bW=bO+"--dots",ai=bO+"--thumbs",aG=bO+"__frame",br=ag+"__fade",al=br+"-front",n=br+"-rear",aW=ag+"__shadow",bz=aW+"s",S=bz+"--left",aL=bz+"--right",a2=bz+"--top",aR=bz+"--bottom",a4=ag+"__active",a9=ag+"__select",bs=ag+"--hidden",M=ag+"--fullscreen",aJ=ag+"__fullscreen-icon",bP=ag+"__error",bM=ag+"__loading",c=ag+"__loaded",b3=c+"--full",bg=c+"--img",bR=ag+"__grabbing",J=ag+"__img",Y=J+"--full",bS=ag+"__thumb",b0=bS+"__arr--left",H=bS+"__arr--right",cb=bS+"-border",bd=ag+"__html",af=ag+"-video-container",bJ=ag+"__video",T=bJ+"-play",w=bJ+"-close",au=ag+"_horizontal_ratio",aY=ag+"_vertical_ratio",ca=ag+"__spinner",Z=ca+"--show";var E=bV&&bV.fn.jquery.split(".");if(!E||E[0]<1||(E[0]==1&&E[1]<8)){throw"Fotorama requires jQuery 1.8 or later and will not run without it."}var bx={};var ap=(function(co,ct,cj){var cf="2.8.3",cm={},cD=ct.documentElement,cE="modernizr",cB=ct.createElement(cE),cp=cB.style,cg,cw={}.toString,cy=" -webkit- -moz- -o- -ms- ".split(" "),cd="Webkit Moz O ms",cG=cd.split(" "),cq=cd.toLowerCase().split(" "),ck={},ce={},cu={},cA=[],cv=cA.slice,cc,cz=function(cQ,cS,cK,cR){var cJ,cP,cM,cN,cI=ct.createElement("div"),cO=ct.body,cL=cO||ct.createElement("body");if(parseInt(cK,10)){while(cK--){cM=ct.createElement("div");cM.id=cR?cR[cK]:cE+(cK+1);cI.appendChild(cM)}}cJ=["­",'"].join("");cI.id=cE;(cO?cI:cL).innerHTML+=cJ;cL.appendChild(cI);if(!cO){cL.style.background="";cL.style.overflow="hidden";cN=cD.style.overflow;cD.style.overflow="hidden";cD.appendChild(cL)}cP=cS(cI,cQ);if(!cO){cL.parentNode.removeChild(cL);cD.style.overflow=cN}else{cI.parentNode.removeChild(cI)}return !!cP},cs=({}).hasOwnProperty,cC;if(!cl(cs,"undefined")&&!cl(cs.call,"undefined")){cC=function(cI,cJ){return cs.call(cI,cJ)}}else{cC=function(cI,cJ){return((cJ in cI)&&cl(cI.constructor.prototype[cJ],"undefined"))}}if(!Function.prototype.bind){Function.prototype.bind=function cH(cK){var cL=this;if(typeof cL!="function"){throw new TypeError()}var cI=cv.call(arguments,1),cJ=function(){if(this instanceof cJ){var cO=function(){};cO.prototype=cL.prototype;var cN=new cO();var cM=cL.apply(cN,cI.concat(cv.call(arguments)));if(Object(cM)===cM){return cM}return cN}else{return cL.apply(cK,cI.concat(cv.call(arguments)))}};return cJ}}function cr(cI){cp.cssText=cI}function ci(cJ,cI){return cr(cy.join(cJ+";")+(cI||""))}function cl(cJ,cI){return typeof cJ===cI}function cn(cJ,cI){return !!~(""+cJ).indexOf(cI)}function cF(cK,cI){for(var cJ in cK){var cL=cK[cJ];if(!cn(cL,"-")&&cp[cL]!==cj){return cI=="pfx"?cL:true}}return false}function cx(cJ,cM,cL){for(var cI in cJ){var cK=cM[cJ[cI]];if(cK!==cj){if(cL===false){return cJ[cI]}if(cl(cK,"function")){return cK.bind(cL||cM)}return cK}}return false}function i(cM,cI,cL){var cJ=cM.charAt(0).toUpperCase()+cM.slice(1),cK=(cM+" "+cG.join(cJ+" ")+cJ).split(" ");if(cl(cI,"string")||cl(cI,"undefined")){return cF(cK,cI)}else{cK=(cM+" "+(cq).join(cJ+" ")+cJ).split(" ");return cx(cK,cI,cL)}}ck.touch=function(){var cI;if(("ontouchstart" in co)||co.DocumentTouch&&ct instanceof DocumentTouch){cI=true}else{cz(["@media (",cy.join("touch-enabled),("),cE,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(cJ){cI=cJ.offsetTop===9})}return cI};ck.csstransforms3d=function(){var cI=!!i("perspective");if(cI&&"webkitPerspective" in cD.style){cz("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(cJ,cK){cI=cJ.offsetLeft===9&&cJ.offsetHeight===3})}return cI};ck.csstransitions=function(){return i("transition")};for(var ch in ck){if(cC(ck,ch)){cc=ch.toLowerCase();cm[cc]=ck[ch]();cA.push((cm[cc]?"":"no-")+cc)}}cm.addTest=function(cJ,cK){if(typeof cJ=="object"){for(var cI in cJ){if(cC(cJ,cI)){cm.addTest(cI,cJ[cI])}}}else{cJ=cJ.toLowerCase();if(cm[cJ]!==cj){return cm}cK=typeof cK=="function"?cK():cK;if(typeof enableClasses!=="undefined"&&enableClasses){cD.className+=" "+(cK?"":"no-")+cJ}cm[cJ]=cK}return cm};cr("");cB=cg=null;cm._version=cf;cm._prefixes=cy;cm._domPrefixes=cq;cm._cssomPrefixes=cG;cm.testProp=function(cI){return cF([cI])};cm.testAllProps=i;cm.testStyles=cz;cm.prefixed=function(cK,cJ,cI){if(!cJ){return i(cK,"pfx")}else{return i(cK,cJ,cI)}};return cm})(bo,k);var bB={ok:false,is:function(){return false},request:function(){},cancel:function(){},event:"",prefix:""},h="webkit moz o ms khtml".split(" ");if(typeof k.cancelFullScreen!="undefined"){bB.ok=true}else{for(var bv=0,N=h.length;bv=i?"bottom":"top bottom"):(ce<=cd?"left":ce>=i?"right":"left right")}function z(cc,cd,i){i=i||{};cc.each(function(){var cg=bV(this),cf=cg.data(),ce;if(cf.clickOn){return}cf.clickOn=true;bV.extend(aI(cg,{onStart:function(ch){ce=ch;(i.onStart||g).call(this,ch)},onMove:i.onMove||g,onTouchEnd:i.onTouchEnd||g,onEnd:function(ch){if(ch.moved){return}cd.call(this,ce)}}),{noMove:true})})}function ab(i,cc){return'
'+(cc||"")+"
"}function aT(i){return"."+i}function q(i){var cc='';return cc}function aC(cf){var cc=cf.length;while(cc){var ce=Math.floor(Math.random()*cc--);var cd=cf[cc];cf[cc]=cf[ce];cf[ce]=cd}return cf}function bG(i){return Object.prototype.toString.call(i)=="[object Array]"&&bV.map(i,function(cc){return bV.extend({},cc)})}function bU(i,cd,cc){i.scrollLeft(cd||0).scrollTop(cc||0)}function bA(i){if(i){var cc={};bV.each(i,function(cd,ce){cc[cd.toLowerCase()]=ce});return cc}}function bm(i){if(!i){return}var cc=+i;if(!isNaN(cc)){return cc}else{cc=i.split("/");return +cc[0]/+cc[1]||aP}}function D(cd,ce,cc,i){if(!ce){return}cd.addEventListener?cd.addEventListener(ce,cc,!!i):cd.attachEvent("on"+ce,cc)}function a5(i,cc){if(i>cc.max){i=cc.max}else{if(i=(ci-cf)){if(cc==="horizontal"){cg=-ce.position().left}else{cg=-ce.position().top}}else{if((cj+i.margin)*(ch)<=Math.abs(cf)){if(cc==="horizontal"){cg=-ce.position().left+ci-(cj+i.margin)}else{cg=-ce.position().top+ci-(cj+i.margin)}}else{cg=cf}}cg=a5(cg,ck);return cg||0}function aj(i){return !!i.getAttribute("disabled")}function ad(cc,i){if(i){return{disabled:cc}}else{return{tabindex:cc*-1+"",disabled:cc}}}function a(cc,i){D(cc,"keyup",function(cd){aj(cc)||cd.keyCode==13&&i.call(cc,cd)})}function bL(cc,i){D(cc,"focus",cc.onfocusin=function(cd){i.call(cc,cd)},true)}function O(cc,i){cc.preventDefault?cc.preventDefault():(cc.returnValue=false);i&&cc.stopPropagation&&cc.stopPropagation()}function aE(cd,cc){var i=/iP(ad|hone|od)/i.test(bo.navigator.userAgent);if(i&&cc==="touchend"){cd.on("touchend",function(ce){bw.trigger("mouseup",ce)})}cd.on(cc,function(ce){O(ce,true);return false})}function ay(i){return i?">":"<"}var aS=(function(){function cd(ch,ce,cg){var cf=ce/cg;if(cf<=1){ch.parent().removeClass(au);ch.parent().addClass(aY)}else{ch.parent().removeClass(aY);ch.parent().addClass(au)}}function i(cf,cg,ch){var ce=ch;if(!cf.attr(ce)&&cf.attr(ce)!==aP){cf.attr(ce,cg)}if(cf.find("["+ce+"]").length){cf.find("["+ce+"]").each(function(){bV(this).attr(ce,cg)})}}function cc(cf,ce,ci){var cg=false,ch;cf.showCaption===ci||cf.showCaption===true?ch=true:ch=false;if(!ce){return false}if(cf.caption&&ch){cg=true}return cg}return{setRatio:cd,setThumbAttr:i,isExpectedCaption:cc}}(aS||{},jQuery));function A(ce,cd){var cc=ce.data(),i=Math.round(cd.pos),cf=function(){if(cc&&cc.sliding){cc.sliding=false}(cd.onEnd||g)()};if(typeof cd.overPos!=="undefined"&&cd.overPos!==cd.pos){i=cd.overPos}var cg=bV.extend(b2(i,cd.direction),cd.width&&{width:cd.width},cd.height&&{height:cd.height});if(cc&&cc.sliding){cc.sliding=true}if(aA){ce.css(bV.extend(b6(cd.time),cg));if(cd.time>10){X(ce,"transform",cf,cd.time)}else{cf()}}else{ce.stop().animate(cg,cd.time,u,cf)}}function aq(ck,cj,cc,cm,ce,i){var ch=typeof i!=="undefined";if(!ch){ce.push(arguments);Array.prototype.push.call(arguments,ce.length);if(ce.length>1){return}}ck=ck||bV(ck);cj=cj||bV(cj);var ci=ck[0],cg=cj[0],cf=cm.method==="crossfade",cl=function(){if(!cl.done){cl.done=true;var cn=(ch||ce.shift())&&ce.shift();cn&&aq.apply(this,cn);(cm.onEnd||g)(!!cn)}},cd=cm.time/(i||1);cc.removeClass(n+" "+al);ck.stop().addClass(n);cj.stop().addClass(al);cf&&cg&&ck.fadeTo(0,0);ck.fadeTo(cf?cd:0,1,cf&&cl);cj.fadeTo(cd,0,cl);(ci&&cf)||cg||cl()}var G,b5,e,j,bD;function bn(i){var cc=(i.touches||[])[0]||i;i._x=cc.pageX||cc.originalEvent.pageX;i._y=cc.clientY||cc.originalEvent.clientY;i._now=bV.now()}function aI(cr,cg){var cc=cr[0],cj={},i,cl,cf,cn,cs,cd,ce,co,ch;function cq(ct){cf=bV(ct.target);cj.checked=cd=ce=ch=false;if(i||cj.flow||(ct.touches&&ct.touches.length>1)||ct.which>1||(G&&G.type!==ct.type&&e)||(cd=cg.select&&cf.is(cg.select,cc))){return cd}cs=ct.type==="touchstart";ce=cf.is("a, a *",cc);cn=cj.control;co=(cj.noMove||cj.noSwipe||cn)?16:!cj.snap?4:0;bn(ct);cl=G=ct;b5=ct.type.replace(/down|start/,"move").replace(/Down/,"Move");(cg.onStart||g).call(cc,ct,{control:cn,$target:cf});i=cj.flow=true;if(!cs||cj.go){O(ct)}}function ck(cx){if((cx.touches&&cx.touches.length>1)||(aZ&&!cx.isPrimary)||b5!==cx.type||!i){i&&ci();(cg.onTouchEnd||g)();return}bn(cx);var cy=Math.abs(cx._x-cl._x),cu=Math.abs(cx._y-cl._y),cw=cy-cu,cv=(cj.go||cj.x||cw>=0)&&!cj.noSwipe,ct=cw<0;if(cs&&!cj.checked){if(i=cv){O(cx)}}else{O(cx);(cg.onMove||g).call(cc,cx,{touch:cs})}if(!ch&&Math.sqrt(Math.pow(cy,2)+Math.pow(cu,2))>co){ch=true}cj.checked=cj.checked||cv||ct}function ci(cu){(cg.onTouchEnd||g)();var ct=i;cj.control=i=false;if(ct){cj.flow=false}if(!ct||(ce&&!cj.checked)){return}cu&&O(cu);e=true;clearTimeout(j);j=setTimeout(function(){e=false},1000);(cg.onEnd||g).call(cc,{moved:ch,$target:cf,control:cn,touch:cs,startEvent:cl,aborted:!cu||cu.type==="MSPointerCancel"})}function cm(){if(cj.flow){return}cj.flow=true}function cp(){if(!cj.flow){return}cj.flow=false}if(aZ){D(cc,"MSPointerDown",cq);D(k,"MSPointerMove",ck);D(k,"MSPointerCancel",ci);D(k,"MSPointerUp",ci)}else{D(cc,"touchstart",cq);D(cc,"touchmove",ck);D(cc,"touchend",ci);D(k,"touchstart",cm);D(k,"touchend",cp);D(k,"touchcancel",cp);bf.on("scroll",cp);cr.on("mousedown pointerdown",cq);bw.on("mousemove pointermove",ck).on("mouseup pointerup",ci)}if(ap.touch){bD="a"}else{bD="div"}cr.on("click",bD,function(ct){cj.checked&&O(ct)});return cj}function ao(cz,cd){var cc=cz[0],ce=cz.data(),cm={},cw,cf,cx,cj,ch,cy,co,cg,cr,ct,cp,cq,i,cv,ci,cn;function cs(cA,cB){cn=true;cw=cf=(cq==="vertical")?cA._y:cA._x;co=cA._now;cy=[[co,cw]];cx=cj=cm.noMove||cB?0:a1(cz,(cd.getPos||g)());(cd.onStart||g).call(cc,cA)}function cu(cB,cA){cr=cm.min;ct=cm.max;cp=cm.snap,cq=cm.direction||"horizontal",cz.navdir=cq;i=cB.altKey;cn=ci=false;cv=cA.control;if(!cv&&!ce.sliding){cs(cB)}}function cl(cB,cA){if(!cm.noSwipe){if(!cn){cs(cB)}cf=(cq==="vertical")?cB._y:cB._x;cy.push([cB._now,cf]);cj=cx-(cw-cf);ch=bp(cj,cr,ct,cq);if(cj<=cr){cj=aF(cj,cr)}else{if(cj>=ct){cj=aF(cj,ct)}}if(!cm.noMove){cz.css(b2(cj,cq));if(!ci){ci=true;cA.touch||aZ||cz.addClass(bR)}(cd.onMove||g).call(cc,cB,{pos:cj,edge:ch})}}}function ck(cJ){if(cm.noSwipe&&cJ.moved){return}if(!cn){cs(cJ.startEvent,true)}cJ.touch||aZ||cz.removeClass(bR);cg=bV.now();var cG=cg-b8,cK,cP,cQ,cS=null,cA,cE,cN,cD,cF,cI=ba,cO,cH=cd.friction;for(var cC=cy.length-1;cC>=0;cC--){cK=cy[cC][0];cP=Math.abs(cK-cG);if(cS===null||cPcQ){break}}cQ=cP}cD=bb(cj,cr,ct);var cT=cA-cf,cR=cT>=0,cL=cg-cS,cB=cL>b8,cM=!cB&&cj!==cx&&cD===cj;if(cp){cD=bb(Math[cM?(cR?"floor":"ceil"):"round"](cj/cp)*cp,cr,ct);cr=ct=cD}if(cM&&(cp||cD===cj)){cO=-(cT/cL);cI*=bb(Math.abs(cO),cd.timeLow,cd.timeHigh);cE=Math.round(cj+cO*cI/cH);if(!cp){cD=cE}if(!cR&&cE>ct||cR&&cE"),c9=bV(ab(bs)),dk=d6.find(aT(ae)),cf=dk.find(aT(a7)),dY=cf[0],cl=d6.find(aT(B)),c8=bV(),dW=d6.find(aT(bc)),da=d6.find(aT(r)),cU=d6.find(aT(aK)),dU=d6.find(aT(bq)),dO=dU.find(aT(bO)),cF=dO.find(aT(aH)),dA,cB=bV(),cW=bV(),dS=cl.data(),cX=cF.data(),c7=d6.find(aT(cb)),eg=d6.find(aT(b0)),dX=d6.find(aT(H)),dM=d6.find(aT(aJ)),dD=dM[0],cH=bV(ab(T)),dt=d6.find(aT(w)),d1=dt[0],eb=d6.find(aT(ca)),dg,eo=false,dF,ea,c2,ed,dw,d4,cN,cK,dx,dj,cq,c0,d8,c4,d2,cv,ch,ej,ds,cu,ec,dH,dE,d0={},en={},dG,d5={},cG={},dy={},ef={},cs,cT,ee,cj,el,cd={},er={},dZ,c6,dz,dr,d3=0,cI=[];dk[bu]=bV('
');dk[bl]=bV(bV.Fotorama.jst.thumb());dk[b7]=bV(bV.Fotorama.jst.dots());cd[bu]=[];cd[bl]=[];cd[b7]=[];er[bu]={};dk.addClass(aA?aX:ah);cR.fotorama=this;function ep(){bV.each(dP,function(ey,eA){if(!eA.i){eA.i=cY++;var ez=at(eA.video,true);if(ez){var ex={};eA.video=ez;if(!eA.img&&!eA.thumb){ex=aQ(eA,dP,cg)}else{eA.thumbsReady=true}v(dP,{img:ex.img,thumb:ex.thumb},eA.i,cg)}}})}function df(ex){return dE[ex]}function i(){if(cf!==aP){if(c3.navdir=="vertical"){var ex=c3.thumbwidth+c3.thumbmargin;cf.css("left",ex);da.css("right",ex);dM.css("right",ex);dk.css("width",dk.css("width")+ex);cl.css("max-width",dk.width()-ex)}else{cf.css("left","");da.css("right","");dM.css("right","");dk.css("width",dk.css("width")+ex);cl.css("max-width","")}}}function ek(eB){var eC="keydown."+ag,eD=ag+cC,ex="keydown."+eD,eA="keyup."+eD,ey="resize."+eD+" orientationchange."+eD,ez;if(eB){bw.on(ex,function(eG){var eF,eE;if(dg&&eG.keyCode===27){eF=true;cO(dg,true,true)}else{if(cg.fullScreen||(c3.keyboard&&!cg.index)){if(eG.keyCode===27){eF=true;cg.cancelFullScreen()}else{if((eG.shiftKey&&eG.keyCode===32&&df("space"))||(!eG.altKey&&!eG.metaKey&&eG.keyCode===37&&df("left"))||(eG.keyCode===38&&df("up")&&bV(":focus").attr("data-gallery-role"))){cg.longPress.progress();eE="<"}else{if((eG.keyCode===32&&df("space"))||(!eG.altKey&&!eG.metaKey&&eG.keyCode===39&&df("right"))||(eG.keyCode===40&&df("down")&&bV(":focus").attr("data-gallery-role"))){cg.longPress.progress();eE=">"}else{if(eG.keyCode===36&&df("home")){cg.longPress.progress();eE="<<"}else{if(eG.keyCode===35&&df("end")){cg.longPress.progress();eE=">>"}}}}}}}(eF||eE)&&O(eG);ez={index:eE,slow:eG.altKey,user:true};eE&&(cg.longPress.inProgress?cg.showWhileLongPress(ez):cg.show(ez))});if(eB){bw.on(eA,function(eE){if(cg.longPress.inProgress){cg.showEndLongPress({user:true})}cg.longPress.reset()})}if(!cg.index){bw.off(eC).on(eC,"textarea, input, select",function(eE){!I.hasClass(bH)&&eE.stopPropagation()})}bf.on(ey,cg.resize)}else{bw.off(ex);bf.off(ey)}}function dd(ex){if(ex===dd.f){return}if(ex){d6.addClass(ag+" "+cQ).before(c9).before(de);C(cg)}else{c9.detach();de.detach();d6.html(cR.urtext).removeClass(cQ);av(cg)}ek(ex);dd.f=ex}function dn(){dP=cg.data=dP||bG(c3.data)||bI(d6);c1=cg.size=dP.length;eq.ok&&c3.shuffle&&aC(dP);ep();eo=cn(eo);c1&&dd(true)}function em(){var ex=c1<2||dg;d5.noMove=ex||cv;d5.noSwipe=ex||!c3.swipe;!cu&&cl.toggleClass(aB,!c3.click&&!d5.noMove&&!d5.noSwipe);aZ&&dk.toggleClass(U,!d5.noSwipe)}function dq(ex){if(ex===true){ex=""}c3.autoplay=Math.max(+ex||bQ,ds*1.5)}function db(ex){if(ex.navarrows&&ex.nav==="thumbs"){eg.show();dX.show()}else{eg.hide();dX.hide()}}function ck(ex,ey){return Math.floor(dk.width()/(ey.thumbwidth+ey.thumbmargin))}function dQ(){if(!c3.nav||c3.nav==="dots"){c3.navdir="horizontal"}cg.options=c3=bA(c3);b4=ck(dk,c3);cv=(c3.transition==="crossfade"||c3.transition==="dissolve");dj=c3.loop&&(c1>2||(cv&&(!cu||cu!=="slide")));ds=+c3.transitionduration||ba;dH=c3.direction==="rtl";dE=bV.extend({},c3.keyboard&&p,c3.keyboard);db(c3);var ey={add:[],remove:[]};function ex(ez,eA){ey[ez?"add":"remove"].push(eA)}if(c1>1){cq=c3.nav;d8=c3.navposition==="top";ey.remove.push(a9);cU.toggle(!!c3.arrows)}else{cq=false;cU.hide()}dh();cJ();ev();if(c3.autoplay){dq(c3.autoplay)}ch=m(c3.thumbwidth)||L;ej=m(c3.thumbheight)||L;cG.ok=ef.ok=c3.trackpad&&!bh;em();dL(c3,[en]);c0=cq==="thumbs";if(dU.filter(":hidden")&&!!cq){dU.show()}if(c0){dl(c1,"navThumb");dA=cW;dr=bl;an(de,bV.Fotorama.jst.style({w:ch,h:ej,b:c3.thumbborderwidth,m:c3.thumbmargin,s:cC,q:!aN}));dO.addClass(ai).removeClass(bW)}else{if(cq==="dots"){dl(c1,"navDot");dA=cB;dr=b7;dO.addClass(bW).removeClass(ai)}else{dU.hide();cq=false;dO.removeClass(ai+" "+bW)}}if(cq){if(d8){dU.insertBefore(cf)}else{dU.insertAfter(cf)}cz.nav=false;cz(dA,cF,"nav")}c4=c3.allowfullscreen;if(c4){dM.prependTo(cf);d2=s&&c4==="native";aE(dM,"touchend")}else{dM.detach();d2=false}ex(cv,ar);ex(!cv,aw);ex(!c3.captions,bN);ex(dH,a0);ex(c3.arrows,f);ec=c3.shadows&&!bh;ex(!ec,aM);dk.addClass(ey.add.join(" ")).removeClass(ey.remove.join(" "));d0=bV.extend({},c3);i()}function cZ(ex){return ex<0?(c1+(ex%c1))%c1:ex>=c1?ex%c1:ex}function cn(ex){return bb(ex,0,c1-1)}function du(ex){return dj?cZ(ex):cn(ex)}function dB(ex){return ex>0||dj?ex-1:false}function ci(ex){return ex1&&dP[eE]===eD&&!eD.html&&!eD.deleted&&!eD.video&&!eN){eD.deleted=true;cg.splice(eE,1)}}}function eL(){bV.Fotorama.measures[eF]=eO.measures=bV.Fotorama.measures[eF]||{width:eS.width,height:eS.height,ratio:eS.width/eS.height};cc(eO.measures.width,eO.measures.height,eO.measures.ratio,eE);eG.off("load error").addClass(""+(eN?Y:J)).attr("aria-hidden","false").prependTo(eC);if(eC.hasClass(x)&&!eC.hasClass(af)){eC.attr("href",eG.attr("src"))}V(eG,(bV.isFunction(eA)?eA():eA)||en);bV.Fotorama.cache[eF]=eB.state="loaded";setTimeout(function(){eC.trigger("f:load").removeClass(bM+" "+bP).addClass(c+" "+(eN?b3:bg));if(ey==="stage"){eH("load")}else{if(eD.thumbratio===bF||!eD.thumbratio&&c3.thumbratio===bF){eD.thumbratio=eO.measures.ratio;dV()}}},0)}if(!eF){eK();return}function eI(){var eT=10;bX(function(){return !c6||!eT--&&!bh},function(){eL()})}if(!bV.Fotorama.cache[eF]){bV.Fotorama.cache[eF]="*";eG.on("load",eI).on("error",eK)}else{(function eQ(){if(bV.Fotorama.cache[eF]==="error"){eK()}else{if(bV.Fotorama.cache[eF]==="loaded"){setTimeout(eI,0)}else{setTimeout(eQ,100)}}})()}eB.state="";eS.src=eF;if(eB.data.caption){eS.alt=eB.data.caption||""}if(eB.data.full){bV(eS).data("original",eB.data.full)}if(aS.isExpectedCaption(eD,c3.showcaption)){bV(eS).attr("aria-labelledby",eD.labelledby)}})}function cy(){var ex=dF[bu];if(ex&&!ex.data().state){eb.addClass(Z);ex.on("f:load f:error",function(){ex.off("f:load f:error");eb.removeClass(Z)})}}function cL(ex){a(ex,dJ);bL(ex,function(){setTimeout(function(){bU(dO)},0);dT({time:ds,guessIndex:bV(this).data().eq,minMax:dy})})}function dl(ex,ey){dm(ex,ey,function(eB,ez,eG,eD,eA,eC){if(eD){return}eD=eG[eA]=dk[eA].clone();eC=eD.data();eC.data=eG;var eF=eD[0],eE="labelledby"+bV.now();if(ey==="stage"){if(eG.html){bV('
').append(eG._html?bV(eG.html).removeAttr("id").html(eG._html):eG.html).appendTo(eD)}if(eG.id){eE=eG.id||eE}eG.labelledby=eE;if(aS.isExpectedCaption(eG,c3.showcaption)){bV(bV.Fotorama.jst.frameCaption({caption:eG.caption,labelledby:eE})).appendTo(eD)}eG.video&&eD.addClass(l).append(cH.clone());bL(eF,function(){setTimeout(function(){bU(cf)},0);cm({index:eC.eq,user:true})});c8=c8.add(eD)}else{if(ey==="navDot"){cL(eF);cB=cB.add(eD)}else{if(ey==="navThumb"){cL(eF);eC.$wrap=eD.children(":first");cW=cW.add(eD);if(eG.video){eC.$wrap.append(cH.clone())}}}}})}function cM(ey,ex){return ey&&ey.length&&V(ey,ex)}function di(ex){dm(ex,"stage",function(eB,ez,eE,eD,eA,eC){if(!eD){return}var ey=cZ(ez);eC.eq=ey;er[bu][ey]=eD.css(bV.extend({left:cv?0:a8(ez,en.w,c3.margin,c2)},cv&&b6(0)));if(be(eD[0])){eD.appendTo(cl);cO(eE.$video)}cM(eC.$img,en);cM(eC.$full,en);if(eD.hasClass(x)&&!(eD.attr("aria-hidden")==="false"&&eD.hasClass(a4))){eD.attr("aria-hidden","true")}})}function dp(eB,ex){var ey,ez,eA;if(cq!=="thumbs"||isNaN(eB)){return}ey=-eB;ez=-eB+en.nw;if(c3.navdir==="vertical"){eB=eB-c3.thumbheight;ez=-eB+en.h}cW.each(function(){var eH=bV(this),eD=eH.data(),eC=eD.eq,eG=function(){return{h:ej,w:eD.w}},eF=eG(),eE=c3.navdir==="vertical"?eD.t>ez:eD.l>ez;eF.w=eD.w;if(eD.l+eD.wen.w/3}function cE(ex){return !dj&&(!(eo+ex)||!(eo-c1+ex))&&!dg}function dh(){var ey=cE(0),ex=cE(1);dW.toggleClass(F,ey).attr(ad(ey,false));da.toggleClass(F,ex).attr(ad(ex,false))}function ev(){var ex=false,ey=false;if(c3.navtype==="thumbs"&&!c3.loop){(eo==0)?ex=true:ex=false;(eo==c3.data.length-1)?ey=true:ey=false}if(c3.navtype==="slides"){var ez=aa(cF,c3.navdir);ez>=dy.max?ex=true:ex=false;ez<=dy.min?ey=true:ey=false}eg.toggleClass(F,ex).attr(ad(ex,true));dX.toggleClass(F,ey).attr(ad(ey,true))}function cJ(){if(cG.ok){cG.prevent={"<":cE(0),">":cE(1)}}}function dI(eD){var eA=eD.data(),eC,eB,ez,ex;if(c0){eC=eA.l;eB=eA.t;ez=eA.w;ex=eA.h}else{eC=eD.position().left;ez=eD.width()}var ey={c:eC+ez/2,min:-eC+c3.thumbmargin*10,max:-eC+en.w-ez-c3.thumbmargin*10};var eE={c:eB+ex/2,min:-eB+c3.thumbmargin*10,max:-eB+en.h-ex-c3.thumbmargin*10};return c3.navdir==="vertical"?eE:ey}function d7(ey){var ex=dF[dr].data();A(c7,{time:ey*1.2,pos:(c3.navdir==="vertical"?ex.t:ex.l),width:ex.w,height:ex.h,direction:c3.navdir})}function dT(eH){var eB=dP[eH.guessIndex][dr],ez=c3.navtype;var eD,ex,eA,eG,eC,ey,eE,eF;if(eB){if(ez==="thumbs"){eD=dy.min!==dy.max;eA=eH.minMax||eD&&dI(dF[dr]);eG=eD&&(eH.keep&&dT.t?dT.l:bb((eH.coo||en.nw/2)-dI(eB).c,eA.min,eA.max));eC=eD&&(eH.keep&&dT.l?dT.l:bb((eH.coo||en.nw/2)-dI(eB).c,eA.min,eA.max));ey=(c3.navdir==="vertical"?eG:eC);eE=eD&&bb(ey,dy.min,dy.max)||0;ex=eH.time*1.1;A(cF,{time:ex,pos:eE,direction:c3.navdir,onEnd:function(){dp(eE,true);ev()}});co(dO,bp(eE,dy.min,dy.max,c3.navdir));dT.l=ey}else{eF=aa(cF,c3.navdir);ex=eH.time*1.11;eE=aD(c3,dy,eH.guessIndex,eF,eB,dU,c3.navdir);A(cF,{time:ex,pos:eE,direction:c3.navdir,onEnd:function(){dp(eE,true);ev()}});co(dO,bp(eE,dy.min,dy.max,c3.navdir))}}}function cS(){dN(dr);cd[dr].push(dF[dr].addClass(a4).attr("data-active",true))}function dN(ey){var ex=cd[ey];while(ex.length){ex.shift().removeClass(a4).attr("data-active",false)}}function ce(ey){var ex=er[ey];bV.each(ea,function(eA,ez){delete ex[cZ(ez)]});bV.each(ex,function(ez,eA){delete ex[ez];eA.detach()})}function dC(ey){c2=ed=eo;var ex=dF[bu];if(ex){dN(bu);cd[bu].push(ex.addClass(a4).attr("data-active",true));if(ex.hasClass(x)){ex.attr("aria-hidden","false")}ey||cg.showStage.onEnd(true);a1(cl,0,true);ce(bu);di(ea);d9();c5();a(cl[0],function(){if(!d6.hasClass(M)){cg.requestFullScreen();dM.focus()}})}}function dL(ey,ex){if(!ey){return}bV.each(ex,function(ez,eA){if(!eA){return}bV.extend(eA,{width:ey.width||eA.width,height:ey.height,minwidth:ey.minwidth,maxwidth:ey.maxwidth,minheight:ey.minheight,maxheight:ey.maxheight,ratio:bm(ey.ratio)})})}function dc(ey,ex){d6.trigger(ag+":"+ey,[cg,ex])}function dR(){clearTimeout(cr.t);c6=1;if(c3.stopautoplayontouch){cg.stopAutoplay()}else{cj=true}}function cr(){if(!c6){return}if(!c3.stopautoplayontouch){cw();es()}cr.t=setTimeout(function(){c6=0},ba+b8)}function cw(){cj=!!(dg||el)}function es(){clearTimeout(es.t);bX.stop(es.w);if(!c3.autoplay||cj){if(cg.autoplay){cg.autoplay=false;dc("stopautoplay")}return}if(!cg.autoplay){cg.autoplay=true;dc("startautoplay")}var ey=eo;var ex=dF[bu].data();es.w=bX(function(){return ex.state||ey!==eo},function(){es.t=setTimeout(function(){if(cj||ey!==eo){return}var ez=cK,eA=dP[ez][bu].data();es.w=bX(function(){return eA.state||ez!==cK},function(){if(cj||ez!==cK){return}cg.show(dj?ay(!dH):cK)})},c3.autoplay)})}cg.startAutoplay=function(ex){if(cg.autoplay){return this}cj=el=false;dq(ex||c3.autoplay);es();return this};cg.stopAutoplay=function(){if(cg.autoplay){cj=el=true;es()}return this};cg.showSlide=function(ez){var eA=aa(cF,c3.navdir),eC,eB=500*1.1,ey=c3.navdir==="horizontal"?c3.thumbwidth:c3.thumbheight,ex=function(){ev()};if(ez==="next"){eC=eA-(ey+c3.margin)*b4}if(ez==="prev"){eC=eA+(ey+c3.margin)*b4}eC=a5(eC,dy);dp(eC,true);A(cF,{time:eB,pos:eC,direction:c3.navdir,onEnd:ex})};cg.showWhileLongPress=function(eA){if(cg.longPress.singlePressInProgress){return}var ez=dK(eA);ew(ez);var eB=cA(eA)/50;var ey=dF;cg.activeFrame=dF=dP[eo];var ex=ey===dF&&!eA.user;cg.showNav(ex,eA,eB);return this};cg.showEndLongPress=function(eA){if(cg.longPress.singlePressInProgress){return}var ez=dK(eA);ew(ez);var eB=cA(eA)/50;var ey=dF;cg.activeFrame=dF=dP[eo];var ex=ey===dF&&!eA.user;cg.showStage(ex,eA,eB);ee=typeof dw!=="undefined"&&dw!==eo;dw=eo;return this};function dK(ey){var ex;if(typeof ey!=="object"){ex=ey;ey={}}else{ex=ey.index}ex=ex===">"?ed+1:ex==="<"?ed-1:ex==="<<"?0:ex===">>"?c1-1:ex;ex=isNaN(ex)?aP:ex;ex=typeof ex==="undefined"?eo||0:ex;return ex}function ew(ex){cg.activeIndex=eo=du(ex);d4=dB(eo);cN=ci(eo);cK=cZ(eo+(dH?-1:1));ea=[eo,d4,cN];ed=dj?ex:eo}function cA(ey){var ex=Math.abs(dw-ed),ez=bj(ey.time,function(){return Math.min(ds*(1+(ex-1)/12),ds*2)});if(ey.slow){ez*=10}return ez}cg.showStage=function(ey,eA,eD){cO(dg,dF.i!==dP[cZ(c2)].i);dl(ea,"stage");di(bh?[ed]:[ed,dB(ed),ci(ed)]);cD("go",true);ey||dc("show",{user:eA.user,time:eD});cj=true;var eC=eA.overPos;var ez=cg.showStage.onEnd=function(eE){if(ez.ok){return}ez.ok=true;eE||dC(true);if(!ey){dc("showend",{user:eA.user})}if(!eE&&cu&&cu!==c3.transition){cg.setOptions({transition:cu});cu=false;return}cy();cx(ea,"stage");cD("go",false);cJ();ei();cw();es();if(cg.fullScreen){dF[bu].find("."+Y).attr("aria-hidden",false);dF[bu].find("."+J).attr("aria-hidden",true)}else{dF[bu].find("."+Y).attr("aria-hidden",true);dF[bu].find("."+J).attr("aria-hidden",false)}};if(!cv){A(cl,{pos:-a8(ed,en.w,c3.margin,c2),overPos:eC,time:eD,onEnd:ez})}else{var ex=dF[bu],eB=dP[dw]&&eo!==dw?dP[dw][bu]:null;aq(ex,eB,c8,{time:eD,method:c3.transition,onEnd:ez},cI)}dh()};cg.showNav=function(ey,ez,eA){ev();if(cq){cS();var ex=cn(eo+bb(ed-dw,-1,1));dT({time:eA,coo:ex!==eo&&ez.coo,guessIndex:typeof ez.coo!=="undefined"?ex:eo,keep:ey});if(c0){d7(eA)}}};cg.show=function(eA){cg.longPress.singlePressInProgress=true;var ez=dK(eA);ew(ez);var eB=cA(eA);var ey=dF;cg.activeFrame=dF=dP[eo];var ex=ey===dF&&!eA.user;cg.showStage(ex,eA,eB);cg.showNav(ex,eA,eB);ee=typeof dw!=="undefined"&&dw!==eo;dw=eo;cg.longPress.singlePressInProgress=false;return this};cg.requestFullScreen=function(){if(c4&&!cg.fullScreen){var ex=bV((cg.activeFrame||{}).$stageFrame||{}).hasClass("fotorama-video-container");if(ex){return}cs=bf.scrollTop();cT=bf.scrollLeft();bU(bf);cD("x",true);dZ=bV.extend({},en);d6.addClass(M).appendTo(I.addClass(bH));R.addClass(bH);cO(dg,true,true);cg.fullScreen=true;if(d2){bB.request(eu)}cg.resize();cx(ea,"stage");cy();dc("fullscreenenter");if(!("ontouchstart" in bo)){dM.focus()}}return this};function cP(){if(cg.fullScreen){cg.fullScreen=false;if(s){bB.cancel(eu)}I.removeClass(bH);R.removeClass(bH);d6.removeClass(M).insertAfter(c9);en=bV.extend({},dZ);cO(dg,true,true);cD("x",false);cg.resize();cx(ea,"stage");bU(bf,cT,cs);dc("fullscreenexit")}}cg.cancelFullScreen=function(){if(d2&&bB.is()){bB.cancel(k)}else{cP()}return this};cg.toggleFullScreen=function(){return cg[(cg.fullScreen?"cancel":"request")+"FullScreen"]()};cg.resize=function(ez){if(!dP){return this}var eC=arguments[1]||0,ey=arguments[2];b4=ck(dk,c3);dL(!cg.fullScreen?bA(ez):{width:bV(bo).width(),maxwidth:null,minwidth:null,height:bV(bo).height(),maxheight:null,minheight:null},[en,ey||cg.fullScreen||c3]);var eB=en.width,ex=en.height,eA=en.ratio,eD=bf.height()-(cq?dO.height():0);if(t(eB)){dk.css({width:""});dk.css({height:""});cf.css({width:""});cf.css({height:""});cl.css({width:""});cl.css({height:""});dO.css({width:""});dO.css({height:""});dk.css({minWidth:en.minwidth||0,maxWidth:en.maxwidth||bK});if(cq==="dots"){dU.hide()}eB=en.W=en.w=dk.width();en.nw=cq&&d(c3.navwidth,eB)||eB;cl.css({width:en.w,marginLeft:(en.W-en.w)/2});ex=d(ex,eD);ex=ex||(eA&&eB/eA);if(ex){eB=Math.round(eB);ex=en.h=Math.round(bb(ex,d(en.minheight,eD),d(en.maxheight,eD)));cf.css({width:eB,height:ex});if(c3.navdir==="vertical"&&!cg.fullscreen){dO.width(c3.thumbwidth+c3.thumbmargin*2)}if(c3.navdir==="horizontal"&&!cg.fullscreen){dO.height(c3.thumbheight+c3.thumbmargin*2)}if(cq==="dots"){dO.width(eB).height("auto");dU.show()}if(c3.navdir==="vertical"&&cg.fullScreen){cf.css("height",bf.height())}if(c3.navdir==="horizontal"&&cg.fullScreen){cf.css("height",bf.height()-dO.height())}if(cq){switch(c3.navdir){case"vertical":dU.removeClass(bZ);dU.removeClass(ax);dU.addClass(b);dO.stop().animate({height:en.h,width:c3.thumbwidth},eC);break;case"list":dU.removeClass(b);dU.removeClass(bZ);dU.addClass(ax);break;default:dU.removeClass(b);dU.removeClass(ax);dU.addClass(bZ);dO.stop().animate({width:en.nw},eC);break}dC();dT({guessIndex:eo,time:eC,keep:true});if(c0&&cz.nav){d7(eC)}}dG=ey||true;eq.ok=true;eq()}}d3=cf.offset().left;i();return this};cg.setOptions=function(ex){bV.extend(c3,ex);dV();return this};cg.shuffle=function(){dP&&aC(dP)&&dV();return this};function co(ex,ey){if(ec){ex.removeClass(S+" "+aL);ex.removeClass(a2+" "+aR);ey&&!dg&&ex.addClass(ey.replace(/^|\s/g," "+bz+"--"))}}cg.longPress={threshold:1,count:0,thumbSlideTime:20,progress:function(){if(!this.inProgress){this.count++;this.inProgress=this.count>this.threshold}},end:function(){if(this.inProgress){this.isEnded=true}},reset:function(){this.count=0;this.inProgress=false;this.isEnded=false}};cg.destroy=function(){cg.cancelFullScreen();cg.stopAutoplay();dP=cg.data=null;dd();ea=[];ce(bu);dV.ok=false;return this};cg.playVideo=function(){var ez=dF,ex=ez.video,ey=eo;if(typeof ex==="object"&&ez.videoReady){d2&&cg.fullScreen&&cg.cancelFullScreen();bX(function(){return !bB.is()||ey!==eo},function(){if(ey===eo){ez.$video=ez.$video||bV(ab(bJ)).append(q(ex));ez.$video.appendTo(ez[bu]);dk.addClass(bt);dg=ez.$video;em();cU.blur();dM.blur();dc("loadvideo")}})}return this};cg.stopVideo=function(){cO(dg,true,true);return this};cg.spliceByIndex=function(ex,ey){ey.i=ex+1;ey.img&&bV.ajax({url:ey.img,type:"HEAD",success:function(){dP.splice(ex,1,ey);dV()}})};function cO(ex,ez,ey){if(ez){dk.removeClass(bt);dg=false;em()}if(ex&&ex!==dg){ex.remove();dc("unloadvideo")}if(ey){cw();es()}}function cp(ex){dk.toggleClass(P,ex)}function ei(ez){if(d5.flow){return}var ex=ez?ez.pageX:ei.x,ey=ex&&!cE(eh(ex))&&c3.click;if(ei.p!==ey&&cf.toggleClass(bC,ey)){ei.p=ey;ei.x=ex}}cf.on("mousemove",ei);function cm(ex){clearTimeout(cm.t);if(c3.clicktransition&&c3.clicktransition!==c3.transition){setTimeout(function(){var ey=c3.transition;cg.setOptions({transition:c3.clicktransition});cu=ey;cm.t=setTimeout(function(){cg.show(ex)},10)},0)}else{cg.show(ex)}}function ct(eA,ey){var ez=eA.target,ex=bV(ez);if(ex.hasClass(T)){cg.playVideo()}else{if(ez===dD){cg.toggleFullScreen()}else{if(dg){ez===d1&&cO(dg,true,true)}else{if(!d6.hasClass(M)){cg.requestFullScreen()}}}}O(eA,true)}function cD(ex,ey){d5[ex]=dy[ex]=ey}d5=ao(cl,{onStart:dR,onMove:function(ey,ex){co(cf,ex.edge)},onTouchEnd:cr,onEnd:function(ex){var ez;co(cf);ez=(aZ&&!dz||ex.touch)&&c3.arrows;if((ex.moved||(ez&&ex.pos!==ex.newPos&&!ex.control))&&ex.$target[0]!==dM[0]){var ey=by(ex.newPos,en.w,c3.margin,c2);cg.show({index:ey,time:cv?ds:ex.time,overPos:ex.overPos,user:true})}else{if(!ex.aborted&&!ex.control){ct(ex.startEvent,ez)}}},timeLow:1,timeHigh:1,friction:2,select:"."+a9+", ."+a9+" *",$wrap:cf,direction:"horizontal"});dy=ao(cF,{onStart:dR,onMove:function(ey,ex){co(dO,ex.edge)},onTouchEnd:cr,onEnd:function(ex){function ey(){dT.l=ex.newPos;cw();es();dp(ex.newPos,true);ev()}if(!ex.moved){var ez=ex.$target.closest("."+aG,cF)[0];ez&&dJ.call(ez,ex.startEvent)}else{if(ex.pos!==ex.newPos){cj=true;A(cF,{time:ex.time,pos:ex.newPos,overPos:ex.overPos,direction:c3.navdir,onEnd:ey});dp(ex.newPos);ec&&co(dO,bp(ex.newPos,dy.min,dy.max,ex.dir))}else{ey()}}},timeLow:0.5,timeHigh:2,friction:5,$wrap:dO,direction:c3.navdir});cG=o(cf,{shift:true,onEnd:function(ey,ex){dR();cr();cg.show({index:ex,slow:ey.altKey})}});ef=o(dO,{onEnd:function(ez,ey){dR();cr();var ex=a1(cF)+ey*0.25;cF.css(b2(bb(ex,dy.min,dy.max),c3.navdir));ec&&co(dO,bp(ex,dy.min,dy.max,c3.navdir));ef.prevent={"<":ex>=dy.max,">":ex<=dy.min};clearTimeout(ef.t);ef.t=setTimeout(function(){dT.l=ex;dp(ex,true)},b8);dp(ex)}});dk.hover(function(){setTimeout(function(){if(c6){return}cp(!(dz=true))},0)},function(){if(!dz){return}cp(!(dz=false))});function dJ(ey){var ex=bV(this).data().eq;if(c3.navtype==="thumbs"){cm({index:ex,slow:ey.altKey,user:true,coo:ey._x-dO.offset().left})}else{cm({index:ex,slow:ey.altKey,user:true})}}function et(ex){cm({index:cU.index(this)?">":"<",slow:ex.altKey,user:true})}z(cU,function(ex){O(ex);et.call(this,ex)},{onStart:function(){dR();d5.control=true},onTouchEnd:cr});z(eg,function(ex){O(ex);if(c3.navtype==="thumbs"){cg.show("<")}else{cg.showSlide("prev")}});z(dX,function(ex){O(ex);if(c3.navtype==="thumbs"){cg.show(">")}else{cg.showSlide("next")}});function dv(ex){bL(ex,function(){setTimeout(function(){bU(cf)},0);cp(false)})}cU.each(function(){a(this,function(ex){et.call(this,ex)});dv(this)});a(dD,function(){if(d6.hasClass(M)){cg.cancelFullScreen();cl.focus()}else{cg.requestFullScreen();dM.focus()}});dv(dD);function dV(){dn();dQ();if(!dV.i){dV.i=true;var ex=c3.startindex;eo=c2=ed=dw=dx=du(ex)||0}if(c1){if(cV()){return}if(dg){cO(dg,true)}ea=[];ce(bu);dV.ok=true;cg.show({index:eo,time:0});cg.resize()}else{cg.destroy()}}function cV(){if(!cV.f===dH){cV.f=dH;eo=c1-1-eo;cg.reverse();return true}}bV.each("load push pop shift unshift reverse sort splice".split(" "),function(ex,ey){cg[ey]=function(){dP=dP||[];if(ey!=="load"){Array.prototype[ey].apply(dP,arguments)}else{if(arguments[0]&&typeof arguments[0]==="object"&&arguments[0].length){dP=bG(arguments[0])}}dV();return cg}});function eq(){if(eq.ok){eq.ok=false;dc("ready")}}dV()};bV.fn.fotorama=function(i){return this.each(function(){var ce=this,cd=bV(this),cc=cd.data(),cf=cc.fotorama;if(!cf){bX(function(){return !W(ce)},function(){cc.urtext=cd.html();new bV.Fotorama(cd,bV.extend({},Q,bo.fotoramaDefaults,i,cc))})}else{cf.setOptions(i,true)}})};bV.Fotorama.instances=[];function b1(){bV.each(bV.Fotorama.instances,function(cc,i){i.index=cc})}function C(i){bV.Fotorama.instances.push(i);b1()}function av(i){bV.Fotorama.instances.splice(i.index,1);b1()}bV.Fotorama.cache={};bV.Fotorama.measures={};bV=bV||{};bV.Fotorama=bV.Fotorama||{};bV.Fotorama.jst=bV.Fotorama.jst||{};bV.Fotorama.jst.dots=function(cc){var i,ce="",cd=bx.escape;ce+='
\r\n
\r\n
';return ce};bV.Fotorama.jst.frameCaption=function(cc){var i,ce="",cd=bx.escape;ce+='\r\n";return ce};bV.Fotorama.jst.style=function(cc){var i,ce="",cd=bx.escape;ce+=".fotorama"+((i=(cc.s))==null?"":i)+" .fotorama__nav--thumbs .fotorama__nav__frame{\r\npadding:"+((i=(cc.m))==null?"":i)+"px;\r\nheight:"+((i=(cc.h))==null?"":i)+"px}\r\n.fotorama"+((i=(cc.s))==null?"":i)+" .fotorama__thumb-border{\r\nheight:"+((i=(cc.h))==null?"":i)+"px;\r\nborder-width:"+((i=(cc.b))==null?"":i)+"px;\r\nmargin-top:"+((i=(cc.m))==null?"":i)+"px}";return ce};bV.Fotorama.jst.thumb=function(cc){var i,ce="",cd=bx.escape;ce+='
\r\n
\r\n
\r\n
';return ce}})(window,document,location,typeof jQuery!=="undefined"&&jQuery); +fotoramaVersion="4.6.4",function(t,e,n,o,a){"use strict";var i="fotorama",r="fotorama__fullscreen",s=i+"__wrap",u=s+"--css2",l=s+"--css3",c=s+"--video",d=s+"--fade",h=s+"--slide",f=s+"--no-controls",m=s+"--no-shadows",v=s+"--pan-y",p=s+"--rtl",g=s+"--no-captions",w=s+"--toggle-arrows",b=i+"__stage",y=b+"__frame",x=y+"--video",_=b+"__shaft",C=i+"__grab",k=i+"__pointer",P=i+"__arr",S=P+"--disabled",T=P+"--prev",F=P+"--next",E=i+"__nav",M=E+"-wrap",j=E+"__shaft",$=M+"--vertical",z=M+"--list",q=M+"--horizontal",N=E+"--dots",A=E+"--thumbs",L=E+"__frame",O=i+"__fade",D=O+"-front",I=O+"-rear",W=i+"__shadow"+"s",R=W+"--left",H=W+"--right",K=W+"--top",Q=W+"--bottom",V=i+"__active",X=i+"__select",B=i+"--hidden",Y=i+"--fullscreen",U=i+"__fullscreen-icon",G=i+"__error",J=i+"__loading",Z=i+"__loaded",tt=Z+"--full",et=Z+"--img",nt=i+"__grabbing",ot=i+"__img",at=ot+"--full",it=i+"__thumb",rt=it+"__arr--left",st=it+"__arr--right",ut=it+"-border",lt=i+"__html",ct=i+"-video-container",dt=i+"__video",ht=dt+"-play",ft=dt+"-close",mt=i+"_horizontal_ratio",vt=i+"_vertical_ratio",pt=i+"__spinner",gt=pt+"--show",wt=o&&o.fn.jquery.split(".");if(!wt||wt[0]<1||1==wt[0]&&wt[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var bt=function(t,e,n){var o,a,i={},r=e.documentElement,s="modernizr",u=e.createElement(s),l=u.style,c=" -webkit- -moz- -o- -ms- ".split(" "),d="Webkit Moz O ms",h=d.split(" "),f=d.toLowerCase().split(" "),m={},v=[],p=v.slice,g=function(t,n,o,a){var i,u,l,c,d=e.createElement("div"),h=e.body,f=h||e.createElement("body");if(parseInt(o,10))for(;o--;)(l=e.createElement("div")).id=a?a[o]:s+(o+1),d.appendChild(l);return i=["­",'"].join(""),d.id=s,(h?d:f).innerHTML+=i,f.appendChild(d),h||(f.style.background="",f.style.overflow="hidden",c=r.style.overflow,r.style.overflow="hidden",r.appendChild(f)),u=n(d,t),h?d.parentNode.removeChild(d):(f.parentNode.removeChild(f),r.style.overflow=c),!!u},w={}.hasOwnProperty;function b(t){l.cssText=t}function y(t,e){return typeof t===e}function x(t,e){for(var o in t){var a=t[o];if(!~(""+a).indexOf("-")&&l[a]!==n)return"pfx"!=e||a}return!1}function _(t,e,o){var a=t.charAt(0).toUpperCase()+t.slice(1),i=(t+" "+h.join(a+" ")+a).split(" ");return y(e,"string")||y(e,"undefined")?x(i,e):function(t,e,o){for(var a in t){var i=e[t[a]];if(i!==n)return!1===o?t[a]:y(i,"function")?i.bind(o||e):i}return!1}(i=(t+" "+f.join(a+" ")+a).split(" "),e,o)}for(var C in a=y(w,"undefined")||y(w.call,"undefined")?function(t,e){return e in t&&y(t.constructor.prototype[e],"undefined")}:function(t,e){return w.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var n=p.call(arguments,1),o=function(){if(this instanceof o){var a=function(){};a.prototype=e.prototype;var i=new a,r=e.apply(i,n.concat(p.call(arguments)));return Object(r)===r?r:i}return e.apply(t,n.concat(p.call(arguments)))};return o}),m.touch=function(){var n;return"ontouchstart"in t||t.DocumentTouch&&e instanceof DocumentTouch?n=!0:g(["@media (",c.join("touch-enabled),("),s,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(t){n=9===t.offsetTop}),n},m.csstransforms3d=function(){var t=!!_("perspective");return t&&"webkitPerspective"in r.style&&g("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(e,n){t=9===e.offsetLeft&&3===e.offsetHeight}),t},m.csstransitions=function(){return _("transition")},m)a(m,C)&&(o=C.toLowerCase(),i[o]=m[C](),v.push((i[o]?"":"no-")+o));return i.addTest=function(t,e){if("object"==typeof t)for(var o in t)a(t,o)&&i.addTest(o,t[o]);else{if(t=t.toLowerCase(),i[t]!==n)return i;e="function"==typeof e?e():e,"undefined"!=typeof enableClasses&&enableClasses&&(r.className+=" "+(e?"":"no-")+t),i[t]=e}return i},b(""),u=null,i._version="2.8.3",i._prefixes=c,i._domPrefixes=f,i._cssomPrefixes=h,i.testProp=function(t){return x([t])},i.testAllProps=_,i.testStyles=g,i.prefixed=function(t,e,n){return e?_(t,e,n):_(t,"pfx")},i}(t,e),yt={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},xt="webkit moz o ms khtml".split(" ");if(void 0!==e.cancelFullScreen)yt.ok=!0;else for(var _t=0,Ct=xt.length;_t=n?"bottom":"top bottom":t<=e?"left":t>=n?"right":"left right")}function be(t,e,n){n=n||{},t.each(function(){var t,a=o(this),i=a.data();i.clickOn||(i.clickOn=!0,o.extend(Re(a,{onStart:function(e){t=e,(n.onStart||Jt).call(this,e)},onMove:n.onMove||Jt,onTouchEnd:n.onTouchEnd||Jt,onEnd:function(n){n.moved||e.call(this,t)}}),{noMove:!0}))})}function ye(t,e){return'
'+(e||"")+"
"}function xe(t){return"."+t}function _e(t){for(var e=t.length;e;){var n=Math.floor(Math.random()*e--),o=t[e];t[e]=t[n],t[n]=o}return t}function Ce(t){return"[object Array]"==Object.prototype.toString.call(t)&&o.map(t,function(t){return o.extend({},t)})}function ke(t,e,n){t.scrollLeft(e||0).scrollTop(n||0)}function Pe(t){if(t){var e={};return o.each(t,function(t,n){e[t.toLowerCase()]=n}),e}}function Se(t){if(t){var e=+t;return isNaN(e)?+(e=t.split("/"))[0]/+e[1]||a:e}}function Te(t,e,n,o){e&&(t.addEventListener?t.addEventListener(e,n,!!o):t.attachEvent("on"+e,n))}function Fe(t,e){return t>e.max?t=e.max:t":"<"}pe.stop=function(t){pe.ii[t]=!1};var qe,Ne,Ae,Le,Oe,De=function(){return{setRatio:function(t,e,n){e/n<=1?(t.parent().removeClass(mt),t.parent().addClass(vt)):(t.parent().removeClass(vt),t.parent().addClass(mt))},setThumbAttr:function(t,e,n){var i=n;t.attr(i)||t.attr(i)===a||t.attr(i,e),t.find("["+i+"]").length&&t.find("["+i+"]").each(function(){o(this).attr(i,e)})},isExpectedCaption:function(t,e,n){var o,a=!1;return o=t.showCaption===n||!0===t.showCaption,!!e&&(t.caption&&o&&(a=!0),a)}}}(jQuery);function Ie(t,e){var n=t.data(),a=Math.round(e.pos),i=function(){n&&n.sliding&&(n.sliding=!1),(e.onEnd||Jt)()};void 0!==e.overPos&&e.overPos!==e.pos&&(a=e.overPos);var r=o.extend(ee(a,e.direction),e.width&&{width:e.width},e.height&&{height:e.height});n&&n.sliding&&(n.sliding=!0),Mt?(t.css(o.extend(ne(e.time),r)),e.time>10?ue(t,"transform",i,e.time):i()):t.stop().animate(r,e.time,Bt,i)}function We(t){var e=(t.touches||[])[0]||t;t._x=e.pageX||e.originalEvent.pageX,t._y=e.clientY||e.originalEvent.clientY,t._now=o.now()}function Re(t,n){var a,i,r,s,u,l,c,d,h,f=t[0],m={};function v(t){if(r=o(t.target),m.checked=l=c=h=!1,a||m.flow||t.touches&&t.touches.length>1||t.which>1||qe&&qe.type!==t.type&&Ae||(l=n.select&&r.is(n.select,f)))return l;u="touchstart"===t.type,c=r.is("a, a *",f),s=m.control,d=m.noMove||m.noSwipe||s?16:m.snap?0:4,We(t),i=qe=t,Ne=t.type.replace(/down|start/,"move").replace(/Down/,"Move"),(n.onStart||Jt).call(f,t,{control:s,$target:r}),a=m.flow=!0,u&&!m.go||$e(t)}function p(t){if(t.touches&&t.touches.length>1||Nt&&!t.isPrimary||Ne!==t.type||!a)return a&&w(),void(n.onTouchEnd||Jt)();We(t);var e=Math.abs(t._x-i._x),o=Math.abs(t._y-i._y),r=e-o,s=(m.go||m.x||r>=0)&&!m.noSwipe,l=r<0;u&&!m.checked?(a=s)&&$e(t):($e(t),g(e,o)&&(n.onMove||Jt).call(f,t,{touch:u})),!h&&g(e,o)&&Math.sqrt(Math.pow(e,2)+Math.pow(o,2))>d&&(h=!0),m.checked=m.checked||s||l}function g(t,e){return t>e&&t>1.5}function w(t){(n.onTouchEnd||Jt)();var e=a;m.control=a=!1,e&&(m.flow=!1),!e||c&&!m.checked||(t&&$e(t),Ae=!0,clearTimeout(Le),Le=setTimeout(function(){Ae=!1},1e3),(n.onEnd||Jt).call(f,{moved:h,$target:r,control:s,touch:u,startEvent:i,aborted:!t||"MSPointerCancel"===t.type}))}function b(){m.flow&&(m.flow=!1)}return Nt?(Te(f,"MSPointerDown",v),Te(e,"MSPointerMove",p),Te(e,"MSPointerCancel",w),Te(e,"MSPointerUp",w)):(Te(f,"touchstart",v),Te(f,"touchmove",p),Te(f,"touchend",w),Te(e,"touchstart",function(){m.flow||(m.flow=!0)}),Te(e,"touchend",b),Te(e,"touchcancel",b),St.on("scroll",b),t.on("mousedown pointerdown",v),Tt.on("mousemove pointermove",p).on("mouseup pointerup",w)),Oe=bt.touch?"a":"div",t.on("click",Oe,function(t){m.checked&&$e(t)}),m}function He(t,e){var n,a,i,r,s,u,l,c,d,h,f,m,v,p,g,w=t[0],b=t.data(),y={};function x(o,s){g=!0,n=a="vertical"===m?o._y:o._x,l=o._now,u=[[l,n]],i=r=y.noMove||s?0:le(t,(e.getPos||Jt)()),(e.onStart||Jt).call(w,o)}return y=o.extend(Re(e.$wrap,o.extend({},e,{onStart:function(e,n){d=y.min,h=y.max,f=y.snap,m=y.direction||"horizontal",t.navdir=m,v=e.altKey,g=p=!1,n.control||b.sliding||x(e)},onMove:function(o,l){y.noSwipe||(g||x(o),a="vertical"===m?o._y:o._x,u.push([o._now,a]),s=we(r=i-(n-a),d,h,m),r<=d?r=de(r,d):r>=h&&(r=de(r,h)),y.noMove||(t.css(ee(r,m)),p||(p=!0,l.touch||Nt||t.addClass(nt)),(e.onMove||Jt).call(w,o,{pos:r,edge:s})))},onEnd:function(n){if(!y.noSwipe||!n.moved){g||x(n.startEvent,!0),n.touch||Nt||t.removeClass(nt);for(var s,l,p,b,_,C,k,P,S,T=(c=o.now())-Lt,F=null,E=Ot,M=e.friction,j=u.length-1;j>=0;j--){if(s=u[j][0],l=Math.abs(s-T),null===F||lp)break;p=l}k=Zt(r,d,h);var $=b-a,z=$>=0,q=c-F,N=q>Lt,A=!N&&r!==i&&k===r;f&&(k=Zt(Math[A?z?"floor":"ceil":"round"](r/f)*f,d,h),d=h=k),A&&(f||k===r)&&(S=-$/q,E*=Zt(Math.abs(S),e.timeLow,e.timeHigh),_=Math.round(r+S*E/M),f||(k=_),(!z&&_>h||z&&_"),ln=o(ye(B)),cn=n.find(xe(s)),dn=cn.find(xe(b)),hn=(dn[0],n.find(xe(_))),fn=o(),mn=n.find(xe(T)),vn=n.find(xe(F)),pn=n.find(xe(P)),gn=n.find(xe(M)),wn=gn.find(xe(E)),bn=wn.find(xe(j)),yn=o(),xn=o(),_n=(hn.data(),bn.data(),n.find(xe(ut))),Cn=n.find(xe(rt)),kn=n.find(xe(st)),Pn=n.find(xe(U)),Sn=Pn[0],Tn=o(ye(ht)),Fn=n.find(xe(ft))[0],En=n.find(xe(pt)),Mn=!1,jn={},$n={},zn={},qn={},Nn={},An={},Ln={},On=0,Dn=[];function In(){o.each(nt,function(t,e){if(!e.i){e.i=rn++;var n=fe(e.video,!0);if(n){var a={};e.video=n,e.img||e.thumb?e.thumbsReady=!0:(r=nt,s=en,"youtube"===(c=(i=e).video).type?(u=(l=he()+"img.youtube.com/vi/"+c.id+"/default.jpg").replace(/\/default.jpg$/,"/hqdefault.jpg"),i.thumbsReady=!0):"vimeo"===c.type?o.ajax({url:he()+"vimeo.com/api/v2/video/"+c.id+".json",dataType:"jsonp",success:function(t){i.thumbsReady=!0,me(r,{img:t[0].thumbnail_large,thumb:t[0].thumbnail_small},i.i,s)}}):i.thumbsReady=!0,a={img:u,thumb:l}),me(nt,{img:a.img,thumb:a.thumb},e.i,en)}}var i,r,s,u,l,c})}function Wn(t){return Re[t]}function Rn(){if(dn!==a)if("vertical"==O.navdir){var t=O.thumbwidth+O.thumbmargin;dn.css("left",t),vn.css("right",t),Pn.css("right",t),cn.css("width",cn.css("width")+t),hn.css("max-width",cn.width()-t)}else dn.css("left",""),vn.css("right",""),Pn.css("right",""),cn.css("width",cn.css("width")+t),hn.css("max-width","")}function Hn(t){var e,a,s,u,l,c,d,h,f;t!==Hn.f&&(t?(n.addClass(i+" "+on).before(ln).before(un),a=en,o.Fotorama.instances.push(a),Qe()):(ln.detach(),un.detach(),n.html(sn.urtext).removeClass(on),e=en,o.Fotorama.instances.splice(e.index,1),Qe()),l="keydown."+i,d="keydown."+(c=i+nn),h="keyup."+c,f="resize."+c+" orientationchange."+c,(s=t)?(Tt.on(d,function(t){var e,n;vt&&27===t.keyCode?(e=!0,Mo(vt,!0,!0)):(en.fullScreen||O.keyboard&&!en.index)&&(27===t.keyCode?(e=!0,en.cancelFullScreen()):t.shiftKey&&32===t.keyCode&&Wn("space")||37===t.keyCode&&Wn("left")||38===t.keyCode&&Wn("up")&&o(":focus").attr("data-gallery-role")?(en.longPress.progress(),n="<"):32===t.keyCode&&Wn("space")||39===t.keyCode&&Wn("right")||40===t.keyCode&&Wn("down")&&o(":focus").attr("data-gallery-role")?(en.longPress.progress(),n=">"):36===t.keyCode&&Wn("home")?(en.longPress.progress(),n="<<"):35===t.keyCode&&Wn("end")&&(en.longPress.progress(),n=">>")),(e||n)&&$e(t),u={index:n,slow:t.altKey,user:!0},n&&(en.longPress.inProgress?en.showWhileLongPress(u):en.show(u))}),s&&Tt.on(h,function(t){en.longPress.inProgress&&en.showEndLongPress({user:!0}),en.longPress.reset()}),en.index||Tt.off(l).on(l,"textarea, input, select",function(t){!Pt.hasClass(r)&&t.stopPropagation()}),St.on(f,en.resize)):(Tt.off(d),St.off(f)),Hn.f=t)}function Kn(){var t=it<2||vt;$n.noMove=t||Te,$n.noSwipe=t||!O.swipe,!Le&&hn.toggleClass(C,!O.click&&!$n.noMove&&!$n.noSwipe),Nt&&cn.toggleClass(v,!$n.noSwipe)}function Qn(t){!0===t&&(t=""),O.autoplay=Math.max(+t||It,1.5*Ae)}function Vn(t,e){return Math.floor(cn.width()/(e.thumbwidth+e.thumbmargin))}function Xn(){var t;O.nav&&"dots"!==O.nav||(O.navdir="horizontal"),en.options=O=Pe(O),Yt=Vn(0,O),Te="crossfade"===O.transition||"dissolve"===O.transition,Dt=O.loop&&(it>2||Te&&(!Le||"slide"!==Le)),Ae=+O.transitionduration||Ot,We="rtl"===O.direction,Re=o.extend({},O.keyboard&&Gt,O.keyboard),(t=O).navarrows&&"thumbs"===t.nav?(Cn.show(),kn.show()):(Cn.hide(),kn.hide());var e,n,a,i,r={add:[],remove:[]};function s(t,e){r[t?"add":"remove"].push(e)}it>1?(Bt=O.nav,oe="top"===O.navposition,r.remove.push(X),pn.toggle(O.arrows)):(Bt=!1,pn.hide()),co(),fo(),ho(),O.autoplay&&Qn(O.autoplay),qe=ae(O.thumbwidth)||Wt,Ne=ae(O.thumbheight)||Wt,zn.ok=Nn.ok=O.trackpad&&!qt,Kn(),yo(O,[jn]),Ut="thumbs"===Bt,gn.filter(":hidden")&&Bt&&gn.show(),Ut?(ao(it,"navThumb"),mt=xn,tn=Vt,e=un,n=o.Fotorama.jst.style({w:qe,h:Ne,b:O.thumbborderwidth,m:O.thumbmargin,s:nn,q:!jt}),(a=e[0]).styleSheet?a.styleSheet.cssText=n:e.html(n),wn.addClass(A).removeClass(N)):"dots"===Bt?(ao(it,"navDot"),mt=yn,tn=Qt,wn.addClass(N).removeClass(A)):(gn.hide(),Bt=!1,wn.removeClass(A+" "+N)),Bt&&(oe?gn.insertBefore(dn):gn.insertAfter(dn),uo.nav=!1,uo(mt,bn,"nav")),(ue=O.allowfullscreen)?(Pn.prependTo(dn),de=$t&&"native"===ue,i="touchend",Pn.on(i,function(t){return $e(t,!0),!1})):(Pn.detach(),de=!1),s(Te,d),s(!Te,h),s(!O.captions,g),s(We,p),s(O.arrows,w),s(!(Oe=O.shadows&&!qt),m),cn.addClass(r.add.join(" ")).removeClass(r.remove.join(" ")),o.extend({},O),Rn()}function Bn(t){return t<0?(it+t%it)%it:t>=it?t%it:t}function Yn(t){return Zt(t,0,it-1)}function Un(t){return Dt?Bn(t):Yn(t)}function Gn(t){return!!(t>0||Dt)&&t-1}function Jn(t){return!!(t1&&nt[i]===r)||r.html||r.deleted||r.video||c||(r.deleted=!0,en.splice(i,1))):(r[m]=v=p,l.$full=null,eo([i],e,n,!0))}function b(){var t=10;pe(function(){return!Je||!t--&&!qt},function(){o.Fotorama.measures[v]=f.measures=o.Fotorama.measures[v]||{width:d.width,height:d.height,ratio:d.width/d.height},to(f.measures.width,f.measures.height,f.measures.ratio,i),h.off("load error").addClass(""+(c?at:ot)).attr("aria-hidden","false").prependTo(s),s.hasClass(y)&&!s.hasClass(ct)&&s.attr("href",h.attr("src")),ge(h,(o.isFunction(n)?n():n)||jn),o.Fotorama.cache[v]=l.state="loaded",setTimeout(function(){s.trigger("f:load").removeClass(J+" "+G).addClass(Z+" "+(c?tt:et)),"stage"===e?g("load"):(r.thumbratio===Xt||!r.thumbratio&&O.thumbratio===Xt)&&(r.thumbratio=f.measures.ratio,Oo())},0)})}})}function no(){var t=wt[Kt];t&&!t.data().state&&(En.addClass(gt),t.on("f:load f:error",function(){t.off("f:load f:error"),En.removeClass(gt)}))}function oo(t){Me(t,No),je(t,function(){setTimeout(function(){ke(wn)},0),po({time:Ae,guessIndex:o(this).data().eq,minMax:qn})})}function ao(t,e){Zn(t,e,function(t,n,a,i,r,s){if(!i){i=a[r]=cn[r].clone(),(s=i.data()).data=a;var u=i[0],l="labelledby"+o.now();"stage"===e?(a.html&&o('
').append(a._html?o(a.html).removeAttr("id").html(a._html):a.html).appendTo(i),a.id&&(l=a.id||l),a.labelledby=l,De.isExpectedCaption(a,O.showcaption)&&o(o.Fotorama.jst.frameCaption({caption:a.caption,labelledby:l})).appendTo(i),a.video&&i.addClass(x).append(Tn.clone()),je(u,function(){setTimeout(function(){ke(dn)},0),zo({index:s.eq,user:!0})}),fn=fn.add(i)):"navDot"===e?(oo(u),yn=yn.add(i)):"navThumb"===e&&(oo(u),s.$wrap=i.children(":first"),xn=xn.add(i),a.video&&s.$wrap.append(Tn.clone()))}})}function io(t,e){return t&&t.length&&ge(t,e)}function ro(t){Zn(t,"stage",function(t,n,a,i,r,s){if(i){var u,l=Bn(n);s.eq=l,Ln[Kt][l]=i.css(o.extend({left:Te?0:se(n,jn.w,O.margin,xt)},Te&&ne(0))),u=i[0],o.contains(e.documentElement,u)||(i.appendTo(hn),Mo(a.$video)),io(s.$img,jn),io(s.$full,jn),!i.hasClass(y)||"false"===i.attr("aria-hidden")&&i.hasClass(V)||i.attr("aria-hidden","true")}})}function so(t,e){var n,a;"thumbs"!==Bt||isNaN(t)||(n=-t,a=-t+jn.nw,"vertical"===O.navdir&&(t-=O.thumbheight,a=-t+jn.h),xn.each(function(){var t=o(this).data(),i=t.eq,r=function(){return{h:Ne,w:t.w}},s=r(),u="vertical"===O.navdir?t.t>a:t.l>a;s.w=t.w,t.l+t.w=qn.max,e=n<=qn.min}Cn.toggleClass(S,t).attr(Ee(t,!0)),kn.toggleClass(S,e).attr(Ee(e,!0))}function fo(){zn.ok&&(zn.prevent={"<":lo(0),">":lo(1)})}function mo(t){var e,n,o,a,i=t.data();Ut?(e=i.l,n=i.t,o=i.w,a=i.h):(e=t.position().left,o=t.width());var r={c:e+o/2,min:-e+10*O.thumbmargin,max:-e+jn.w-o-10*O.thumbmargin},s={c:n+a/2,min:-n+10*O.thumbmargin,max:-n+jn.h-a-10*O.thumbmargin};return"vertical"===O.navdir?s:r}function vo(t){var e=wt[tn].data();Ie(_n,{time:1.2*t,pos:"vertical"===O.navdir?e.t:e.l,width:e.w,height:e.h,direction:O.navdir})}function po(t){var e,n,o,a,i,r,s,u,l,c,d,h,f,m,v,p,g,w=nt[t.guessIndex][tn],b=O.navtype;w&&("thumbs"===b?(e=qn.min!==qn.max,o=t.minMax||e&&mo(wt[tn]),a=e&&(t.keep&&po.t?po.l:Zt((t.coo||jn.nw/2)-mo(w).c,o.min,o.max)),i=e&&(t.keep&&po.l?po.l:Zt((t.coo||jn.nw/2)-mo(w).c,o.min,o.max)),r="vertical"===O.navdir?a:i,s=e&&Zt(r,qn.min,qn.max)||0,n=1.1*t.time,Ie(bn,{time:n,pos:s,direction:O.navdir,onEnd:function(){so(s,!0),ho()}}),Eo(wn,we(s,qn.min,qn.max,O.navdir)),po.l=r):(u=te(bn,O.navdir),n=1.11*t.time,l=O,c=qn,d=t.guessIndex,h=u,f=w,m=gn,"horizontal"===(v=O.navdir)?(p=l.thumbwidth,g=m.width()):(p=l.thumbheight,g=m.height()),s=Fe((p+l.margin)*(d+1)>=g-h?"horizontal"===v?-f.position().left:-f.position().top:(p+l.margin)*d<=Math.abs(h)?"horizontal"===v?-f.position().left+g-(p+l.margin):-f.position().top+g-(p+l.margin):h,c)||0,Ie(bn,{time:n,pos:s,direction:O.navdir,onEnd:function(){so(s,!0),ho()}}),Eo(wn,we(s,qn.min,qn.max,O.navdir))))}function go(t){for(var e=An[t];e.length;)e.shift().removeClass(V).attr("data-active",!1)}function wo(t){var e=Ln[t];o.each(bt,function(t,n){delete e[Bn(n)]}),o.each(e,function(t,n){delete e[t],n.detach()})}function bo(t){xt=_t=Mn;var e,o,a,i=wt[Kt];i&&(go(Kt),An[Kt].push(i.addClass(V).attr("data-active",!0)),i.hasClass(y)&&i.attr("aria-hidden","false"),t||en.showStage.onEnd(!0),le(hn,0),wo(Kt),ro(bt),$n.min=Dt?-1/0:-se(it-1,jn.w,O.margin,xt),$n.max=Dt?1/0:-se(0,jn.w,O.margin,xt),$n.snap=jn.w+O.margin,e="vertical"===O.navdir,o=e?bn.height():bn.width(),a=e?jn.h:jn.nw,qn.min=Math.min(0,a-o),qn.max=0,qn.direction=O.navdir,bn.toggleClass(C,!(qn.noMove=qn.min===qn.max)),Me(hn[0],function(){n.hasClass(Y)||(en.requestFullScreen(),Pn.focus())}))}function yo(t,e){t&&o.each(e,function(e,n){n&&o.extend(n,{width:t.width||n.width,height:t.height,minwidth:t.minwidth,maxwidth:t.maxwidth,minheight:t.minheight,maxheight:t.maxheight,ratio:Se(t.ratio)})})}function xo(t,e){n.trigger(i+":"+t,[en,e])}function _o(){clearTimeout(Co.t),Je=1,O.stopautoplayontouch?en.stopAutoplay():Ye=!0}function Co(){Je&&(O.stopautoplayontouch||(ko(),Po()),Co.t=setTimeout(function(){Je=0},Ot+Lt))}function ko(){Ye=!(!vt&&!Ue)}function Po(){if(clearTimeout(Po.t),pe.stop(Po.w),O.autoplay&&!Ye){en.autoplay||(en.autoplay=!0,xo("startautoplay"));var t=Mn,e=wt[Kt].data();Po.w=pe(function(){return e.state||t!==Mn},function(){Po.t=setTimeout(function(){if(!Ye&&t===Mn){var e=zt,n=nt[e][Kt].data();Po.w=pe(function(){return n.state||e!==zt},function(){Ye||e!==zt||en.show(Dt?ze(!We):zt)})}},O.autoplay)})}else en.autoplay&&(en.autoplay=!1,xo("stopautoplay"))}function So(t){var e;return"object"!=typeof t?(e=t,t={}):e=t.index,e=">"===e?_t+1:"<"===e?_t-1:"<<"===e?0:">>"===e?it-1:e,e=void 0===(e=isNaN(e)?a:e)?Mn||0:e}function To(t){en.activeIndex=Mn=Un(t),Ft=Gn(Mn),Et=Jn(Mn),zt=Bn(Mn+(We?-1:1)),bt=[Mn,Ft,Et],_t=Dt?t:Mn}function Fo(t){var e=Math.abs(Ct-_t),n=ce(t.time,function(){return Math.min(Ae*(1+(e-1)/12),2*Ae)});return t.slow&&(n*=10),n}function Eo(t,e){Oe&&(t.removeClass(R+" "+H),t.removeClass(K+" "+Q),e&&!vt&&t.addClass(e.replace(/^|\s/g," "+W+"--")))}function Mo(t,e,n){e&&(cn.removeClass(c),vt=!1,Kn()),t&&t!==vt&&(t.remove(),xo("unloadvideo")),n&&(ko(),Po())}function jo(t){cn.toggleClass(f,t)}function $o(t){if(!$n.flow){var e,n=t?t.pageX:$o.x,o=n&&!lo((e=n,e-On>jn.w/3))&&O.click;$o.p!==o&&dn.toggleClass(k,o)&&($o.p=o,$o.x=n)}}function zo(t){clearTimeout(zo.t),O.clicktransition&&O.clicktransition!==O.transition?setTimeout(function(){var e=O.transition;en.setOptions({transition:O.clicktransition}),Le=e,zo.t=setTimeout(function(){en.show(t)},10)},0):en.show(t)}function qo(t,e){$n[t]=qn[t]=e}function No(t){var e=o(this).data().eq;"thumbs"===O.navtype?zo({index:e,slow:t.altKey,user:!0,coo:t._x-wn.offset().left}):zo({index:e,slow:t.altKey,user:!0})}function Ao(t){zo({index:pn.index(this)?">":"<",slow:t.altKey,user:!0})}function Lo(t){je(t,function(){setTimeout(function(){ke(dn)},0),jo(!1)})}function Oo(){if(nt=en.data=nt||Ce(O.data)||ve(n),it=en.size=nt.length,Do.ok&&O.shuffle&&_e(nt),In(),Mn=Yn(Mn),it&&Hn(!0),Xn(),!Oo.i){Oo.i=!0;var t=O.startindex;Mn=xt=_t=Ct=At=Un(t)||0}if(it){if(function t(){if(!t.f===We)return t.f=We,Mn=it-1-Mn,en.reverse(),!0}())return;vt&&Mo(vt,!0),bt=[],wo(Kt),Oo.ok=!0,en.show({index:Mn,time:0}),en.resize()}else en.destroy()}function Do(){Do.ok&&(Do.ok=!1,xo("ready"))}cn[Kt]=o('
'),cn[Vt]=o(o.Fotorama.jst.thumb()),cn[Qt]=o(o.Fotorama.jst.dots()),An[Kt]=[],An[Vt]=[],An[Qt]=[],Ln[Kt]={},cn.addClass(Mt?l:u),sn.fotorama=this,en.startAutoplay=function(t){return en.autoplay?this:(Ye=Ue=!1,Qn(t||O.autoplay),Po(),this)},en.stopAutoplay=function(){return en.autoplay&&(Ye=Ue=!0,Po()),this},en.showSlide=function(t){var e,n=te(bn,O.navdir),o="horizontal"===O.navdir?O.thumbwidth:O.thumbheight;"next"===t&&(e=n-(o+O.margin)*Yt),"prev"===t&&(e=n+(o+O.margin)*Yt),so(e=Fe(e,qn),!0),Ie(bn,{time:550,pos:e,direction:O.navdir,onEnd:function(){ho()}})},en.showWhileLongPress=function(t){if(!en.longPress.singlePressInProgress){To(So(t));var e=Fo(t)/50,n=wt;en.activeFrame=wt=nt[Mn];var o=n===wt&&!t.user;return en.showNav(o,t,e),this}},en.showEndLongPress=function(t){if(!en.longPress.singlePressInProgress){To(So(t));var e=Fo(t)/50,n=wt;en.activeFrame=wt=nt[Mn];var o=n===wt&&!t.user;return en.showStage(o,t,e),void 0!==Ct&&Ct!==Mn,Ct=Mn,this}},en.showStage=function(t,e,n){Mo(vt,wt.i!==nt[Bn(xt)].i),ao(bt,"stage"),ro(qt?[_t]:[_t,Gn(_t),Jn(_t)]),qo("go",!0),t||xo("show",{user:e.user,time:n}),Ye=!0;var a=e.overPos,i=en.showStage.onEnd=function(n){if(!i.ok){if(i.ok=!0,n||bo(!0),t||xo("showend",{user:e.user}),!n&&Le&&Le!==O.transition)return en.setOptions({transition:Le}),void(Le=!1);no(),eo(bt,"stage"),qo("go",!1),fo(),$o(),ko(),Po(),en.fullScreen?(wt[Kt].find("."+at).attr("aria-hidden",!1),wt[Kt].find("."+ot).attr("aria-hidden",!0)):(wt[Kt].find("."+at).attr("aria-hidden",!0),wt[Kt].find("."+ot).attr("aria-hidden",!1))}};Te?function t(e,n,a,i,r,s){var u=void 0!==s;if(u||(r.push(arguments),Array.prototype.push.call(arguments,r.length),!(r.length>1))){e=e||o(e),n=n||o(n);var l=e[0],c=n[0],d="crossfade"===i.method,h=function(){if(!h.done){h.done=!0;var e=(u||r.shift())&&r.shift();e&&t.apply(this,e),(i.onEnd||Jt)(!!e)}},f=i.time/(s||1);a.removeClass(I+" "+D),e.stop().addClass(I),n.stop().addClass(D),d&&c&&e.fadeTo(0,0),e.fadeTo(d?f:0,1,d&&h),n.fadeTo(f,0,h),l&&d||c||h()}}(wt[Kt],nt[Ct]&&Mn!==Ct?nt[Ct][Kt]:null,fn,{time:n,method:O.transition,onEnd:i},Dn):Ie(hn,{pos:-se(_t,jn.w,O.margin,xt),overPos:a,time:n,onEnd:i});co()},en.showNav=function(t,e,n){if(ho(),Bt){go(tn),An[tn].push(wt[tn].addClass(V).attr("data-active",!0));var o=Yn(Mn+Zt(_t-Ct,-1,1));po({time:n,coo:o!==Mn&&e.coo,guessIndex:void 0!==e.coo?o:Mn,keep:t}),Ut&&vo(n)}},en.show=function(t){en.longPress.singlePressInProgress=!0,To(So(t));var e=Fo(t),n=wt;en.activeFrame=wt=nt[Mn];var o=n===wt&&!t.user;return en.showStage(o,t,e),en.showNav(o,t,e),void 0!==Ct&&Ct!==Mn,Ct=Mn,en.longPress.singlePressInProgress=!1,this},en.requestFullScreen=function(){if(ue&&!en.fullScreen){if(o((en.activeFrame||{}).$stageFrame||{}).hasClass("fotorama-video-container"))return;Xe=St.scrollTop(),Be=St.scrollLeft(),ke(St),qo("x",!0),Ge=o.extend({},jn),n.addClass(Y).appendTo(Pt.addClass(r)),kt.addClass(r),Mo(vt,!0,!0),en.fullScreen=!0,de&&yt.request(an),en.resize(),eo(bt,"stage"),no(),xo("fullscreenenter"),"ontouchstart"in t||Pn.focus()}return this},en.cancelFullScreen=function(){return de&&yt.is()?yt.cancel(e):en.fullScreen&&(en.fullScreen=!1,$t&&yt.cancel(an),Pt.removeClass(r),kt.removeClass(r),n.removeClass(Y).insertAfter(ln),jn=o.extend({},Ge),Mo(vt,!0,!0),qo("x",!1),en.resize(),eo(bt,"stage"),ke(St,Be,Xe),xo("fullscreenexit")),this},en.toggleFullScreen=function(){return en[(en.fullScreen?"cancel":"request")+"FullScreen"]()},en.resize=function(e){if(!nt)return this;var n=arguments[1]||0,a=arguments[2];Yt=Vn(0,O),yo(en.fullScreen?{width:o(t).width(),maxwidth:null,minwidth:null,height:o(t).height(),maxheight:null,minheight:null}:Pe(e),[jn,a||en.fullScreen||O]);var i=jn.width,r=jn.height,s=jn.ratio,u=St.height()-(Bt?wn.height():0);if(re(i)&&(cn.css({width:""}),cn.css({height:""}),dn.css({width:""}),dn.css({height:""}),hn.css({width:""}),hn.css({height:""}),wn.css({width:""}),wn.css({height:""}),cn.css({minWidth:jn.minwidth||0,maxWidth:jn.maxwidth||1200}),"dots"===Bt&&gn.hide(),i=jn.W=jn.w=cn.width(),jn.nw=Bt&&ie(O.navwidth,i)||i,hn.css({width:jn.w,marginLeft:(jn.W-jn.w)/2}),r=(r=ie(r,u))||s&&i/s)){if(i=Math.round(i),r=jn.h=Math.round(Zt(r,ie(jn.minheight,u),ie(jn.maxheight,u))),dn.css({width:i,height:r}),"vertical"!==O.navdir||en.fullscreen||wn.width(O.thumbwidth+2*O.thumbmargin),"horizontal"!==O.navdir||en.fullscreen||wn.height(O.thumbheight+2*O.thumbmargin),"dots"===Bt&&(wn.width(i).height("auto"),gn.show()),"vertical"===O.navdir&&en.fullScreen&&dn.css("height",St.height()),"horizontal"===O.navdir&&en.fullScreen&&dn.css("height",St.height()-wn.height()),Bt){switch(O.navdir){case"vertical":gn.removeClass(q),gn.removeClass(z),gn.addClass($),wn.stop().animate({height:jn.h,width:O.thumbwidth},n);break;case"list":gn.removeClass($),gn.removeClass(q),gn.addClass(z);break;default:gn.removeClass($),gn.removeClass(z),gn.addClass(q),wn.stop().animate({width:jn.nw},n)}bo(),po({guessIndex:Mn,time:n,keep:!0}),Ut&&uo.nav&&vo(n)}Ve=a||!0,Do.ok=!0,Do()}return On=dn.offset().left,Rn(),this},en.setOptions=function(t){return o.extend(O,t),Oo(),this},en.shuffle=function(){return nt&&_e(nt)&&Oo(),this},en.longPress={threshold:1,count:0,thumbSlideTime:20,progress:function(){this.inProgress||(this.count++,this.inProgress=this.count>this.threshold)},end:function(){this.inProgress&&(this.isEnded=!0)},reset:function(){this.count=0,this.inProgress=!1,this.isEnded=!1}},en.destroy=function(){return en.cancelFullScreen(),en.stopAutoplay(),nt=en.data=null,Hn(),bt=[],wo(Kt),Oo.ok=!1,this},en.playVideo=function(){var t=wt,e=t.video,n=Mn;return"object"==typeof e&&t.videoReady&&(de&&en.fullScreen&&en.cancelFullScreen(),pe(function(){return!yt.is()||n!==Mn},function(){var a;n===Mn&&(t.$video=t.$video||o(ye(dt)).append(''),t.$video.appendTo(t[Kt]),cn.addClass(c),vt=t.$video,Kn(),pn.blur(),Pn.blur(),xo("loadvideo"))})),this},en.stopVideo=function(){return Mo(vt,!0,!0),this},en.spliceByIndex=function(t,e){e.i=t+1,e.img&&o.ajax({url:e.img,type:"HEAD",success:function(){nt.splice(t,1,e),Oo()}})},dn.on("mousemove",$o),$n=He(hn,{onStart:_o,onMove:function(t,e){Eo(dn,e.edge)},onTouchEnd:Co,onEnd:function(t){var e,a,i,r,s,u,l;if(Eo(dn),e=(Nt&&!Ze||t.touch)&&O.arrows,(t.moved||e&&t.pos!==t.newPos&&!t.control)&&t.$target[0]!==Pn[0]){var c=(r=t.newPos,s=jn.w,u=O.margin,l=xt,-Math.round(r/(s+(u||0))-(l||0)));en.show({index:c,time:Te?Ae:t.time,overPos:t.overPos,user:!0})}else t.aborted||t.control||(a=t.startEvent,i=a.target,o(i).hasClass(ht)?en.playVideo():i===Sn?en.toggleFullScreen():vt?i===Fn&&Mo(vt,!0,!0):n.hasClass(Y)||en.requestFullScreen())},timeLow:1,timeHigh:1,friction:2,select:"."+X+", ."+X+" *",$wrap:dn,direction:"horizontal"}),qn=He(bn,{onStart:_o,onMove:function(t,e){Eo(wn,e.edge)},onTouchEnd:Co,onEnd:function(t){function e(){po.l=t.newPos,ko(),Po(),so(t.newPos,!0),ho()}if(t.moved)t.pos!==t.newPos?(Ye=!0,Ie(bn,{time:t.time,pos:t.newPos,overPos:t.overPos,direction:O.navdir,onEnd:e}),so(t.newPos),Oe&&Eo(wn,we(t.newPos,qn.min,qn.max,t.dir))):e();else{var n=t.$target.closest("."+L,bn)[0];n&&No.call(n,t.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:wn,direction:O.navdir}),zn=Ke(dn,{shift:!0,onEnd:function(t,e){_o(),Co(),en.show({index:e,slow:t.altKey})}}),Nn=Ke(wn,{onEnd:function(t,e){_o(),Co();var n=le(bn)+.25*e;bn.css(ee(Zt(n,qn.min,qn.max),O.navdir)),Oe&&Eo(wn,we(n,qn.min,qn.max,O.navdir)),Nn.prevent={"<":n>=qn.max,">":n<=qn.min},clearTimeout(Nn.t),Nn.t=setTimeout(function(){po.l=n,so(n,!0)},Lt),so(n)}}),cn.hover(function(){setTimeout(function(){Je||jo(!(Ze=!0))},0)},function(){Ze&&jo(!(Ze=!1))}),be(pn,function(t){$e(t),Ao.call(this,t)},{onStart:function(){_o(),$n.control=!0},onTouchEnd:Co}),be(Cn,function(t){$e(t),"thumbs"===O.navtype?en.show("<"):en.showSlide("prev")}),be(kn,function(t){$e(t),"thumbs"===O.navtype?en.show(">"):en.showSlide("next")}),pn.each(function(){Me(this,function(t){Ao.call(this,t)}),Lo(this)}),Me(Sn,function(){n.hasClass(Y)?(en.cancelFullScreen(),hn.focus()):(en.requestFullScreen(),Pn.focus())}),Lo(Sn),o.each("load push pop shift unshift reverse sort splice".split(" "),function(t,e){en[e]=function(){return nt=nt||[],"load"!==e?Array.prototype[e].apply(nt,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(nt=Ce(arguments[0])),Oo(),en}}),Oo()},o.fn.fotorama=function(e){return this.each(function(){var n=this,a=o(this),i=a.data(),r=i.fotorama;r?r.setOptions(e,!0):pe(function(){return!(0===(t=n).offsetWidth&&0===t.offsetHeight);var t},function(){i.urtext=a.html(),new o.Fotorama(a,o.extend({},Ut,t.fotoramaDefaults,e,i))})})},o.Fotorama.instances=[],o.Fotorama.cache={},o.Fotorama.measures={},(o=o||{}).Fotorama=o.Fotorama||{},o.Fotorama.jst=o.Fotorama.jst||{},o.Fotorama.jst.dots=function(t){return'
\r\n
\r\n
','
\r\n
\r\n
'},o.Fotorama.jst.frameCaption=function(t){var e,n="";return n+='\r\n"},o.Fotorama.jst.style=function(t){var e,n="";return n+=".fotorama"+(null==(e=t.s)?"":e)+" .fotorama__nav--thumbs .fotorama__nav__frame{\r\npadding:"+(null==(e=t.m)?"":e)+"px;\r\nheight:"+(null==(e=t.h)?"":e)+"px}\r\n.fotorama"+(null==(e=t.s)?"":e)+" .fotorama__thumb-border{\r\nheight:"+(null==(e=t.h)?"":e)+"px;\r\nborder-width:"+(null==(e=t.b)?"":e)+"px;\r\nmargin-top:"+(null==(e=t.m)?"":e)+"px}"},o.Fotorama.jst.thumb=function(t){return'
\r\n
\r\n
\r\n
','
\r\n
\r\n
\r\n
'}}(window,document,location,"undefined"!=typeof jQuery&&jQuery); \ No newline at end of file