CVE-2024-37308 (published 2024-06-13T14:15Z)

The Cooked Pro recipe plugin for WordPress is vulnerable to Persistent Cross-Site Scripting (XSS) via the `_recipe_settings[post_title]` parameter in versions up to, and including, 1.7.15.4 due to insufficient input sanitization and output escaping. This vulnerability allows authenticated attackers with contributor-level access and above to inject arbitrary web scripts in pages that will execute whenever a user accesses a compromised page. A patch is available at commit 8cf88f334ccbf11134080bbb655c66f1cfe77026 and will be part of version 1.8.0.


Weakness information:
cwe_id: NVD-CWE-noinfo
cwe_name: Insufficient Information
description: There is insufficient information about the issue to classify it; details are unkown or unspecified.
extended_description: Insufficient Information

Fix information:
repo_url: https://github.com/XjSv/Cooked
commit_details: repo_url: https://github.com/XjSv/Cooked
author: Armand Tresova
author_date: 2024-06-12 21:36:57-04:00
msg: Fix for advisories/GHSA-9vfv-c966-jwrv
repository: repo_url: https://github.com/XjSv/Cooked
repo_name: XjSv/Cooked
description: A recipe plugin for WordPress.
repo_language: PHP
owner: XjSv
file_changes: filename: fotorama.js
change_type: ModificationType.MODIFY
diff: @@ -1410,6 +1410,13 @@ function div (classes, child) {
   return '<div class="' + classes + '">' + (child || '') + '</div>';
 }
 
