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