Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*!
- * Fotorama 4.6.4 | http://fotorama.io/license/
- */
- fotoramaVersion="4.6.4",function(a,b,c,d,e){"use strict";function Ab(a){var b="bez_"+d.makeArray(arguments).join("_").replace(".","p");if("function"!==typeof d.easing[b]){var c=function(a,b){var c=[null,null],d=[null,null],e=[null,null],f=function(f,g){return e[g]=3*a[g],d[g]=3*(b[g]-a[g])-e[g],c[g]=1-e[g]-d[g],f*(e[g]+f*(d[g]+f*c[g]))},g=function(a){return e[0]+a*(2*d[0]+3*c[0]*a)},h=function(a){for(var d,b=a,c=0;++c<14&&(d=f(b,0)-a,!(Math.abs(d)<.001));)b-=d/g(b);return b};return function(a){return f(h(a),1)}};d.easing[b]=function(b,d,e,f,g){return f*c([a[0],a[1]],[a[2],a[3]])(d/g)+e}}return b}function dc(){}function ec(a,b,c){return Math.max(isNaN(b)?-1/0:b,Math.min(isNaN(c)?1/0:c,a))}function fc(a){return a.match(/ma/)&&a.match(/-?\d+(?!d)/g)[a.match(/3d/)?12:4]}function gc(a){return Hb?+fc(a.css("transform")):+a.css("left").replace("px","")}function hc(a){var b={};return Hb?b.transform="translate3d("+a+"px,0,0)":b.left=a,b}function ic(a){return{"transition-duration":a+"ms"}}function jc(a,b){return isNaN(a)?b:a}function kc(a,b){return jc(+String(a).replace(b||"px",""))}function lc(a){return/%$/.test(a)?kc(a,"%"):e}function mc(a,b){return jc(lc(a)/100*b,kc(a))}function nc(a){return(!isNaN(kc(a))||!isNaN(kc(a,"%")))&&a}function oc(a,b,c,d){return(a-(d||0))*(b+(c||0))}function pc(a,b,c,d){return-Math.round(a/(b+(c||0))-(d||0))}function qc(a){var b=a.data();if(!b.tEnd){var c=a[0],d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"};Qc(c,d[sb.prefixed("transition")],function(a){b.tProp&&a.propertyName.match(b.tProp)&&b.onEndFn()}),b.tEnd=!0}}function rc(a,b,c,d){var e,f=a.data();f&&(f.onEndFn=function(){e||(e=!0,clearTimeout(f.tT),c())},f.tProp=b,clearTimeout(f.tT),f.tT=setTimeout(function(){f.onEndFn()},1.5*d),qc(a))}function sc(a,b){if(a.length){var c=a.data();Hb?(a.css(ic(0)),c.onEndFn=dc,clearTimeout(c.tT)):a.stop();var d=tc(b,function(){return gc(a)});return a.css(hc(d)),d}}function tc(){for(var a,b=0,c=arguments.length;b<c&&(a=b?arguments[b]():arguments[b],"number"!==typeof a);b++);return a}function uc(a,b){return Math.round(a+(b-a)/1.5)}function vc(){return vc.p=vc.p||("https:"===c.protocol?"https://":"http://"),vc.p}function wc(a){var c=b.createElement("a");return c.href=a,c}function xc(a,b){if("string"!==typeof a)return a;a=wc(a);var c,d;if(a.host.match(/youtube\.com/)&&a.search){if(c=a.search.split("v=")[1]){var e=c.indexOf("&");-1!==e&&(c=c.substring(0,e)),d="youtube"}}else a.host.match(/youtube\.com|youtu\.be/)?(c=a.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),d="youtube"):a.host.match(/vimeo\.com/)&&(d="vimeo",c=a.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,""));return c&&d||!b||(c=a.href,d="custom"),c?{id:c,type:d,s:a.search.replace(/^\?/,""),p:vc()}:!1}function yc(a,b,c){var e,f,g=a.video;return"youtube"===g.type?(f=vc()+"img.youtube.com/vi/"+g.id+"/default.jpg",e=f.replace(/\/default.jpg$/,"/hqdefault.jpg"),a.thumbsReady=!0):"vimeo"===g.type?d.ajax({url:vc()+"vimeo.com/api/v2/video/"+g.id+".json",dataType:"jsonp",success:function(d){a.thumbsReady=!0,zc(b,{img:d[0].thumbnail_large,thumb:d[0].thumbnail_small},a.i,c)}}):a.thumbsReady=!0,{img:e,thumb:f}}function zc(a,b,c,e){for(var f=0,g=a.length;f<g;f++){var h=a[f];if(h.i===c&&h.thumbsReady){var i={videoReady:!0};i[Wb]=i[Yb]=i[Xb]=!1,e.splice(f,1,d.extend({},h,i,b));break}}}function Ac(a){function c(a,b,c){var f=a.children("img").eq(0),g=a.attr("href"),h=a.attr("src"),i=f.attr("src"),j=b.video,k=c?xc(g,j===!0):!1;k?g=!1:k=j,e(a,f,d.extend(b,{video:k,img:b.img||g||h||i,thumb:b.thumb||i||h||g}))}function e(a,b,c){var e=c.thumb&&c.img!==c.thumb,f=kc(c.width||a.attr("width")),g=kc(c.height||a.attr("height")),h=a.attr("alt"),i=a.attr("alt"),j=a.attr("title");i&&d.extend(c,{alt:i}),j&&d.extend(c,{title:j}),d.extend(c,{width:f,height:g,alt:h,thumbratio:Pc(c.thumbratio||kc(c.thumbwidth||b&&b.attr("width")||e||f)/kc(c.thumbheight||b&&b.attr("height")||e||g))})}var b=[];return a.children().each(function(){var a=d(this),f=Oc(d.extend(a.data(),{id:a.attr("id")}));if(a.is("a, img"))c(a,f,!0);else{if(a.is(":empty"))return;e(a,null,d.extend(f,{html:this,_html:a.html()}))}b.push(f)}),b}function Bc(a){return 0===a.offsetWidth&&0===a.offsetHeight}function Cc(a){return!d.contains(b.documentElement,a)}function Dc(a,b,c,d){return Dc.i||(Dc.i=1,Dc.ii=[!0]),d=d||Dc.i,"undefined"===typeof Dc.ii[d]&&(Dc.ii[d]=!0),a()?b():Dc.ii[d]&&setTimeout(function(){Dc.ii[d]&&Dc(a,b,c,d)},c||100),Dc.i++}function Ec(a){c.replace(c.protocol+"//"+c.host+c.pathname.replace(/^\/?/,"/")+c.search+"#"+a)}function Fc(a,b,c,d){var e=a.data(),f=e.measures;if(f&&(!e.l||e.l.W!==f.width||e.l.H!==f.height||e.l.r!==f.ratio||e.l.w!==b.w||e.l.h!==b.h||e.l.m!==c||e.l.p!==d)){var g=f.width,h=f.height,i=b.w/b.h,j=f.ratio>=i,k="scaledown"===c,l="contain"===c,m="cover"===c,n=Xc(d);j&&(k||l)||!j&&m?(g=ec(b.w,0,k?g:1/0),h=g/f.ratio):(j&&m||!j&&(k||l))&&(h=ec(b.h,0,k?h:1/0),g=h*f.ratio),a.css({width:g,height:h,left:mc(n.x,b.w-g),top:mc(n.y,b.h-h)}),e.l={W:f.width,H:f.height,r:f.ratio,w:b.w,h:b.h,m:c,p:d}}return!0}function Gc(a,b){var c=a[0];c.styleSheet?c.styleSheet.cssText=b:a.html(b)}function Hc(a,b,c){return b===c?!1:a<=b?"left":a>=c?"right":"left right"}function Ic(a,b,c,d){if(!c)return!1;if(!isNaN(a))return a-(d?0:1);for(var e,f=0,g=b.length;f<g;f++){var h=b[f];if(h.id===a){e=f;break}}return e}function Jc(a,b,c){c=c||{},a.each(function(){var f,a=d(this),e=a.data();e.clickOn||(e.clickOn=!0,d.extend(dd(a,{onStart:function(a){f=a,(c.onStart||dc).call(this,a)},onMove:c.onMove||dc,onTouchEnd:c.onTouchEnd||dc,onEnd:function(a){a.moved||b.call(this,f)}}),{noMove:!0}))})}function Kc(a,b){return'<div class="'+a+'">'+(b||"")+"</div>"}function Lc(a){for(var b=a.length;b;){var c=Math.floor(Math.random()*b--),d=a[b];a[b]=a[c],a[c]=d}return a}function Mc(a){return"[object Array]"==Object.prototype.toString.call(a)&&d.map(a,function(a){return d.extend({},a)})}function Nc(a,b,c){a.scrollLeft(b||0).scrollTop(c||0)}function Oc(a){if(a){var b={};return d.each(a,function(a,c){b[a.toLowerCase()]=c}),b}}function Pc(a){if(a){var b=+a;return isNaN(b)?(b=a.split("/"),+b[0]/+b[1]||e):b}}function Qc(a,b,c,d){b&&(a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent("on"+b,c))}function Rc(a){return!!a.getAttribute("disabled")}function Sc(a){return{tabindex:-1*a+"",disabled:a}}function Tc(a,b){Qc(a,"keyup",function(c){Rc(a)||13==c.keyCode&&b.call(a,c)})}function Uc(a,b){Qc(a,"focus",a.onfocusin=function(c){b.call(a,c)},!0)}function Vc(a,b){a.preventDefault?a.preventDefault():a.returnValue=!1,b&&a.stopPropagation&&a.stopPropagation()}function Wc(a){return a?">":"<"}function Xc(a){return a=(a+"").split(/\s+/),{x:nc(a[0])||ac,y:nc(a[1])||ac}}function Yc(a,b){var c=a.data(),e=Math.round(b.pos),f=function(){c.sliding=!1,(b.onEnd||dc)()};"undefined"!==typeof b.overPos&&b.overPos!==b.pos&&(e=b.overPos,f=function(){Yc(a,d.extend({},b,{overPos:b.pos,time:Math.max(Pb,b.time/2)}))});var g=d.extend(hc(e),b.width&&{width:b.width});c.sliding=!0,Hb?(a.css(d.extend(ic(b.time),g)),b.time>10?rc(a,"transform",f,b.time):f()):a.stop().animate(g,b.time,$b,f)}function Zc(a,b,c,e,f,g){var h="undefined"!==typeof g;if(h||(f.push(arguments),Array.prototype.push.call(arguments,f.length),!(f.length>1))){a=a||d(a),b=b||d(b);var i=a[0],j=b[0],k="crossfade"===e.method,l=function(){if(!l.done){l.done=!0;var a=(h||f.shift())&&f.shift();a&&Zc.apply(this,a),(e.onEnd||dc)(!!a)}},m=e.time/(g||1);c.removeClass(P+" "+O),a.stop().addClass(P),b.stop().addClass(O),k&&j&&a.fadeTo(0,0),a.fadeTo(k?m:0,1,k&&l),b.fadeTo(m,0,l),i&&k||j||l()}}function cd(a){var b=(a.touches||[])[0]||a;a._x=b.pageX,a._y=b.clientY,a._now=Date.now()}function dd(a,c){function p(a){return i=d(a.target),f.checked=l=m=o=!1,g||f.flow||a.touches&&a.touches.length>1||a.which>1||$c&&$c.type!==a.type&&ad||(l=c.select&&i.is(c.select,e))?l:(k="touchstart"===a.type,m=i.is("a, a *",e),j=f.control,n=f.noMove||f.noSwipe||j?16:f.snap?0:4,cd(a),h=$c=a,_c=a.type.replace(/down|start/,"move").replace(/Down/,"Move"),(c.onStart||dc).call(e,a,{control:j,$target:i}),g=f.flow=!0,void((!k||f.go)&&Vc(a)))}function q(a){if(a.touches&&a.touches.length>1||Mb&&!a.isPrimary||_c!==a.type||!g)return g&&r(),void(c.onTouchEnd||dc)();cd(a);var b=Math.abs(a._x-h._x),d=Math.abs(a._y-h._y),i=b-d,j=(f.go||f.x||i>=0)&&!f.noSwipe,l=i<0;k&&!f.checked?(g=j)&&Vc(a):(Vc(a),(c.onMove||dc).call(e,a,{touch:k})),!o&&Math.sqrt(Math.pow(b,2)+Math.pow(d,2))>n&&(o=!0),f.checked=f.checked||j||l}function r(a){(c.onTouchEnd||dc)();var b=g;f.control=g=!1,b&&(f.flow=!1),!b||m&&!f.checked||(a&&Vc(a),ad=!0,clearTimeout(bd),bd=setTimeout(function(){ad=!1},1e3),(c.onEnd||dc).call(e,{moved:o,$target:i,control:j,touch:k,startEvent:h,aborted:!a||"MSPointerCancel"===a.type}))}function s(){f.flow||setTimeout(function(){f.flow=!0},10)}function t(){f.flow&&setTimeout(function(){f.flow=!1},Ob)}var g,h,i,j,k,l,m,n,o,e=a[0],f={};return Mb?(Qc(e,"MSPointerDown",p),Qc(b,"MSPointerMove",q),Qc(b,"MSPointerCancel",r),Qc(b,"MSPointerUp",r)):(Qc(e,"touchstart",p),Qc(e,"touchmove",q),Qc(e,"touchend",r),Qc(b,"touchstart",s),Qc(b,"touchend",t),Qc(b,"touchcancel",t),Bb.on("scroll",t),a.on("mousedown",p),Cb.on("mousemove",q).on("mouseup",r)),a.on("click","a",function(a){f.checked&&Vc(a)}),f}function ed(a,b){function v(d,e){u=!0,g=h=d._x,m=d._now,l=[[m,g]],i=j=f.noMove||e?0:sc(a,(b.getPos||dc)()),(b.onStart||dc).call(c,d)}function w(a,b){o=f.min,p=f.max,q=f.snap,r=a.altKey,u=t=!1,s=b.control,s||e.sliding||v(a)}function x(d,e){f.noSwipe||(u||v(d),h=d._x,l.push([d._now,h]),j=i-(g-h),k=Hc(j,o,p),j<=o?j=uc(j,o):j>=p&&(j=uc(j,p)),f.noMove||(a.css(hc(j)),t||(t=!0,e.touch||Mb||a.addClass(cb)),(b.onMove||dc).call(c,d,{pos:j,edge:k})))}function y(e){if(!f.noSwipe||!e.moved){u||v(e.startEvent,!0),e.touch||Mb||a.removeClass(cb),n=Date.now();for(var k,m,s,w,x,y,z,A,C,g=n-Ob,t=null,B=Pb,D=b.friction,E=l.length-1;E>=0;E--){if(k=l[E][0],m=Math.abs(k-g),null===t||m<s)t=k,w=l[E][1];else if(t===g||m>s)break;s=m}z=ec(j,o,p);var F=w-h,G=F>=0,H=n-t,I=H>Ob,J=!I&&j!==i&&z===j;q&&(z=ec(Math[J?G?"floor":"ceil":"round"](j/q)*q,o,p),o=p=z),J&&(q||z===j)&&(C=-(F/H),B*=ec(Math.abs(C),b.timeLow,b.timeHigh),x=Math.round(j+C*B/D),q||(z=x),(!G&&x>p||G&&x<o)&&(y=G?o:p,A=x-y,q||(z=y),A=ec(z+.03*A,y-50,y+50),B=Math.abs((j-A)/(C/D)))),B*=r?10:1,(b.onEnd||dc).call(c,d.extend(e,{moved:e.moved||I&&q,pos:j,newPos:z,overPos:A,time:B}))}}var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,c=a[0],e=a.data(),f={};return f=d.extend(dd(b.$wrap,d.extend({},b,{onStart:w,onMove:x,onEnd:y})),f)}function fd(a,b){var d,e,f,c=a[0],g={prevent:{}};return Qc(c,Nb,function(a){var c=a.wheelDeltaY||-1*a.deltaY||0,h=a.wheelDeltaX||-1*a.deltaX||0,i=Math.abs(h)&&!Math.abs(c),j=Wc(h<0),k=e===j,l=Date.now(),m=l-f<Ob;e=j,f=l,i&&g.ok&&(!g.prevent[j]||d)&&(Vc(a,!0),d&&k&&m||(b.shift&&(d=!0,clearTimeout(g.t),g.t=setTimeout(function(){d=!1},Qb)),(b.onEnd||dc)(a,b.shift?j:h)))}),g}function gd(){d.each(d.Fotorama.instances,function(a,b){b.index=a})}function hd(a){d.Fotorama.instances.push(a),gd()}function id(a){d.Fotorama.instances.splice(a.index,1),gd()}var f="fotorama",g="fullscreen",h=f+"__wrap",i=h+"--css2",j=h+"--css3",k=h+"--video",l=h+"--fade",m=h+"--slide",n=h+"--no-controls",o=h+"--no-shadows",p=h+"--pan-y",q=h+"--rtl",r=h+"--only-active",s=h+"--no-captions",t=h+"--toggle-arrows",u=f+"__stage",v=u+"__frame",w=v+"--video",x=u+"__shaft",y=f+"__grab",z=f+"__pointer",A=f+"__arr",B=A+"--disabled",C=A+"--prev",D=A+"--next",F=f+"__nav",G=F+"-wrap",H=F+"__shaft",I=F+"--dots",J=F+"--thumbs",K=F+"__frame",L=K+"--dot",M=K+"--thumb",N=f+"__fade",O=N+"-front",P=N+"-rear",Q=f+"__shadow",R=Q+"s",S=R+"--left",T=R+"--right",U=f+"__active",V=f+"__select",W=f+"--hidden",X=f+"--fullscreen",Y=f+"__fullscreen-icon",Z=f+"__error",$=f+"__loading",_=f+"__loaded",ab=_+"--full",bb=_+"--img",cb=f+"__grabbing",db=f+"__img",eb=db+"--full",fb=f+"__dot",gb=f+"__thumb",hb=gb+"-border",ib=f+"__html",jb=f+"__video",kb=jb+"-play",lb=jb+"-close",mb=f+"__caption",nb=f+"__caption__wrap",ob=f+"__spinner",pb='" tabindex="0" role="button',qb=d&&d.fn.jquery.split(".");if(!qb||qb[0]<1||1==qb[0]&&qb[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var rb={},sb=function(a,b,c){function y(a){i.cssText=a}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b){for(var d in a){var e=a[d];if(!B(e,"-")&&i[e]!==c)return"pfx"==b?e:!0}return!1}function D(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}function E(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return A(b,"string")||A(b,"undefined")?C(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),D(e,b,c))}var j,u,x,d="2.6.2",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,l=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},s=[],t=s.slice,v=function(a,c,d,e){var h,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))for(;d--;)j=b.createElement("div"),j.id=e?e[d]:g+(d+1),l.appendChild(j);return h=["­",'<style id="s',g,'">',a,"</style>"].join(""),l.id=g,(m?l:n).innerHTML+=h,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=f.style.overflow,f.style.overflow="hidden",f.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),f.style.overflow=k),!!i},w={}.hasOwnProperty;x=A(w,"undefined")||A(w.call,"undefined")?function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")}:function(a,b){return w.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=t.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(t.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(t.call(arguments)))};return d}),p.csstransforms3d=function(){var a=!!E("perspective");return a};for(var F in p)x(p,F)&&(u=F.toLowerCase(),e[u]=p[F](),s.push((e[u]?"":"no-")+u));return e.addTest=function(a,b){if("object"==typeof a)for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{if(a=a.toLowerCase(),e[a]!==c)return e;b="function"==typeof b?b():b,"undefined"!==typeof enableClasses&&enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),h=j=null,e._version=d,e._prefixes=l,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return C([a])},e.testAllProps=E,e.testStyles=v,e.prefixed=function(a,b,c){return b?E(a,b,c):E(a,"pfx")},e}(a,b),tb={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},ub="webkit moz o ms khtml".split(" ");if("undefined"!=typeof b.cancelFullScreen)tb.ok=!0;else for(var vb=0,wb=ub.length;vb<wb;vb++)if(tb.prefix=ub[vb],"undefined"!=typeof b[tb.prefix+"CancelFullScreen"]){tb.ok=!0;break}tb.ok&&(tb.event=tb.prefix+"fullscreenchange",tb.is=function(){switch(this.prefix){case"":return b.fullScreen;case"webkit":return b.webkitIsFullScreen;default:return b[this.prefix+"FullScreen"]}},tb.request=function(a){return""===this.prefix?a.requestFullScreen():a[this.prefix+"RequestFullScreen"]()},tb.cancel=function(){return"moz"!=this.prefix?""===this.prefix?b.cancelFullScreen():b[this.prefix+"CancelFullScreen"]():void 0});var xb,yb={lines:12,length:5,width:2,radius:7,corners:1,rotate:15,color:"rgba(128, 128, 128, .75)",hwaccel:!0},zb={top:"auto",left:"auto",className:""};!function(a,b){xb=b()}(this,function(){function f(a,c){var e,d=b.createElement(a||"div");for(e in c)d[e]=c[e];return d}function g(a){for(var b=1,c=arguments.length;b<c;b++)a.appendChild(arguments[b]);return a}function i(a,b,e,f){var g=["opacity",b,~~(100*a),e,f].join("-"),i=.01+e/f*100,j=Math.max(1-(1-a)/b*(100-i),a),k=d.substring(0,d.indexOf("Animation")).toLowerCase(),l=k&&"-"+k+"-"||"";return c[g]||(h.insertRule("@"+l+"keyframes "+g+"{0%{opacity:"+j+"}"+i+"%{opacity:"+a+"}"+(i+.01)+"%{opacity:1}"+(i+b)%100+"%{opacity:"+a+"}100%{opacity:"+j+"}}",h.cssRules.length),c[g]=1),g}function j(b,c){var f,g,d=b.style;for(c=c.charAt(0).toUpperCase()+c.slice(1),g=0;g<a.length;g++)if(f=a[g]+c,d[f]!==e)return f;return d[c]!==e?c:void 0}function k(a,b){for(var c in b)a.style[j(a,c)||c]=b[c];return a}function l(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]===e&&(a[d]=c[d])}return a}function m(a){for(var b={x:a.offsetLeft,y:a.offsetTop};a=a.offsetParent;)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}function n(a,b){return"string"==typeof a?a:a[b%a.length]}function p(a){return"undefined"==typeof this?new p(a):void(this.opts=l(a||{},p.defaults,o))}function q(){function a(a,b){return f("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',b)}h.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(b,c){function f(){return k(a("group",{coordsize:e+" "+e,coordorigin:-d+" "+-d}),{width:e,height:e})}function l(b,e,h){g(i,g(k(f(),{rotation:360/c.lines*b+"deg",left:~~e}),g(k(a("roundrect",{arcsize:c.corners}),{width:d,height:c.width,left:c.radius,top:-c.width>>1,filter:h}),a("fill",{color:n(c.color,b),opacity:c.opacity}),a("stroke",{opacity:0}))))}var j,d=c.length+c.width,e=2*d,h=2*-(c.width+c.length)+"px",i=k(f(),{position:"absolute",top:h,left:h});if(c.shadow)for(j=1;j<=c.lines;j++)l(j,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(j=1;j<=c.lines;j++)l(j);return g(b,i)},p.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var d,a=["webkit","Moz","ms","O"],c={},h=function(){var a=f("style",{type:"text/css"});return g(b.getElementsByTagName("head")[0],a),a.sheet||a.styleSheet}(),o={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};p.defaults={},l(p.prototype,{spin:function(a){this.stop();var h,i,b=this,c=b.opts,e=b.el=k(f(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex}),g=c.radius+c.length+c.width;if(a&&(a.insertBefore(e,a.firstChild||null),i=m(a),h=m(e),k(e,{left:("auto"==c.left?i.x-h.x+(a.offsetWidth>>1):parseInt(c.left,10)+g)+"px",top:("auto"==c.top?i.y-h.y+(a.offsetHeight>>1):parseInt(c.top,10)+g)+"px"})),e.setAttribute("role","progressbar"),b.lines(e,b.opts),!d){var n,j=0,l=(c.lines-1)*(1-c.direction)/2,o=c.fps,p=o/c.speed,q=(1-c.opacity)/(p*c.trail/100),r=p/c.lines;!function s(){j++;for(var a=0;a<c.lines;a++)n=Math.max(1-(j+(c.lines-a)*r)%p*q,c.opacity),b.opacity(e,a*c.direction+l,n,c);b.timeout=b.el&&setTimeout(s,~~(1e3/o))}()}return b},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=e),this},lines:function(a,b){function j(a,d){return k(f(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:d,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*c+b.rotate)+"deg) translate("+b.radius+"px,0)",borderRadius:(b.corners*b.width>>1)+"px"})}for(var h,c=0,e=(b.lines-1)*(1-b.direction)/2;c<b.lines;c++)h=k(f(),{position:"absolute",top:1+~(b.width/2)+"px",transform:b.hwaccel?"translate3d(0,0,0)":"",opacity:b.opacity,animation:d&&i(b.opacity,b.trail,e+c*b.direction,b.lines)+" "+1/b.speed+"s linear infinite"}),b.shadow&&g(h,k(j("#000","0 0 4px #000"),{top:"2px"})),g(a,g(h,j(n(b.color,c),"0 0 1px rgba(0,0,0,.1)")));return a},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var r=k(f("group"),{behavior:"url(#default#VML)"});return!j(r,"transform")&&r.adj?q():d=j(r,"animation"),p});var Db,Eb,Bb=d(a),Cb=d(b),Fb="quirks"===c.hash.replace("#",""),Gb=sb.csstransforms3d,Hb=Gb&&!Fb,Ib=Gb||"CSS1Compat"===b.compatMode,Jb=tb.ok,Kb=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),Lb=!Hb||Kb,Mb=navigator.msPointerEnabled,Nb="onwheel"in b.createElement("div")?"wheel":b.onmousewheel!==e?"mousewheel":"DOMMouseScroll",Ob=250,Pb=300,Qb=1400,Rb=5e3,Sb=2,Tb=64,Ub=500,Vb=333,Wb="$stageFrame",Xb="$navDotFrame",Yb="$navThumbFrame",Zb="auto",$b=Ab([.1,0,.25,1]),_b=99999,ac="50%",bc={width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:Sb,glimpse:0,fit:"contain",position:ac,thumbposition:ac,nav:"dots",navposition:"bottom",navwidth:null,thumbwidth:Tb,thumbheight:Tb,thumbmargin:Sb,thumbborderwidth:Sb,thumbfit:"cover",allowfullscreen:!1,transition:"slide",clicktransition:null,transitionduration:Pb,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!1,enableifsingleframe:!1,controlsonstart:!0,shuffle:!1,direction:"ltr",shadows:!0,spinner:null},cc={left:!0,right:!0,down:!1,up:!1,space:!1,home:!1,end:!1};Dc.stop=function(a){Dc.ii[a]=!1};var $c,_c,ad,bd;jQuery.Fotorama=function(a,e){function Td(){d.each(Q,function(a,b){if(!b.i){b.i=cb++;var c=xc(b.video,!0);if(c){var d={};b.video=c,b.img||b.thumb?b.thumbsReady=!0:d=yc(b,Q,E),zc(Q,{img:d.img,thumb:d.thumb},b.i,E)}}})}function Ud(a){return yd[a]||E.fullScreen}function Vd(a){var b="keydown."+f,c=f+N,d="keydown."+c,h="resize."+c+" orientationchange."+c;a?(Cb.on(d,function(a){var b,c;Rc&&27===a.keyCode?(b=!0,Le(Rc,!0,!0)):(E.fullScreen||e.keyboard&&!E.index)&&(27===a.keyCode?(b=!0,E.cancelFullScreen()):a.shiftKey&&32===a.keyCode&&Ud("space")||37===a.keyCode&&Ud("left")||38===a.keyCode&&Ud("up")?c="<":32===a.keyCode&&Ud("space")||39===a.keyCode&&Ud("right")||40===a.keyCode&&Ud("down")?c=">":36===a.keyCode&&Ud("home")?c="<<":35===a.keyCode&&Ud("end")&&(c=">>")),(b||c)&&Vc(a),c&&E.show({index:c,slow:a.altKey,user:!0})}),E.index||Cb.off(b).on(b,"textarea, input, select",function(a){!Eb.hasClass(g)&&a.stopPropagation()}),Bb.on(h,E.resize)):(Cb.off(d),Bb.off(h))}function Wd(b){b!==Wd.f&&(b?(a.html("").addClass(f+" "+O).append(ub).before(rb).before(sb),hd(E)):(ub.detach(),rb.detach(),sb.detach(),a.html(jb.urtext).removeClass(O),id(E)),Vd(b),Wd.f=b)}function Xd(){Q=E.data=Q||Mc(e.data)||Ac(a),qb=E.size=Q.length,!We.ok&&e.shuffle&&Lc(Q),Td(),Xc=ae(Xc),qb&&Wd(!0)}function Yd(){var a=qb<2&&!e.enableifsingleframe||Rc;Cd.noMove=a||rd,Cd.noSwipe=a||!e.swipe,!vd&&Ab.toggleClass(y,!e.click&&!Cd.noMove&&!Cd.noSwipe),Mb&&ub.toggleClass(p,!Cd.noSwipe)}function Zd(a){a===!0&&(a=""),e.autoplay=Math.max(+a||Rb,1.5*ud)}function $d(){function b(b,c){a[b?"add":"remove"].push(c)}E.options=e=Oc(e),rd="crossfade"===e.transition||"dissolve"===e.transition,ld=e.loop&&(qb>2||rd&&(!vd||"slide"!==vd)),ud=+e.transitionduration||Pb,xd="rtl"===e.direction,yd=d.extend({},e.keyboard&&cc,e.keyboard);var a={add:[],remove:[]};qb>1||e.enableifsingleframe?(md=e.nav,od="top"===e.navposition,a.remove.push(V),Nb.toggle(!!e.arrows)):(md=!1,Nb.hide()),ke(),wc=new xb(d.extend(yb,e.spinner,zb,{direction:xd?-1:1})),ue(),ve(),e.autoplay&&Zd(e.autoplay),sd=kc(e.thumbwidth)||Tb,td=kc(e.thumbheight)||Tb,Dd.ok=Fd.ok=e.trackpad&&!Lb,Yd(),De(e,[Ad]),nd="thumbs"===md,nd?(ne(qb,"navThumb"),ac=dc,Qd=Yb,Gc(rb,d.Fotorama.jst.style({w:sd,h:td,b:e.thumbborderwidth,m:e.thumbmargin,s:N,q:!Ib})),Sb.addClass(J).removeClass(I)):"dots"===md?(ne(qb,"navDot"),ac=bc,Qd=Xb,Sb.addClass(I).removeClass(J)):(md=!1,Sb.removeClass(J+" "+I)),md&&(od?Qb.insertBefore(vb):Qb.insertAfter(vb),re.nav=!1,re(ac,$b,"nav")),pd=e.allowfullscreen,pd?(lc.prependTo(vb),qd=Jb&&"native"===pd):(lc.detach(),qd=!1),b(rd,l),b(!rd,m),b(!e.captions,s),b(xd,q),b("always"!==e.arrows,t),wd=e.shadows&&!Lb,b(!wd,o),ub.addClass(a.add.join(" ")).removeClass(a.remove.join(" ")),zd=d.extend({},e)}function _d(a){return a<0?(qb+a%qb)%qb:a>=qb?a%qb:a}function ae(a){return ec(a,0,qb-1)}function be(a){return ld?_d(a):ae(a)}function ce(a){return a>0||ld?a-1:!1}function de(a){return a<qb-1||ld?a+1:!1}function ee(){Cd.min=ld?-1/0:-oc(qb-1,Ad.w,e.margin,ad),Cd.max=ld?1/0:-oc(0,Ad.w,e.margin,ad),Cd.snap=Ad.w+e.margin}function fe(){Ed.min=Math.min(0,Ad.nw-$b.width()),Ed.max=0,$b.toggleClass(y,!(Ed.noMove=Ed.min===Ed.max))}function ge(a,b,c){if("number"===typeof a){a=new Array(a);var e=!0}return d.each(a,function(a,d){if(e&&(d=a),"number"===typeof d){var f=Q[_d(d)];if(f){var g="$"+b+"Frame",h=f[g];c.call(this,a,d,f,h,g,h&&h.data())}}})}function he(a,b,c,d){(!Bd||"*"===Bd&&d===kd)&&(a=nc(e.width)||nc(a)||Ub,b=nc(e.height)||nc(b)||Vb,E.resize({width:a,ratio:e.ratio||c||a/b},0,d!==kd&&"*"))}function ie(a,b,c,f,g,h){ge(a,b,function(a,i,j,k,l,m){function u(a){var b=_d(i);Ee(a,{index:b,src:s,frame:Q[b]})}function v(){p.remove(),d.Fotorama.cache[s]="error",j.html&&"stage"===b||!t||t===s?(!s||j.html||n?"stage"===b&&(k.trigger("f:load").removeClass($+" "+Z).addClass(_),u("load"),he()):(k.trigger("f:error").removeClass($).addClass(Z),u("error")),m.state="error",!(qb>1&&Q[i]===j)||j.html||j.deleted||j.video||n||(j.deleted=!0,E.splice(i,1))):(j[r]=s=t,ie([i],b,c,f,g,!0))}function w(){d.Fotorama.measures[s]=q.measures=d.Fotorama.measures[s]||{width:o.width,height:o.height,ratio:o.width/o.height},he(q.measures.width,q.measures.height,q.measures.ratio,i),p.off("load error").addClass(db+(n?" "+eb:"")).prependTo(k),Fc(p,("function"===typeof c?c():c)||Ad,f||j.fit||e.fit,g||j.position||e.position),d.Fotorama.cache[s]=m.state="loaded",setTimeout(function(){k.trigger("f:load").removeClass($+" "+Z).addClass(_+" "+(n?ab:bb)),"stage"===b?u("load"):(j.thumbratio===Zb||!j.thumbratio&&e.thumbratio===Zb)&&(j.thumbratio=q.measures.ratio,Ue())},0)}function x(){var a=10;Dc(function(){return!Od||!a--&&!Lb},function(){w()})}if(k){var n=E.fullScreen&&j.full&&j.full!==j.img&&!m.$full&&"stage"===b;if(!m.$img||h||n){var o=new Image,p=d(o),q=p.data();m[n?"$full":"$img"]=p;var r="stage"===b?n?"full":"img":"thumb",s=j[r],t=n?null:j["stage"===b?"thumb":"img"];if("navThumb"===b&&(k=m.$wrap),!s)return void v();d.Fotorama.cache[s]?!function y(){"error"===d.Fotorama.cache[s]?v():"loaded"===d.Fotorama.cache[s]?setTimeout(x,0):setTimeout(y,100)}():(d.Fotorama.cache[s]="*",p.on("load",x).on("error",v)),m.state="",m.data.hasOwnProperty("alt")&&(o.alt=m.data.alt),m.data.hasOwnProperty("title")&&(o.title=m.data.title),o.src=s}}})}function je(a){Bc.append(wc.spin().el).appendTo(a)}function ke(){Bc.detach(),wc&&wc.stop()}function le(){var a=$c[Wb];a&&!a.data().state&&(je(a),a.on("f:load f:error",function(){a.off("f:load f:error"),ke()}))}function me(a){Tc(a,Re),Uc(a,function(){setTimeout(function(){Nc(Sb)},0),ye({time:ud,guessIndex:d(this).data().eq,minMax:Ed})})}function ne(a,b){ge(a,b,function(a,c,e,f,g,h){if(!f){f=e[g]=ub[g].clone(),h=f.data(),h.data=e;var i=f[0];"stage"===b?(e.html&&d('<div class="'+ib+'"></div>').append(e._html?d(e.html).removeAttr("id").html(e._html):e.html).appendTo(f),e.caption&&d(Kc(mb,Kc(nb,e.caption))).appendTo(f),e.video&&f.addClass(w).append(rc.clone()),Uc(i,function(){setTimeout(function(){Nc(vb)},0),Oe({index:h.eq,user:!0})}),Fb=Fb.add(f)):"navDot"===b?(me(i),bc=bc.add(f)):"navThumb"===b&&(me(i),h.$wrap=f.children(":first"),dc=dc.add(f),e.video&&h.$wrap.append(rc.clone()))}})}function oe(a,b,c,d){return a&&a.length&&Fc(a,b,c,d)}function pe(a){ge(a,"stage",function(a,b,c,f,g,h){if(f){var i=_d(b),j=c.fit||e.fit,k=c.position||e.position;h.eq=i,Md[Wb][i]=f.css(d.extend({left:rd?0:oc(b,Ad.w,e.margin,ad)},rd&&ic(0))),Cc(f[0])&&(f.appendTo(Ab),Le(c.$video)),oe(h.$img,Ad,j,k),oe(h.$full,Ad,j,k)}})}function qe(a,b){if("thumbs"===md&&!isNaN(a)){var c=-a,f=-a+Ad.nw;dc.each(function(){var a=d(this),g=a.data(),h=g.eq,i=function(){return{h:td,w:g.w}},j=i(),k=Q[h]||{},l=k.thumbfit||e.thumbfit,m=k.thumbposition||e.thumbposition;j.w=g.w,g.l+g.w<c||g.l>f||oe(g.$img,j,l,m)||b&&ie([h],"navThumb",i,l,m)})}}function re(a,b,c){if(!re[c]){var f="nav"===c&&nd,g=0;a.filter(function(){for(var a,b=d(this),c=b.data(),e=0,f=Q.length;e<f;e++)if(c.data===Q[e]){a=!0,c.eq=e;break}return a||b.remove()&&!1}),[].sort.call(a,function(a,b){return d(a).data().eq-d(b).data().eq}),b.append(a.each(function(){if(f){var a=d(this),b=a.data(),c=Math.round(td*b.data.thumbratio)||sd;b.l=g,b.w=c,a.css({width:c}),g+=c+e.thumbmargin}})),re[c]=!0}}function se(a){return a-Rd>Ad.w/3}function te(a){return!ld&&(!(Xc+a)||!(Xc-qb+a))&&!Rc}function ue(){var a=te(0),b=te(1);Gb.toggleClass(B,a).attr(Sc(a)),Kb.toggleClass(B,b).attr(Sc(b))}function ve(){Dd.ok&&(Dd.prevent={"<":te(0),">":te(1)})}function we(a){var c,d,b=a.data();return nd?(c=b.l,d=b.w):(c=a.position().left,d=a.width()),{c:c+d/2,min:-c+10*e.thumbmargin,max:-c+Ad.w-d-10*e.thumbmargin}}function xe(a){var b=$c[Qd].data();Yc(jc,{time:1.2*a,pos:b.l,width:b.w-2*e.thumbborderwidth})}function ye(a){var b=Q[a.guessIndex][Qd];if(b){var c=Ed.min!==Ed.max,d=a.minMax||c&&we($c[Qd]),e=c&&(a.keep&&ye.l?ye.l:ec((a.coo||Ad.nw/2)-we(b).c,d.min,d.max)),f=c&&ec(e,Ed.min,Ed.max),g=1.1*a.time;Yc($b,{time:g,pos:f||0,onEnd:function(){qe(f,!0)}}),Ke(Sb,Hc(f,Ed.min,Ed.max)),ye.l=e}}function ze(){Ae(Qd),Ld[Qd].push($c[Qd].addClass(U))}function Ae(a){for(var b=Ld[a];b.length;)b.shift().removeClass(U)}function Be(a){var b=Md[a];d.each(_c,function(a,c){delete b[_d(c)]}),d.each(b,function(a,c){delete b[a],c.detach()})}function Ce(a){ad=bd=Xc;var b=$c[Wb];b&&(Ae(Wb),Ld[Wb].push(b.addClass(U)),a||E.show.onEnd(!0),sc(Ab,0,!0),Be(Wb),pe(_c),ee(),fe())}function De(a,b){a&&d.each(b,function(b,c){c&&d.extend(c,{width:a.width||c.width,height:a.height,minwidth:a.minwidth,maxwidth:a.maxwidth,minheight:a.minheight,maxheight:a.maxheight,ratio:Pc(a.ratio)})})}function Ee(b,c){a.trigger(f+":"+b,[E,c])}function Fe(){clearTimeout(Ge.t),Od=1,e.stopautoplayontouch?E.stopAutoplay():Jd=!0}function Ge(){Od&&(e.stopautoplayontouch||(He(),Ie()),Ge.t=setTimeout(function(){Od=0},Pb+Ob))}function He(){Jd=!(!Rc&&!Kd)}function Ie(){if(clearTimeout(Ie.t),Dc.stop(Ie.w),!e.autoplay||Jd)return void(E.autoplay&&(E.autoplay=!1,Ee("stopautoplay")));E.autoplay||(E.autoplay=!0,Ee("startautoplay"));var a=Xc,b=$c[Wb].data();Ie.w=Dc(function(){return b.state||a!==Xc},function(){Ie.t=setTimeout(function(){if(!Jd&&a===Xc){var b=jd,c=Q[b][Wb].data();Ie.w=Dc(function(){return c.state||b!==jd},function(){Jd||b!==jd||E.show(ld?Wc(!xd):jd)})}},e.autoplay)})}function Je(){E.fullScreen&&(E.fullScreen=!1,Jb&&tb.cancel(P),Eb.removeClass(g),Db.removeClass(g),a.removeClass(X).insertAfter(sb),Ad=d.extend({},Nd),Le(Rc,!0,!0),Qe("x",!1),E.resize(),ie(_c,"stage"),Nc(Bb,Hd,Gd),Ee("fullscreenexit"))}function Ke(a,b){wd&&(a.removeClass(S+" "+T),b&&!Rc&&a.addClass(b.replace(/^|\s/g," "+R+"--")))}function Le(a,b,c){b&&(ub.removeClass(k),Rc=!1,Yd()),a&&a!==Rc&&(a.remove(),Ee("unloadvideo")),c&&(He(),Ie())}function Me(a){ub.toggleClass(n,a)}function Ne(a){if(!Cd.flow){var b=a?a.pageX:Ne.x,c=b&&!te(se(b))&&e.click;Ne.p!==c&&vb.toggleClass(z,c)&&(Ne.p=c,Ne.x=b)}}function Oe(a){clearTimeout(Oe.t),e.clicktransition&&e.clicktransition!==e.transition?setTimeout(function(){var b=e.transition;E.setOptions({transition:e.clicktransition}),vd=b,Oe.t=setTimeout(function(){E.show(a)},10)},0):E.show(a)}function Pe(a,b){var c=a.target,f=d(c);f.hasClass(kb)?E.playVideo():c===qc?E.toggleFullScreen():Rc?c===vc&&Le(Rc,!0,!0):b?Me():e.click&&Oe({index:a.shiftKey||Wc(se(a._x)),slow:a.altKey,user:!0})}function Qe(a,b){Cd[a]=Ed[a]=b}function Re(a){var b=d(this).data().eq;Oe({index:b,slow:a.altKey,user:!0,coo:a._x-Sb.offset().left})}function Se(a){Oe({index:Nb.index(this)?">":"<",slow:a.altKey,user:!0})}function Te(a){Uc(a,function(){setTimeout(function(){Nc(vb)},0),Me(!1)})}function Ue(){if(Xd(),$d(),!Ue.i){Ue.i=!0;var a=e.startindex;(a||e.hash&&c.hash)&&(kd=Ic(a||c.hash.replace(/^#/,""),Q,0===E.index||a,a)),Xc=ad=bd=cd=kd=be(kd)||0}if(qb){if(Ve())return;Rc&&Le(Rc,!0),_c=[],Be(Wb),Ue.ok=!0,E.show({index:Xc,time:0}),E.resize()}else E.destroy()}function Ve(){return!Ve.f===xd?(Ve.f=xd,Xc=qb-1-Xc,E.reverse(),!0):void 0}function We(){We.ok||(We.ok=!0,Ee("ready"))}Db=d("html"),Eb=d("body");
- var Q,qb,ac,wc,Rc,$c,_c,ad,bd,cd,dd,gd,jd,kd,ld,md,nd,od,pd,qd,rd,sd,td,ud,vd,wd,xd,yd,Bd,Gd,Hd,Id,Jd,Kd,Nd,Od,Pd,Qd,E=this,N=Date.now(),O=f+N,P=a[0],cb=1,jb=a.data(),rb=d("<style></style>"),sb=d(Kc(W)),ub=d(Kc(h)),vb=d(Kc(u)).appendTo(ub),Ab=(vb[0],d(Kc(x)).appendTo(vb)),Fb=d(),Gb=d(Kc(A+" "+C+pb)),Kb=d(Kc(A+" "+D+pb)),Nb=Gb.add(Kb).appendTo(vb),Qb=d(Kc(G)),Sb=d(Kc(F)).appendTo(Qb),$b=d(Kc(H)).appendTo(Sb),bc=d(),dc=d(),jc=(Ab.data(),$b.data(),d(Kc(hb)).appendTo($b)),lc=d(Kc(Y+pb)),qc=lc[0],rc=d(Kc(kb)),uc=d(Kc(lb)).appendTo(vb),vc=uc[0],Bc=d(Kc(ob)),Xc=!1,zd={},Ad={},Cd={},Dd={},Ed={},Fd={},Ld={},Md={},Rd=0,Sd=[];ub[Wb]=d(Kc(v)),ub[Yb]=d(Kc(K+" "+M+pb,Kc(gb))),ub[Xb]=d(Kc(K+" "+L+pb,Kc(fb))),Ld[Wb]=[],Ld[Yb]=[],Ld[Xb]=[],Md[Wb]={},ub.addClass(Hb?j:i).toggleClass(n,!e.controlsonstart),jb.fotorama=this,E.startAutoplay=function(a){return E.autoplay?this:(Jd=Kd=!1,Zd(a||e.autoplay),Ie(),this)},E.stopAutoplay=function(){return E.autoplay&&(Jd=Kd=!0,Ie()),this},E.show=function(a){var b;"object"!==typeof a?(b=a,a={}):b=a.index,b=">"===b?bd+1:"<"===b?bd-1:"<<"===b?0:">>"===b?qb-1:b,b=isNaN(b)?Ic(b,Q,!0):b,b="undefined"===typeof b?Xc||0:b,E.activeIndex=Xc=be(b),dd=ce(Xc),gd=de(Xc),jd=_d(Xc+(xd?-1:1)),_c=[Xc,dd,gd],bd=ld?b:Xc;var c=Math.abs(cd-bd),d=tc(a.time,function(){return Math.min(ud*(1+(c-1)/12),2*ud)}),f=a.overPos;a.slow&&(d*=10);var g=$c;E.activeFrame=$c=Q[Xc];var h=g===$c&&!a.user;Le(Rc,$c.i!==Q[_d(ad)].i),ne(_c,"stage"),pe(Lb?[bd]:[bd,ce(bd),de(bd)]),Qe("go",!0),h||Ee("show",{user:a.user,time:d}),Jd=!0;var i=E.show.onEnd=function(b){if(!i.ok){if(i.ok=!0,b||Ce(!0),h||Ee("showend",{user:a.user}),!b&&vd&&vd!==e.transition)return E.setOptions({transition:vd}),void(vd=!1);le(),ie(_c,"stage"),Qe("go",!1),ve(),Ne(),He(),Ie()}};if(rd){var j=$c[Wb],k=Xc!==cd?Q[cd][Wb]:null;Zc(j,k,Fb,{time:d,method:e.transition,onEnd:i},Sd)}else Yc(Ab,{pos:-oc(bd,Ad.w,e.margin,ad),overPos:f,time:d,onEnd:i});if(ue(),md){ze();var l=ae(Xc+ec(bd-cd,-1,1));ye({time:d,coo:l!==Xc&&a.coo,guessIndex:"undefined"!==typeof a.coo?l:Xc,keep:h}),nd&&xe(d)}return Id="undefined"!==typeof cd&&cd!==Xc,cd=Xc,e.hash&&Id&&!E.eq&&Ec($c.id||Xc+1),this},E.requestFullScreen=function(){return pd&&!E.fullScreen&&(Gd=Bb.scrollTop(),Hd=Bb.scrollLeft(),Nc(Bb),Qe("x",!0),Nd=d.extend({},Ad),a.addClass(X).appendTo(Eb.addClass(g)),Db.addClass(g),Le(Rc,!0,!0),E.fullScreen=!0,qd&&tb.request(P),E.resize(),ie(_c,"stage"),le(),Ee("fullscreenenter")),this},E.cancelFullScreen=function(){return qd&&tb.is()?tb.cancel(b):Je(),this},E.toggleFullScreen=function(){return E[(E.fullScreen?"cancel":"request")+"FullScreen"]()},Qc(b,tb.event,function(){!Q||tb.is()||Rc||Je()}),E.resize=function(a){if(!Q)return this;var b=arguments[1]||0,c=arguments[2];De(E.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:Oc(a),[Ad,c||E.fullScreen||e]);var d=Ad.width,f=Ad.height,g=Ad.ratio,h=Bb.height()-(md?Sb.height():0);return nc(d)&&(ub.addClass(r).css({width:d,minWidth:Ad.minwidth||0,maxWidth:Ad.maxwidth||_b}),d=Ad.W=Ad.w=ub.width(),Ad.nw=md&&mc(e.navwidth,d)||d,e.glimpse&&(Ad.w-=Math.round(2*(mc(e.glimpse,d)||0))),Ab.css({width:Ad.w,marginLeft:(Ad.W-Ad.w)/2}),f=mc(f,h),f=f||g&&d/g,f&&(d=Math.round(d),f=Ad.h=Math.round(ec(f,mc(Ad.minheight,h),mc(Ad.maxheight,h))),vb.stop().animate({width:d,height:f},b,function(){ub.removeClass(r)}),Ce(),md&&(Sb.stop().animate({width:Ad.nw},b),ye({guessIndex:Xc,time:b,keep:!0}),nd&&re.nav&&xe(b)),Bd=c||!0,We())),Rd=vb.offset().left,this},E.setOptions=function(a){return d.extend(e,a),Ue(),this},E.shuffle=function(){return Q&&Lc(Q)&&Ue(),this},E.destroy=function(){return E.cancelFullScreen(),E.stopAutoplay(),Q=E.data=null,Wd(),_c=[],Be(Wb),Ue.ok=!1,this},E.playVideo=function(){var a=$c,b=a.video,c=Xc;return"object"===typeof b&&a.videoReady&&(qd&&E.fullScreen&&E.cancelFullScreen(),Dc(function(){return!tb.is()||c!==Xc},function(){c===Xc&&(a.$video=a.$video||d(d.Fotorama.jst.video(b)),a.$video.appendTo(a[Wb]),ub.addClass(k),Rc=a.$video,Yd(),Nb.trigger("blur"),lc.trigger("blur"),Ee("loadvideo"))})),this},E.stopVideo=function(){return Le(Rc,!0,!0),this},vb.on("mousemove",Ne),Cd=ed(Ab,{onStart:Fe,onMove:function(a,b){Ke(vb,b.edge)},onTouchEnd:Ge,onEnd:function(a){Ke(vb);var b=(Mb&&!Pd||a.touch)&&e.arrows&&"always"!==e.arrows;if(a.moved||b&&a.pos!==a.newPos&&!a.control){var c=pc(a.newPos,Ad.w,e.margin,ad);E.show({index:c,time:rd?ud:a.time,overPos:a.overPos,user:!0})}else a.aborted||a.control||Pe(a.startEvent,b)},timeLow:1,timeHigh:1,friction:2,select:"."+V+", ."+V+" *",$wrap:vb}),Ed=ed($b,{onStart:Fe,onMove:function(a,b){Ke(Sb,b.edge)},onTouchEnd:Ge,onEnd:function(a){function b(){ye.l=a.newPos,He(),Ie(),qe(a.newPos,!0)}if(a.moved)a.pos!==a.newPos?(Jd=!0,Yc($b,{time:a.time,pos:a.newPos,overPos:a.overPos,onEnd:b}),qe(a.newPos),wd&&Ke(Sb,Hc(a.newPos,Ed.min,Ed.max))):b();else{var c=a.$target.closest("."+K,$b)[0];c&&Re.call(c,a.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:Sb}),Dd=fd(vb,{shift:!0,onEnd:function(a,b){Fe(),Ge(),E.show({index:b,slow:a.altKey})}}),Fd=fd(Sb,{onEnd:function(a,b){Fe(),Ge();var c=sc($b)+.25*b;$b.css(hc(ec(c,Ed.min,Ed.max))),wd&&Ke(Sb,Hc(c,Ed.min,Ed.max)),Fd.prevent={"<":c>=Ed.max,">":c<=Ed.min},clearTimeout(Fd.t),Fd.t=setTimeout(function(){ye.l=c,qe(c,!0)},Ob),qe(c)}}),ub.on("mouseenter",function(){setTimeout(function(){Od||Me(!(Pd=!0))},0)}).on("mouseleave",function(){Pd&&Me(!(Pd=!1))}),Jc(Nb,function(a){Vc(a),Se.call(this,a)},{onStart:function(){Fe(),Cd.control=!0},onTouchEnd:Ge}),Nb.each(function(){Tc(this,function(a){Se.call(this,a)}),Te(this)}),Tc(qc,E.toggleFullScreen),Te(qc),d.each("load push pop shift unshift reverse sort splice".split(" "),function(a,b){E[b]=function(){return Q=Q||[],"load"!==b?Array.prototype[b].apply(Q,arguments):arguments[0]&&"object"===typeof arguments[0]&&arguments[0].length&&(Q=Mc(arguments[0])),Ue(),E}}),Ue()},d.fn.fotorama=function(b){return this.each(function(){var c=this,e=d(this),f=e.data(),g=f.fotorama;g?g.setOptions(b,!0):Dc(function(){return!Bc(c)},function(){f.urtext=e.html(),new d.Fotorama(e,d.extend({},bc,a.fotoramaDefaults,b,f))})})},d.Fotorama.instances=[],d.Fotorama.cache={},d.Fotorama.measures={},d=d||{},d.Fotorama=d.Fotorama||{},d.Fotorama.jst=d.Fotorama.jst||{},d.Fotorama.jst.style=function(a){{var b,c="";rb.escape}return c+=".fotorama"+(null==(b=a.s)?"":b)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+(null==(b=a.m)?"":b)+"px;\nheight:"+(null==(b=a.h)?"":b)+"px}\n.fotorama"+(null==(b=a.s)?"":b)+" .fotorama__thumb-border{\nheight:"+(null==(b=a.h-a.b*(a.q?0:2))?"":b)+"px;\nborder-width:"+(null==(b=a.b)?"":b)+"px;\nmargin-top:"+(null==(b=a.m)?"":b)+"px}"},d.Fotorama.jst.video=function(a){function f(){c+=e.call(arguments,"")}var c="",e=(rb.escape,Array.prototype.join);return c+='<div class="fotorama__video"><iframe src="',f(("youtube"==a.type?a.p+"youtube.com/embed/"+a.id+"?autoplay=1":"vimeo"==a.type?a.p+"player.vimeo.com/video/"+a.id+"?autoplay=1&badge=0":a.id)+(a.s&&"custom"!=a.type?"&"+a.s:"")),c+='" frameborder="0" allowfullscreen></iframe></div>\n'},d(function(){d("."+f+':not([data-auto="false"])').fotorama()})}(window,document,location,"undefined"!==typeof jQuery&&jQuery);
Advertisement
Add Comment
Please, Sign In to add comment