+function safeDiv (classes, child) {
+  var div = document.createElement('div');
+  div.textContent = child || '';
+  div.className = classes;
+  return div.outerHTML;
+}
+
 // Fisher–Yates Shuffle
 // http://bost.ocks.org/mike/shuffle/
 function shuffle (array) {
@@ -2578,7 +2585,7 @@ jQuery.Fotorama = function ($fotorama, opts) {
               .appendTo($frame);
         }
 
-        dataFrame.caption && $(div(captionClass, div(captionWrapClass, dataFrame.caption))).appendTo($frame);
+        dataFrame.caption && $(div(captionClass, safeDiv(captionWrapClass, dataFrame.caption))).appendTo($frame);
 
         dataFrame.video && $frame
           .addClass(stageFrameVideoClass)

programming_language: JavaScript
filename: fotorama.min.js
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-fotoramaVersion="4.6.4",function(i,ye,be,xe,u){"use strict";var _e="fotorama",Ce="fullscreen",Te=_e+"__wrap",Je=Te+"--video",Ze=Te+"--no-controls",tn=Te+"--only-active",en=_e+"__stage",nn=en+"__frame",on=_e+"__grab",an=_e+"__arr",rn=an+"--disabled",ke=_e+"__nav",sn=ke+"--dots",un=ke+"--thumbs",ln=ke+"__frame",t=_e+"__fade",f=t+"-front",d=t+"-rear",cn="fotorama__shadows",fn=_e+"__active",dn=_e+"__select",hn=_e+"--fullscreen",mn=_e+"__error",pn=_e+"__loading",vn=_e+"__loaded",N=_e+"__grabbing",wn=_e+"__img",gn=_e+"__thumb",t=_e+"__video",yn=t+"-play",Me='" tabindex="0" role="button',t=xe&&xe.fn.jquery.split(".");if(!t||t[0]<1||1==t[0]&&t[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var s=function(c,f){var t,o,e,a={},d=c.documentElement,h="modernizr",i=c.createElement(h).style,n=" -webkit- -moz- -o- -ms- ".split(" "),r="Webkit Moz O ms",m=r.split(" "),p=r.toLowerCase().split(" "),s={},u=[],l=u.slice,v={}.hasOwnProperty;function w(t){i.cssText=t}function g(t,e){return typeof t===e}function y(t,e){for(var n in t){n=t[n];if(!~(""+n).indexOf("-")&&i[n]!==f)return"pfx"!=e||n}return!1}function b(t,e,n){var o=t.charAt(0).toUpperCase()+t.slice(1),a=(t+" "+m.join(o+" ")+o).split(" ");if(g(e,"string")||void 0===e)return y(a,e);var i,r=(t+" "+p.join(o+" ")+o).split(" "),s=e,u=n;for(i in r){var l=s[r[i]];if(l!==f)return!1===u?r[i]:g(l,"function")?l.bind(u||s):l}return!1}for(e in o=void 0!==v&&void 0!==v.call?function(t,e){return v.call(t,e)}:function(t,e){return e in t&&void 0===t.constructor.prototype[e]},Function.prototype.bind||(Function.prototype.bind=function(n){var o=this;if("function"!=typeof o)throw new TypeError;var a=l.call(arguments,1),i=function(){var t,e;return this instanceof i?((t=function(){}).prototype=o.prototype,t=new t,e=o.apply(t,a.concat(l.call(arguments))),Object(e)===e?e:t):o.apply(n,a.concat(l.call(arguments)))};return i}),s.csstransforms3d=function(){return!!b("perspective")},s)o(s,e)&&(t=e.toLowerCase(),a[t]=s[e](),u.push((a[t]?"":"no-")+t));return a.addTest=function(t,e){if("object"==typeof t)for(var n in t)o(t,n)&&a.addTest(n,t[n]);else{if(t=t.toLowerCase(),a[t]!==f)return a;e="function"==typeof e?e():e,"undefined"!=typeof enableClasses&&enableClasses&&(d.className+=" "+(e?"":"no-")+t),a[t]=e}return a},w(""),0,a._version="2.6.2",a._prefixes=n,a._domPrefixes=p,a._cssomPrefixes=m,a.testProp=function(t){return y([t])},a.testAllProps=b,a.testStyles=function(t,e,n,o){var a,i,r,s=c.createElement("div"),u=c.body,l=u||c.createElement("body");if(parseInt(n,10))for(;n--;)(i=c.createElement("div")).id=o?o[n]:h+(n+1),s.appendChild(i);return a=["&#173;",'<style id="s',h,'">',t,"</style>"].join(""),s.id=h,(u?s:l).innerHTML+=a,l.appendChild(s),u||(l.style.background="",l.style.overflow="hidden",r=d.style.overflow,d.style.overflow="hidden",d.appendChild(l)),a=e(s,t),u?s.parentNode.removeChild(s):(l.parentNode.removeChild(l),d.style.overflow=r),!!a},a.prefixed=function(t,e,n){return e?b(t,e,n):b(t,"pfx")},a}(ye),Se={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},e="webkit moz o ms khtml".split(" ");if(void 0!==ye.cancelFullScreen)Se.ok=!0;else for(var n=0,o=e.length;n<o;n++)if(Se.prefix=e[n],void 0!==ye[Se.prefix+"CancelFullScreen"]){Se.ok=!0;break}Se.ok&&(Se.event=Se.prefix+"fullscreenchange",Se.is=function(){switch(this.prefix){case"":return ye.fullScreen;case"webkit":return ye.webkitIsFullScreen;default:return ye[this.prefix+"FullScreen"]}},Se.request=function(t){return""===this.prefix?t.requestFullScreen():t[this.prefix+"RequestFullScreen"]()},Se.cancel=function(t){return""===this.prefix?ye.cancelFullScreen():ye[this.prefix+"CancelFullScreen"]()});var bn,xn={lines:12,length:5,width:2,radius:7,corners:1,rotate:15,color:"rgba(128, 128, 128, .75)",hwaccel:!0},_n={top:"auto",left:"auto",className:""};bn=function(){"use strict";var i=["webkit","Moz","ms","O"],l={},m;function p(t,e){var n=ye.createElement(t||"div"),o;for(o in e)n[o]=e[o];return n}function c(t){for(var e=1,n=arguments.length;e<n;e++)t.appendChild(arguments[e]);return t}var f=function(){var t=p("style",{type:"text/css"});c(ye.getElementsByTagName("head")[0],t);return t.sheet||t.styleSheet}();function r(t,e,n,o){var a=["opacity",e,~~(t*100),n,o].join("-"),i=.01+n/o*100,r=Math.max(1-(1-t)/e*(100-i),t),s=m.substring(0,m.indexOf("Animation")).toLowerCase(),u=s&&"-"+s+"-"||"";if(!l[a]){f.insertRule("@"+u+"keyframes "+a+"{"+"0%{opacity:"+r+"}"+i+"%{opacity:"+t+"}"+(i+.01)+"%{opacity:1}"+(i+e)%100+"%{opacity:"+t+"}"+"100%{opacity:"+r+"}"+"}",f.cssRules.length);l[a]=1}return a}function o(t,e){var n=t.style,o,a;e=e.charAt(0).toUpperCase()+e.slice(1);for(a=0;a<i.length;a++){o=i[a]+e;if(n[o]!==u)return o}if(n[e]!==u)return e}function v(t,e){for(var n in e)t.style[o(t,n)||n]=e[n];return t}function e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)if(t[o]===u)t[o]=n[o]}return t}function w(t){var e={x:t.offsetLeft,y:t.offsetTop};while(t=t.offsetParent)e.x+=t.offsetLeft,e.y+=t.offsetTop;return e}function d(t,e){return typeof t=="string"?t:t[e%t.length]}var n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};function a(t){if(typeof this=="undefined")return new a(t);this.opts=e(t||{},a.defaults,n)}function t(){function l(t,e){return p("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}f.addRule(".spin-vml","behavior:url(#default#VML)");a.prototype.lines=function(t,o){var a=o.length+o.width,e=2*a;function i(){return v(l("group",{coordsize:e+" "+e,coordorigin:-a+" "+-a}),{width:e,height:e})}var n=-(o.width+o.length)*2+"px",r=v(i(),{position:"absolute",top:n,left:n}),s;function u(t,e,n){c(r,c(v(i(),{rotation:360/o.lines*t+"deg",left:~~e}),c(v(l("roundrect",{arcsize:o.corners}),{width:a,height:o.width,left:o.radius,top:-o.width>>1,filter:n}),l("fill",{color:d(o.color,t),opacity:o.opacity}),l("stroke",{opacity:0}))))}if(o.shadow)for(s=1;s<=o.lines;s++)u(s,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(s=1;s<=o.lines;s++)u(s);return c(t,r)};a.prototype.opacity=function(t,e,n,o){var a=t.firstChild;o=o.shadow&&o.lines||0;if(a&&e+o<a.childNodes.length){a=a.childNodes[e+o];a=a&&a.firstChild;a=a&&a.firstChild;if(a)a.opacity=n}}}a.defaults={},e(a.prototype,{spin:function(t){this.stop();var n=this,o=n.opts,a=n.el=v(p(0,{className:o.className}),{position:o.position,width:0,zIndex:o.zIndex}),e=o.radius+o.length+o.width,i,r;if(t){t.insertBefore(a,t.firstChild||null);r=w(t);i=w(a);v(a,{left:(o.left=="auto"?r.x-i.x+(t.offsetWidth>>1):parseInt(o.left,10)+e)+"px",top:(o.top=="auto"?r.y-i.y+(t.offsetHeight>>1):parseInt(o.top,10)+e)+"px"})}a.setAttribute("role","progressbar");n.lines(a,n.opts);if(!m){var s=0,u=(o.lines-1)*(1-o.direction)/2,l,c=o.fps,f=c/o.speed,d=(1-o.opacity)/(f*o.trail/100),h=f/o.lines;(function t(){s++;for(var e=0;e<o.lines;e++){l=Math.max(1-(s+(o.lines-e)*h)%f*d,o.opacity);n.opacity(a,e*o.direction+u,l,o)}n.timeout=n.el&&setTimeout(t,~~(1e3/c))})()}return n},stop:function(){var t=this.el;if(t){clearTimeout(this.timeout);if(t.parentNode)t.parentNode.removeChild(t);this.el=u}return this},lines:function(t,n){var o=0,e=(n.lines-1)*(1-n.direction)/2,a;function i(t,e){return v(p(),{position:"absolute",width:n.length+n.width+"px",height:n.width+"px",background:t,boxShadow:e,transformOrigin:"left",transform:"rotate("+~~(360/n.lines*o+n.rotate)+"deg) translate("+n.radius+"px"+",0)",borderRadius:(n.corners*n.width>>1)+"px"})}for(;o<n.lines;o++){a=v(p(),{position:"absolute",top:1+~(n.width/2)+"px",transform:n.hwaccel?"translate3d(0,0,0)":"",opacity:n.opacity,animation:m&&r(n.opacity,n.trail,e+o*n.direction,n.lines)+" "+1/n.speed+"s linear infinite"});if(n.shadow)c(a,v(i("#000","0 0 4px "+"#000"),{top:2+"px"}));c(t,c(a,i(d(n.color,o),"0 0 1px rgba(0,0,0,.1)")))}return t},opacity:function(t,e,n){if(e<t.childNodes.length)t.childNodes[e].style.opacity=n}});var s=v(p("group"),{behavior:"url(#default#VML)"});if(!o(s,"transform")&&s.adj)t();else m=o(s,"animation");return a}();var Cn,Fe,w,g,y,b,Ee=xe(i),Pe=xe(ye),t="quirks"===be.hash.replace("#",""),a=s.csstransforms3d,je=a&&!t,Tn=a||"CSS1Compat"===ye.compatMode,kn=Se.ok,t=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),Ne=!je||t,$e=navigator.msPointerEnabled,r="onwheel"in ye.createElement("div")?"wheel":ye.onmousewheel!==u?"mousewheel":"DOMMouseScroll",qe=250,Ae=300,m=1400,ze="$stageFrame",Oe="$navDotFrame",Le="$navThumbFrame",l=function(i){var r,t="bez_"+xe.makeArray(arguments).join("_").replace(".","p");return"function"!=typeof xe.easing[t]&&(r=function(n,o){function i(t,e){return u[e]=3*n[e],s[e]=3*(o[e]-n[e])-u[e],r[e]=1-u[e]-s[e],t*(u[e]+t*(s[e]+t*r[e]))}function e(t){for(var e,n,o=t,a=0;++a<14&&(e=i(o,0)-t,!(Math.abs(e)<.001));)o-=e/(n=o,u[0]+n*(2*s[0]+3*r[0]*n));return o}var r=[null,null],s=[null,null],u=[null,null];return function(t){return i(e(t),1)}},xe.easing[t]=function(t,e,n,o,a){return o*r([i[0],i[1]],[i[2],i[3]])(e/a)+n}),t}([.1,0,.25,1]),h="50%",c={width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:2,glimpse:0,fit:"contain",position:h,thumbposition:h,nav:"dots",navposition:"bottom",navwidth:null,thumbwidth:64,thumbheight:64,thumbmargin:2,thumbborderwidth:2,thumbfit:"cover",allowfullscreen:!1,transition:"slide",clicktransition:null,transitionduration:Ae,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!1,enableifsingleframe:!1,controlsonstart:!0,shuffle:!1,direction:"ltr",shadows:!0,spinner:null},Mn={left:!0,right:!0,down:!1,up:!1,space:!1,home:!1,end:!1};function Ie(){}function De(t,e,n){return Math.max(isNaN(e)?-1/0:e,Math.min(isNaN(n)?1/0:n,t))}function Re(t){var e={};return je?e.transform="translate3d("+t+"px,0,0)":e.left=t,e}function Sn(t){return{"transition-duration":t+"ms"}}function p(t,e){return isNaN(t)?e:t}function We(t,e){return p(+String(t).replace(e||"px",""))}function He(t,e){return p((/%$/.test(n=t)?We(n,"%"):u)/100*e,We(t));var n}function Ke(t){return(!isNaN(We(t))||!isNaN(We(t,"%")))&&t}function Fn(t,e,n,o){return(t-(o||0))*(e+(n||0))}function v(t,e,n,o){var a,i,r=t.data();r&&(r.onEndFn=function(){a||(a=!0,clearTimeout(r.tT),n())},r.tProp=e,clearTimeout(r.tT),r.tT=setTimeout(function(){r.onEndFn()},1.5*o),(i=(e=t).data()).tEnd||(Ue(e[0],{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"}[s.prefixed("transition")],function(t){i.tProp&&t.propertyName.match(i.tProp)&&i.onEndFn()}),i.tEnd=!0))}function En(n,t){var e;if(n.length)return e=n.data(),je?(n.css(Sn(0)),e.onEndFn=Ie,clearTimeout(e.tT)):n.stop(),e=Pn(t,function(){return t=n,je?+((e=t.css("transform")).match(/ma/)&&e.match(/-?\d+(?!d)/g)[e.match(/3d/)?12:4]):+t.css("left").replace("px","");var t,e}),n.css(Re(e)),e}function Pn(){for(var t,e=0,n=arguments.length;e<n&&"number"!=typeof(t=e?arguments[e]():arguments[e]);e++);return t}function $(t,e){return Math.round(t+(e-t)/1.5)}function Ve(){return Ve.p=Ve.p||("https:"===be.protocol?"https://":"http://"),Ve.p}function jn(t,e){var n,o,a,i;return"string"!=typeof t?t:(a=t,(n=ye.createElement("a")).href=a,(t=n).host.match(/youtube\.com/)&&t.search?(i=t.search.split("v=")[1])&&(-1!==(a=i.indexOf("&"))&&(i=i.substring(0,a)),o="youtube"):t.host.match(/youtube\.com|youtu\.be/)?(i=t.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),o="youtube"):t.host.match(/vimeo\.com/)&&(o="vimeo",i=t.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,"")),i&&o||!e||(i=t.href,o="custom"),!!i&&{id:i,type:o,s:t.search.replace(/^\?/,""),p:Ve()})}function Nn(t,e,n,o){for(var a=0,i=t.length;a<i;a++){var r=t[a];if(r.i===n&&r.thumbsReady){var s={videoReady:!0};s[ze]=s[Le]=s[Oe]=!1,o.splice(a,1,xe.extend({},r,s,e));break}}}function $n(t){var c=[];function f(t,e,n){var o=n.thumb&&n.img!==n.thumb,a=We(n.width||t.attr("width")),i=We(n.height||t.attr("height")),r=t.attr("alt"),t=t.attr("title");r&&xe.extend(n,{alt:r}),t&&xe.extend(n,{title:t}),xe.extend(n,{width:a,height:i,thumbratio:Dn(n.thumbratio||We(n.thumbwidth||e&&e.attr("width")||o||a)/We(n.thumbheight||e&&e.attr("height")||o||i))})}return t.children().each(function(){var t,e,n,o,a,i,r,s,u=xe(this),l=In(xe.extend(u.data(),{id:u.attr("id")}));if(u.is("a, img"))e=l,n=!0,o=(t=u).children("img").eq(0),a=t.attr("href"),i=t.attr("src"),r=o.attr("src"),s=e.video,(n=!!n&&jn(a,!0===s))?a=!1:n=s,f(t,o,xe.extend(e,{video:n,img:e.img||a||i||r,thumb:e.thumb||r||i||a}));else{if(u.is(":empty"))return;f(u,null,xe.extend(l,{html:this,_html:u.html()}))}c.push(l)}),c}function Be(t,e,n,o){return Be.i||(Be.i=1,Be.ii=[!0]),o=o||Be.i,void 0===Be.ii[o]&&(Be.ii[o]=!0),t()?e():Be.ii[o]&&setTimeout(function(){Be.ii[o]&&Be(t,e,n,o)},n||100),Be.i++}function qn(t,e,n,o){var a,i,r,s,u,l,c,f=t.data(),d=f.measures;return!d||f.l&&f.l.W===d.width&&f.l.H===d.height&&f.l.r===d.ratio&&f.l.w===e.w&&f.l.h===e.h&&f.l.m===n&&f.l.p===o||(a=d.width,i=d.height,r=e.w/e.h,r=d.ratio>=r,s="scaledown"===n,u="contain"===n,l="cover"===n,c={x:Ke((c=((c=o)+"").split(/\s+/))[0])||h,y:Ke(c[1])||h},r&&(s||u)||!r&&l?i=(a=De(e.w,0,s?a:1/0))/d.ratio:(r&&l||!r&&(s||u))&&(a=(i=De(e.h,0,s?i:1/0))*d.ratio),t.css({width:a,height:i,left:He(c.x,e.w-a),top:He(c.y,e.h-i)}),f.l={W:d.width,H:d.height,r:d.ratio,w:e.w,h:e.h,m:n,p:o}),!0}function An(t,e,n){return e!==n&&(t<=e?"left":n<=t?"right":"left right")}function zn(t,e,n,o){if(!n)return!1;if(!isNaN(t))return t-(o?0:1);for(var a,i=0,r=e.length;i<r;i++)if(e[i].id===t){a=i;break}return a}function Xe(t,e){return'<div class="'+t+'">'+(e||"")+"</div>"}function On(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 Ln(t){return"[object Array]"==Object.prototype.toString.call(t)&&xe.map(t,function(t){return xe.extend({},t)})}function Qe(t,e,n){t.scrollLeft(e||0).scrollTop(n||0)}function In(t){var n;if(t)return n={},xe.each(t,function(t,e){n[t.toLowerCase()]=e}),n}function Dn(t){var e;if(t)return e=+t,isNaN(e)?+(e=t.split("/"))[0]/+e[1]||u:e}function Ue(t,e,n,o){e&&(t.addEventListener?t.addEventListener(e,n,!!o):t.attachEvent("on"+e,n))}function Rn(t){return{tabindex:-1*t+"",disabled:t}}function Wn(e,n){Ue(e,"keyup",function(t){e.getAttribute("disabled")||13==t.keyCode&&n.call(e,t)})}function Hn(e,n){Ue(e,"focus",e.onfocusin=function(t){n.call(e,t)},!0)}function Ye(t,e){t.preventDefault?t.preventDefault():t.returnValue=!1,e&&t.stopPropagation&&t.stopPropagation()}function Kn(t){return t?">":"<"}function Ge(t,e){var n=t.data(),o=Math.round(e.pos),a=function(){n.sliding=!1,(e.onEnd||Ie)()},o=(void 0!==e.overPos&&e.overPos!==e.pos&&(o=e.overPos,a=function(){Ge(t,xe.extend({},e,{overPos:e.pos,time:Math.max(Ae,e.time/2)}))}),xe.extend(Re(o),e.width&&{width:e.width}));n.sliding=!0,je?(t.css(xe.extend(Sn(e.time),o)),10<e.time?v(t,"transform",a,e.time):a()):t.stop().animate(o,e.time,l,a)}function Vn(t,e,n,o,a,i){var r,s,u,l,c=void 0!==i;!c&&(a.push(arguments),Array.prototype.push.call(arguments,a.length),1<a.length)||(t=t||xe(t),e=e||xe(e),r=t[0],s=e[0],u="crossfade"===o.method,l=function(){var t;l.done||(l.done=!0,(t=(c||a.shift())&&a.shift())&&Vn.apply(this,t),(o.onEnd||Ie)(!!t))},i=o.time/(i||1),n.removeClass(d+" "+f),t.stop().addClass(d),e.stop().addClass(f),u&&s&&t.fadeTo(0,0),t.fadeTo(u?i:0,1,u&&l),e.fadeTo(i,0,l),r&&u)||s||l()}function x(t){var e=(t.touches||[])[0]||t;t._x=e.pageX,t._y=e.clientY,t._now=xe.now()}function Bn(t,i){var r,s,n,o,u,e,a,l,c,f=t[0],d={};function h(t){if(n=xe(t.target),d.checked=e=a=c=!1,r||d.flow||t.touches&&1<t.touches.length||1<t.which||w&&w.type!==t.type&&y||(e=i.select&&n.is(i.select,f)))return e;u="touchstart"===t.type,a=n.is("a, a *",f),o=d.control,l=d.noMove||d.noSwipe||o?16:d.snap?0:4,x(t),s=w=t,g=t.type.replace(/down|start/,"move").replace(/Down/,"Move"),(i.onStart||Ie).call(f,t,{control:o,$target:n}),r=d.flow=!0,u&&!d.go||Ye(t)}function m(t){var e,n,o,a;t.touches&&1<t.touches.length||$e&&!t.isPrimary||g!==t.type||!r?(r&&p(),(i.onTouchEnd||Ie)()):(x(t),a=(e=Math.abs(t._x-s._x))-(n=Math.abs(t._y-s._y)),o=(d.go||d.x||0<=a)&&!d.noSwipe,a=a<0,u&&!d.checked?(r=o)&&Ye(t):(Ye(t),(i.onMove||Ie).call(f,t,{touch:u})),!c&&Math.sqrt(Math.pow(e,2)+Math.pow(n,2))>l&&(c=!0),d.checked=d.checked||o||a)}function p(t){(i.onTouchEnd||Ie)();var e=r;d.control=r=!1,e&&(d.flow=!1),!e||a&&!d.checked||(t&&Ye(t),y=!0,clearTimeout(b),b=setTimeout(function(){y=!1},1e3),(i.onEnd||Ie).call(f,{moved:c,$target:n,control:o,touch:u,startEvent:s,aborted:!t||"MSPointerCancel"===t.type}))}function v(){d.flow&&setTimeout(function(){d.flow=!1},qe)}return $e?(Ue(f,"MSPointerDown",h),Ue(ye,"MSPointerMove",m),Ue(ye,"MSPointerCancel",p),Ue(ye,"MSPointerUp",p)):(Ue(f,"touchstart",h),Ue(f,"touchmove",m),Ue(f,"touchend",p),Ue(ye,"touchstart",function(){d.flow||setTimeout(function(){d.flow=!0},10)}),Ue(ye,"touchend",v),Ue(ye,"touchcancel",v),Ee.on("scroll",v),t.on("mousedown",h),Pe.on("mousemove",m).on("mouseup",p)),t.on("click","a",function(t){d.checked&&Ye(t)}),d}function Xn(w,g){var n,y,b,x,o,_,a,C,T,k,M,S,i,F,E=w[0],r=w.data(),P={};function j(t,e){F=!0,n=y=t._x,a=t._now,_=[[a,n]],b=x=P.noMove||e?0:En(w,(g.getPos||Ie)()),(g.onStart||Ie).call(E,t)}return P=xe.extend(Bn(g.$wrap,xe.extend({},g,{onStart:function(t,e){T=P.min,k=P.max,M=P.snap,S=t.altKey,F=i=!1,e.control||r.sliding||j(t)},onMove:function(t,e){P.noSwipe||(F||j(t),y=t._x,_.push([t._now,y]),o=An(x=b-(n-y),T,k),x<=T?x=$(x,T):k<=x&&(x=$(x,k)),P.noMove)||(w.css(Re(x)),i||(i=!0,e.touch)||$e||w.addClass(N),(g.onMove||Ie).call(E,t,{pos:x,edge:o}))},onEnd:function(t){if(!P.noSwipe||!t.moved){F||j(t.startEvent,!0),t.touch||$e||w.removeClass(N);for(var e,n,o,a,i,r=(C=xe.now())-qe,s=null,u=Ae,l=g.friction,c=_.length-1;0<=c;c--){if(e=_[c][0],n=Math.abs(e-r),null===s||n<o)s=e,a=_[c][1];else if(s===r||o<n)break;o=n}var f=De(x,T,k),d=a-y,h=0<=d,m=C-s,p=qe<m,v=!p&&x!==b&&f===x;M&&(f=De(Math[v?h?"floor":"ceil":"round"](x/M)*M,T,k),T=k=f),v&&(M||f===x)&&(v=-d/m,u*=De(Math.abs(v),g.timeLow,g.timeHigh),d=Math.round(x+v*u/l),M||(f=d),!h&&k<d||h&&d<T)&&(m=h?T:k,i=De((f=M?f:m)+.03*(i=d-m),m-50,m+50),u=Math.abs((x-i)/(v/l))),u*=S?10:1,(g.onEnd||Ie).call(E,xe.extend(t,{moved:t.moved||p&&M,pos:x,newPos:f,overPos:i,time:u}))}}})),P)}function Qn(t,s){var u,l,c,t=t[0],f={prevent:{}};return Ue(t,r,function(t){var e=t.wheelDeltaY||-1*t.deltaY||0,n=t.wheelDeltaX||-1*t.deltaX||0,e=Math.abs(n)&&!Math.abs(e),o=Kn(n<0),a=l===o,i=xe.now(),r=i-c<qe;l=o,c=i,!e||!f.ok||f.prevent[o]&&!u||(Ye(t,!0),u&&a&&r)||(s.shift&&(u=!0,clearTimeout(f.t),f.t=setTimeout(function(){u=!1},m)),(s.onEnd||Ie)(t,s.shift?o:n))}),f}function Un(){xe.each(xe.Fotorama.instances,function(t,e){e.index=t})}Be.stop=function(t){Be.ii[t]=!1},jQuery.Fotorama=function(i,x){Cn=xe("html"),Fe=xe("body");var _,C,I,D,s,u,l,c,f,d,R,W,H,h,m,K,V,B,X,p,Q,U,v,w,Y,g,G,J,t,e,Z,y,a,tt,et,nt,b,ot,at,T=this,it=xe.now(),rt=_e+it,st=i[0],ut=1,lt=i.data(),ct=xe("<style></style>"),ft=xe(Xe("fotorama--hidden")),k=xe(Xe(Te)),M=xe(Xe(en)).appendTo(k),S=(M[0],xe(Xe("fotorama__stage__shaft")).appendTo(M)),dt=xe(),ht=xe(Xe(an+" fotorama__arr--prev"+Me)),mt=xe(Xe(an+" fotorama__arr--next"+Me)),pt=ht.add(mt).appendTo(M),vt=xe(Xe("fotorama__nav-wrap")),r=xe(Xe(ke)).appendTo(vt),F=xe(Xe("fotorama__nav__shaft")).appendTo(r),wt=xe(),gt=xe(),yt=(S.data(),F.data(),xe(Xe("fotorama__thumb-border")).appendTo(F)),bt=xe(Xe("fotorama__fullscreen-icon"+Me)),xt=bt[0],_t=xe(Xe(yn)),Ct=xe(Xe("fotorama__video-close")).appendTo(M)[0],Tt=xe(Xe("fotorama__spinner")),E=!1,P={},n={},kt={},j={},Mt={},St={},Ft={},Et=0,Pt=[];function jt(){xe.each(_,function(t,e){var n,o,a,i,r,s,u;!e.i&&(e.i=ut++,u=jn(e.video,!0))&&(n={},e.video=u,e.img||e.thumb?e.thumbsReady=!0:(a=_,i=T,"youtube"===(u=(o=e).video).type?(r=(s=Ve()+"img.youtube.com/vi/"+u.id+"/default.jpg").replace(/\/default.jpg$/,"/hqdefault.jpg"),o.thumbsReady=!0):"vimeo"===u.type?xe.ajax({url:Ve()+"vimeo.com/api/v2/video/"+u.id+".json",dataType:"jsonp",success:function(t){o.thumbsReady=!0,Nn(a,{img:t[0].thumbnail_large,thumb:t[0].thumbnail_small},o.i,i)}}):o.thumbsReady=!0,n={img:r,thumb:s}),Nn(_,{img:n.img,thumb:n.thumb},e.i,T))})}function N(t){return G[t]||T.fullScreen}function Nt(t){var e,n,o,a;t!==Nt.f&&(t?(i.html("").addClass(_e+" "+rt).append(k).before(ct).before(ft),e=T,xe.Fotorama.instances.push(e)):(k.detach(),ct.detach(),ft.detach(),i.html(lt.urtext).removeClass(rt),e=T,xe.Fotorama.instances.splice(e.index,1)),Un(),n="keydown."+_e,o="keydown."+(a=_e+it),a="resize."+a+" orientationchange."+a,t?(Pe.on(o,function(t){var e,n;s&&27===t.keyCode?O(s,e=!0,!0):(T.fullScreen||x.keyboard&&!T.index)&&(27===t.keyCode?(e=!0,T.cancelFullScreen()):t.shiftKey&&32===t.keyCode&&N("space")||37===t.keyCode&&N("left")||38===t.keyCode&&N("up")?n="<":32===t.keyCode&&N("space")||39===t.keyCode&&N("right")||40===t.keyCode&&N("down")?n=">":36===t.keyCode&&N("home")?n="<<":35===t.keyCode&&N("end")&&(n=">>")),(e||n)&&Ye(t),n&&T.show({index:n,slow:t.altKey,user:!0})}),T.index||Pe.off(n).on(n,"textarea, input, select",function(t){Fe.hasClass(Ce)||t.stopPropagation()}),Ee.on(a,T.resize)):(Pe.off(o),Ee.off(a)),Nt.f=t)}function $t(){var t=C<2&&!x.enableifsingleframe||s;n.noMove=t||p,n.noSwipe=t||!x.swipe,w||S.toggleClass(on,!x.click&&!n.noMove&&!n.noSwipe),$e&&k.toggleClass("fotorama__wrap--pan-y",!n.noSwipe)}function qt(t){!0===t&&(t=""),x.autoplay=Math.max(+t||5e3,1.5*v)}function $(t){return t<0?(C+t%C)%C:C<=t?t%C:t}function At(t){return De(t,0,C-1)}function zt(t){return(h?$:At)(t)}function Ot(t){return!!(0<t||h)&&t-1}function Lt(t){return!!(t<C-1||h)&&t+1}function It(t,i,r){var s;"number"==typeof t&&(t=new Array(t),s=!0),xe.each(t,function(t,e){var n,o,a;"number"==typeof(e=s?t:e)&&(n=_[$(e)])&&(a=n[o="$"+i+"Frame"],r.call(this,t,e,n,a,o,a&&a.data()))})}function Dt(t,e,n,o){J&&("*"!==J||o!==H)||(t=Ke(x.width)||Ke(t)||500,e=Ke(x.height)||Ke(e)||333,T.resize({width:t,ratio:x.ratio||n||t/e},0,o!==H&&"*"))}function Rt(t,v,w,g,y,b){It(t,v,function(t,n,e,o,a,i){var r,s,u,l,c,f,d;function h(t){var e=$(n);A(t,{index:e,src:f,frame:_[e]})}function m(){u.remove(),xe.Fotorama.cache[f]="error",e.html&&"stage"===v||!d||d===f?(!f||e.html||r?"stage"===v&&(o.trigger("f:load").removeClass(pn+" "+mn).addClass(vn),h("load"),Dt()):(o.trigger("f:error").removeClass(pn).addClass(mn),h("error")),i.state="error",!(1<C&&_[n]===e)||e.html||e.deleted||e.video||r||(e.deleted=!0,T.splice(n,1))):(e[c]=f=d,Rt([n],v,w,g,y,!0))}function p(){var t=10;Be(function(){return!et||!t--&&!Ne},function(){xe.Fotorama.measures[f]=l.measures=xe.Fotorama.measures[f]||{width:s.width,height:s.height,ratio:s.width/s.height},Dt(l.measures.width,l.measures.height,l.measures.ratio,n),u.off("load error").addClass(wn+(r?" fotorama__img--full":"")).prependTo(o),qn(u,(xe.isFunction(w)?w():w)||P,g||e.fit||x.fit,y||e.position||x.position),xe.Fotorama.cache[f]=i.state="loaded",setTimeout(function(){o.trigger("f:load").removeClass(pn+" "+mn).addClass(vn+" "+(r?"fotorama__loaded--full":"fotorama__loaded--img")),"stage"===v?h("load"):"auto"!==e.thumbratio&&(e.thumbratio||"auto"!==x.thumbratio)||(e.thumbratio=l.measures.ratio,L())},0)})}o&&(r=T.fullScreen&&e.full&&e.full!==e.img&&!i.$full&&"stage"===v,i.$img&&!b&&!r||(s=new Image,u=xe(s),l=u.data(),i[r?"$full":"$img"]=u,f=e[c="stage"===v?r?"full":"img":"thumb"],d=r?null:e["stage"===v?"thumb":"img"],"navThumb"===v&&(o=i.$wrap),f?(xe.Fotorama.cache[f]?function t(){"error"===xe.Fotorama.cache[f]?m():"loaded"===xe.Fotorama.cache[f]?setTimeout(p,0):setTimeout(t,100)}():(xe.Fotorama.cache[f]="*",u.on("load",p).on("error",m)),i.state="",i.data.hasOwnProperty("alt")&&(s.alt=i.data.alt),i.data.hasOwnProperty("title")&&(s.title=i.data.title),s.src=f):m()))})}function Wt(){Tt.detach(),D&&D.stop()}function Ht(){var t,e=u[ze];e&&!e.data().state&&(t=e,Tt.append(D.spin().el).appendTo(t),e.on("f:load f:error",function(){e.off("f:load f:error"),Wt()}))}function Kt(t){Wn(t,me),Hn(t,function(){setTimeout(function(){Qe(r)},0),q({time:v,guessIndex:xe(this).data().eq,minMax:j})})}function Vt(t,r){It(t,r,function(t,e,n,o,a,i){o||(o=n[a]=k[a].clone(),(i=o.data()).data=n,a=o[0],"stage"===r?(n.html&&xe('<div class="fotorama__html"></div>').append(n._html?xe(n.html).removeAttr("id").html(n._html):n.html).appendTo(o),n.caption&&xe(Xe("fotorama__caption",Xe("fotorama__caption__wrap",n.caption))).appendTo(o),n.video&&o.addClass("fotorama__stage__frame--video").append(_t.clone()),Hn(a,function(){setTimeout(function(){Qe(M)},0),de({index:i.eq,user:!0})}),dt=dt.add(o)):"navDot"===r?(Kt(a),wt=wt.add(o)):"navThumb"===r&&(Kt(a),i.$wrap=o.children(":first"),gt=gt.add(o),n.video)&&i.$wrap.append(_t.clone()))})}function Bt(t,e,n,o){return t&&t.length&&qn(t,e,n,o)}function Xt(t){It(t,"stage",function(t,e,n,o,a,i){var r,s,u;o&&(u=$(e),r=n.fit||x.fit,s=n.position||x.position,i.eq=u,Ft[ze][u]=o.css(xe.extend({left:p?0:Fn(e,P.w,x.margin,c)},p&&Sn(0))),u=o[0],xe.contains(ye.documentElement,u)||(o.appendTo(S),O(n.$video)),Bt(i.$img,P,r,s),Bt(i.$full,P,r,s))})}function Qt(t,r){var s,u;"thumbs"!==m||isNaN(t)||(u=(s=-t)+P.nw,gt.each(function(){function t(){return{h:U,w:e.w}}var e=xe(this).data(),n=e.eq,o=t(),a=_[n]||{},i=a.thumbfit||x.thumbfit,a=a.thumbposition||x.thumbposition;o.w=e.w,e.l+e.w<s||e.l>u||Bt(e.$img,o,i,a)||r&&Rt([n],"navThumb",t,i,a)}))}function Ut(t,e,n){var o,a;Ut[n]||(o="nav"===n&&K,a=0,e.append(t.filter(function(){for(var t,e=xe(this),n=e.data(),o=0,a=_.length;o<a;o++)if(n.data===_[o]){t=!0,n.eq=o;break}return t||e.remove()&&!1}).sort(function(t,e){return xe(t).data().eq-xe(e).data().eq}).each(function(){var t,e,n;o&&(e=(t=xe(this)).data(),n=Math.round(U*e.data.thumbratio)||Q,e.l=a,e.w=n,t.css({width:n}),a+=n+x.thumbmargin)})),Ut[n]=!0)}function Yt(t){return t-Et>P.w/3}function Gt(t){return!(h||E+t&&E-C+t||s)}function Jt(){var t=Gt(0),e=Gt(1);ht.toggleClass(rn,t).attr(Rn(t)),mt.toggleClass(rn,e).attr(Rn(e))}function Zt(){kt.ok&&(kt.prevent={"<":Gt(0),">":Gt(1)})}function te(t){var e,n=t.data(),n=K?(e=n.l,n.w):(e=t.position().left,t.width());return{c:e+n/2,min:-e+10*x.thumbmargin,max:-e+P.w-n-10*x.thumbmargin}}function ee(t){var e=u[b].data();Ge(yt,{time:1.2*t,pos:e.l,width:e.w-2*x.thumbborderwidth})}function q(t){var e,n,o,a=_[t.guessIndex][b];a&&(e=j.min!==j.max,o=t.minMax||e&&te(u[b]),a=e&&(t.keep&&q.l?q.l:De((t.coo||P.nw/2)-te(a).c,o.min,o.max)),n=e&&De(a,j.min,j.max),o=1.1*t.time,Ge(F,{time:o,pos:n||0,onEnd:function(){Qt(n,!0)}}),le(r,An(n,j.min,j.max)),q.l=a)}function ne(t){for(var e=St[t];e.length;)e.shift().removeClass(fn)}function oe(t){var n=Ft[t];xe.each(l,function(t,e){delete n[$(e)]}),xe.each(n,function(t,e){delete n[t],e.detach()})}function ae(t){c=f=E;var e=u[ze];e&&(ne(ze),St[ze].push(e.addClass(fn)),t||T.show.onEnd(!0),En(S,0),oe(ze),Xt(l),n.min=h?-1/0:-Fn(C-1,P.w,x.margin,c),n.max=h?1/0:-Fn(0,P.w,x.margin,c),n.snap=P.w+x.margin,j.min=Math.min(0,P.nw-F.width()),j.max=0,F.toggleClass(on,!(j.noMove=j.min===j.max)))}function ie(n,t){n&&xe.each(t,function(t,e){e&&xe.extend(e,{width:n.width||e.width,height:n.height,minwidth:n.minwidth,maxwidth:n.maxwidth,minheight:n.minheight,maxheight:n.maxheight,ratio:Dn(n.ratio)})})}function A(t,e){i.trigger(_e+":"+t,[T,e])}function re(){clearTimeout(o.t),et=1,x.stopautoplayontouch?T.stopAutoplay():y=!0}function o(){et&&(x.stopautoplayontouch||(se(),z()),o.t=setTimeout(function(){et=0},Ae+qe))}function se(){y=!(!s&&!a)}function z(){var n,t;clearTimeout(z.t),Be.stop(z.w),!x.autoplay||y?T.autoplay&&(T.autoplay=!1,A("stopautoplay")):(T.autoplay||(T.autoplay=!0,A("startautoplay")),n=E,t=u[ze].data(),z.w=Be(function(){return t.state||n!==E},function(){z.t=setTimeout(function(){var t,e;y||n!==E||(e=_[t=W][ze].data(),z.w=Be(function(){return e.state||t!==W},function(){y||t!==W||T.show(h?Kn(!g):W)}))},x.autoplay)}))}function ue(){T.fullScreen&&(T.fullScreen=!1,kn&&Se.cancel(st),Fe.removeClass(Ce),Cn.removeClass(Ce),i.removeClass(hn).insertAfter(ft),P=xe.extend({},tt),O(s,!0,!0),he("x",!1),T.resize(),Rt(l,"stage"),Qe(Ee,e,t),A("fullscreenexit"))}function le(t,e){Y&&(t.removeClass("fotorama__shadows--left fotorama__shadows--right"),e)&&!s&&t.addClass(e.replace(/^|\s/g," "+cn+"--"))}function O(t,e,n){e&&(k.removeClass(Je),s=!1,$t()),t&&t!==s&&(t.remove(),A("unloadvideo")),n&&(se(),z())}function ce(t){k.toggleClass(Ze,t)}function fe(t){var e;n.flow||(e=(t=t?t.pageX:fe.x)&&!Gt(Yt(t))&&x.click,fe.p!==e&&M.toggleClass("fotorama__pointer",e)&&(fe.p=e,fe.x=t))}function de(e){clearTimeout(de.t),x.clicktransition&&x.clicktransition!==x.transition?setTimeout(function(){var t=x.transition;T.setOptions({transition:x.clicktransition}),w=t,de.t=setTimeout(function(){T.show(e)},10)},0):T.show(e)}function he(t,e){n[t]=j[t]=e}function me(t){de({index:xe(this).data().eq,slow:t.altKey,user:!0,coo:t._x-r.offset().left})}function pe(t){de({index:pt.index(this)?">":"<",slow:t.altKey,user:!0})}function ve(t){Hn(t,function(){setTimeout(function(){Qe(M)},0),ce(!1)})}function L(){function t(t,e){o[t?"add":"remove"].push(e)}var e,n,o,a;_=T.data=_||Ln(x.data)||$n(i),C=T.size=_.length,!ge.ok&&x.shuffle&&On(_),jt(),E=At(E),C&&Nt(!0),T.options=x=In(x),p="crossfade"===x.transition||"dissolve"===x.transition,h=x.loop&&(2<C||p&&(!w||"slide"!==w)),v=+x.transitionduration||Ae,g="rtl"===x.direction,G=xe.extend({},x.keyboard&&Mn,x.keyboard),o={add:[],remove:[]},1<C||x.enableifsingleframe?(m=x.nav,V="top"===x.navposition,o.remove.push(dn),pt.toggle(!!x.arrows)):(m=!1,pt.hide()),Wt(),D=new bn(xe.extend(xn,x.spinner,_n,{direction:g?-1:1})),Jt(),Zt(),x.autoplay&&qt(x.autoplay),Q=We(x.thumbwidth)||64,U=We(x.thumbheight)||64,kt.ok=Mt.ok=x.trackpad&&!Ne,$t(),ie(x,[P]),(K="thumbs"===m)?(Vt(C,"navThumb"),I=gt,b=Le,e=ct,n=xe.Fotorama.jst.style({w:Q,h:U,b:x.thumbborderwidth,m:x.thumbmargin,s:it,q:!Tn}),(a=e[0]).styleSheet?a.styleSheet.cssText=n:e.html(n),r.addClass(un).removeClass(sn)):"dots"===m?(Vt(C,"navDot"),I=wt,b=Oe,r.addClass(sn).removeClass(un)):(m=!1,r.removeClass(un+" "+sn)),m&&(V?vt.insertBefore(M):vt.insertAfter(M),Ut.nav=!1,Ut(I,F,"nav")),B=x.allowfullscreen,X=B?(bt.prependTo(M),kn&&"native"===B):(bt.detach(),!1),t(p,"fotorama__wrap--fade"),t(!p,"fotorama__wrap--slide"),t(!x.captions,"fotorama__wrap--no-captions"),t(g,"fotorama__wrap--rtl"),t("always"!==x.arrows,"fotorama__wrap--toggle-arrows"),t(!(Y=x.shadows&&!Ne),"fotorama__wrap--no-shadows"),k.addClass(o.add.join(" ")).removeClass(o.remove.join(" ")),xe.extend({},x),L.i||(L.i=!0,((a=x.startindex)||x.hash&&be.hash)&&(H=zn(a||be.hash.replace(/^#/,""),_,0===T.index||a,a)),E=c=f=d=H=zt(H)||0),C?we()||(s&&O(s,!0),l=[],oe(ze),L.ok=!0,T.show({index:E,time:0}),T.resize()):T.destroy()}function we(){if(!we.f===g)return we.f=g,E=C-1-E,T.reverse(),!0}function ge(){ge.ok||(ge.ok=!0,A("ready"))}k[ze]=xe(Xe(nn)),k[Le]=xe(Xe(ln+" fotorama__nav__frame--thumb"+Me,Xe(gn))),k[Oe]=xe(Xe(ln+" fotorama__nav__frame--dot"+Me,Xe("fotorama__dot"))),St[ze]=[],St[Le]=[],St[Oe]=[],Ft[ze]={},k.addClass(je?"fotorama__wrap--css3":"fotorama__wrap--css2").toggleClass(Ze,!x.controlsonstart),lt.fotorama=this,T.startAutoplay=function(t){return T.autoplay||(y=a=!1,qt(t||x.autoplay),z()),this},T.stopAutoplay=function(){return T.autoplay&&(y=a=!0,z()),this},T.show=function(e){"object"!=typeof e?(n=e,e={}):n=e.index,n=">"===n?f+1:"<"===n?f-1:"<<"===n?0:">>"===n?C-1:n,n=void 0===(n=isNaN(n)?zn(n,_,!0):n)?E||0:n,T.activeIndex=E=zt(n),Z=Ot(E),R=Lt(E),W=$(E+(g?-1:1)),l=[E,Z,R],f=h?n:E;var t=Math.abs(d-f),n=Pn(e.time,function(){return Math.min(v*(1+(t-1)/12),2*v)}),o=e.overPos,a=(e.slow&&(n*=10),u),i=(T.activeFrame=u=_[E],a===u&&!e.user),r=(O(s,u.i!==_[$(c)].i),Vt(l,"stage"),Xt(Ne?[f]:[f,Ot(f),Lt(f)]),he("go",!0),i||A("show",{user:e.user,time:n}),y=!0,T.show.onEnd=function(t){r.ok||(r.ok=!0,t||ae(!0),i||A("showend",{user:e.user}),!t&&w&&w!==x.transition?(T.setOptions({transition:w}),w=!1):(Ht(),Rt(l,"stage"),he("go",!1),Zt(),fe(),se(),z()))});return p?Vn(u[ze],E!==d?_[d][ze]:null,dt,{time:n,method:x.transition,onEnd:r},Pt):Ge(S,{pos:-Fn(f,P.w,x.margin,c),overPos:o,time:n,onEnd:r}),Jt(),m&&(ne(b),St[b].push(u[b].addClass(fn)),q({time:n,coo:(a=At(E+De(f-d,-1,1)))!==E&&e.coo,guessIndex:void 0!==e.coo?a:E,keep:i}),K)&&ee(n),Z=void 0!==d&&d!==E,d=E,x.hash&&Z&&!T.eq&&(o=u.id||E+1,be.replace(be.protocol+"//"+be.host+be.pathname.replace(/^\/?/,"/")+be.search+"#"+o)),this},T.requestFullScreen=function(){return B&&!T.fullScreen&&(t=Ee.scrollTop(),e=Ee.scrollLeft(),Qe(Ee),he("x",!0),tt=xe.extend({},P),i.addClass(hn).appendTo(Fe.addClass(Ce)),Cn.addClass(Ce),O(s,!0,!0),T.fullScreen=!0,X&&Se.request(st),T.resize(),Rt(l,"stage"),Ht(),A("fullscreenenter")),this},T.cancelFullScreen=function(){return X&&Se.is()?Se.cancel(ye):ue(),this},T.toggleFullScreen=function(){return T[(T.fullScreen?"cancel":"request")+"FullScreen"]()},Ue(ye,Se.event,function(){!_||Se.is()||s||ue()}),T.resize=function(t){var e,n,o,a,i;return _&&(e=arguments[1]||0,n=arguments[2],ie(T.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:In(t),[P,n||T.fullScreen||x]),t=P.width,o=P.height,a=P.ratio,i=Ee.height()-(m?r.height():0),Ke(t)&&(k.addClass(tn).css({width:t,minWidth:P.minwidth||0,maxWidth:P.maxwidth||99999}),t=P.W=P.w=k.width(),P.nw=m&&He(x.navwidth,t)||t,x.glimpse&&(P.w-=Math.round(2*(He(x.glimpse,t)||0))),S.css({width:P.w,marginLeft:(P.W-P.w)/2}),o=(o=He(o,i))||a&&t/a)&&(t=Math.round(t),o=P.h=Math.round(De(o,He(P.minheight,i),He(P.maxheight,i))),M.stop().animate({width:t,height:o},e,function(){k.removeClass(tn)}),ae(),m&&(r.stop().animate({width:P.nw},e),q({guessIndex:E,time:e,keep:!0}),K)&&Ut.nav&&ee(e),J=n||!0,ge()),Et=M.offset().left),this},T.setOptions=function(t){return xe.extend(x,t),L(),this},T.shuffle=function(){return _&&On(_)&&L(),this},T.destroy=function(){return T.cancelFullScreen(),T.stopAutoplay(),_=T.data=null,Nt(),l=[],oe(ze),L.ok=!1,this},T.playVideo=function(){var t=u,e=t.video,n=E;return"object"==typeof e&&t.videoReady&&(X&&T.fullScreen&&T.cancelFullScreen(),Be(function(){return!Se.is()||n!==E},function(){n===E&&(t.$video=t.$video||xe(xe.Fotorama.jst.video(e)),t.$video.appendTo(t[ze]),k.addClass(Je),s=t.$video,$t(),pt.blur(),bt.blur(),A("loadvideo"))})),this},T.stopVideo=function(){return O(s,!0,!0),this},M.on("mousemove",fe),n=Xn(S,{onStart:re,onMove:function(t,e){le(M,e.edge)},onTouchEnd:o,onEnd:function(t){le(M);var e,n,o,a,i=($e&&!nt||t.touch)&&x.arrows&&"always"!==x.arrows;t.moved||i&&t.pos!==t.newPos&&!t.control?(e=t.newPos,n=P.w,o=x.margin,a=c,e=-Math.round(e/(n+(o||0))-(a||0)),T.show({index:e,time:p?v:t.time,overPos:t.overPos,user:!0})):t.aborted||t.control||(n=t.startEvent,o=i,a=n.target,xe(a).hasClass(yn)?T.playVideo():a===xt?T.toggleFullScreen():s?a===Ct&&O(s,!0,!0):o?ce():x.click&&de({index:n.shiftKey||Kn(Yt(n._x)),slow:n.altKey,user:!0}))},timeLow:1,timeHigh:1,friction:2,select:"."+dn+", ."+dn+" *",$wrap:M}),j=Xn(F,{onStart:re,onMove:function(t,e){le(r,e.edge)},onTouchEnd:o,onEnd:function(t){function e(){q.l=t.newPos,se(),z(),Qt(t.newPos,!0)}var n;t.moved?t.pos!==t.newPos?(y=!0,Ge(F,{time:t.time,pos:t.newPos,overPos:t.overPos,onEnd:e}),Qt(t.newPos),Y&&le(r,An(t.newPos,j.min,j.max))):e():(n=t.$target.closest("."+ln,F)[0])&&me.call(n,t.startEvent)},timeLow:.5,timeHigh:2,friction:5,$wrap:r}),kt=Qn(M,{shift:!0,onEnd:function(t,e){re(),o(),T.show({index:e,slow:t.altKey})}}),Mt=Qn(r,{onEnd:function(t,e){re(),o();var n=En(F)+.25*e;F.css(Re(De(n,j.min,j.max))),Y&&le(r,An(n,j.min,j.max)),Mt.prevent={"<":n>=j.max,">":n<=j.min},clearTimeout(Mt.t),Mt.t=setTimeout(function(){Qt(q.l=n,!0)},qe),Qt(n)}}),k.hover(function(){setTimeout(function(){et||ce(!(nt=!0))},0)},function(){nt&&ce(!(nt=!1))}),ot=function(t){Ye(t),pe.call(this,t)},at=(at={onStart:function(){re(),n.control=!0},onTouchEnd:o})||{},pt.each(function(){var e,t=xe(this),n=t.data();n.clickOn||(n.clickOn=!0,xe.extend(Bn(t,{onStart:function(t){e=t,(at.onStart||Ie).call(this,t)},onMove:at.onMove||Ie,onTouchEnd:at.onTouchEnd||Ie,onEnd:function(t){t.moved||ot.call(this,e)}}),{noMove:!0}))}),pt.each(function(){Wn(this,function(t){pe.call(this,t)}),ve(this)}),Wn(xt,T.toggleFullScreen),ve(xt),xe.each("load push pop shift unshift reverse sort splice".split(" "),function(t,e){T[e]=function(){return _=_||[],"load"!==e?Array.prototype[e].apply(_,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(_=Ln(arguments[0])),L(),T}}),L()},xe.fn.fotorama=function(a){return this.each(function(){var e=this,t=xe(this),n=t.data(),o=n.fotorama;o?o.setOptions(a,!0):Be(function(){return!(0===(t=e).offsetWidth&&0===t.offsetHeight);var t},function(){n.urtext=t.html(),new xe.Fotorama(t,xe.extend({},c,i.fotoramaDefaults,a,n))})})},xe.Fotorama.instances=[],xe.Fotorama.cache={},xe.Fotorama.measures={},(xe=xe||{}).Fotorama=xe.Fotorama||{},xe.Fotorama.jst=xe.Fotorama.jst||{},xe.Fotorama.jst.style=function(t){var e,n="";return n+=".fotorama"+(null==(e=t.s)?"":e)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+(null==(e=t.m)?"":e)+"px;\nheight:"+(null==(e=t.h)?"":e)+"px}\n.fotorama"+(null==(e=t.s)?"":e)+" .fotorama__thumb-border{\nheight:"+(null==(e=t.h-t.b*(t.q?0:2))?"":e)+"px;\nborder-width:"+(null==(e=t.b)?"":e)+"px;\nmargin-top:"+(null==(e=t.m)?"":e)+"px}"},xe.Fotorama.jst.video=function(t){var e="",n=Array.prototype.join;return e+='<div class="fotorama__video"><iframe src="',function(){e+=n.call(arguments,"")}(("youtube"==t.type?t.p+"youtube.com/embed/"+t.id+"?autoplay=1":"vimeo"==t.type?t.p+"player.vimeo.com/video/"+t.id+"?autoplay=1&badge=0":t.id)+(t.s&&"custom"!=t.type?"&"+t.s:"")),e+='" frameborder="0" allowfullscreen></iframe></div>\n'},xe(function(){xe("."+_e+':not([data-auto="false"])').fotorama()})}(window,document,location,"undefined"!=typeof jQuery&&jQuery);
\ No newline at end of file
+fotoramaVersion="4.6.4",function(i,ye,be,xe,u){"use strict";var _e="fotorama",Ce="fullscreen",Te=_e+"__wrap",Je=Te+"--video",Ze=Te+"--no-controls",tn=Te+"--only-active",en=_e+"__stage",nn=en+"__frame",on=_e+"__grab",an=_e+"__arr",rn=an+"--disabled",ke=_e+"__nav",sn=ke+"--dots",un=ke+"--thumbs",ln=ke+"__frame",t=_e+"__fade",f=t+"-front",d=t+"-rear",cn="fotorama__shadows",fn=_e+"__active",dn=_e+"__select",hn=_e+"--fullscreen",mn=_e+"__error",pn=_e+"__loading",vn=_e+"__loaded",j=_e+"__grabbing",wn=_e+"__img",gn=_e+"__thumb",t=_e+"__video",yn=t+"-play",Me='" tabindex="0" role="button',t=xe&&xe.fn.jquery.split(".");if(!t||t[0]<1||1==t[0]&&t[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var s=function(c,f){var t,o,e,a={},d=c.documentElement,h="modernizr",i=c.createElement(h).style,n=" -webkit- -moz- -o- -ms- ".split(" "),r="Webkit Moz O ms",m=r.split(" "),p=r.toLowerCase().split(" "),s={},u=[],l=u.slice,v={}.hasOwnProperty;function w(t){i.cssText=t}function g(t,e){return typeof t===e}function y(t,e){for(var n in t){n=t[n];if(!~(""+n).indexOf("-")&&i[n]!==f)return"pfx"!=e||n}return!1}function b(t,e,n){var o=t.charAt(0).toUpperCase()+t.slice(1),a=(t+" "+m.join(o+" ")+o).split(" ");if(g(e,"string")||void 0===e)return y(a,e);var i,r=(t+" "+p.join(o+" ")+o).split(" "),s=e,u=n;for(i in r){var l=s[r[i]];if(l!==f)return!1===u?r[i]:g(l,"function")?l.bind(u||s):l}return!1}for(e in o=void 0!==v&&void 0!==v.call?function(t,e){return v.call(t,e)}:function(t,e){return e in t&&void 0===t.constructor.prototype[e]},Function.prototype.bind||(Function.prototype.bind=function(n){var o=this;if("function"!=typeof o)throw new TypeError;var a=l.call(arguments,1),i=function(){var t,e;return this instanceof i?((t=function(){}).prototype=o.prototype,t=new t,e=o.apply(t,a.concat(l.call(arguments))),Object(e)===e?e:t):o.apply(n,a.concat(l.call(arguments)))};return i}),s.csstransforms3d=function(){return!!b("perspective")},s)o(s,e)&&(t=e.toLowerCase(),a[t]=s[e](),u.push((a[t]?"":"no-")+t));return a.addTest=function(t,e){if("object"==typeof t)for(var n in t)o(t,n)&&a.addTest(n,t[n]);else{if(t=t.toLowerCase(),a[t]!==f)return a;e="function"==typeof e?e():e,"undefined"!=typeof enableClasses&&enableClasses&&(d.className+=" "+(e?"":"no-")+t),a[t]=e}return a},w(""),0,a._version="2.6.2",a._prefixes=n,a._domPrefixes=p,a._cssomPrefixes=m,a.testProp=function(t){return y([t])},a.testAllProps=b,a.testStyles=function(t,e,n,o){var a,i,r,s=c.createElement("div"),u=c.body,l=u||c.createElement("body");if(parseInt(n,10))for(;n--;)(i=c.createElement("div")).id=o?o[n]:h+(n+1),s.appendChild(i);return a=["&#173;",'<style id="s',h,'">',t,"</style>"].join(""),s.id=h,(u?s:l).innerHTML+=a,l.appendChild(s),u||(l.style.background="",l.style.overflow="hidden",r=d.style.overflow,d.style.overflow="hidden",d.appendChild(l)),a=e(s,t),u?s.parentNode.removeChild(s):(l.parentNode.removeChild(l),d.style.overflow=r),!!a},a.prefixed=function(t,e,n){return e?b(t,e,n):b(t,"pfx")},a}(ye),Se={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},e="webkit moz o ms khtml".split(" ");if(void 0!==ye.cancelFullScreen)Se.ok=!0;else for(var n=0,o=e.length;n<o;n++)if(Se.prefix=e[n],void 0!==ye[Se.prefix+"CancelFullScreen"]){Se.ok=!0;break}Se.ok&&(Se.event=Se.prefix+"fullscreenchange",Se.is=function(){switch(this.prefix){case"":return ye.fullScreen;case"webkit":return ye.webkitIsFullScreen;default:return ye[this.prefix+"FullScreen"]}},Se.request=function(t){return""===this.prefix?t.requestFullScreen():t[this.prefix+"RequestFullScreen"]()},Se.cancel=function(t){return""===this.prefix?ye.cancelFullScreen():ye[this.prefix+"CancelFullScreen"]()});var bn,xn={lines:12,length:5,width:2,radius:7,corners:1,rotate:15,color:"rgba(128, 128, 128, .75)",hwaccel:!0},_n={top:"auto",left:"auto",className:""};bn=function(){"use strict";var i=["webkit","Moz","ms","O"],l={},m;function p(t,e){var n=ye.createElement(t||"div"),o;for(o in e)n[o]=e[o];return n}function c(t){for(var e=1,n=arguments.length;e<n;e++)t.appendChild(arguments[e]);return t}var f=function(){var t=p("style",{type:"text/css"});c(ye.getElementsByTagName("head")[0],t);return t.sheet||t.styleSheet}();function r(t,e,n,o){var a=["opacity",e,~~(t*100),n,o].join("-"),i=.01+n/o*100,r=Math.max(1-(1-t)/e*(100-i),t),s=m.substring(0,m.indexOf("Animation")).toLowerCase(),u=s&&"-"+s+"-"||"";if(!l[a]){f.insertRule("@"+u+"keyframes "+a+"{"+"0%{opacity:"+r+"}"+i+"%{opacity:"+t+"}"+(i+.01)+"%{opacity:1}"+(i+e)%100+"%{opacity:"+t+"}"+"100%{opacity:"+r+"}"+"}",f.cssRules.length);l[a]=1}return a}function o(t,e){var n=t.style,o,a;e=e.charAt(0).toUpperCase()+e.slice(1);for(a=0;a<i.length;a++){o=i[a]+e;if(n[o]!==u)return o}if(n[e]!==u)return e}function v(t,e){for(var n in e)t.style[o(t,n)||n]=e[n];return t}function e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)if(t[o]===u)t[o]=n[o]}return t}function w(t){var e={x:t.offsetLeft,y:t.offsetTop};while(t=t.offsetParent)e.x+=t.offsetLeft,e.y+=t.offsetTop;return e}function d(t,e){return typeof t=="string"?t:t[e%t.length]}var n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};function a(t){if(typeof this=="undefined")return new a(t);this.opts=e(t||{},a.defaults,n)}function t(){function l(t,e){return p("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}f.addRule(".spin-vml","behavior:url(#default#VML)");a.prototype.lines=function(t,o){var a=o.length+o.width,e=2*a;function i(){return v(l("group",{coordsize:e+" "+e,coordorigin:-a+" "+-a}),{width:e,height:e})}var n=-(o.width+o.length)*2+"px",r=v(i(),{position:"absolute",top:n,left:n}),s;function u(t,e,n){c(r,c(v(i(),{rotation:360/o.lines*t+"deg",left:~~e}),c(v(l("roundrect",{arcsize:o.corners}),{width:a,height:o.width,left:o.radius,top:-o.width>>1,filter:n}),l("fill",{color:d(o.color,t),opacity:o.opacity}),l("stroke",{opacity:0}))))}if(o.shadow)for(s=1;s<=o.lines;s++)u(s,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(s=1;s<=o.lines;s++)u(s);return c(t,r)};a.prototype.opacity=function(t,e,n,o){var a=t.firstChild;o=o.shadow&&o.lines||0;if(a&&e+o<a.childNodes.length){a=a.childNodes[e+o];a=a&&a.firstChild;a=a&&a.firstChild;if(a)a.opacity=n}}}a.defaults={},e(a.prototype,{spin:function(t){this.stop();var n=this,o=n.opts,a=n.el=v(p(0,{className:o.className}),{position:o.position,width:0,zIndex:o.zIndex}),e=o.radius+o.length+o.width,i,r;if(t){t.insertBefore(a,t.firstChild||null);r=w(t);i=w(a);v(a,{left:(o.left=="auto"?r.x-i.x+(t.offsetWidth>>1):parseInt(o.left,10)+e)+"px",top:(o.top=="auto"?r.y-i.y+(t.offsetHeight>>1):parseInt(o.top,10)+e)+"px"})}a.setAttribute("role","progressbar");n.lines(a,n.opts);if(!m){var s=0,u=(o.lines-1)*(1-o.direction)/2,l,c=o.fps,f=c/o.speed,d=(1-o.opacity)/(f*o.trail/100),h=f/o.lines;(function t(){s++;for(var e=0;e<o.lines;e++){l=Math.max(1-(s+(o.lines-e)*h)%f*d,o.opacity);n.opacity(a,e*o.direction+u,l,o)}n.timeout=n.el&&setTimeout(t,~~(1e3/c))})()}return n},stop:function(){var t=this.el;if(t){clearTimeout(this.timeout);if(t.parentNode)t.parentNode.removeChild(t);this.el=u}return this},lines:function(t,n){var o=0,e=(n.lines-1)*(1-n.direction)/2,a;function i(t,e){return v(p(),{position:"absolute",width:n.length+n.width+"px",height:n.width+"px",background:t,boxShadow:e,transformOrigin:"left",transform:"rotate("+~~(360/n.lines*o+n.rotate)+"deg) translate("+n.radius+"px"+",0)",borderRadius:(n.corners*n.width>>1)+"px"})}for(;o<n.lines;o++){a=v(p(),{position:"absolute",top:1+~(n.width/2)+"px",transform:n.hwaccel?"translate3d(0,0,0)":"",opacity:n.opacity,animation:m&&r(n.opacity,n.trail,e+o*n.direction,n.lines)+" "+1/n.speed+"s linear infinite"});if(n.shadow)c(a,v(i("#000","0 0 4px "+"#000"),{top:2+"px"}));c(t,c(a,i(d(n.color,o),"0 0 1px rgba(0,0,0,.1)")))}return t},opacity:function(t,e,n){if(e<t.childNodes.length)t.childNodes[e].style.opacity=n}});var s=v(p("group"),{behavior:"url(#default#VML)"});if(!o(s,"transform")&&s.adj)t();else m=o(s,"animation");return a}();var Cn,Fe,w,g,y,b,Ee=xe(i),Pe=xe(ye),t="quirks"===be.hash.replace("#",""),a=s.csstransforms3d,Ne=a&&!t,Tn=a||"CSS1Compat"===ye.compatMode,kn=Se.ok,t=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),je=!Ne||t,$e=navigator.msPointerEnabled,r="onwheel"in ye.createElement("div")?"wheel":ye.onmousewheel!==u?"mousewheel":"DOMMouseScroll",qe=250,Ae=300,m=1400,ze="$stageFrame",Oe="$navDotFrame",Le="$navThumbFrame",l=function(i){var r,t="bez_"+xe.makeArray(arguments).join("_").replace(".","p");return"function"!=typeof xe.easing[t]&&(r=function(n,o){function i(t,e){return u[e]=3*n[e],s[e]=3*(o[e]-n[e])-u[e],r[e]=1-u[e]-s[e],t*(u[e]+t*(s[e]+t*r[e]))}function e(t){for(var e,n,o=t,a=0;++a<14&&(e=i(o,0)-t,!(Math.abs(e)<.001));)o-=e/(n=o,u[0]+n*(2*s[0]+3*r[0]*n));return o}var r=[null,null],s=[null,null],u=[null,null];return function(t){return i(e(t),1)}},xe.easing[t]=function(t,e,n,o,a){return o*r([i[0],i[1]],[i[2],i[3]])(e/a)+n}),t}([.1,0,.25,1]),h="50%",c={width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:2,glimpse:0,fit:"contain",position:h,thumbposition:h,nav:"dots",navposition:"bottom",navwidth:null,thumbwidth:64,thumbheight:64,thumbmargin:2,thumbborderwidth:2,thumbfit:"cover",allowfullscreen:!1,transition:"slide",clicktransition:null,transitionduration:Ae,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!1,enableifsingleframe:!1,controlsonstart:!0,shuffle:!1,direction:"ltr",shadows:!0,spinner:null},Mn={left:!0,right:!0,down:!1,up:!1,space:!1,home:!1,end:!1};function Ie(){}function De(t,e,n){return Math.max(isNaN(e)?-1/0:e,Math.min(isNaN(n)?1/0:n,t))}function Re(t){var e={};return Ne?e.transform="translate3d("+t+"px,0,0)":e.left=t,e}function Sn(t){return{"transition-duration":t+"ms"}}function p(t,e){return isNaN(t)?e:t}function We(t,e){return p(+String(t).replace(e||"px",""))}function He(t,e){return p((/%$/.test(n=t)?We(n,"%"):u)/100*e,We(t));var n}function Ke(t){return(!isNaN(We(t))||!isNaN(We(t,"%")))&&t}function Fn(t,e,n,o){return(t-(o||0))*(e+(n||0))}function v(t,e,n,o){var a,i,r=t.data();r&&(r.onEndFn=function(){a||(a=!0,clearTimeout(r.tT),n())},r.tProp=e,clearTimeout(r.tT),r.tT=setTimeout(function(){r.onEndFn()},1.5*o),(i=(e=t).data()).tEnd||(Ue(e[0],{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"}[s.prefixed("transition")],function(t){i.tProp&&t.propertyName.match(i.tProp)&&i.onEndFn()}),i.tEnd=!0))}function En(n,t){var e;if(n.length)return e=n.data(),Ne?(n.css(Sn(0)),e.onEndFn=Ie,clearTimeout(e.tT)):n.stop(),e=Pn(t,function(){return t=n,Ne?+((e=t.css("transform")).match(/ma/)&&e.match(/-?\d+(?!d)/g)[e.match(/3d/)?12:4]):+t.css("left").replace("px","");var t,e}),n.css(Re(e)),e}function Pn(){for(var t,e=0,n=arguments.length;e<n&&"number"!=typeof(t=e?arguments[e]():arguments[e]);e++);return t}function $(t,e){return Math.round(t+(e-t)/1.5)}function Ve(){return Ve.p=Ve.p||("https:"===be.protocol?"https://":"http://"),Ve.p}function Nn(t,e){var n,o,a,i;return"string"!=typeof t?t:(a=t,(n=ye.createElement("a")).href=a,(t=n).host.match(/youtube\.com/)&&t.search?(i=t.search.split("v=")[1])&&(-1!==(a=i.indexOf("&"))&&(i=i.substring(0,a)),o="youtube"):t.host.match(/youtube\.com|youtu\.be/)?(i=t.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),o="youtube"):t.host.match(/vimeo\.com/)&&(o="vimeo",i=t.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,"")),i&&o||!e||(i=t.href,o="custom"),!!i&&{id:i,type:o,s:t.search.replace(/^\?/,""),p:Ve()})}function jn(t,e,n,o){for(var a=0,i=t.length;a<i;a++){var r=t[a];if(r.i===n&&r.thumbsReady){var s={videoReady:!0};s[ze]=s[Le]=s[Oe]=!1,o.splice(a,1,xe.extend({},r,s,e));break}}}function $n(t){var c=[];function f(t,e,n){var o=n.thumb&&n.img!==n.thumb,a=We(n.width||t.attr("width")),i=We(n.height||t.attr("height")),r=t.attr("alt"),t=t.attr("title");r&&xe.extend(n,{alt:r}),t&&xe.extend(n,{title:t}),xe.extend(n,{width:a,height:i,thumbratio:Dn(n.thumbratio||We(n.thumbwidth||e&&e.attr("width")||o||a)/We(n.thumbheight||e&&e.attr("height")||o||i))})}return t.children().each(function(){var t,e,n,o,a,i,r,s,u=xe(this),l=In(xe.extend(u.data(),{id:u.attr("id")}));if(u.is("a, img"))e=l,n=!0,o=(t=u).children("img").eq(0),a=t.attr("href"),i=t.attr("src"),r=o.attr("src"),s=e.video,(n=!!n&&Nn(a,!0===s))?a=!1:n=s,f(t,o,xe.extend(e,{video:n,img:e.img||a||i||r,thumb:e.thumb||r||i||a}));else{if(u.is(":empty"))return;f(u,null,xe.extend(l,{html:this,_html:u.html()}))}c.push(l)}),c}function Be(t,e,n,o){return Be.i||(Be.i=1,Be.ii=[!0]),o=o||Be.i,void 0===Be.ii[o]&&(Be.ii[o]=!0),t()?e():Be.ii[o]&&setTimeout(function(){Be.ii[o]&&Be(t,e,n,o)},n||100),Be.i++}function qn(t,e,n,o){var a,i,r,s,u,l,c,f=t.data(),d=f.measures;return!d||f.l&&f.l.W===d.width&&f.l.H===d.height&&f.l.r===d.ratio&&f.l.w===e.w&&f.l.h===e.h&&f.l.m===n&&f.l.p===o||(a=d.width,i=d.height,r=e.w/e.h,r=d.ratio>=r,s="scaledown"===n,u="contain"===n,l="cover"===n,c={x:Ke((c=((c=o)+"").split(/\s+/))[0])||h,y:Ke(c[1])||h},r&&(s||u)||!r&&l?i=(a=De(e.w,0,s?a:1/0))/d.ratio:(r&&l||!r&&(s||u))&&(a=(i=De(e.h,0,s?i:1/0))*d.ratio),t.css({width:a,height:i,left:He(c.x,e.w-a),top:He(c.y,e.h-i)}),f.l={W:d.width,H:d.height,r:d.ratio,w:e.w,h:e.h,m:n,p:o}),!0}function An(t,e,n){return e!==n&&(t<=e?"left":n<=t?"right":"left right")}function zn(t,e,n,o){if(!n)return!1;if(!isNaN(t))return t-(o?0:1);for(var a,i=0,r=e.length;i<r;i++)if(e[i].id===t){a=i;break}return a}function Xe(t,e){return'<div class="'+t+'">'+(e||"")+"</div>"}function On(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 Ln(t){return"[object Array]"==Object.prototype.toString.call(t)&&xe.map(t,function(t){return xe.extend({},t)})}function Qe(t,e,n){t.scrollLeft(e||0).scrollTop(n||0)}function In(t){var n;if(t)return n={},xe.each(t,function(t,e){n[t.toLowerCase()]=e}),n}function Dn(t){var e;if(t)return e=+t,isNaN(e)?+(e=t.split("/"))[0]/+e[1]||u:e}function Ue(t,e,n,o){e&&(t.addEventListener?t.addEventListener(e,n,!!o):t.attachEvent("on"+e,n))}function Rn(t){return{tabindex:-1*t+"",disabled:t}}function Wn(e,n){Ue(e,"keyup",function(t){e.getAttribute("disabled")||13==t.keyCode&&n.call(e,t)})}function Hn(e,n){Ue(e,"focus",e.onfocusin=function(t){n.call(e,t)},!0)}function Ye(t,e){t.preventDefault?t.preventDefault():t.returnValue=!1,e&&t.stopPropagation&&t.stopPropagation()}function Kn(t){return t?">":"<"}function Ge(t,e){var n=t.data(),o=Math.round(e.pos),a=function(){n.sliding=!1,(e.onEnd||Ie)()},o=(void 0!==e.overPos&&e.overPos!==e.pos&&(o=e.overPos,a=function(){Ge(t,xe.extend({},e,{overPos:e.pos,time:Math.max(Ae,e.time/2)}))}),xe.extend(Re(o),e.width&&{width:e.width}));n.sliding=!0,Ne?(t.css(xe.extend(Sn(e.time),o)),10<e.time?v(t,"transform",a,e.time):a()):t.stop().animate(o,e.time,l,a)}function Vn(t,e,n,o,a,i){var r,s,u,l,c=void 0!==i;!c&&(a.push(arguments),Array.prototype.push.call(arguments,a.length),1<a.length)||(t=t||xe(t),e=e||xe(e),r=t[0],s=e[0],u="crossfade"===o.method,l=function(){var t;l.done||(l.done=!0,(t=(c||a.shift())&&a.shift())&&Vn.apply(this,t),(o.onEnd||Ie)(!!t))},i=o.time/(i||1),n.removeClass(d+" "+f),t.stop().addClass(d),e.stop().addClass(f),u&&s&&t.fadeTo(0,0),t.fadeTo(u?i:0,1,u&&l),e.fadeTo(i,0,l),r&&u)||s||l()}function x(t){var e=(t.touches||[])[0]||t;t._x=e.pageX,t._y=e.clientY,t._now=xe.now()}function Bn(t,i){var r,s,n,o,u,e,a,l,c,f=t[0],d={};function h(t){if(n=xe(t.target),d.checked=e=a=c=!1,r||d.flow||t.touches&&1<t.touches.length||1<t.which||w&&w.type!==t.type&&y||(e=i.select&&n.is(i.select,f)))return e;u="touchstart"===t.type,a=n.is("a, a *",f),o=d.control,l=d.noMove||d.noSwipe||o?16:d.snap?0:4,x(t),s=w=t,g=t.type.replace(/down|start/,"move").replace(/Down/,"Move"),(i.onStart||Ie).call(f,t,{control:o,$target:n}),r=d.flow=!0,u&&!d.go||Ye(t)}function m(t){var e,n,o,a;t.touches&&1<t.touches.length||$e&&!t.isPrimary||g!==t.type||!r?(r&&p(),(i.onTouchEnd||Ie)()):(x(t),a=(e=Math.abs(t._x-s._x))-(n=Math.abs(t._y-s._y)),o=(d.go||d.x||0<=a)&&!d.noSwipe,a=a<0,u&&!d.checked?(r=o)&&Ye(t):(Ye(t),(i.onMove||Ie).call(f,t,{touch:u})),!c&&Math.sqrt(Math.pow(e,2)+Math.pow(n,2))>l&&(c=!0),d.checked=d.checked||o||a)}function p(t){(i.onTouchEnd||Ie)();var e=r;d.control=r=!1,e&&(d.flow=!1),!e||a&&!d.checked||(t&&Ye(t),y=!0,clearTimeout(b),b=setTimeout(function(){y=!1},1e3),(i.onEnd||Ie).call(f,{moved:c,$target:n,control:o,touch:u,startEvent:s,aborted:!t||"MSPointerCancel"===t.type}))}function v(){d.flow&&setTimeout(function(){d.flow=!1},qe)}return $e?(Ue(f,"MSPointerDown",h),Ue(ye,"MSPointerMove",m),Ue(ye,"MSPointerCancel",p),Ue(ye,"MSPointerUp",p)):(Ue(f,"touchstart",h),Ue(f,"touchmove",m),Ue(f,"touchend",p),Ue(ye,"touchstart",function(){d.flow||setTimeout(function(){d.flow=!0},10)}),Ue(ye,"touchend",v),Ue(ye,"touchcancel",v),Ee.on("scroll",v),t.on("mousedown",h),Pe.on("mousemove",m).on("mouseup",p)),t.on("click","a",function(t){d.checked&&Ye(t)}),d}function Xn(w,g){var n,y,b,x,o,_,a,C,T,k,M,S,i,F,E=w[0],r=w.data(),P={};function N(t,e){F=!0,n=y=t._x,a=t._now,_=[[a,n]],b=x=P.noMove||e?0:En(w,(g.getPos||Ie)()),(g.onStart||Ie).call(E,t)}return P=xe.extend(Bn(g.$wrap,xe.extend({},g,{onStart:function(t,e){T=P.min,k=P.max,M=P.snap,S=t.altKey,F=i=!1,e.control||r.sliding||N(t)},onMove:function(t,e){P.noSwipe||(F||N(t),y=t._x,_.push([t._now,y]),o=An(x=b-(n-y),T,k),x<=T?x=$(x,T):k<=x&&(x=$(x,k)),P.noMove)||(w.css(Re(x)),i||(i=!0,e.touch)||$e||w.addClass(j),(g.onMove||Ie).call(E,t,{pos:x,edge:o}))},onEnd:function(t){if(!P.noSwipe||!t.moved){F||N(t.startEvent,!0),t.touch||$e||w.removeClass(j);for(var e,n,o,a,i,r=(C=xe.now())-qe,s=null,u=Ae,l=g.friction,c=_.length-1;0<=c;c--){if(e=_[c][0],n=Math.abs(e-r),null===s||n<o)s=e,a=_[c][1];else if(s===r||o<n)break;o=n}var f=De(x,T,k),d=a-y,h=0<=d,m=C-s,p=qe<m,v=!p&&x!==b&&f===x;M&&(f=De(Math[v?h?"floor":"ceil":"round"](x/M)*M,T,k),T=k=f),v&&(M||f===x)&&(v=-d/m,u*=De(Math.abs(v),g.timeLow,g.timeHigh),d=Math.round(x+v*u/l),M||(f=d),!h&&k<d||h&&d<T)&&(m=h?T:k,i=De((f=M?f:m)+.03*(i=d-m),m-50,m+50),u=Math.abs((x-i)/(v/l))),u*=S?10:1,(g.onEnd||Ie).call(E,xe.extend(t,{moved:t.moved||p&&M,pos:x,newPos:f,overPos:i,time:u}))}}})),P)}function Qn(t,s){var u,l,c,t=t[0],f={prevent:{}};return Ue(t,r,function(t){var e=t.wheelDeltaY||-1*t.deltaY||0,n=t.wheelDeltaX||-1*t.deltaX||0,e=Math.abs(n)&&!Math.abs(e),o=Kn(n<0),a=l===o,i=xe.now(),r=i-c<qe;l=o,c=i,!e||!f.ok||f.prevent[o]&&!u||(Ye(t,!0),u&&a&&r)||(s.shift&&(u=!0,clearTimeout(f.t),f.t=setTimeout(function(){u=!1},m)),(s.onEnd||Ie)(t,s.shift?o:n))}),f}function Un(){xe.each(xe.Fotorama.instances,function(t,e){e.index=t})}Be.stop=function(t){Be.ii[t]=!1},jQuery.Fotorama=function(i,x){Cn=xe("html"),Fe=xe("body");var _,C,I,D,s,u,l,c,f,d,R,W,H,h,m,K,V,B,X,p,Q,U,v,w,Y,g,G,J,t,e,Z,y,a,tt,et,nt,b,ot,at,T=this,it=xe.now(),rt=_e+it,st=i[0],ut=1,lt=i.data(),ct=xe("<style></style>"),ft=xe(Xe("fotorama--hidden")),k=xe(Xe(Te)),M=xe(Xe(en)).appendTo(k),S=(M[0],xe(Xe("fotorama__stage__shaft")).appendTo(M)),dt=xe(),ht=xe(Xe(an+" fotorama__arr--prev"+Me)),mt=xe(Xe(an+" fotorama__arr--next"+Me)),pt=ht.add(mt).appendTo(M),vt=xe(Xe("fotorama__nav-wrap")),r=xe(Xe(ke)).appendTo(vt),F=xe(Xe("fotorama__nav__shaft")).appendTo(r),wt=xe(),gt=xe(),yt=(S.data(),F.data(),xe(Xe("fotorama__thumb-border")).appendTo(F)),bt=xe(Xe("fotorama__fullscreen-icon"+Me)),xt=bt[0],_t=xe(Xe(yn)),Ct=xe(Xe("fotorama__video-close")).appendTo(M)[0],Tt=xe(Xe("fotorama__spinner")),E=!1,P={},n={},kt={},N={},Mt={},St={},Ft={},Et=0,Pt=[];function Nt(){xe.each(_,function(t,e){var n,o,a,i,r,s,u;!e.i&&(e.i=ut++,u=Nn(e.video,!0))&&(n={},e.video=u,e.img||e.thumb?e.thumbsReady=!0:(a=_,i=T,"youtube"===(u=(o=e).video).type?(r=(s=Ve()+"img.youtube.com/vi/"+u.id+"/default.jpg").replace(/\/default.jpg$/,"/hqdefault.jpg"),o.thumbsReady=!0):"vimeo"===u.type?xe.ajax({url:Ve()+"vimeo.com/api/v2/video/"+u.id+".json",dataType:"jsonp",success:function(t){o.thumbsReady=!0,jn(a,{img:t[0].thumbnail_large,thumb:t[0].thumbnail_small},o.i,i)}}):o.thumbsReady=!0,n={img:r,thumb:s}),jn(_,{img:n.img,thumb:n.thumb},e.i,T))})}function j(t){return G[t]||T.fullScreen}function jt(t){var e,n,o,a;t!==jt.f&&(t?(i.html("").addClass(_e+" "+rt).append(k).before(ct).before(ft),e=T,xe.Fotorama.instances.push(e)):(k.detach(),ct.detach(),ft.detach(),i.html(lt.urtext).removeClass(rt),e=T,xe.Fotorama.instances.splice(e.index,1)),Un(),n="keydown."+_e,o="keydown."+(a=_e+it),a="resize."+a+" orientationchange."+a,t?(Pe.on(o,function(t){var e,n;s&&27===t.keyCode?O(s,e=!0,!0):(T.fullScreen||x.keyboard&&!T.index)&&(27===t.keyCode?(e=!0,T.cancelFullScreen()):t.shiftKey&&32===t.keyCode&&j("space")||37===t.keyCode&&j("left")||38===t.keyCode&&j("up")?n="<":32===t.keyCode&&j("space")||39===t.keyCode&&j("right")||40===t.keyCode&&j("down")?n=">":36===t.keyCode&&j("home")?n="<<":35===t.keyCode&&j("end")&&(n=">>")),(e||n)&&Ye(t),n&&T.show({index:n,slow:t.altKey,user:!0})}),T.index||Pe.off(n).on(n,"textarea, input, select",function(t){Fe.hasClass(Ce)||t.stopPropagation()}),Ee.on(a,T.resize)):(Pe.off(o),Ee.off(a)),jt.f=t)}function $t(){var t=C<2&&!x.enableifsingleframe||s;n.noMove=t||p,n.noSwipe=t||!x.swipe,w||S.toggleClass(on,!x.click&&!n.noMove&&!n.noSwipe),$e&&k.toggleClass("fotorama__wrap--pan-y",!n.noSwipe)}function qt(t){!0===t&&(t=""),x.autoplay=Math.max(+t||5e3,1.5*v)}function $(t){return t<0?(C+t%C)%C:C<=t?t%C:t}function At(t){return De(t,0,C-1)}function zt(t){return(h?$:At)(t)}function Ot(t){return!!(0<t||h)&&t-1}function Lt(t){return!!(t<C-1||h)&&t+1}function It(t,i,r){var s;"number"==typeof t&&(t=new Array(t),s=!0),xe.each(t,function(t,e){var n,o,a;"number"==typeof(e=s?t:e)&&(n=_[$(e)])&&(a=n[o="$"+i+"Frame"],r.call(this,t,e,n,a,o,a&&a.data()))})}function Dt(t,e,n,o){J&&("*"!==J||o!==H)||(t=Ke(x.width)||Ke(t)||500,e=Ke(x.height)||Ke(e)||333,T.resize({width:t,ratio:x.ratio||n||t/e},0,o!==H&&"*"))}function Rt(t,v,w,g,y,b){It(t,v,function(t,n,e,o,a,i){var r,s,u,l,c,f,d;function h(t){var e=$(n);A(t,{index:e,src:f,frame:_[e]})}function m(){u.remove(),xe.Fotorama.cache[f]="error",e.html&&"stage"===v||!d||d===f?(!f||e.html||r?"stage"===v&&(o.trigger("f:load").removeClass(pn+" "+mn).addClass(vn),h("load"),Dt()):(o.trigger("f:error").removeClass(pn).addClass(mn),h("error")),i.state="error",!(1<C&&_[n]===e)||e.html||e.deleted||e.video||r||(e.deleted=!0,T.splice(n,1))):(e[c]=f=d,Rt([n],v,w,g,y,!0))}function p(){var t=10;Be(function(){return!et||!t--&&!je},function(){xe.Fotorama.measures[f]=l.measures=xe.Fotorama.measures[f]||{width:s.width,height:s.height,ratio:s.width/s.height},Dt(l.measures.width,l.measures.height,l.measures.ratio,n),u.off("load error").addClass(wn+(r?" fotorama__img--full":"")).prependTo(o),qn(u,(xe.isFunction(w)?w():w)||P,g||e.fit||x.fit,y||e.position||x.position),xe.Fotorama.cache[f]=i.state="loaded",setTimeout(function(){o.trigger("f:load").removeClass(pn+" "+mn).addClass(vn+" "+(r?"fotorama__loaded--full":"fotorama__loaded--img")),"stage"===v?h("load"):"auto"!==e.thumbratio&&(e.thumbratio||"auto"!==x.thumbratio)||(e.thumbratio=l.measures.ratio,L())},0)})}o&&(r=T.fullScreen&&e.full&&e.full!==e.img&&!i.$full&&"stage"===v,i.$img&&!b&&!r||(s=new Image,u=xe(s),l=u.data(),i[r?"$full":"$img"]=u,f=e[c="stage"===v?r?"full":"img":"thumb"],d=r?null:e["stage"===v?"thumb":"img"],"navThumb"===v&&(o=i.$wrap),f?(xe.Fotorama.cache[f]?function t(){"error"===xe.Fotorama.cache[f]?m():"loaded"===xe.Fotorama.cache[f]?setTimeout(p,0):setTimeout(t,100)}():(xe.Fotorama.cache[f]="*",u.on("load",p).on("error",m)),i.state="",i.data.hasOwnProperty("alt")&&(s.alt=i.data.alt),i.data.hasOwnProperty("title")&&(s.title=i.data.title),s.src=f):m()))})}function Wt(){Tt.detach(),D&&D.stop()}function Ht(){var t,e=u[ze];e&&!e.data().state&&(t=e,Tt.append(D.spin().el).appendTo(t),e.on("f:load f:error",function(){e.off("f:load f:error"),Wt()}))}function Kt(t){Wn(t,me),Hn(t,function(){setTimeout(function(){Qe(r)},0),q({time:v,guessIndex:xe(this).data().eq,minMax:N})})}function Vt(t,l){It(t,l,function(t,e,n,o,a,i){var r,s,u;o||(o=n[a]=k[a].clone(),(i=o.data()).data=n,a=o[0],"stage"===l?(n.html&&xe('<div class="fotorama__html"></div>').append(n._html?xe(n.html).removeAttr("id").html(n._html):n.html).appendTo(o),n.caption&&xe(Xe("fotorama__caption",(r="fotorama__caption__wrap",s=n.caption,(u=ye.createElement("div")).textContent=s||"",u.className=r,u.outerHTML))).appendTo(o),n.video&&o.addClass("fotorama__stage__frame--video").append(_t.clone()),Hn(a,function(){setTimeout(function(){Qe(M)},0),de({index:i.eq,user:!0})}),dt=dt.add(o)):"navDot"===l?(Kt(a),wt=wt.add(o)):"navThumb"===l&&(Kt(a),i.$wrap=o.children(":first"),gt=gt.add(o),n.video)&&i.$wrap.append(_t.clone()))})}function Bt(t,e,n,o){return t&&t.length&&qn(t,e,n,o)}function Xt(t){It(t,"stage",function(t,e,n,o,a,i){var r,s,u;o&&(u=$(e),r=n.fit||x.fit,s=n.position||x.position,i.eq=u,Ft[ze][u]=o.css(xe.extend({left:p?0:Fn(e,P.w,x.margin,c)},p&&Sn(0))),u=o[0],xe.contains(ye.documentElement,u)||(o.appendTo(S),O(n.$video)),Bt(i.$img,P,r,s),Bt(i.$full,P,r,s))})}function Qt(t,r){var s,u;"thumbs"!==m||isNaN(t)||(u=(s=-t)+P.nw,gt.each(function(){function t(){return{h:U,w:e.w}}var e=xe(this).data(),n=e.eq,o=t(),a=_[n]||{},i=a.thumbfit||x.thumbfit,a=a.thumbposition||x.thumbposition;o.w=e.w,e.l+e.w<s||e.l>u||Bt(e.$img,o,i,a)||r&&Rt([n],"navThumb",t,i,a)}))}function Ut(t,e,n){var o,a;Ut[n]||(o="nav"===n&&K,a=0,e.append(t.filter(function(){for(var t,e=xe(this),n=e.data(),o=0,a=_.length;o<a;o++)if(n.data===_[o]){t=!0,n.eq=o;break}return t||e.remove()&&!1}).sort(function(t,e){return xe(t).data().eq-xe(e).data().eq}).each(function(){var t,e,n;o&&(e=(t=xe(this)).data(),n=Math.round(U*e.data.thumbratio)||Q,e.l=a,e.w=n,t.css({width:n}),a+=n+x.thumbmargin)})),Ut[n]=!0)}function Yt(t){return t-Et>P.w/3}function Gt(t){return!(h||E+t&&E-C+t||s)}function Jt(){var t=Gt(0),e=Gt(1);ht.toggleClass(rn,t).attr(Rn(t)),mt.toggleClass(rn,e).attr(Rn(e))}function Zt(){kt.ok&&(kt.prevent={"<":Gt(0),">":Gt(1)})}function te(t){var e,n=t.data(),n=K?(e=n.l,n.w):(e=t.position().left,t.width());return{c:e+n/2,min:-e+10*x.thumbmargin,max:-e+P.w-n-10*x.thumbmargin}}function ee(t){var e=u[b].data();Ge(yt,{time:1.2*t,pos:e.l,width:e.w-2*x.thumbborderwidth})}function q(t){var e,n,o,a=_[t.guessIndex][b];a&&(e=N.min!==N.max,o=t.minMax||e&&te(u[b]),a=e&&(t.keep&&q.l?q.l:De((t.coo||P.nw/2)-te(a).c,o.min,o.max)),n=e&&De(a,N.min,N.max),o=1.1*t.time,Ge(F,{time:o,pos:n||0,onEnd:function(){Qt(n,!0)}}),le(r,An(n,N.min,N.max)),q.l=a)}function ne(t){for(var e=St[t];e.length;)e.shift().removeClass(fn)}function oe(t){var n=Ft[t];xe.each(l,function(t,e){delete n[$(e)]}),xe.each(n,function(t,e){delete n[t],e.detach()})}function ae(t){c=f=E;var e=u[ze];e&&(ne(ze),St[ze].push(e.addClass(fn)),t||T.show.onEnd(!0),En(S,0),oe(ze),Xt(l),n.min=h?-1/0:-Fn(C-1,P.w,x.margin,c),n.max=h?1/0:-Fn(0,P.w,x.margin,c),n.snap=P.w+x.margin,N.min=Math.min(0,P.nw-F.width()),N.max=0,F.toggleClass(on,!(N.noMove=N.min===N.max)))}function ie(n,t){n&&xe.each(t,function(t,e){e&&xe.extend(e,{width:n.width||e.width,height:n.height,minwidth:n.minwidth,maxwidth:n.maxwidth,minheight:n.minheight,maxheight:n.maxheight,ratio:Dn(n.ratio)})})}function A(t,e){i.trigger(_e+":"+t,[T,e])}function re(){clearTimeout(o.t),et=1,x.stopautoplayontouch?T.stopAutoplay():y=!0}function o(){et&&(x.stopautoplayontouch||(se(),z()),o.t=setTimeout(function(){et=0},Ae+qe))}function se(){y=!(!s&&!a)}function z(){var n,t;clearTimeout(z.t),Be.stop(z.w),!x.autoplay||y?T.autoplay&&(T.autoplay=!1,A("stopautoplay")):(T.autoplay||(T.autoplay=!0,A("startautoplay")),n=E,t=u[ze].data(),z.w=Be(function(){return t.state||n!==E},function(){z.t=setTimeout(function(){var t,e;y||n!==E||(e=_[t=W][ze].data(),z.w=Be(function(){return e.state||t!==W},function(){y||t!==W||T.show(h?Kn(!g):W)}))},x.autoplay)}))}function ue(){T.fullScreen&&(T.fullScreen=!1,kn&&Se.cancel(st),Fe.removeClass(Ce),Cn.removeClass(Ce),i.removeClass(hn).insertAfter(ft),P=xe.extend({},tt),O(s,!0,!0),he("x",!1),T.resize(),Rt(l,"stage"),Qe(Ee,e,t),A("fullscreenexit"))}function le(t,e){Y&&(t.removeClass("fotorama__shadows--left fotorama__shadows--right"),e)&&!s&&t.addClass(e.replace(/^|\s/g," "+cn+"--"))}function O(t,e,n){e&&(k.removeClass(Je),s=!1,$t()),t&&t!==s&&(t.remove(),A("unloadvideo")),n&&(se(),z())}function ce(t){k.toggleClass(Ze,t)}function fe(t){var e;n.flow||(e=(t=t?t.pageX:fe.x)&&!Gt(Yt(t))&&x.click,fe.p!==e&&M.toggleClass("fotorama__pointer",e)&&(fe.p=e,fe.x=t))}function de(e){clearTimeout(de.t),x.clicktransition&&x.clicktransition!==x.transition?setTimeout(function(){var t=x.transition;T.setOptions({transition:x.clicktransition}),w=t,de.t=setTimeout(function(){T.show(e)},10)},0):T.show(e)}function he(t,e){n[t]=N[t]=e}function me(t){de({index:xe(this).data().eq,slow:t.altKey,user:!0,coo:t._x-r.offset().left})}function pe(t){de({index:pt.index(this)?">":"<",slow:t.altKey,user:!0})}function ve(t){Hn(t,function(){setTimeout(function(){Qe(M)},0),ce(!1)})}function L(){function t(t,e){o[t?"add":"remove"].push(e)}var e,n,o,a;_=T.data=_||Ln(x.data)||$n(i),C=T.size=_.length,!ge.ok&&x.shuffle&&On(_),Nt(),E=At(E),C&&jt(!0),T.options=x=In(x),p="crossfade"===x.transition||"dissolve"===x.transition,h=x.loop&&(2<C||p&&(!w||"slide"!==w)),v=+x.transitionduration||Ae,g="rtl"===x.direction,G=xe.extend({},x.keyboard&&Mn,x.keyboard),o={add:[],remove:[]},1<C||x.enableifsingleframe?(m=x.nav,V="top"===x.navposition,o.remove.push(dn),pt.toggle(!!x.arrows)):(m=!1,pt.hide()),Wt(),D=new bn(xe.extend(xn,x.spinner,_n,{direction:g?-1:1})),Jt(),Zt(),x.autoplay&&qt(x.autoplay),Q=We(x.thumbwidth)||64,U=We(x.thumbheight)||64,kt.ok=Mt.ok=x.trackpad&&!je,$t(),ie(x,[P]),(K="thumbs"===m)?(Vt(C,"navThumb"),I=gt,b=Le,e=ct,n=xe.Fotorama.jst.style({w:Q,h:U,b:x.thumbborderwidth,m:x.thumbmargin,s:it,q:!Tn}),(a=e[0]).styleSheet?a.styleSheet.cssText=n:e.html(n),r.addClass(un).removeClass(sn)):"dots"===m?(Vt(C,"navDot"),I=wt,b=Oe,r.addClass(sn).removeClass(un)):(m=!1,r.removeClass(un+" "+sn)),m&&(V?vt.insertBefore(M):vt.insertAfter(M),Ut.nav=!1,Ut(I,F,"nav")),B=x.allowfullscreen,X=B?(bt.prependTo(M),kn&&"native"===B):(bt.detach(),!1),t(p,"fotorama__wrap--fade"),t(!p,"fotorama__wrap--slide"),t(!x.captions,"fotorama__wrap--no-captions"),t(g,"fotorama__wrap--rtl"),t("always"!==x.arrows,"fotorama__wrap--toggle-arrows"),t(!(Y=x.shadows&&!je),"fotorama__wrap--no-shadows"),k.addClass(o.add.join(" ")).removeClass(o.remove.join(" ")),xe.extend({},x),L.i||(L.i=!0,((a=x.startindex)||x.hash&&be.hash)&&(H=zn(a||be.hash.replace(/^#/,""),_,0===T.index||a,a)),E=c=f=d=H=zt(H)||0),C?we()||(s&&O(s,!0),l=[],oe(ze),L.ok=!0,T.show({index:E,time:0}),T.resize()):T.destroy()}function we(){if(!we.f===g)return we.f=g,E=C-1-E,T.reverse(),!0}function ge(){ge.ok||(ge.ok=!0,A("ready"))}k[ze]=xe(Xe(nn)),k[Le]=xe(Xe(ln+" fotorama__nav__frame--thumb"+Me,Xe(gn))),k[Oe]=xe(Xe(ln+" fotorama__nav__frame--dot"+Me,Xe("fotorama__dot"))),St[ze]=[],St[Le]=[],St[Oe]=[],Ft[ze]={},k.addClass(Ne?"fotorama__wrap--css3":"fotorama__wrap--css2").toggleClass(Ze,!x.controlsonstart),lt.fotorama=this,T.startAutoplay=function(t){return T.autoplay||(y=a=!1,qt(t||x.autoplay),z()),this},T.stopAutoplay=function(){return T.autoplay&&(y=a=!0,z()),this},T.show=function(e){"object"!=typeof e?(n=e,e={}):n=e.index,n=">"===n?f+1:"<"===n?f-1:"<<"===n?0:">>"===n?C-1:n,n=void 0===(n=isNaN(n)?zn(n,_,!0):n)?E||0:n,T.activeIndex=E=zt(n),Z=Ot(E),R=Lt(E),W=$(E+(g?-1:1)),l=[E,Z,R],f=h?n:E;var t=Math.abs(d-f),n=Pn(e.time,function(){return Math.min(v*(1+(t-1)/12),2*v)}),o=e.overPos,a=(e.slow&&(n*=10),u),i=(T.activeFrame=u=_[E],a===u&&!e.user),r=(O(s,u.i!==_[$(c)].i),Vt(l,"stage"),Xt(je?[f]:[f,Ot(f),Lt(f)]),he("go",!0),i||A("show",{user:e.user,time:n}),y=!0,T.show.onEnd=function(t){r.ok||(r.ok=!0,t||ae(!0),i||A("showend",{user:e.user}),!t&&w&&w!==x.transition?(T.setOptions({transition:w}),w=!1):(Ht(),Rt(l,"stage"),he("go",!1),Zt(),fe(),se(),z()))});return p?Vn(u[ze],E!==d?_[d][ze]:null,dt,{time:n,method:x.transition,onEnd:r},Pt):Ge(S,{pos:-Fn(f,P.w,x.margin,c),overPos:o,time:n,onEnd:r}),Jt(),m&&(ne(b),St[b].push(u[b].addClass(fn)),q({time:n,coo:(a=At(E+De(f-d,-1,1)))!==E&&e.coo,guessIndex:void 0!==e.coo?a:E,keep:i}),K)&&ee(n),Z=void 0!==d&&d!==E,d=E,x.hash&&Z&&!T.eq&&(o=u.id||E+1,be.replace(be.protocol+"//"+be.host+be.pathname.replace(/^\/?/,"/")+be.search+"#"+o)),this},T.requestFullScreen=function(){return B&&!T.fullScreen&&(t=Ee.scrollTop(),e=Ee.scrollLeft(),Qe(Ee),he("x",!0),tt=xe.extend({},P),i.addClass(hn).appendTo(Fe.addClass(Ce)),Cn.addClass(Ce),O(s,!0,!0),T.fullScreen=!0,X&&Se.request(st),T.resize(),Rt(l,"stage"),Ht(),A("fullscreenenter")),this},T.cancelFullScreen=function(){return X&&Se.is()?Se.cancel(ye):ue(),this},T.toggleFullScreen=function(){return T[(T.fullScreen?"cancel":"request")+"FullScreen"]()},Ue(ye,Se.event,function(){!_||Se.is()||s||ue()}),T.resize=function(t){var e,n,o,a,i;return _&&(e=arguments[1]||0,n=arguments[2],ie(T.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:In(t),[P,n||T.fullScreen||x]),t=P.width,o=P.height,a=P.ratio,i=Ee.height()-(m?r.height():0),Ke(t)&&(k.addClass(tn).css({width:t,minWidth:P.minwidth||0,maxWidth:P.maxwidth||99999}),t=P.W=P.w=k.width(),P.nw=m&&He(x.navwidth,t)||t,x.glimpse&&(P.w-=Math.round(2*(He(x.glimpse,t)||0))),S.css({width:P.w,marginLeft:(P.W-P.w)/2}),o=(o=He(o,i))||a&&t/a)&&(t=Math.round(t),o=P.h=Math.round(De(o,He(P.minheight,i),He(P.maxheight,i))),M.stop().animate({width:t,height:o},e,function(){k.removeClass(tn)}),ae(),m&&(r.stop().animate({width:P.nw},e),q({guessIndex:E,time:e,keep:!0}),K)&&Ut.nav&&ee(e),J=n||!0,ge()),Et=M.offset().left),this},T.setOptions=function(t){return xe.extend(x,t),L(),this},T.shuffle=function(){return _&&On(_)&&L(),this},T.destroy=function(){return T.cancelFullScreen(),T.stopAutoplay(),_=T.data=null,jt(),l=[],oe(ze),L.ok=!1,this},T.playVideo=function(){var t=u,e=t.video,n=E;return"object"==typeof e&&t.videoReady&&(X&&T.fullScreen&&T.cancelFullScreen(),Be(function(){return!Se.is()||n!==E},function(){n===E&&(t.$video=t.$video||xe(xe.Fotorama.jst.video(e)),t.$video.appendTo(t[ze]),k.addClass(Je),s=t.$video,$t(),pt.blur(),bt.blur(),A("loadvideo"))})),this},T.stopVideo=function(){return O(s,!0,!0),this},M.on("mousemove",fe),n=Xn(S,{onStart:re,onMove:function(t,e){le(M,e.edge)},onTouchEnd:o,onEnd:function(t){le(M);var e,n,o,a,i=($e&&!nt||t.touch)&&x.arrows&&"always"!==x.arrows;t.moved||i&&t.pos!==t.newPos&&!t.control?(e=t.newPos,n=P.w,o=x.margin,a=c,e=-Math.round(e/(n+(o||0))-(a||0)),T.show({index:e,time:p?v:t.time,overPos:t.overPos,user:!0})):t.aborted||t.control||(n=t.startEvent,o=i,a=n.target,xe(a).hasClass(yn)?T.playVideo():a===xt?T.toggleFullScreen():s?a===Ct&&O(s,!0,!0):o?ce():x.click&&de({index:n.shiftKey||Kn(Yt(n._x)),slow:n.altKey,user:!0}))},timeLow:1,timeHigh:1,friction:2,select:"."+dn+", ."+dn+" *",$wrap:M}),N=Xn(F,{onStart:re,onMove:function(t,e){le(r,e.edge)},onTouchEnd:o,onEnd:function(t){function e(){q.l=t.newPos,se(),z(),Qt(t.newPos,!0)}var n;t.moved?t.pos!==t.newPos?(y=!0,Ge(F,{time:t.time,pos:t.newPos,overPos:t.overPos,onEnd:e}),Qt(t.newPos),Y&&le(r,An(t.newPos,N.min,N.max))):e():(n=t.$target.closest("."+ln,F)[0])&&me.call(n,t.startEvent)},timeLow:.5,timeHigh:2,friction:5,$wrap:r}),kt=Qn(M,{shift:!0,onEnd:function(t,e){re(),o(),T.show({index:e,slow:t.altKey})}}),Mt=Qn(r,{onEnd:function(t,e){re(),o();var n=En(F)+.25*e;F.css(Re(De(n,N.min,N.max))),Y&&le(r,An(n,N.min,N.max)),Mt.prevent={"<":n>=N.max,">":n<=N.min},clearTimeout(Mt.t),Mt.t=setTimeout(function(){Qt(q.l=n,!0)},qe),Qt(n)}}),k.hover(function(){setTimeout(function(){et||ce(!(nt=!0))},0)},function(){nt&&ce(!(nt=!1))}),ot=function(t){Ye(t),pe.call(this,t)},at=(at={onStart:function(){re(),n.control=!0},onTouchEnd:o})||{},pt.each(function(){var e,t=xe(this),n=t.data();n.clickOn||(n.clickOn=!0,xe.extend(Bn(t,{onStart:function(t){e=t,(at.onStart||Ie).call(this,t)},onMove:at.onMove||Ie,onTouchEnd:at.onTouchEnd||Ie,onEnd:function(t){t.moved||ot.call(this,e)}}),{noMove:!0}))}),pt.each(function(){Wn(this,function(t){pe.call(this,t)}),ve(this)}),Wn(xt,T.toggleFullScreen),ve(xt),xe.each("load push pop shift unshift reverse sort splice".split(" "),function(t,e){T[e]=function(){return _=_||[],"load"!==e?Array.prototype[e].apply(_,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(_=Ln(arguments[0])),L(),T}}),L()},xe.fn.fotorama=function(a){return this.each(function(){var e=this,t=xe(this),n=t.data(),o=n.fotorama;o?o.setOptions(a,!0):Be(function(){return!(0===(t=e).offsetWidth&&0===t.offsetHeight);var t},function(){n.urtext=t.html(),new xe.Fotorama(t,xe.extend({},c,i.fotoramaDefaults,a,n))})})},xe.Fotorama.instances=[],xe.Fotorama.cache={},xe.Fotorama.measures={},(xe=xe||{}).Fotorama=xe.Fotorama||{},xe.Fotorama.jst=xe.Fotorama.jst||{},xe.Fotorama.jst.style=function(t){var e,n="";return n+=".fotorama"+(null==(e=t.s)?"":e)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+(null==(e=t.m)?"":e)+"px;\nheight:"+(null==(e=t.h)?"":e)+"px}\n.fotorama"+(null==(e=t.s)?"":e)+" .fotorama__thumb-border{\nheight:"+(null==(e=t.h-t.b*(t.q?0:2))?"":e)+"px;\nborder-width:"+(null==(e=t.b)?"":e)+"px;\nmargin-top:"+(null==(e=t.m)?"":e)+"px}"},xe.Fotorama.jst.video=function(t){var e="",n=Array.prototype.join;return e+='<div class="fotorama__video"><iframe src="',function(){e+=n.call(arguments,"")}(("youtube"==t.type?t.p+"youtube.com/embed/"+t.id+"?autoplay=1":"vimeo"==t.type?t.p+"player.vimeo.com/video/"+t.id+"?autoplay=1&badge=0":t.id)+(t.s&&"custom"!=t.type?"&"+t.s:"")),e+='" frameborder="0" allowfullscreen></iframe></div>\n'},xe(function(){xe("."+_e+':not([data-auto="false"])').fotorama()})}(window,document,location,"undefined"!=typeof jQuery&&jQuery);
\ No newline at end of file

programming_language: JavaScript