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