text: !function(t,e,n,o,a){"use strict";function i(t){var e="bez_"+o.makeArray(arguments).join("_").replace(".","p");if("function"!=typeof o.easing[e]){var n=function(t,e){var n=[null,null],o=[null,null],a=[null,null],i=function(i,r){return a[r]=3*t[r],o[r]=3*(e[r]-t[r])-a[r],n[r]=1-a[r]-o[r],i*(a[r]+i*(o[r]+i*n[r]))},r=function(t){return a[0]+t*(2*o[0]+3*n[0]*t)},s=function(t){for(var e,n=t,o=0;++o<14&&(e=i(n,0)-t,!(Math.abs(e)<.001));)n-=e/r(n);return n};return function(t){return i(s(t),1)}};o.easing[e]=function(e,o,a,i,r){return i*n([t[0],t[1]],[t[2],t[3]])(o/r)+a}}return e}function r(){}function s(t,e,n){return Math.max(isNaN(e)?-1/0:e,Math.min(isNaN(n)?1/0:n,t))}function u(t){return t.match(/ma/)&&t.match(/-?\d+(?!d)/g)[t.match(/3d/)?12:4]}function c(t){return kn?+u(t.css("transform")):+t.css("left").replace("px","")}function l(t,e){var n={};return kn?n.transform="translate3d("+(t+(e?.001:0))+"px,0,0)":n.left=t,n}function f(t){return{"transition-duration":t+"ms"}}function d(t,e){return+String(t).replace(e||"px","")||a}function h(t){return/%$/.test(t)&&d(t,"%")}function m(t){return(!!d(t)||!!d(t,"%"))&&t}function p(t,e,n,o){return(t-(o||0))*(e+(n||0))}function v(t,e,n,o){return-Math.round(t/(e+(n||0))-(o||0))}function g(t){var e=t.data();if(!e.tEnd){var n=t[0],o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"};n.addEventListener(o[ln.prefixed("transition")],function(t){e.tProp&&t.propertyName.match(e.tProp)&&e.onEndFn()},!1),e.tEnd=!0}}function w(t,e,n,o){var a,i=t.data();i&&(i.onEndFn=function(){a||(a=!0,clearTimeout(i.tT),n())},i.tProp=e,clearTimeout(i.tT),i.tT=setTimeout(function(){i.onEndFn()},1.5*o),g(t))}function y(t,e,n){if(t.length){var o=t.data();kn?(t.css(f(0)),o.onEndFn=r,clearTimeout(o.tT)):t.stop();var a=b(e,function(){return c(t)});return t.css(l(a,n)),a}}function b(){for(var t,e=0,n=arguments.length;n>e&&(t=e?arguments[e]():arguments[e],"number"!=typeof t);e++);return t}function x(t,e){return Math.round(t+(e-t)/1.5)}function _(){return _.p=_.p||("https://"===n.protocol?"https://":"http://"),_.p}function C(t){var n=e.createElement("a");return n.href=t,n}function T(t,e){if("string"!=typeof t)return t;t=C(t);var n,o;if(t.host.match(/youtube\.com/)&&t.search){if(n=t.search.split("v=")[1]){var a=n.indexOf("&");-1!==a&&(n=n.substring(0,a)),o="youtube"}}else t.host.match(/youtube\.com|youtu\.be/)?(n=t.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),o="youtube"):t.host.match(/vimeo\.com/)&&(o="vimeo",n=t.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,""));return n&&o||!e||(n=t.href,o="custom"),n?{id:n,type:o,s:t.search.replace(/^\?/,"")}:!1}function k(t,e,n){var a,i,r=t.video;return"youtube"===r.type?(i=_()+"img.youtube.com/vi/"+r.id+"/default.jpg",a=i.replace(/\/default.jpg$/,"/hqdefault.jpg"),t.thumbsReady=!0):"vimeo"===r.type?o.ajax({url:_()+"vimeo.com/api/v2/video/"+r.id+".json",dataType:"jsonp",success:function(o){t.thumbsReady=!0,M(e,{img:o[0].thumbnail_large,thumb:o[0].thumbnail_small},t.i,n)}}):t.thumbsReady=!0,{img:a,thumb:i}}function M(t,e,n,a){for(var i=0,r=t.length;r>i;i++){var s=t[i];if(s.i===n&&s.thumbsReady){var u={videoReady:!0};u[In]=u[Rn]=u[Kn]=!1,a.splice(i,1,o.extend({},s,u,e));break}}}function S(t){function e(t,e,a){var i=t.children("img").eq(0),r=t.attr("href"),s=t.attr("src"),u=i.attr("src"),c=e.video,l=a?T(r,c===!0):!1;l?r=!1:l=c,n(t,i,o.extend(e,{video:l,img:e.img||r||s||u,thumb:e.thumb||u||s||r}))}function n(t,e,n){var a=n.thumb&&n.img!==n.thumb,i=d(n.width||t.attr("width")),r=d(n.height||t.attr("height"));o.extend(n,{width:i,height:r,thumbratio:K(n.thumbratio||d(n.thumbwidth||e&&e.attr("width")||a||i)/d(n.thumbheight||e&&e.attr("height")||a||r))})}var a=[];return t.children().each(function(){var t=o(this),i=I(o.extend(t.data(),{id:t.attr("id")}));if(t.is("a, img"))e(t,i,!0);else{if(t.is(":empty"))return;n(t,null,o.extend(i,{html:this,_html:t.html()}))}a.push(i)}),a}function F(t){return 0===t.offsetWidth&&0===t.offsetHeight}function E(t){return!o.contains(e.documentElement,t)}function P(t,e,n){t()?e():setTimeout(function(){P(t,e)},n||100)}function j(t){n.replace(n.protocol+"//"+n.host+n.pathname.replace(/^\/?/,"/")+n.search+"#"+t)}function $(t,e,n){var o=t.data(),a=o.measures;if(a&&(!o.l||o.l.W!==a.width||o.l.H!==a.height||o.l.r!==a.ratio||o.l.w!==e.w||o.l.h!==e.h||o.l.m!==n)){var i=a.width,r=a.height,u=e.w/e.h,c=a.ratio>=u,l="scaledown"===n,f="contain"===n,d="cover"===n;c&&(l||f)||!c&&d?(i=s(e.w,0,l?i:1/0),r=i/a.ratio):(c&&d||!c&&(l||f))&&(r=s(e.h,0,l?r:1/0),i=r*a.ratio),t.css({width:Math.ceil(i),height:Math.ceil(r),marginLeft:Math.floor(-i/2),marginTop:Math.floor(-r/2)}),o.l={W:a.width,H:a.height,r:a.ratio,w:e.w,h:e.h,m:n}}return!0}function q(t,e){var n=t[0];n.styleSheet?n.styleSheet.cssText=e:t.html(e)}function A(t,e,n){return e===n?!1:e>=t?"left":t>=n?"right":"left right"}function L(t,e,n,o){if(!n)return!1;if(!isNaN(t))return t-(o?0:1);for(var a,i=0,r=e.length;r>i;i++){var s=e[i];if(s.id===t){a=i;break}}return a}function N(t,e,n){n=n||{},t.each(function(){var t,a=o(this),i=a.data();i.clickOn||(i.clickOn=!0,o.extend(V(a,{onStart:function(e){t=e,(n.onStart||r).call(this,e)},onMove:n.onMove||r,onEnd:function(o){o.moved||n.tail.checked||e.call(this,t)}}),n.tail))})}function z(t,e){return'<div class="'+t+'">'+(e||"")+"</div>"}function O(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 D(t){return"[object Array]"==Object.prototype.toString.call(t)&&o.map(t,function(t){return o.extend({},t)})}function W(t,e){xn.scrollLeft(t).scrollTop(e)}function I(t){if(t){var e={};return o.each(t,function(t,n){e[t.toLowerCase()]=n}),e}}function K(t){if(t){var e=+t;return isNaN(e)?(e=t.split("/"),+e[0]/+e[1]||a):e}}function R(t,e){t.preventDefault(),e&&t.stopPropagation()}function H(t){return t?">":"<"}function X(t,e){var n=Math.round(e.pos),a=e.onEnd||r;"undefined"!=typeof e.overPos&&e.overPos!==e.pos&&(n=e.overPos,a=function(){X(t,o.extend({},e,{overPos:e.pos,time:Math.max(An,e.time/2)}))});var i=o.extend(l(n,e._001),{width:e.width});kn?(t.css(o.extend(f(e.time),i)),e.time>10?w(t,"transform",a,e.time):a()):t.stop().animate(i,e.time,Hn,a)}function B(t,e,n,a,i,s){var u="undefined"!=typeof s;if(u||(i.push(arguments),Array.prototype.push.call(arguments,i.length),!(i.length>1))){t=t||o(t),e=e||o(e);var c=t[0],l=e[0],f="crossfade"===a.method,d=function(){if(!d.done){d.done=!0;var t=(u||i.shift())&&i.shift();t&&B.apply(this,t),(a.onEnd||r)(!!t)}},h=a.time/(s||1);n.not(t.addClass(qe).removeClass($e)).not(e.addClass($e).removeClass(qe)).removeClass(qe+" "+$e),t.stop(),e.stop(),f&&l&&t.fadeTo(0,0),t.fadeTo(f?h:1,1,f&&d),e.fadeTo(h,0,d),c&&f||l||d()}}function Q(t){var e=(t.touches||[])[0]||t;t._x=e.pageX,t._y=e.clientY}function V(n,a){function i(t){return h=o(t.target),y.checked=v=g=!1,f||y.flow||t.touches&&t.touches.length>1||t.which>1||gn&&gn.type!==t.type&&yn||(v=a.select&&h.is(a.select,w))?v:(p="touchstart"===t.type,g=h.is("a, a *",w),Q(t),d=gn=t,wn=t.type.replace(/down|start/,"move").replace(/Down/,"Move"),m=y.control,(a.onStart||r).call(w,t,{control:m,$target:h}),f=y.flow=!0,void((!p||y.go)&&R(t)))}function s(t){if(t.touches&&t.touches.length>1||jn&&!t.isPrimary||wn!==t.type||!f)return void(f&&u());Q(t);var e=Math.abs(t._x-d._x),n=Math.abs(t._y-d._y),o=e-n,i=(y.go||y.x||o>=0)&&!y.noSwipe,s=0>o;p&&!y.checked?(f=i)&&R(t):(R(t),(a.onMove||r).call(w,t,{touch:p})),y.checked=y.checked||i||s}function u(t){var e=f;y.control=f=!1,e&&(y.flow=!1),!e||g&&!y.checked||(t&&R(t),yn=!0,clearTimeout(bn),bn=setTimeout(function(){yn=!1},1e3),(a.onEnd||r).call(w,{moved:y.checked,$target:h,control:m,touch:p,startEvent:d,aborted:!t||"MSPointerCancel"===t.type}))}function c(){y.flow||setTimeout(function(){y.flow=!0},10)}function l(){y.flow&&setTimeout(function(){y.flow=!1},qn)}var f,d,h,m,p,v,g,w=n[0],y={};return jn?(w[Pn]("MSPointerDown",i,!1),e[Pn]("MSPointerMove",s,!1),e[Pn]("MSPointerCancel",u,!1),e[Pn]("MSPointerUp",u,!1)):(w[Pn]&&(w[Pn]("touchstart",i,!1),w[Pn]("touchmove",s,!1),w[Pn]("touchend",u,!1),e[Pn]("touchstart",c,!1),e[Pn]("touchend",l,!1),e[Pn]("touchcancel",l,!1),t[Pn]("scroll",l,!1)),n.on("mousedown",i),_n.on("mousemove",s).on("mouseup",u)),n.on("click","a",function(t){y.checked&&R(t)}),y}function Y(t,e){function n(n){c=f=n._x,v=o.now(),p=[[v,c]],d=h=F.noMove?0:y(t,e.getPos&&e.getPos(),e._001),(e.onStart||r).call(M,n)}function a(t,e){w=S.min,b=S.max,_=S.snap,C=t.altKey,k=!1,T=e.control,T||n(t)}function i(a,i){T&&(T=!1,n(a)),F.noSwipe||(f=a._x,p.push([o.now(),f]),h=d-(c-f),m=A(h,w,b),w>=h?h=x(h,w):h>=b&&(h=x(h,b)),F.noMove||(t.css(l(h,e._001)),k||(k=!0,i.touch||jn||t.addClass(Ve)),(e.onMove||r).call(M,a,{pos:h,edge:m})))}function u(n){if(!T){n.touch||jn||t.removeClass(Ve),g=(new Date).getTime();for(var a,i,u,c,l,m,v,y,x,k=g-qn,S=null,F=An,E=e.friction,P=p.length-1;P>=0;P--){if(a=p[P][0],i=Math.abs(a-k),null===S||u>i)S=a,c=p[P][1];else if(S===k||i>u)break;u=i}v=s(h,w,b);var j=c-f,$=j>=0,q=g-S,A=q>qn,L=!A&&h!==d&&v===h;_&&(v=s(Math[L?$?"floor":"ceil":"round"](h/_)*_,w,b),w=b=v),L&&(_||v===h)&&(x=-(j/q),F*=s(Math.abs(x),e.timeLow,e.timeHigh),l=Math.round(h+x*F/E),_||(v=l),(!$&&l>b||$&&w>l)&&(m=$?w:b,y=l-m,_||(v=m),y=s(v+.03*y,m-50,m+50),F=Math.abs((h-y)/(x/E)))),F*=C?10:1,(e.onEnd||r).call(M,o.extend(n,{pos:h,newPos:v,overPos:y,time:F,moved:A?_:Math.abs(h-d)>(_?0:3)}))}}var c,f,d,h,m,p,v,g,w,b,_,C,T,k,M=t[0],S=t.data(),F={};return F=o.extend(V(e.$wrap,{onStart:a,onMove:i,onEnd:u,select:e.select,control:e.control}),F)}function U(t,e){var n,a,i,s=t[0],u={prevent:{}};return s[Pn]&&s[Pn]($n,function(t){var s=t.wheelDeltaY||-1*t.deltaY||0,c=t.wheelDeltaX||-1*t.deltaX||0,l=Math.abs(c)>Math.abs(s),f=H(0>c),d=a===f,h=o.now(),m=qn>h-i;a=f,i=h,l&&u.ok&&(!u.prevent[f]||n)&&(R(t,!0),n&&d&&m||(e.shift&&(n=!0,clearTimeout(u.t),u.t=setTimeout(function(){n=!1},Ln)),(e.onEnd||r)(t,e.shift?f:c)))},!1),u}function G(){o.each(o.Fotorama.instances,function(t,e){e.index=t})}function J(t){o.Fotorama.instances.push(t),G()}function Z(t){o.Fotorama.instances.splice(t.index,1),G()}var te="fotorama",ee="fullscreen",ne=te+"__wrap",oe=ne+"--css2",ae=ne+"--css3",ie=ne+"--video",re=ne+"--fade",se=ne+"--slide",ue=ne+"--no-controls",ce=ne+"--no-shadows",le=ne+"--pan-y",fe=ne+"--rtl",de=te+"__stage",he=de+"__frame",me=he+"--video",pe=de+"__shaft",ve=de+"--only-active",ge=te+"__grab",we=te+"__pointer",ye=te+"__arr",be=ye+"--disabled",xe=ye+"--prev",_e=ye+"--next",Ce=te+"__nav",Te=Ce+"-wrap",ke=Ce+"__shaft",Me=Ce+"--dots",Se=Ce+"--thumbs",Fe=Ce+"__frame",Ee=Fe+"--dot",Pe=Fe+"--thumb",je=te+"__fade",$e=je+"-front",qe=je+"-rear",Ae=te+"__shadow",Le=Ae+"s",Ne=Le+"--left",ze=Le+"--right",Oe=te+"__active",De=te+"__select",We=te+"--hidden",Ie=te+"--fullscreen",Ke=te+"__fullscreen-icon",Re=te+"__error",He=te+"__loading",Xe=te+"__loaded",Be=Xe+"--full",Qe=Xe+"--img",Ve=te+"__grabbing",Ye=te+"__img",Ue=Ye+"--full",Ge=te+"__dot",Je=te+"__thumb",Ze=Je+"-border",tn=te+"__html",en=te+"__video",nn=en+"-play",on=en+"-close",an=te+"__caption",rn=te+"__caption__wrap",sn=te+"__oooo",un=o&&o.fn.jquery.split(".");if(!un||un[0]<1||1==un[0]&&un[1]<8)throw new Error("Fotorama requires jQuery 1.8 or later and will not run without it.");var cn={},ln=function(t,e,n){function o(t){g.cssText=t}function a(t,e){return typeof t===e}function i(t,e){return!!~(""+t).indexOf(e)}function r(t,e){for(var o in t){var a=t[o];if(!i(a,"-")&&g[a]!==n)return"pfx"==e?a:!0}return!1}function s(t,e,o){for(var i in t){var r=e[t[i]];if(r!==n)return o===!1?t[i]:a(r,"function")?r.bind(o||e):r}return!1}function u(t,e,n){var o=t.charAt(0).toUpperCase()+t.slice(1),i=(t+" "+b.join(o+" ")+o).split(" ");return a(e,"string")||a(e,"undefined")?r(i,e):(i=(t+" "+x.join(o+" ")+o).split(" "),s(i,e,n))}var c,l,f,d="2.6.2",h={},m=e.documentElement,p="modernizr",v=e.createElement(p),g=v.style,w=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),y="Webkit Moz O ms",b=y.split(" "),x=y.toLowerCase().split(" "),_={},C=[],T=C.slice,k=function(t,n,o,a){var i,r,s,u,c=e.createElement("div"),l=e.body,f=l||e.createElement("body");if(parseInt(o,10))for(;o--;)s=e.createElement("div"),s.id=a?a[o]:p+(o+1),c.appendChild(s);return i=["&#173;",'<style id="s',p,'">',t,"</style>"].join(""),c.id=p,(l?c:f).innerHTML+=i,f.appendChild(c),l||(f.style.background="",f.style.overflow="hidden",u=m.style.overflow,m.style.overflow="hidden",m.appendChild(f)),r=n(c,t),l?c.parentNode.removeChild(c):(f.parentNode.removeChild(f),m.style.overflow=u),!!r},M={}.hasOwnProperty;f=a(M,"undefined")||a(M.call,"undefined")?function(t,e){return e in t&&a(t.constructor.prototype[e],"undefined")}:function(t,e){return M.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var n=T.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(T.call(arguments)));return Object(r)===r?r:i}return e.apply(t,n.concat(T.call(arguments)))};return o}),_.csstransforms3d=function(){var t=!!u("perspective");return t};for(var S in _)f(_,S)&&(l=S.toLowerCase(),h[l]=_[S](),C.push((h[l]?"":"no-")+l));return h.addTest=function(t,e){if("object"==typeof t)for(var o in t)f(t,o)&&h.addTest(o,t[o]);else{if(t=t.toLowerCase(),h[t]!==n)return h;e="function"==typeof e?e():e,"undefined"!=typeof enableClasses&&enableClasses&&(m.className+=" "+(e?"":"no-")+t),h[t]=e}return h},o(""),v=c=null,h._version=d,h._prefixes=w,h._domPrefixes=x,h._cssomPrefixes=b,h.testProp=function(t){return r([t])},h.testAllProps=u,h.testStyles=k,h.prefixed=function(t,e,n){return e?u(t,e,n):u(t,"pfx")},h}(t,e),fn={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},dn="webkit moz o ms khtml".split(" ");if("undefined"!=typeof e.cancelFullScreen)fn.ok=!0;else for(var hn=0,mn=dn.length;mn>hn;hn++)if(fn.prefix=dn[hn],"undefined"!=typeof e[fn.prefix+"CancelFullScreen"]){fn.ok=!0;break}fn.ok&&(fn.event=fn.prefix+"fullscreenchange",fn.is=function(){switch(this.prefix){case"":return e.fullScreen;case"webkit":return e.webkitIsFullScreen;default:return e[this.prefix+"FullScreen"]}},fn.request=function(t){return""===this.prefix?t.requestFullScreen():t[this.prefix+"RequestFullScreen"]()},fn.cancel=function(){return""===this.prefix?e.cancelFullScreen():e[this.prefix+"CancelFullScreen"]()});var pn,vn,gn,wn,yn,bn,xn=o(t),_n=o(e),Cn="quirks"===n.hash.replace("#",""),Tn=ln.csstransforms3d,kn=Tn&&!Cn,Mn=Tn||"CSS1Compat"===e.compatMode,Sn=fn.ok,Fn=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),En=!kn||Fn,Pn="addEventListener",jn=t.navigator.msPointerEnabled,$n="onwheel"in e.createElement("div")?"wheel":e.onmousewheel!==a?"mousewheel":"DOMMouseScroll",qn=250,An=300,Ln=1400,Nn=5e3,zn=2,On=64,Dn=500,Wn=333,In="$stageFrame",Kn="$navDotFrame",Rn="$navThumbFrame",Hn=i([.1,0,.25,1]);jQuery.Fotorama=function(t,i){function u(){o.each(lo,function(t,e){if(!e.i){e.i=Yo++;var n=T(e.video,!0);if(n){var o={};e.video=n,e.img||e.thumb?e.thumbsReady=!0:o=k(e,lo,Xo),M(lo,{img:o.img,thumb:o.thumb},e.i,Xo)}}})}function c(t){var e="keydown."+te,n="keydown."+te+Bo,o="resize."+te+Bo;t?(_n.on(n,function(t){mo&&27===t.keyCode?(R(t),eo(mo,!0,!0)):(Xo.fullScreen||i.keyboard&&!Xo.index)&&(27===t.keyCode?(R(t),Xo.cancelFullScreen()):39===t.keyCode||40===t.keyCode&&Xo.fullScreen?(R(t),Xo.show({index:">",slow:t.altKey,user:!0})):(37===t.keyCode||38===t.keyCode&&Xo.fullScreen)&&(R(t),Xo.show({index:"<",slow:t.altKey,user:!0})))}),Xo.index||_n.off(e).on(e,"textarea, input, select",function(t){!vn.hasClass(ee)&&t.stopPropagation()}),xn.on(o,Xo.resize)):(_n.off(n),xn.off(o))}function g(e){e!==g.f&&(e?(t.html("").addClass(te+" "+Qo).append(Zo).before(Go).before(Jo),J(Xo)):(Zo.detach(),Go.detach(),Jo.detach(),t.html(Uo.urtext).removeClass(Qo),Z(Xo)),c(e),g.f=e)}function w(){lo=Xo.data=lo||D(i.data)||S(t),fo=Xo.size=lo.length,!co.ok&&i.shuffle&&O(lo),u(),ya=V(ya),fo&&g(!0)}function x(){var t=2>fo||mo;_a.noMove=t||Eo,_a.noSwipe=t||!i.swipe,ea.toggleClass(ge,!_a.noMove&&!_a.noSwipe),jn&&Zo.toggleClass(le,!_a.noSwipe)}function _(t){t===!0&&(t=""),i.autoplay=Math.max(+t||Nn,1.5*$o)}function C(t){return t?"add":"remove"}function F(){Xo.options=i=I(i),Eo="crossfade"===i.transition||"dissolve"===i.transition,Co=i.loop&&(fo>2||Eo),$o=+i.transitionduration||An,Ao="rtl"===i.direction;var t={add:[],remove:[]};fo>1?(To=i.nav,Mo="top"===i.navposition,t.remove.push(De),ia.toggle(i.arrows)):(To=!1,ia.hide()),Tn(),Fn(),i.autoplay&&_(i.autoplay),Po=d(i.thumbwidth)||On,jo=d(i.thumbheight)||On,Ca.ok=ka.ok=i.trackpad&&!En,x(),Qn(i,!0),ko="thumbs"===To,ko?(hn(fo,"navThumb"),ho=la,Ho=Rn,q(Go,o.Fotorama.jst.style({w:Po,h:jo,b:i.thumbborderwidth,m:i.thumbmargin,s:Bo,q:!Mn})),sa.addClass(Se).removeClass(Me)):"dots"===To?(hn(fo,"navDot"),ho=ca,Ho=Kn,sa.addClass(Me).removeClass(Se)):(To=!1,sa.removeClass(Se+" "+Me)),To&&(Mo?ra.insertBefore(ta):ra.insertAfter(ta),yn.nav=!1,yn(ho,ua,"nav")),So=i.allowfullscreen,So?(ma.appendTo(ta),Fo=Sn&&"native"===So):(ma.detach(),Fo=!1),t[C(Eo)].push(re),t[C(!Eo)].push(se),t[C(Ao)].push(fe),qo=i.shadows&&!En,t[C(!qo)].push(ce),ln(),Zo.addClass(t.add.join(" ")).removeClass(t.remove.join(" ")),ba=o.extend({},i)}function Q(t){return 0>t?(fo+t%fo)%fo:t>=fo?t%fo:t}function V(t){return s(t,0,fo-1)}function G(t){return Co?Q(t):V(t)}function je(t){return t>0||Co?t-1:!1}function $e(t){return fo-1>t||Co?t+1:!1}function qe(){fa.min=Co?-1/0:-p(fo-1,xa.w,i.margin,go),fa.max=Co?1/0:-p(0,xa.w,i.margin,go),fa.snap=xa.w+i.margin}function Ae(){da.min=Math.min(0,xa.W-ua.width()),da.max=0,ua.toggleClass(ge,!(Ta.noMove=da.min===da.max))}function Ve(t,e,n){if("number"==typeof t){t=new Array(t);var a=!0}return o.each(t,function(t,o){if(a&&(o=t),"number"==typeof o){var i=lo[Q(o)];if(i){var r="$"+e+"Frame",s=i[r];n.call(this,t,o,i,s,r,s&&s.data())}}})}function en(t,e,n,o){(!Lo||"*"===Lo&&o===_o)&&(t=m(i.width)||m(t)||Dn,e=m(i.height)||m(e)||Wn,Xo.resize({width:t,ratio:i.ratio||n||t/e},0,o===_o?!0:"*"))}function un(t,e,n,a,r){Ve(t,e,function(t,s,u,c,l,f){function d(t){var e=Q(s);Vn(t,{index:e,src:x,frame:lo[e]})}function h(){w.remove(),o.Fotorama.cache[x]="error",u.html&&"stage"===e||!_||_===x?(!x||u.html||v?"stage"===e&&(c.trigger("f:load").removeClass(He+" "+Re).addClass(Xe),d("load"),en()):(c.trigger("f:error").removeClass(He).addClass(Re),d("error")),f.state="error",!(fo>1)||u.html||u.deleted||u.video||v||(u.deleted=!0,Xo.splice(s,1))):(u[b]=x=_,un([s],e,n,a,!0))}function m(){var t=g.width,r=g.height,l=t/r;y.measures={width:t,height:r,ratio:l},en(t,r,l,s),w.off("load error").addClass(Ye+(v?" "+Ue:"")).prependTo(c),$(w,n||xa,a||u.fit||i.fit),o.Fotorama.cache[x]=f.state="loaded",setTimeout(function(){c.trigger("f:load").removeClass(He+" "+Re).addClass(Xe+" "+(v?Be:Qe)),"stage"===e&&d("load")},5)}function p(){var t=10;P(function(){return!Ko||!t--&&!En},function(){m()})}if(c){var v=Xo.fullScreen&&u.full&&u.full!==u.img&&!f.$full&&"stage"===e;if(!f.$img||r||v){var g=new Image,w=o(g),y=w.data();f[v?"$full":"$img"]=w;var b="stage"===e?v?"full":"img":"thumb",x=u[b],_=v?null:u["stage"===e?"thumb":"img"];if("navThumb"===e&&(c=f.$wrap),!x)return void h();o.Fotorama.cache[x]?!function C(){"error"===o.Fotorama.cache[x]?h():"loaded"===o.Fotorama.cache[x]?setTimeout(p,0):setTimeout(C,100)}():(o.Fotorama.cache[x]="*",w.on("load",p).on("error",h)),f.state="",g.src=x}}})}function cn(t){ln(!0),$a.appendTo(t),ja=0,qa(),Pa=setInterval(qa,200)}function ln(t){t||$a.detach(),clearInterval(Pa)}function dn(){var t=Xo.activeFrame[In];t&&!t.data().state&&(cn(t),t.on("f:load f:error",function(){t.off("f:load f:error"),ln()}))}function hn(t,e){Ve(t,e,function(t,n,a,r,s,u){r||(r=a[s]=Zo[s].clone(),u=r.data(),u.data=a,"stage"===e?(a.html&&o('<div class="'+tn+'"></div>').append(a._html?o(a.html).removeAttr("id").html(a._html):a.html).appendTo(r),i.captions&&a.caption&&o(z(an,z(rn,a.caption))).appendTo(r),a.video&&r.addClass(me).append(va.clone()),na=na.add(r)):"navDot"===e?ca=ca.add(r):"navThumb"===e&&(u.$wrap=r.children(":first"),la=la.add(r),a.video&&r.append(va.clone())))})}function mn(t,e,n){return t&&t.length&&$(t,e,n)}function gn(t){Ve(t,"stage",function(t,e,n,a,r,s){if(a){Sa[In][Q(e)]=a.css(o.extend({left:Eo?0:p(e,xa.w,i.margin,go)},Eo&&f(0))),E(a[0])&&(a.appendTo(ea),eo(n.$video));var u=n.fit||i.fit;mn(s.$img,xa,u),mn(s.$full,xa,u)}})}function wn(t,e){if("thumbs"===To&&!isNaN(t)){var n=-t,a=-t+xa.w;la.each(function(){var t=o(this),i=t.data(),r=i.eq,s={h:jo},u="cover";s.w=i.w,i.l+i.w<n||i.l>a||mn(i.$img,s,u)||e&&un([r],"navThumb",s,u)})}}function yn(t,e,n){if(!yn[n]){var a="nav"===n&&ko,r=0;e.append(t.filter(function(){for(var t,e=o(this),n=e.data(),a=0,i=lo.length;i>a;a++)if(n.data===lo[a]){t=!0,n.eq=a;break}return t||e.remove()&&!1}).sort(function(t,e){return o(t).data().eq-o(e).data().eq}).each(function(){if(a){var t=o(this),e=t.data(),n=Math.round(jo*e.data.thumbratio)||Po;e.l=r,e.w=n,t.css({width:n}),r+=n+i.thumbmargin}})),yn[n]=!0}}function bn(t){return t-Fa>xa.w/3}function Cn(t){return!(Co||ya+t&&ya-fo+t||mo)}function Tn(){oa.toggleClass(be,Cn(0)),aa.toggleClass(be,Cn(1))}function Fn(){Ca.ok&&(Ca.prevent={"<":Cn(0),">":Cn(1)})}function Pn(t){var e,n,o=t.data();return ko?(e=o.l,n=o.w):(e=t.position().left,n=t.width()),{c:e+n/2,min:-e+10*i.thumbmargin,max:-e+xa.w-n-10*i.thumbmargin}}function $n(t){var e=Xo.activeFrame[Ho].data();X(ha,{time:.9*t,pos:e.l,width:e.w-2*i.thumbborderwidth})}function Ln(t){var e=lo[t.guessIndex][Ho];if(e){var n=da.min!==da.max,o=n&&Pn(Xo.activeFrame[Ho]),a=n&&(t.keep&&Ln.l?Ln.l:s((t.coo||xa.w/2)-Pn(e).c,o.min,o.max)),i=n&&s(a,da.min,da.max),r=.9*t.time;X(ua,{time:r,pos:i||0,onEnd:function(){wn(i,!0)}}),r&&wn(i),to(sa,A(i,da.min,da.max)),Ln.l=a}}function zn(){Hn(Ho),Ma[Ho].push(Xo.activeFrame[Ho].addClass(Oe))}function Hn(t){for(var e=Ma[t];e.length;)e.shift().removeClass(Oe)}function Xn(t){var e=Sa[t];o.each(vo,function(t,n){delete e[Q(n)]}),o.each(e,function(t,n){delete e[t],n.detach()})}function Bn(t){go=wo=ya;var e=Xo.activeFrame,n=e[In];n&&(Hn(In),Ma[In].push(n.addClass(Oe)),t||Xo.show.onEnd(!0),y(ea,0,!0),Xn(In),gn(vo),qe(),Ae())}function Qn(t,e){t&&o.extend(xa,{width:t.width||xa.width,height:t.height,minwidth:t.minwidth,maxwidth:t.maxwidth,minheight:t.minheight,maxheight:t.maxheight,ratio:K(t.ratio)})&&!e&&o.extend(i,{width:xa.width,height:xa.height,minwidth:xa.minwidth,maxwidth:xa.maxwidth,minheight:xa.minheight,maxheight:xa.maxheight,ratio:xa.ratio})}function Vn(e,n,o){t.trigger(te+":"+e,[Xo,n]),Xo.prevent[e]?delete Xo.prevent[e]:(o||r)()}function Yn(){clearTimeout(Un.t),Ko=1,i.stopautoplayontouch?Xo.stopAutoplay():Do=!0}function Un(){Un.t=setTimeout(function(){Ko=0},An+qn)}function Gn(){Do=!(!mo&&!Wo)}function Jn(){if(clearTimeout(Jn.t),!i.autoplay||Do)return void(Xo.autoplay&&(Xo.autoplay=!1,Vn("stopautoplay")));Xo.autoplay||(Xo.autoplay=!0,Vn("startautoplay"));var t=ya,e=Xo.activeFrame[In].data();P(function(){return e.state||t!==ya},function(){Jn.t=setTimeout(function(){Do||t!==ya||Xo.show(Co?H(!Ao):Q(ya+(Ao?-1:1)))},i.autoplay)})}function Zn(){Xo.fullScreen&&(Xo.fullScreen=!1,Sn&&fn.cancel(Vo),vn.removeClass(ee),pn.removeClass(ee),t.removeClass(Ie).insertAfter(Jo),xa=o.extend({},Io),eo(mo,!0,!0),io("x",!1),Xo.resize(),un(vo,"stage"),W(zo,No),Vn("fullscreenexit"))}function to(t,e){qo&&(t.removeClass(Ne+" "+ze),e&&!mo&&t.addClass(e.replace(/^|\s/g," "+Le+"--")))}function eo(t,e,n){e&&(Zo.removeClass(ie),mo=!1,x()),t&&t!==mo&&(t.remove(),Vn("unloadvideo")),n&&(Gn(),Jn())}function no(t){Zo.toggleClass(ue,t)}function oo(t){if(!_a.flow){var e=t?t.pageX:oo.x,n=e&&!Cn(bn(e))&&i.click;oo.p===n||!Eo&&i.swipe||!ta.toggleClass(we,n)||(oo.p=n,oo.x=e)}}function ao(t,e){var n=t.target,r=o(n);r.hasClass(nn)?Xo.playVideo():n===pa?Xo[(Xo.fullScreen?"cancel":"request")+"FullScreen"]():mo?n===wa&&eo(mo,!0,!0):Vn("stagetap",a,function(){e?no():i.click&&Xo.show({index:t.shiftKey||H(bn(t._x)),slow:t.altKey,user:!0})})}function io(t,e){_a[t]=Ta[t]=e}function ro(t,e){var n=o(this).data().eq;Xo.show({index:n,slow:t.altKey,user:!0,coo:t._x-sa.offset().left,time:e})}function so(){if(w(),F(),!so.i){so.i=!0;var t=i.startindex;(t||i.hash&&n.hash)&&(_o=L(t||n.hash.replace(/^#/,""),lo,0===Xo.index||t,t)),ya=go=wo=yo=_o=G(_o)||0}if(fo){if(uo())return;mo&&eo(mo,!0),vo=[],Xn(In),Xo.show({index:ya,time:0}),Xo.resize()}else Xo.destroy()}function uo(){return!uo.f===Ao?(uo.f=Ao,ya=fo-1-ya,Xo.reverse(),!0):void 0}function co(){co.ok||(co.ok=!0,Vn("ready"))}pn=pn||o("html"),vn=vn||o("body");var lo,fo,ho,mo,po,vo,go,wo,yo,bo,xo,_o,Co,To,ko,Mo,So,Fo,Eo,Po,jo,$o,qo,Ao,Lo,No,zo,Oo,Do,Wo,Io,Ko,Ro,Ho,Xo=this,Bo=o.now(),Qo=te+Bo,Vo=t[0],Yo=1,Uo=t.data(),Go=o("<style></style>"),Jo=o(z(We)),Zo=o(z(ne)),ta=o(z(de)).appendTo(Zo),ea=(ta[0],o(z(pe)).appendTo(ta)),na=o(),oa=o(z(ye+" "+xe)),aa=o(z(ye+" "+_e)),ia=oa.add(aa).appendTo(ta),ra=o(z(Te)),sa=o(z(Ce)).appendTo(ra),ua=o(z(ke)).appendTo(sa),ca=o(),la=o(),fa=ea.data(),da=ua.data(),ha=o(z(Ze)).appendTo(ua),ma=o(z(Ke)),pa=ma[0],va=o(z(nn)),ga=o(z(on)).appendTo(ta),wa=ga[0],ya=!1,ba={},xa={},_a={},Ca={},Ta={},ka={},Ma={},Sa={},Fa=0,Ea=[];Zo[In]=o(z(he)),Zo[Rn]=o(z(Fe+" "+Pe,z(Je))),Zo[Kn]=o(z(Fe+" "+Ee,z(Ge))),Ma[In]=[],Ma[Rn]=[],Ma[Kn]=[],Sa[In]={},Xo.prevent={},Zo.addClass(kn?ae:oe),Uo.fotorama=this;var Pa,ja,$a=o(z("",z(sn))),qa=function(){$a.attr("class",sn+" "+sn+"--"+ja),ja++,ja>4&&(ja=0)};Xo.startAutoplay=function(t){return Xo.autoplay?this:(Do=Wo=!1,_(t||i.autoplay),Jn(),this)},Xo.stopAutoplay=function(){return Xo.autoplay&&(Do=Wo=!0,Jn()),this},Xo.show=function(t){var e;"object"!=typeof t?(e=t,t={}):e=t.index,e=">"===e?wo+1:"<"===e?wo-1:"<<"===e?0:">>"===e?fo-1:e,e=isNaN(e)?L(e,lo,!0):e,e="undefined"==typeof e?ya||0:e,Xo.activeIndex=ya=G(e),bo=je(ya),xo=$e(ya),vo=[ya,bo,xo],wo=Co?e:ya;var n=Math.abs(yo-wo),o=b(t.time,function(){return Math.min($o*(1+(n-1)/12),2*$o)}),a=t.overPos;t.slow&&(o*=10),Xo.activeFrame=po=lo[ya],eo(mo,po.i!==lo[Q(go)].i),hn(vo,"stage"),gn([wo,je(wo),$e(wo)]),io("go",!0),Vn("show",{user:t.user,time:o});var r=Xo.show.onEnd=function(e){r.ok||(r.ok=!0,dn(),un(vo,"stage"),e||Bn(!0),Vn("showend",{user:t.user}),io("go",!1),Fn(),oo(),Gn(),Jn())};if(Eo){var u=po[In],c=ya!==yo?lo[yo][In]:null;B(u,c,na,{time:o,method:i.transition,onEnd:r},Ea)}else X(ea,{pos:-p(wo,xa.w,i.margin,go),overPos:a,time:o,onEnd:r,_001:!0});if(Tn(),To){zn();var l=V(ya+s(wo-yo,-1,1));Ln({time:o,coo:l!==ya&&t.coo,guessIndex:"undefined"!=typeof t.coo?l:ya}),ko&&$n(o)}return Oo="undefined"!=typeof yo&&yo!==ya,yo=ya,i.hash&&Oo&&!Xo.eq&&j(po.id||ya+1),this},Xo.requestFullScreen=function(){return So&&!Xo.fullScreen&&(No=xn.scrollTop(),zo=xn.scrollLeft(),W(0,0),io("x",!0),Io=o.extend({},xa),t.addClass(Ie).appendTo(vn.addClass(ee)),pn.addClass(ee),eo(mo,!0,!0),Xo.fullScreen=!0,Fo&&fn.request(Vo),Xo.resize(),un(vo,"stage"),dn(),Vn("fullscreenenter")),this},Xo.cancelFullScreen=function(){return Fo&&fn.is()?fn.cancel(e):Zn(),this},e.addEventListener&&e.addEventListener(fn.event,function(){!lo||fn.is()||mo||Zn()},!1),Xo.resize=function(t){if(!lo)return this;Qn(Xo.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:I(t),Xo.fullScreen);var e=arguments[1]||0,n=arguments[2],o=xa.width,a=xa.height,r=xa.ratio,u=xn.height()-(To?sa.height():0);return m(o)&&(Zo.css({width:o,minWidth:xa.minwidth,maxWidth:xa.maxwidth}),o=xa.W=xa.w=Zo.width(),i.glimpse&&(xa.w-=Math.round(2*(h(i.glimpse)/100*o||d(i.glimpse)))),ea.css({width:xa.w,marginLeft:(xa.W-xa.w)/2}),a=h(a)/100*u||d(a),a=a||r&&o/r,a&&(o=Math.round(o),a=xa.h=Math.round(s(a,h(xa.minheight)/100*u||d(xa.minheight),h(xa.maxheight)/100*u||d(xa.maxheight))),Bn(),ta.addClass(ve).stop().animate({width:o,height:a},e,function(){ta.removeClass(ve)}),To&&(sa.stop().animate({width:o},e),Ln({guessIndex:ya,time:e,keep:!0}),ko&&yn.nav&&$n(e)),Lo=n||!0,co())),Fa=ta.offset().left,this},Xo.setOptions=function(t){return o.extend(i,t),so(),this},Xo.shuffle=function(){return lo&&O(lo)&&so(),this},Xo.destroy=function(){return Xo.cancelFullScreen(),Xo.stopAutoplay(),lo=Xo.data=null,g(),vo=[],Xn(In),this},Xo.playVideo=function(){var t=Xo.activeFrame,e=t.video,n=ya;return"object"==typeof e&&t.videoReady&&(Fo&&Xo.fullScreen&&Xo.cancelFullScreen(),P(function(){return!fn.is()||n!==ya},function(){n===ya&&(t.$video=t.$video||o(o.Fotorama.jst.video(e)),t.$video.appendTo(t[In]),Zo.addClass(ie),mo=t.$video,x(),Vn("loadvideo"))})),this},Xo.stopVideo=function(){return eo(mo,!0,!0),this},ta.on("mousemove",oo),_a=Y(ea,{onStart:Yn,onMove:function(t,e){to(ta,e.edge)},onEnd:function(t){to(ta),Un();var e=(jn&&!Ro||t.touch)&&i.arrows;if(t.moved||e&&t.pos!==t.newPos){var n=v(t.newPos,xa.w,i.margin,go);Xo.show({index:n,time:Eo?$o:t.time,overPos:t.overPos,user:!0})}else t.aborted||ao(t.startEvent,e)},getPos:function(){return-p(wo,xa.w,i.margin,go)},_001:!0,timeLow:1,timeHigh:1,friction:2,select:"."+De+", ."+De+" *",$wrap:ta}),Ta=Y(ua,{onStart:Yn,onMove:function(t,e){to(sa,e.edge)},onEnd:function(t){function e(){Ln.l=t.newPos,Gn(),Jn(),wn(t.newPos,!0)}if(Un(),t.moved)t.pos!==t.newPos?(X(ua,{time:t.time,pos:t.newPos,overPos:t.overPos,onEnd:e}),wn(t.newPos),qo&&to(sa,A(t.newPos,da.min,da.max))):e();else{var n=t.$target.closest("."+Fe,ua)[0];n&&ro.call(n,t.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:sa}),Ca=U(ta,{shift:!0,onEnd:function(t,e){Yn(),Un(),Xo.show({index:e,slow:t.altKey})}}),ka=U(sa,{onEnd:function(t,e){Yn(),Un();var n=y(ua)+.25*e;ua.css(l(s(n,da.min,da.max))),qo&&to(sa,A(n,da.min,da.max)),ka.prevent={"<":n>=da.max,">":n<=da.min},clearTimeout(ka.t),ka.t=setTimeout(function(){wn(n,!0)},qn),wn(n)}}),Zo.hover(function(){setTimeout(function(){Ko||(Ro=!0,no(!Ro))},0)},function(){Ro&&(Ro=!1,no(!Ro))}),N(ia,function(t){R(t),mo?eo(mo,!0,!0):(Un(),Xo.show({index:ia.index(this)?">":"<",slow:t.altKey,user:!0}))},{onStart:function(){Yn(),_a.control=!0},tail:_a}),o.each("load push pop shift unshift reverse sort splice".split(" "),function(t,e){Xo[e]=function(){return lo=lo||[],"load"!==e?Array.prototype[e].apply(lo,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(lo=D(arguments[0])),so(),Xo}}),so()},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):P(function(){return!F(n)},function(){i.urtext=a.html(),new o.Fotorama(a,o.extend({},{width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:zn,glimpse:0,nav:"dots",navposition:"bottom",thumbwidth:On,thumbheight:On,thumbmargin:zn,thumbborderwidth:zn,allowfullscreen:!1,fit:"contain",transition:"slide",transitionduration:An,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!0,shuffle:!1,direction:"ltr",shadows:!0},t.fotoramaDefaults,e,i))})})},o.Fotorama.instances=[],o.Fotorama.cache={},o=o||{},o.Fotorama=o.Fotorama||{},o.Fotorama.jst=o.Fotorama.jst||{},o.Fotorama.jst.style=function(t){var e,n="";return cn.escape,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}"},o.Fotorama.jst.video=function(t){function e(){n+=o.call(arguments,"")}var n="",o=(cn.escape,Array.prototype.join);return n+='<div class="fotorama__video"><iframe src="',e(("youtube"==t.type?"http://youtube.com/embed/"+t.id+"?autoplay=1":"vimeo"==t.type?"http://player.vimeo.com/video/"+t.id+"?autoplay=1&badge=0":t.id)+(t.s?"&"+t.s:"")),n+='" frameborder="0" allowfullscreen></iframe></div>'},o(function(){o("."+te+':not([data-auto="false"])').fotorama()})}(window,document,location,window.jQuery);