// PhotoSwipe - http://www.photoswipe.com/
// Copyright (c) 2011 by Code Computerlove (http://www.codecomputerlove.com)
// Licensed under the MIT license
// version: 1.0.19
(function(){if(!Function.prototype.bind)Function.prototype.bind=function(a){var b=[].slice,c=b.call(arguments,1),e=this,d=function(){},f=function(){return e.apply(this instanceof d?this:a||{},c.concat(b.call(arguments)))};d.prototype=e.prototype;f.prototype=new d;return f};if(typeof Code==="undefined")Code={},Code.PhotoSwipe={};Code.PhotoSwipe.Util={browser:{version:(navigator.userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],webkit:/webkit/i.test(navigator.userAgent),opera:/opera/i.test(navigator.userAgent),
msie:/msie/i.test(navigator.userAgent)&&!/opera/.test(navigator.userAgent),chrome:/Chrome/i.test(navigator.userAgent),mozilla:/mozilla/i.test(navigator.userAgent)&&!/(compatible|webkit)/.test(navigator.userAgent),mobileSafari:/mobile.*safari/i.test(navigator.userAgent),is3dSupported:!1,isAndroid:/android/i.test(navigator.userAgent),isBlackberry:/blackberry/i.test(navigator.userAgent),isiOS:/like Mac OS/i.test(navigator.userAgent),isCSSTransformSupported:!1,touchSupported:!1,gestureSupported:!1,_eventTagNames:{select:"input",
change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},isEventSupported:function(a){var b=document.createElement(this._eventTagNames[a]||"div"),a="on"+a,c=a in b;c||(b.setAttribute(a,"return;"),c=typeof b[a]=="function");return c}},setElementData:function(a,b,c){if(this.isNothing(a.UtilData))a.UtilData={};a.UtilData[b]=c},getElementData:function(a,b,c){typeof c==="undefined"&&(c=null);if(this.isNothing(a.UtilData))return c;if(this.isNothing(a.UtilData[b]))return c;return a.UtilData[b]},
removeElementData:function(a,b){delete a.UtilData[b]},coalesce:function(){var a;for(a=0;a<arguments.length;a++)if(!this.isNothing(arguments[a]))return arguments[a];return null},registerNamespace:function(){var a=arguments,b=null,c,e;for(c=0;c<a.length;++c){var d=a[c].split(".");e=d[0];eval("if (typeof "+e+' == "undefined"){'+e+" = {};} obj = "+e+";");for(e=1;e<d.length;++e)b[d[e]]=b[d[e]]||{},b=b[d[e]]}},extend:function(a,b,c){this.isNothing(c)&&(c=!0);if(a&&b&&this.isObject(b))for(var e in b)c?a[e]=
b[e]:typeof a[e]=="undefined"&&(a[e]=b[e])},swapArrayElements:function(a,b,c){var e=a[b];a[b]=a[c];a[c]=e},isObject:function(a){return typeof a=="object"},isNothing:function(a){if(typeof a==="undefined"||a===null)return!0;return!1},isFunction:function(a){return typeof a=="function"},isArray:function(a){return a&&Code.PhotoSwipe.Util.isFunction(a.pop)},isNumber:function(a){return typeof a=="number"},isString:function(a){return typeof a=="string"},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,
"")}};var d=document.createElement("div");if(Code.PhotoSwipe.Util.browser.webkit&&!Code.PhotoSwipe.Util.browser.chrome)Code.PhotoSwipe.Util.browser.is3dSupported=!Code.PhotoSwipe.Util.isNothing(d.style.WebkitPerspective);Code.PhotoSwipe.Util.browser.isCSSTransformSupported=!Code.PhotoSwipe.Util.isNothing(d.style.WebkitTransform)||!Code.PhotoSwipe.Util.isNothing(d.style.MozTransform)||!Code.PhotoSwipe.Util.isNothing(d.style.msTransform)||!Code.PhotoSwipe.Util.isNothing(d.style.transformProperty);Code.PhotoSwipe.Util.browser.touchSupported=
Code.PhotoSwipe.Util.browser.isEventSupported("touchstart");Code.PhotoSwipe.Util.browser.gestureSupported=Code.PhotoSwipe.Util.browser.isEventSupported("gesturestart")})(window);
(function(d,a){a.extend(a,{DOM:{resetTranslate:function(b){a.browser.webkit?a.browser.is3dSupported?$(b).css({webkitTransform:"translate3d(0px, 0px, 0px)"}):$(b).css({webkitTransform:"translate(0px, 0px)"}):$(b).css({webkitTransform:"translate(0px, 0px)",MozTransform:"translate(0px, 0px)",transform:"translate(0px, 0px)"})},createElement:function(a,c,e){a=$("<"+a+"></"+a+">");a.attr(c);a.append(e);return a[0]},appendChild:function(a,c){$(c).append(a)},appendText:function(a,c){$(c).text(a)},appendToBody:function(a){$("body").append(a)},
removeChild:function(a){$(a).empty().remove()},removeChildren:function(a){$(a).empty()},hasAttribute:function(b,c){return a.isNothing($(b).attr(c))},getAttribute:function(a,c){return $(a).attr(c)},setAttribute:function(a,c,e){$(a).attr(c,e)},removeAttribute:function(a,c){$(a).removeAttr(c)},addClass:function(a,c){$(a).addClass(c)},removeClass:function(a,c){$(a).removeClass(c)},hasClass:function(a,c){$(a).hasClass(c)},setStyle:function(b,c,e){a.isObject(c)?$(b).css(c):$(b).css(c,e)},getStyle:function(a,
c){return $(a).css(c)},hide:function(a){$(a).hide()},show:function(a){$(a).show()},width:function(b,c){a.isNothing(c)||$(b).width(c);return $(b).width()},outerWidth:function(a){return $(a).outerWidth()},height:function(b,c){a.isNothing(c)||$(b).height(c);return $(b).height()},outerHeight:function(a){return $(a).outerHeight()},documentWidth:function(){return $(document.documentElement).width()},documentHeight:function(){return $(document.documentElement).height()},documentOuterWidth:function(){return a.DOM.width(document.documentElement)},
documentOuterHeight:function(){return a.DOM.outerHeight(document.documentElement)},bodyWidth:function(){return $(document.body).width()},bodyHeight:function(){return $(document.body).height()},bodyOuterWidth:function(){return a.DOM.outerWidth(document.body)},bodyOuterHeight:function(){return a.DOM.outerHeight(document.body)},windowWidth:function(){if(!d.innerWidth)return $(d).width();return d.innerWidth},windowHeight:function(){if(!d.innerHeight)return $(d).height();return d.innerHeight},windowScrollLeft:function(){if(!d.pageXOffset)return $(d).scrollLeft();
return d.pageXOffset},windowScrollTop:function(){if(!d.pageYOffset)return $(d).scrollTop();return d.pageYOffset}}})})(window,Code.PhotoSwipe.Util);
(function(d,a){a.extend(a,{Events:{add:function(a,c,e){$(a).bind(c,e)},remove:function(a,c,e){$(a).unbind(c,e)},fire:function(a,c){var e,d=Array.prototype.slice.call(arguments).splice(2);e=typeof c=="string"?{type:c}:c;$(a).trigger(jQuery.Event(e.type,e),d)},getMousePosition:function(a){return{x:a.pageX,y:a.pageY}},getTouchEvent:function(a){return a.originalEvent},domReady:function(a){$(document).ready(a)}}})})(window,Code.PhotoSwipe.Util);
(function(d,a){a.extend(a,{Animation:{stopFade:function(a){$(a).stop(!0,!0)},fadeIn:function(b,c,e,d){c=a.coalesce(c,1);e=a.coalesce(e,500);$(b).fadeTo(e,c,d)},fadeOut:function(b,c,e){a.isNothing(c)&&(c=500);$(b).fadeTo(c,0,e)},slideBy:function(b,c,e,d,f){a.isNothing(d)&&(d=500);c=jQuery.fn.translation?{left:"+="+c+"px",top:"+="+e+"px",useTranslate3d:a.browser.is3dSupported}:{left:"+="+c+"px",top:"+="+e+"px"};$(b).animate(c,d,f)}}})})(window,Code.PhotoSwipe.Util);
(function(d,a){Code.PhotoSwipe.ElementClass=SimpleClass.extend({el:null,settings:null,isHidden:null,fadeInHandler:null,fadeOutHandler:null,init:function(b){this.settings={opacity:1,fadeInSpeed:250,fadeOutSpeed:500};a.extend(this.settings,b);this.fadeInHandler=this.postFadeIn.bind(this);this.fadeOutHandler=this.postFadeOut.bind(this);this.isHidden=!0},resetPosition:function(){},show:function(){this.stopFade();a.DOM.setStyle(this.el,"opacity",this.settings.opacity);a.DOM.show(this.el);this.postShow()},
postShow:function(){this.isHidden=!1;this.addEventHandlers();a.Events.fire(this,Code.PhotoSwipe.ElementClass.EventTypes.onShow)},fadeIn:function(){a.DOM.setStyle(this.el,"opacity",0);this.fadeInFromCurrentOpacity()},fadeInFromCurrentOpacity:function(){this.stopFade();this.isHidden=!1;a.DOM.show(this.el);a.Animation.fadeIn(this.el,this.settings.opacity,this.settings.fadeInSpeed,this.fadeInHandler)},postFadeIn:function(){this.isHidden||(this.addEventHandlers(),a.Events.fire(this,Code.PhotoSwipe.ElementClass.EventTypes.onFadeIn))},
hide:function(){this.stopFade();a.DOM.hide(this.el);this.postHide()},postHide:function(){this.isHidden=!0;this.removeEventHandlers();a.Events.fire(this,Code.PhotoSwipe.ElementClass.EventTypes.onHide)},fadeOut:function(){this.stopFade();this.isHidden=!0;a.Animation.fadeOut(this.el,this.settings.fadeOutSpeed,this.fadeOutHandler)},postFadeOut:function(){this.isHidden&&(a.DOM.hide(this.el),this.removeEventHandlers(),a.Events.fire(this,Code.PhotoSwipe.ElementClass.EventTypes.onFadeOut))},stopFade:function(){a.Animation.stopFade(this.el)},
addEventHandlers:function(){},removeEventHandlers:function(){}});Code.PhotoSwipe.ElementClass.EventTypes={onShow:"PhotoSwipeElementClassOnShow",onHide:"PhotoSwipeElementClassOnHide",onClick:"PhotoSwipeElementClassOnClick",onFadeIn:"PhotoSwipeElementClassOnFadeIn",onFadeOut:"PhotoSwipeElementClassOnFadeOut"}})(window,Code.PhotoSwipe.Util);
(function(d,a){Code.PhotoSwipe.FullSizeImageClass=SimpleClass.extend({el:null,index:null,naturalWidth:null,naturalHeight:null,src:null,caption:null,metaData:null,scaleMethod:null,isLandscape:null,isLoading:null,hasLoaded:null,loadEventHandler:null,init:function(b,c,e,d,f){this.index=b;this.naturalHeight=this.naturalWidth=0;this.src=e;this.caption=d;this.metaData=a.coalesce(f,{});this.hasLoaded=this.isLoading=this.isLandscape=!1;this.scaleMethod=c;this.loadEventHandler=this.onLoad.bind(this)},load:function(){this.isLoading=
!0;this.el=new Image;a.DOM.addClass(this.el,"ps-full-size-image");this.el.onload=this.loadEventHandler;this.el.src=this.src},onLoad:function(){this.naturalWidth=a.coalesce(this.el.naturalWidth,this.el.width);this.naturalHeight=a.coalesce(this.el.naturalHeight,this.el.height);this.isLandscape=this.naturalWidth>this.naturalHeight;this.isLoading=!1;this.hasLoaded=!0;a.Events.fire(this,Code.PhotoSwipe.FullSizeImageClass.EventTypes.onLoad)}});Code.PhotoSwipe.FullSizeImageClass.EventTypes={onLoad:"PhotoSwipeFullSizeImageClassOnLoader"}})(window,
Code.PhotoSwipe.Util);
(function(d,a){Code.PhotoSwipe.DocumentOverlayClass=Code.PhotoSwipe.ElementClass.extend({init:function(b){this.settings={zIndex:1E3};a.extend(this.settings,b);this._super(b);this.el=a.DOM.createElement("div",{"class":Code.PhotoSwipe.DocumentOverlayClass.CssClasses.documentOverlay},"");a.DOM.setStyle(this.el,{left:0,position:"absolute",zIndex:this.settings.zIndex,top:0});a.DOM.hide(this.el);a.DOM.appendToBody(this.el)},resetPosition:function(){a.DOM.width(this.el,a.DOM.bodyOuterWidth());var b=a.DOM.bodyOuterHeight();
if(a.DOM.windowHeight>b)b=a.DOM.windowHeight;a.DOM.height(this.el,b)}});Code.PhotoSwipe.DocumentOverlayClass.CssClasses={documentOverlay:"ps-document-overlay"}})(window,Code.PhotoSwipe.Util);
(function(d,a){Code.PhotoSwipe.ViewportClass=Code.PhotoSwipe.ElementClass.extend({touchStartPoint:null,touchStartTime:null,touchStartHandler:null,touchMoveHandler:null,touchEndHandler:null,gestureStartHandler:null,gestureChangeHandler:null,gestureEndHandler:null,isGesture:null,mouseDownHandler:null,mouseMoveHandler:null,mouseUpHandler:null,doubleClickTimeout:null,init:function(b){this.settings={swipeThreshold:500,swipeTimeThreshold:250,zIndex:1E3,doubleClickSpeed:300};a.extend(this.settings,b);this._super(this.settings);
this.touchStartPoint={x:0,y:0};if(a.browser.touchSupported)this.touchStartHandler=this.onTouchStart.bind(this),this.touchMoveHandler=this.onTouchMove.bind(this),this.touchEndHandler=this.onTouchEnd.bind(this);if(a.browser.gestureSupported)this.gestureStartHandler=this.onGestureStart.bind(this),this.gestureChangeHandler=this.onGestureChange.bind(this),this.gestureEndHandler=this.onGestureEnd.bind(this);this.mouseDownHandler=this.onMouseDown.bind(this);this.mouseMoveHandler=this.onMouseMove.bind(this);
this.mouseUpHandler=this.onMouseUp.bind(this);this.el=a.DOM.createElement("div",{"class":Code.PhotoSwipe.ViewportClass.CssClasses.viewport,"data-role":"dialog"},"");a.DOM.setStyle(this.el,{position:"absolute",left:0,zIndex:this.settings.zIndex,overflow:"hidden"});a.DOM.hide(this.el);a.DOM.appendToBody(this.el)},resetPosition:function(){a.DOM.setStyle(this.el,{top:a.DOM.windowScrollTop()+"px"});a.DOM.width(this.el,a.DOM.bodyOuterWidth());a.DOM.height(this.el,a.DOM.windowHeight())},addEventHandlers:function(){a.browser.touchSupported&&
(a.Events.add(this.el,"touchstart",this.touchStartHandler),a.Events.add(this.el,"touchmove",this.touchMoveHandler),a.Events.add(this.el,"touchend",this.touchEndHandler));a.browser.gestureSupported&&(a.Events.add(this.el,"gesturestart",this.gestureStartHandler),a.Events.add(this.el,"gesturechange",this.gestureChangeHandler),a.Events.add(this.el,"gestureend",this.gestureEndHandler));a.Events.add(this.el,"mousedown",this.mouseDownHandler);a.Events.add(this.el,"mouseup",this.mouseUpHandler)},removeEventHandlers:function(){a.browser.touchSupported&&
(a.Events.remove(this.el,"touchstart",this.touchStartHandler),a.Events.remove(this.el,"touchmove",this.touchMoveHandler),a.Events.remove(this.el,"touchend",this.touchEndHandler));a.browser.gestureSupported&&(a.Events.remove(this.el,"gesturestart",this.gestureStartHandler),a.Events.remove(this.el,"gesturechange",this.gestureChangeHandler),a.Events.remove(this.el,"gestureend",this.gestureEndHandler));a.Events.remove(this.el,"mousedown",this.mouseDownHandler);a.Events.remove(this.el,"mouseup",this.mouseUpHandler)},
getTouchPoint:function(a){return{x:a[0].pageX,y:a[0].pageY}},onGestureStart:function(b){b.preventDefault();b=a.Events.getTouchEvent(b);a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.gestureStart,scale:b.scale,rotation:b.rotation})},onGestureChange:function(b){b.preventDefault();b=a.Events.getTouchEvent(b);a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.gestureChange,
scale:b.scale,rotation:b.rotation})},onGestureEnd:function(b){b.preventDefault();b=a.Events.getTouchEvent(b);a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.gestureEnd,scale:b.scale,rotation:b.rotation})},onTouchStart:function(b){b.preventDefault();b=a.Events.getTouchEvent(b).touches;b.length>1?this.isGesture=!0:(a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.touchStart,
point:this.getTouchPoint(b)}),this.touchStartTime=new Date,this.isGesture=!1,this.touchStartPoint=this.getTouchPoint(b))},onTouchMove:function(b){b.preventDefault();if(!this.isGesture)b=a.Events.getTouchEvent(b).touches,a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.touchMove,point:this.getTouchPoint(b)})},onTouchEnd:function(b){b.preventDefault();this.isGesture||(b=a.Events.getTouchEvent(b),b=this.getTouchPoint(!a.isNothing(b.changedTouches)?
b.changedTouches:b.touches),a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.touchEnd,point:b}),this.fireTouchEvent(this.touchStartPoint,b))},onMouseDown:function(b){b.preventDefault();a.Events.add(this.el,"mousemove",this.mouseMoveHandler);a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.touchStart,point:a.Events.getMousePosition(b)});
this.touchStartTime=new Date;this.isGesture=!1;this.touchStartPoint=a.Events.getMousePosition(b)},onMouseMove:function(b){b.preventDefault();a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:Code.PhotoSwipe.ViewportClass.Actions.touchMove,point:a.Events.getMousePosition(b)})},onMouseUp:function(b){b.preventDefault();a.Events.remove(this.el,"mousemove",this.mouseMoveHandler);this.fireTouchEvent(this.touchStartPoint,a.Events.getMousePosition(b))},fireTouchEvent:function(b,
c){var e;e=c.x-b.x;if(Math.abs(e)>=this.settings.swipeThreshold){if(new Date-this.touchStartTime>this.settings.swipeTimeThreshold)return;e=e<0?Code.PhotoSwipe.ViewportClass.Actions.swipeLeft:Code.PhotoSwipe.ViewportClass.Actions.swipeRight}else if(a.isNothing(this.doubleClickTimeout)){var g=this;this.doubleClickTimeout=d.setTimeout(function(){g.doubleClickTimeout=null;a.Events.fire(g,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:g,action:Code.PhotoSwipe.ViewportClass.Actions.click,
point:c})},this.settings.doubleClickSpeed);return}else d.clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null,e=Code.PhotoSwipe.ViewportClass.Actions.doubleClick;a.isNothing(e)||a.Events.fire(this,{type:Code.PhotoSwipe.ViewportClass.EventTypes.onTouch,target:this,action:e,point:c})}});Code.PhotoSwipe.ViewportClass.CssClasses={viewport:"ps-viewport"};Code.PhotoSwipe.ViewportClass.Actions={click:"click",doubleClick:"doubleClick",swipeLeft:"swipeLeft",swipeRight:"swipeRight",touchStart:"touchStart",
touchMove:"touchMove",touchEnd:"touchEnd",gestureStart:"gestureStart",gestureChange:"gestureChange",gestureEnd:"gestureEnd"};Code.PhotoSwipe.ViewportClass.EventTypes={onTouch:"PhotoSwipeViewportClassOnTouch"}})(window,Code.PhotoSwipe.Util);
(function(d,a,b){Code.PhotoSwipe.SliderItemClass=SimpleClass.extend({el:null,imageContainerEl:null,imageEl:null,parentEl:null,fullSizeImage:null,fullSizeImageLoadEventHandler:null,savedImageWidth:null,savedImageHeight:null,init:function(b){this.parentEl=b;this.fullSizeImageLoadEventHandler=this.onFullSizeImageLoad.bind(this);this.el=a.DOM.createElement("div",{"class":Code.PhotoSwipe.SliderItemClass.CssClasses.item+" "+Code.PhotoSwipe.SliderItemClass.CssClasses.loading},"");a.DOM.setStyle(this.el,
{position:"absolute",overflow:"hidden",top:0});a.DOM.resetTranslate(this.el);a.DOM.appendChild(this.el,this.parentEl);this.imageContainerEl=a.DOM.createElement("div");a.DOM.setStyle(this.imageContainerEl,{position:"absolute",overflow:"hidden",top:0,left:0});a.DOM.appendChild(this.imageContainerEl,this.el);this.imageEl=new Image;a.DOM.setStyle(this.imageEl,{display:"block",position:"absolute",margin:0,padding:0});a.DOM.hide(this.imageEl);a.DOM.appendChild(this.imageEl,this.imageContainerEl)},resetPosition:function(b,
e,d){a.DOM.width(this.el,b);a.DOM.height(this.el,e);a.DOM.setStyle(this.el,"left",d+"px");a.DOM.width(this.imageContainerEl,b);a.DOM.height(this.imageContainerEl,e);this.resetImagePosition()},resetImagePosition:function(){if(!a.isNothing(this.fullSizeImage)){a.DOM.getAttribute(this.imageEl,"src");var b,e,d,f;f=a.DOM.width(this.el);var h=a.DOM.height(this.el);this.fullSizeImage.scaleMethod==="fitNoUpscale"?(e=this.fullSizeImage.naturalWidth,d=this.fullSizeImage.naturalHeight,e>f&&(b=f/e,e=Math.round(e*
b),d=Math.round(d*b)),d>h&&(b=h/d,d=Math.round(d*b),e=Math.round(e*b))):(b=this.fullSizeImage.isLandscape?f/this.fullSizeImage.naturalWidth:h/this.fullSizeImage.naturalHeight,e=Math.round(this.fullSizeImage.naturalWidth*b),d=Math.round(this.fullSizeImage.naturalHeight*b),this.fullSizeImage.scaleMethod==="zoom"?(b=1,d<h?b=h/d:e<f&&(b=f/e),b!==1&&(e=Math.round(e*b),d=Math.round(d*b))):this.fullSizeImage.scaleMethod==="fit"&&(b=1,e>f?b=f/e:d>h&&(b=h/d),b!==1&&(e=Math.round(e*b),d=Math.round(d*b))));
b=(h-d)/2+"px";f=(f-e)/2+"px";a.DOM.width(this.imageEl,e);a.DOM.height(this.imageEl,d);a.DOM.setStyle(this.imageEl,{top:b,left:f});a.DOM.show(this.imageEl);this.savedImageWidth=e;this.savedImageHeight=d}},setFullSizeImage:function(c){this.fullSizeImage=c;a.DOM.removeClass(this.el,Code.PhotoSwipe.SliderItemClass.CssClasses.loading);a.DOM.removeClass(this.el,Code.PhotoSwipe.SliderItemClass.CssClasses.imageError);a.isNothing(this.fullSizeImage)?(this.fullSizeImage=null,a.DOM.addClass(this.el,Code.PhotoSwipe.SliderItemClass.CssClasses.imageError),
this.hideImage()):this.fullSizeImage.hasLoaded?(a.DOM.setAttribute(this.imageEl,"src",this.fullSizeImage.src),this.resetImagePosition(),a.Events.fire(this,Code.PhotoSwipe.SliderItemClass.EventTypes.onFullSizeImageDisplay)):(a.DOM.addClass(this.el,Code.PhotoSwipe.SliderItemClass.CssClasses.loading),this.hideImage(),this.fullSizeImage.isLoading||(a.Events.add(this.fullSizeImage,b.EventTypes.onLoad,this.fullSizeImageLoadEventHandler),this.fullSizeImage.load()))},onFullSizeImageLoad:function(c){a.Events.remove(c.target,
b.EventTypes.onLoad,this.fullSizeImageLoadEventHandler);a.isNothing(this.fullSizeImage)||c.target.index!==this.fullSizeImage.index?a.Events.fire(this,{type:Code.PhotoSwipe.SliderItemClass.EventTypes.onFullSizeImageLoadAnomaly,target:this,fullSizeImage:c.target}):this.setFullSizeImage(c.target)},hideImage:function(){a.DOM.removeAttribute(this.imageEl,"src");a.DOM.hide(this.imageEl)}});Code.PhotoSwipe.SliderItemClass.CssClasses={item:"ps-slider-item",loading:"ps-slider-item-loading",imageError:"ps-slider-item-image-error"};
Code.PhotoSwipe.SliderItemClass.EventTypes={onFullSizeImageDisplay:"PhotoSwipeSliderItemClassOnFullSizeImageDisplay",onFullSizeImageLoadAnomaly:"PhotoSwipeSliderItemClassOnFullSizeImageLoadAnomaly"}})(window,Code.PhotoSwipe.Util,Code.PhotoSwipe.FullSizeImageClass);
(function(d,a,b){Code.PhotoSwipe.SliderClass=Code.PhotoSwipe.ElementClass.extend({parentEl:null,parentElWidth:null,parentElHeight:null,items:null,scaleEl:null,lastScaleValue:null,previousItem:null,currentItem:null,nextItem:null,hasBounced:null,lastShowAction:null,bounceSlideBy:null,showNextEndEventHandler:null,showPreviousEndEventHandler:null,bounceStepOneEventHandler:null,bounceStepTwoEventHandler:null,sliderFullSizeImageLoadAnomalyEventHandler:null,init:function(c,d){this.settings={slideSpeed:250};
a.extend(this.settings,c);this._super(this.settings);this.parentEl=d;this.hasBounced=!1;this.showNextEndEventHandler=this.onShowNextEnd.bind(this);this.showPreviousEndEventHandler=this.onShowPreviousEnd.bind(this);this.bounceStepOneEventHandler=this.onBounceStepOne.bind(this);this.bounceStepTwoEventHandler=this.onBounceStepTwo.bind(this);this.sliderFullSizeImageLoadAnomalyEventHandler=this.onSliderFullSizeImageLoadAnomaly.bind(this);this.el=a.DOM.createElement("div",{"class":Code.PhotoSwipe.SliderClass.CssClasses.slider},
"");a.DOM.setStyle(this.el,{position:"absolute",top:0});a.DOM.hide(this.el);a.DOM.appendChild(this.el,d);this.items=[];this.items.push(new b(this.el));this.items.push(new b(this.el));this.items.push(new b(this.el));this.previousItem=this.items[0];this.currentItem=this.items[1];this.nextItem=this.items[2]},addEventHandlers:function(){for(var c=0;c<this.items.length;c++)a.Events.add(this.items[c],b.EventTypes.onFullSizeImageLoadAnomaly,this.sliderFullSizeImageLoadAnomalyEventHandler)},removeEventHandlers:function(){for(var c=
0;c<this.items.length;c++)a.Events.remove(this.items[c],b.EventTypes.onFullSizeImageLoadAnomaly,this.sliderFullSizeImageLoadAnomalyEventHandler)},resetPosition:function(){a.DOM.show(this.currentItem.imageContainerEl);this.parentElWidth=a.DOM.width(this.parentEl);this.parentElHeight=a.DOM.height(this.parentEl);a.DOM.width(this.el,this.parentElWidth*3);a.DOM.height(this.el,this.parentElHeight);this.previousItem.resetPosition(this.parentElWidth,this.parentElHeight,0);this.currentItem.resetPosition(this.parentElWidth,
this.parentElHeight,this.parentElWidth);this.nextItem.resetPosition(this.parentElWidth,this.parentElHeight,this.parentElWidth*2);this.center()},center:function(){a.DOM.resetTranslate(this.el);a.DOM.setStyle(this.el,{left:this.parentElWidth*-1+"px"})},setCurrentFullSizeImage:function(a){this.currentItem.setFullSizeImage(a);this.dispatchDisplayCurrentFullSizeImage()},setPreviousAndNextFullSizeImages:function(a,b){this.nextItem.setFullSizeImage(b);this.previousItem.setFullSizeImage(a)},showNext:function(){this.lastShowAction=
Code.PhotoSwipe.SliderClass.ShowActionTypes.next;this.hasBounced=!1;a.isNothing(this.nextItem.fullSizeImage)?this.bounce():a.Animation.slideBy(this.el,this.parentElWidth*-1,0,this.settings.slideSpeed,this.showNextEndEventHandler)},showPrevious:function(){this.lastShowAction=Code.PhotoSwipe.SliderClass.ShowActionTypes.previous;this.hasBounced=!1;a.isNothing(this.previousItem.fullSizeImage)?this.bounce():a.Animation.slideBy(this.el,this.parentElWidth,0,this.settings.slideSpeed,this.showPreviousEndEventHandler)},
bounce:function(){a.DOM.show(this.currentItem.imageContainerEl);this.hasBounced=!0;a.browser.chrome?this.dispatchDisplayCurrentFullSizeImage():(this.bounceSlideBy=this.parentElWidth/2,a.Animation.slideBy(this.el,this.lastShowAction===Code.PhotoSwipe.SliderClass.ShowActionTypes.previous?this.bounceSlideBy:this.bounceSlideBy*-1,0,this.settings.slideSpeed,this.bounceStepOneEventHandler))},onBounceStepOne:function(){var b=this;d.setTimeout(function(){a.Animation.slideBy(b.el,b.lastShowAction===Code.PhotoSwipe.SliderClass.ShowActionTypes.previous?
b.bounceSlideBy*-1:b.bounceSlideBy,0,b.settings.slideSpeed,b.bounceStepTwoEventHandler)},25)},onBounceStepTwo:function(){this.dispatchDisplayCurrentFullSizeImage()},onShowNextEnd:function(){a.DOM.show(this.currentItem.imageContainerEl);a.swapArrayElements(this.items,1,2);this.currentItem=this.items[1];this.nextItem=this.items[2];var b=this.parentElWidth;a.DOM.setStyle(this.currentItem.el,"left",b+"px");a.DOM.setStyle(this.nextItem.el,"left",b*2+"px");this.center();this.dispatchDisplayCurrentFullSizeImage()},
onShowPreviousEnd:function(){a.DOM.show(this.currentItem.imageContainerEl);a.swapArrayElements(this.items,1,0);this.currentItem=this.items[1];this.previousItem=this.items[0];a.DOM.setStyle(this.currentItem.el,"left",this.parentElWidth+"px");a.DOM.setStyle(this.previousItem.el,"left","0px");this.center();this.dispatchDisplayCurrentFullSizeImage()},onSliderFullSizeImageLoadAnomaly:function(b){b=b.fullSizeImage;!a.isNothing(this.currentItem.fullSizeImage)&&this.currentItem.fullSizeImage.index===b.index?
(this.currentItem.setFullSizeImage(b),this.dispatchDisplayCurrentFullSizeImage()):!a.isNothing(this.nextItem.fullSizeImage)&&this.nextItem.fullSizeImage.index===b.index?this.nextItem.setFullSizeImage(b):a.isNothing(this.previousItem.fullSizeImage)||this.previousItem.fullSizeImage.index===b.index&&this.previousItem.setFullSizeImage(b)},dispatchDisplayCurrentFullSizeImage:function(){a.Events.fire(this,{type:Code.PhotoSwipe.SliderClass.EventTypes.onDisplayCurrentFullSizeImage,target:this,fullSizeImage:this.currentItem.fullSizeImage})}});
Code.PhotoSwipe.SliderClass.CssClasses={slider:"ps-slider"};Code.PhotoSwipe.SliderClass.ShowActionTypes={next:"next",previous:"previous"};Code.PhotoSwipe.SliderClass.EventTypes={onDisplayCurrentFullSizeImage:"PhotoSwipeSliderClassOnDisplayCurrentFullSizeImage"}})(window,Code.PhotoSwipe.Util,Code.PhotoSwipe.SliderItemClass);
(function(d,a){Code.PhotoSwipe.CaptionClass=Code.PhotoSwipe.ElementClass.extend({contentEl:null,touchMoveHandler:null,captionValue:null,init:function(b){this.settings={position:"top",zIndex:1E3};a.extend(this.settings,b);this._super(this.settings);this.captionValue="";this.touchMoveHandler=this.onTouchMove.bind(this);b=Code.PhotoSwipe.CaptionClass.CssClasses.caption;this.settings.position==="bottom"&&(b=b+" "+Code.PhotoSwipe.CaptionClass.CssClasses.bottom);this.el=a.DOM.createElement("div",{"class":b},
"");a.DOM.setStyle(this.el,{left:0,position:"absolute",overflow:"hidden",zIndex:this.settings.zIndex,opacity:0});a.DOM.hide(this.el);a.DOM.appendToBody(this.el);this.contentEl=a.DOM.createElement("div",{"class":Code.PhotoSwipe.CaptionClass.CssClasses.content},"");a.DOM.appendChild(this.contentEl,this.el)},addEventHandlers:function(){a.browser.touchSupported&&a.Events.add(this.el,"touchmove",this.touchMoveHandler)},removeEventHandlers:function(){a.browser.touchSupported&&a.Events.remove(this.el,"touchmove",
this.touchMoveHandler)},onTouchMove:function(a){a.preventDefault()},resetPosition:function(){var b;b=this.settings.position==="bottom"?a.DOM.windowHeight()-a.DOM.outerHeight(this.el)+a.DOM.windowScrollTop():a.DOM.windowScrollTop();a.DOM.setStyle(this.el,"top",b+"px");a.DOM.width(this.el,a.DOM.bodyOuterWidth())},setCaptionValue:function(b){a.DOM.removeChildren(this.contentEl);b=a.coalesce(b,"\u00a0");a.isObject(b)?a.DOM.appendChild(b,this.contentEl):(b===""&&(b="\u00a0"),a.DOM.appendText(b,this.contentEl));
this.captionValue=b==="\u00a0"?"":b}});Code.PhotoSwipe.CaptionClass.CssClasses={caption:"ps-caption",bottom:"ps-caption-bottom",content:"ps-caption-content"}})(window,Code.PhotoSwipe.Util);
(function(d,a){Code.PhotoSwipe.ToolbarClass=Code.PhotoSwipe.ElementClass.extend({closeEl:null,previousEl:null,nextEl:null,playEl:null,clickHandler:null,touchStartHandler:null,touchMoveHandler:null,touched:null,isNextActive:null,isPreviousActive:null,init:function(b){this.settings={position:"bottom",hideClose:!1,zIndex:1E3};a.extend(this.settings,b);this._super(this.settings);this.isPreviousActive=this.isNextActive=!0;this.touched=!1;this.clickHandler=this.onClick.bind(this);if(a.browser.touchSupported)this.touchMoveHandler=
this.onTouchMove.bind(this),this.touchStartHandler=this.onTouchStart.bind(this);b=Code.PhotoSwipe.ToolbarClass.CssClasses.caption;this.settings.position==="top"&&(b=b+" "+Code.PhotoSwipe.ToolbarClass.CssClasses.top);this.el=a.DOM.createElement("div",{"class":b},"");a.DOM.setStyle(this.el,{left:0,position:"absolute",overflow:"hidden",zIndex:this.settings.zIndex,display:"table",opacity:0});a.DOM.hide(this.el);a.DOM.appendToBody(this.el);this.closeEl=a.DOM.createElement("div",{"class":Code.PhotoSwipe.ToolbarClass.CssClasses.close},
'<div class="'+Code.PhotoSwipe.ToolbarClass.CssClasses.content+'"></div>');this.settings.hideClose&&a.DOM.hide(this.closeEl);a.DOM.appendChild(this.closeEl,this.el);this.playEl=a.DOM.createElement("div",{"class":Code.PhotoSwipe.ToolbarClass.CssClasses.play},'<div class="'+Code.PhotoSwipe.ToolbarClass.CssClasses.content+'"></div>');a.DOM.appendChild(this.playEl,this.el);this.previousEl=a.DOM.createElement("div",{"class":Code.PhotoSwipe.ToolbarClass.CssClasses.previous},'<div class="'+Code.PhotoSwipe.ToolbarClass.CssClasses.content+
'"></div>');a.DOM.appendChild(this.previousEl,this.el);this.nextEl=a.DOM.createElement("div",{"class":Code.PhotoSwipe.ToolbarClass.CssClasses.next},'<div class="'+Code.PhotoSwipe.ToolbarClass.CssClasses.content+'"></div>');a.DOM.appendChild(this.nextEl,this.el)},postFadeIn:function(){this.isHidden||(a.DOM.setStyle(this.el,{display:"table"}),this._super(this.settings))},addEventHandlers:function(){a.browser.touchSupported&&(a.browser.isBlackberry||a.Events.add(this.el,"touchstart",this.touchStartHandler),
a.Events.add(this.el,"touchmove",this.touchMoveHandler));a.Events.add(this.el,"click",this.clickHandler)},removeEventHandlers:function(){a.browser.touchSupported&&(a.browser.isBlackberry||a.Events.remove(this.el,"touchstart",this.touchStartHandler),a.Events.remove(this.el,"touchmove",this.touchMoveHandler));a.Events.remove(this.el,"click",this.clickHandler)},onTouchStart:function(a){a.preventDefault();this.touched=!0;this.handleClick(a)},onTouchMove:function(a){a.preventDefault()},onClick:function(a){this.touched||
this.handleClick(a)},handleClick:function(b){var c;switch(b.target.parentNode){case this.previousEl:if(this.isPreviousActive)c=Code.PhotoSwipe.ToolbarClass.Actions.previous;break;case this.nextEl:if(this.isNextActive)c=Code.PhotoSwipe.ToolbarClass.Actions.next;break;case this.playEl:c=Code.PhotoSwipe.ToolbarClass.Actions.play;break;case this.closeEl:c=Code.PhotoSwipe.ToolbarClass.Actions.close}a.isNothing(c)||a.Events.fire(this,{type:Code.PhotoSwipe.ToolbarClass.EventTypes.onClick,target:this,action:c})},
resetPosition:function(){var b;b=this.settings.position==="bottom"?a.DOM.windowHeight()-a.DOM.outerHeight(this.el)+a.DOM.windowScrollTop():a.DOM.windowScrollTop();a.DOM.setStyle(this.el,"top",b+"px");a.DOM.width(this.el,a.DOM.bodyOuterWidth())},setNextState:function(b){b?(a.DOM.addClass(this.nextEl,Code.PhotoSwipe.ToolbarClass.CssClasses.nextDisabled),this.isNextActive=!1):(a.DOM.removeClass(this.nextEl,Code.PhotoSwipe.ToolbarClass.CssClasses.nextDisabled),this.isNextActive=!0)},setPreviousState:function(b){b?
(a.DOM.addClass(this.previousEl,Code.PhotoSwipe.ToolbarClass.CssClasses.previousDisabled),this.isPreviousActive=!1):(a.DOM.removeClass(this.previousEl,Code.PhotoSwipe.ToolbarClass.CssClasses.previousDisabled),this.isPreviousActive=!0)}});Code.PhotoSwipe.ToolbarClass.CssClasses={caption:"ps-toolbar",top:"ps-toolbar-top",close:"ps-toolbar-close",previous:"ps-toolbar-previous",previousDisabled:"ps-toolbar-previous-disabled",next:"ps-toolbar-next",nextDisabled:"ps-toolbar-next-disabled",play:"ps-toolbar-play",
content:"ps-toolbar-content"};Code.PhotoSwipe.ToolbarClass.Actions={close:"close",previous:"previous",next:"next",play:"play"};Code.PhotoSwipe.ToolbarClass.EventTypes={onClick:"PhotoSwipeToolbarClassOnClick"}})(window,Code.PhotoSwipe.Util);
(function(d,a,b,c){Code.PhotoSwipe.CaptionToolbarClass=SimpleClass.extend({toolbar:null,caption:null,isHidden:null,hasAddedEventHandlers:null,toolbarClickEventHandler:null,init:function(d){this.settings={opacity:0.8,fadeInSpeed:250,fadeOutSpeed:500,autoHideDelay:5E3,flipPosition:!1,showEmptyCaptions:!0,hideClose:!1,zIndex:1E3};a.extend(this.settings,d);this.isHidden=!0;this.hasAddedEventHandlers=!1;this.toolbarClickEventHandler=this.onToolbarClick.bind(this);this.caption=new b({fadeInSpeed:this.settings.fadeInSpeed,
fadeOutSpeed:this.settings.fadeOutSpeed,opacity:this.settings.opacity,position:this.settings.flipPosition?"bottom":"top",zIndex:this.settings.zIndex});this.toolbar=new c({fadeInSpeed:this.settings.fadeInSpeed,fadeOutSpeed:this.settings.fadeOutSpeed,opacity:this.settings.opacity,position:this.settings.flipPosition?"top":"bottom",hideClose:this.settings.hideClose,zIndex:this.settings.zIndex+1})},resetPosition:function(){this.caption.resetPosition();this.toolbar.resetPosition()},addEventHandlers:function(){if(!this.hasAddedEventHandlers)a.Events.add(this.toolbar,
c.EventTypes.onClick,this.toolbarClickEventHandler),this.hasAddedEventHandlers=!0},removeEventHandlers:function(){a.Events.remove(this.toolbar,c.EventTypes.onClick,this.toolbarClickEventHandler);this.hasAddedEventHandlers=!1},fadeIn:function(){this.stopAutoHideTimeout();this.stopFade();this.isHidden?(this.isHidden=!1,this.fadeInCaption(),this.toolbar.fadeIn(),d.setTimeout(this.onFadeIn.bind(this),this.settings.fadeInSpeed)):(this.caption.isHidden&&this.fadeInCaption(),this.resetAutoHideTimeout())},
showCaption:function(){this.caption.captionValue===""?this.settings.showEmptyCaptions&&this.caption.show():this.caption.show()},fadeInCaption:function(){this.caption.captionValue===""?this.settings.showEmptyCaptions&&this.caption.fadeIn():this.caption.fadeIn()},onFadeIn:function(){this.addEventHandlers();this.resetAutoHideTimeout();a.Events.fire(this,{type:Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onShow,target:this})},fadeOut:function(){this.stopAutoHideTimeout();this.stopFade();this.isHidden=
!0;this.caption.fadeOut();this.toolbar.fadeOut();d.setTimeout(this.onFadeOut.bind(this),this.settings.fadeOutSpeed)},onFadeOut:function(){a.Events.fire(this,{type:Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onHide,target:this})},stopFade:function(){this.caption.stopFade();this.toolbar.stopFade()},hide:function(){this.stopAutoHideTimeout();this.stopFade();this.isHidden=!0;this.removeEventHandlers();this.caption.hide();this.toolbar.hide();a.Events.fire(this,{type:Code.PhotoSwipe.CaptionToolbarClass.EventTypes.onHide,
target:this})},setCaptionValue:function(a){this.caption.setCaptionValue(a);this.caption.captionValue===""&&!this.settings.showEmptyCaptions&&this.caption.fadeOut()},resetAutoHideTimeout:function(){if(!this.isHidden&&(this.stopAutoHideTimeout(),this.settings.autoHideDelay>0))this.autoHideTimeout=d.setTimeout(this.fadeOut.bind(this),this.settings.autoHideDelay)},stopAutoHideTimeout:function(){a.isNothing(this.autoHideTimeout)||d.clearTimeout(this.autoHideTimeout)},onToolbarClick:function(b){a.Events.fire(this,
{type:Code.PhotoSwipe.ToolbarClass.EventTypes.onClick,target:this,action:b.action})},setNextState:function(a){this.toolbar.setNextState(a)},setPreviousState:function(a){this.toolbar.setPreviousState(a)}});Code.PhotoSwipe.CaptionToolbarClass.EventTypes={onShow:"PhotoSwipeCaptionToolbarClassOnShow",onHide:"PhotoSwipeCaptionToolbarClassOnHide"}})(window,Code.PhotoSwipe.Util,Code.PhotoSwipe.CaptionClass,Code.PhotoSwipe.ToolbarClass);
(function(d,a){Code.PhotoSwipe.ZoomPanRotateClass=Code.PhotoSwipe.ElementClass.extend({containerEl:null,imageEl:null,parentEl:null,transformSettings:null,panStartingPoint:null,init:function(b,c,d){this.settings={maxZoom:5,minZoom:0.5,adjustPanToZoom:!0};a.extend(this.settings,b);this._super(b);this.parentEl=c;this.imageEl=d.cloneNode(!1);this.transformSettings={startingScale:1,scale:1,startingRotation:0,rotation:0,startingTranslateX:0,startingTranslateY:0,translateX:0,translateY:0};this.el=a.DOM.createElement("div",
{"class":Code.PhotoSwipe.ZoomPanRotateClass.CssClasses.documentOverlay},"");a.DOM.setStyle(this.el,{left:0,top:0,position:"absolute",zIndex:1});a.DOM.width(this.el,a.DOM.bodyOuterWidth());a.DOM.height(this.el,a.DOM.windowHeight());this.containerEl=a.DOM.createElement("div");a.DOM.setStyle(this.containerEl,{left:0,top:0,position:"absolute"});a.DOM.width(this.containerEl,a.DOM.bodyWidth());a.DOM.height(this.containerEl,a.DOM.windowHeight());a.DOM.appendChild(this.imageEl,this.containerEl);a.DOM.appendChild(this.containerEl,
this.el);a.DOM.appendChild(this.el,this.parentEl);a.browser.isiOS&&(a.DOM.resetTranslate(this.containerEl),a.DOM.resetTranslate(this.imageEl))},setStartingTranslateFromCurrentTranform:function(){var b=a.coalesce(this.containerEl.style.webkitTransform,this.containerEl.style.MozTransform,this.containerEl.style.transform);if(!a.isNothing(b)&&(b=b.match(/translate\((.*?)\)/),!a.isNothing(b)))b=b[1].split(", "),this.transformSettings.startingTranslateX=d.parseInt(b[0],10),this.transformSettings.startingTranslateY=
d.parseInt(b[1],10)},getScale:function(a){a*=this.transformSettings.startingScale;if(this.settings.minZoom!==0&&a<this.settings.minZoom)a=this.settings.minZoom;else if(this.settings.maxZoom!==0&&a>this.settings.maxZoom)a=this.settings.maxZoom;return a},setStartingScaleAndRotation:function(a,c){this.transformSettings.startingScale=this.getScale(a);this.transformSettings.startingRotation=(this.transformSettings.startingRotation+c)%360},zoomRotate:function(a,c){this.transformSettings.scale=this.getScale(a);
this.transformSettings.rotation=this.transformSettings.startingRotation+c;this.applyTransform()},panStart:function(a){this.setStartingTranslateFromCurrentTranform();this.panStartingPoint={x:a.x,y:a.y}},pan:function(a){var c=a.x-this.panStartingPoint.x,a=a.y-this.panStartingPoint.y,a=a/this.transformSettings.scale?a/this.transformSettings.scale:a;this.transformSettings.translateX=this.transformSettings.startingTranslateX+(this.settings.adjustPanToZoom?c/this.transformSettings.scale:c);this.transformSettings.translateY=
this.transformSettings.startingTranslateY+a;this.applyTransform()},zoomAndPanToPoint:function(b,c){this.panStart({x:a.DOM.bodyWidth()/2,y:a.DOM.windowHeight()/2});var d=c.x-this.panStartingPoint.x,g=c.y-this.panStartingPoint.y,g=g/this.transformSettings.scale?g/this.transformSettings.scale:g;this.transformSettings.translateX=(this.transformSettings.startingTranslateX+(this.settings.adjustPanToZoom?d/this.transformSettings.scale:d))*-1;this.transformSettings.translateY=(this.transformSettings.startingTranslateY+
g)*-1;this.setStartingScaleAndRotation(b,0);this.transformSettings.scale=this.transformSettings.startingScale;this.transformSettings.rotation=0;this.applyTransform()},applyTransform:function(){var b="scale("+this.transformSettings.scale+") rotate("+this.transformSettings.rotation%360+"deg) translate("+d.parseInt(this.transformSettings.translateX,10)+"px, "+d.parseInt(this.transformSettings.translateY,10)+"px)";a.DOM.setStyle(this.containerEl,{webkitTransform:b,MozTransform:b,msTransform:b,transform:b})},
removeFromDOM:function(){a.DOM.removeChild(this.el,this.parentEl)}});Code.PhotoSwipe.ZoomPanRotateClass.CssClasses={documentOverlay:"ps-zoom-pan-rotate"}})(window,Code.PhotoSwipe.Util);
(function(d,a,b,c,e,g,f,h,i,j,k){h=SimpleClass.extend({fullSizeImages:null,documentOverlay:null,viewport:null,slider:null,captionAndToolbar:null,zoomPanRotate:null,settings:null,currentIndex:null,isBusy:null,isActive:null,currentHistoryHashValue:null,isBackEventSupported:null,slideshowTimeout:null,isSlideshowActive:null,lastShowPrevTrigger:null,backButtonClicked:null,viewportFadeInEventHandler:null,windowOrientationChangeEventHandler:null,windowScrollEventHandler:null,windowHashChangeHandler:null,
keyDownEventHandler:null,viewportTouchEventHandler:null,viewportFadeOutEventHandler:null,sliderDisplayCurrentFullSizeImageEventHandler:null,toolbarClickEventHandler:null,captionAndToolbarShowEventHandler:null,captionAndToolbarHideEventHandler:null,orientationEventName:null,init:function(){this.currentIndex=0;this.backButtonClicked=this.isSlideshowActive=this.isActive=this.isBusy=!1;this.settings={getImageSource:Code.PhotoSwipe.GetImageSource,getImageCaption:Code.PhotoSwipe.GetImageCaption,getImageMetaData:Code.PhotoSwipe.GetImageMetaData,
fadeInSpeed:250,fadeOutSpeed:500,slideSpeed:250,swipeThreshold:50,swipeTimeThreshold:250,loop:!0,slideshowDelay:3E3,imageScaleMethod:"fit",preventHide:!1,zIndex:1E3,backButtonHideEnabled:!0,jQueryMobile:!a.isNothing(d.jQuery)&&!a.isNothing(d.jQuery.mobile),jQueryMobileDialogHash:"&ui-state=dialog",allowUserZoom:!0,allowRotationOnUserZoom:!0,maxUserZoom:5,minUserZoom:0.5,adjustUserPanToZoom:!0,doubleClickSpeed:300,doubleClickZoom:2.5,captionAndToolbarHide:!1,captionAndToolbarHideOnSwipe:!0,captionAndToolbarFlipPosition:!1,
captionAndToolbarAutoHideDelay:5E3,captionAndToolbarOpacity:0.8,captionAndToolbarShowEmptyCaptions:!0};if(a.browser.isAndroid&&navigator.userAgent.indexOf("2.1"))this.isBackEventSupported=!0;if(!this.isBackEventSupported)this.isBackEventSupported="onhashchange"in d;if(this.settings.preventHide)this.settings.backButtonHideEnabled=!1;this.viewportFadeInEventHandler=this.onViewportFadeIn.bind(this);this.windowOrientationChangeEventHandler=this.onWindowOrientationChange.bind(this);this.windowScrollEventHandler=
this.onWindowScroll.bind(this);this.windowHashChangeHandler=this.onWindowHashChange.bind(this);this.keyDownEventHandler=this.onKeyDown.bind(this);this.viewportTouchEventHandler=this.onViewportTouch.bind(this);this.viewportFadeOutEventHandler=this.onViewportFadeOut.bind(this);this.sliderDisplayCurrentFullSizeImageEventHandler=this.onSliderDisplayCurrentFullSizeImage.bind(this);this.toolbarClickEventHandler=this.onToolbarClick.bind(this);this.captionAndToolbarShowEventHandler=this.onCaptionAndToolbarShow.bind(this);
this.captionAndToolbarHideEventHandler=this.onCaptionAndToolbarHide.bind(this)},setOptions:function(b){a.extend(this.settings,b);if(this.settings.preventHide)this.settings.backButtonHideEnabled=!1},setImages:function(b){if(!a.isArray)throw"thumbEls is not an array";this.currentIndex=0;this.fullSizeImages=[];for(var c=0;c<b.length;c++){var d=b[c];this.fullSizeImages.push(new e(c,this.settings.imageScaleMethod,this.settings.getImageSource(d),this.settings.getImageCaption(d),this.settings.getImageMetaData(d)))}},
show:function(c){if(!this.isBusy&&!this.isActive){if(!a.isNumber(c))throw"startingIndex must be a number";if(a.isNothing(this.fullSizeImages))throw"need to set images before showing the gallery";this.backButtonClicked=!1;this.isBusy=this.isActive=!0;this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.show;a.DOM.addClass(document.body,Code.PhotoSwipe.CssClasses.activeBody);c=d.parseInt(c);if(c<0||c>=this.fullSizeImages.length)c=0;this.currentIndex=c;a.isNothing(this.documentOverlay)?this.build():
this.resetPosition();a.Events.add(this.viewport,b.EventTypes.onFadeIn,this.viewportFadeInEventHandler);a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeShow,target:this});this.viewport.fadeIn()}},build:function(){this.documentOverlay=new c({fadeInSpeed:this.settings.fadeInSpeed,fadeOutSpeed:this.settings.fadeOutSpeed,zIndex:this.settings.zIndex});this.viewport=new g({fadeInSpeed:this.settings.fadeInSpeed,fadeOutSpeed:this.settings.fadeOutSpeed,swipeThreshold:this.settings.swipeThreshold,
swipeTimeThreshold:this.settings.swipeTimeThreshold,zIndex:this.settings.zIndex+1,doubleClickSpeed:this.settings.doubleClickSpeed});this.slider=new f({fadeInSpeed:this.settings.fadeInSpeed,fadeOutSpeed:this.settings.fadeOutSpeed,slideSpeed:this.settings.slideSpeed},this.viewport.el);this.captionAndToolbar=new j({opacity:this.settings.captionAndToolbarOpacity,fadeInSpeed:this.settings.fadeInSpeed,fadeOutSpeed:this.settings.fadeOutSpeed,autoHideDelay:this.settings.captionAndToolbarAutoHideDelay,flipPosition:this.settings.captionAndToolbarFlipPosition,
showEmptyCaptions:this.settings.captionAndToolbarShowEmptyCaptions,hideClose:this.settings.preventHide,zIndex:this.settings.zIndex+3});this.resetPosition()},addEventHandler:function(b,c){a.Events.add(this,b,c)},addEventHandlers:function(){this.orientationEventName=a.browser.isAndroid?"resize":"onorientationchange"in d?"orientationchange":"resize";a.Events.add(d,this.orientationEventName,this.windowOrientationChangeEventHandler);a.Events.add(d,"scroll",this.windowScrollEventHandler);if(this.isBackEventSupported&&
this.settings.backButtonHideEnabled)this.settings.jQueryMobile?d.location.hash=this.settings.jQueryMobileDialogHash:(this.currentHistoryHashValue="PhotoSwipe"+(new Date).getTime().toString(),d.location.hash=this.currentHistoryHashValue),a.Events.add(d,"hashchange",this.windowHashChangeHandler);a.Events.add(document,"keydown",this.keyDownEventHandler);a.Events.add(this.viewport,g.EventTypes.onTouch,this.viewportTouchEventHandler);a.Events.add(this.slider,f.EventTypes.onDisplayCurrentFullSizeImage,
this.sliderDisplayCurrentFullSizeImageEventHandler);a.Events.add(this.captionAndToolbar,i.EventTypes.onClick,this.toolbarClickEventHandler);a.Events.add(this.captionAndToolbar,j.EventTypes.onShow,this.captionAndToolbarShowEventHandler);a.Events.add(this.captionAndToolbar,j.EventTypes.onHide,this.captionAndToolbarHideEventHandler)},removeEventHandlers:function(){a.Events.remove(d,this.orientationEventName,this.windowOrientationChangeEventHandler);a.Events.remove(d,"scroll",this.windowScrollEventHandler);
this.isBackEventSupported&&this.settings.backButtonHideEnabled&&a.Events.remove(d,"hashchange",this.windowHashChangeHandler);a.Events.remove(document,"keydown",this.keyDownEventHandler);a.Events.remove(this.viewport,g.EventTypes.onTouch,this.viewportTouchEventHandler);a.Events.remove(this.slider,f.EventTypes.onDisplayCurrentFullSizeImage,this.sliderDisplayCurrentFullSizeImageEventHandler);a.Events.remove(this.captionAndToolbar,i.EventTypes.onClick,this.toolbarClickEventHandler);a.Events.remove(this.captionAndToolbar,
j.EventTypes.onShow,this.captionAndToolbarShowEventHandler);a.Events.remove(this.captionAndToolbar,j.EventTypes.onHide,this.captionAndToolbarHideEventHandler)},onViewportFadeIn:function(){a.Events.remove(this.viewport,b.EventTypes.onFadeIn,this.viewportFadeInEventHandler);this.documentOverlay.show();this.slider.fadeIn();this.addEventHandlers();this.slider.setCurrentFullSizeImage(this.fullSizeImages[this.currentIndex]);this.isBusy=!1;a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onShow,target:this})},
setSliderPreviousAndNextFullSizeImages:function(){var a,b=null,c=null;this.fullSizeImages.length>1&&(a=this.fullSizeImages.length-1,this.currentIndex===a?(this.settings.loop&&(c=this.fullSizeImages[0]),b=this.fullSizeImages[this.currentIndex-1]):this.currentIndex===0?(c=this.fullSizeImages[this.currentIndex+1],this.settings.loop&&(b=this.fullSizeImages[a])):(c=this.fullSizeImages[this.currentIndex+1],b=this.fullSizeImages[this.currentIndex-1]));this.slider.setPreviousAndNextFullSizeImages(b,c)},onKeyDown:function(a){this.stopSlideshow();
a.keyCode===37?(a.preventDefault(),this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.keyboard,this.showPrevious()):a.keyCode===39?(a.preventDefault(),this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.keyboard,this.showNext()):a.keyCode===38||a.keyCode===40?a.preventDefault():a.keyCode===27?(a.preventDefault(),this.hide()):a.keyCode===32&&(this.settings.hideToolbar?this.hide():this.toggleCaptionAndToolbar(),a.preventDefault())},onWindowOrientationChange:function(){this.resetPosition()},
onWindowScroll:function(){this.resetPosition()},onWindowHashChange:function(){if(d.location.hash!=="#"+(this.settings.jQueryMobile?this.settings.jQueryMobileDialogHash:this.currentHistoryHashValue))this.backButtonClicked=!0,this.hide()},resetPosition:function(){this.removeZoomPanRotate();this.viewport.resetPosition();this.slider.resetPosition();this.documentOverlay.resetPosition();this.captionAndToolbar.resetPosition();a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onResetPosition,target:this})},
canUserZoom:function(){if(!a.browser.isCSSTransformSupported)return!1;if(!this.settings.allowUserZoom)return!1;if(this.isBusy)return!1;if(a.isNothing(this.slider.currentItem.fullSizeImage))return!1;if(!this.slider.currentItem.fullSizeImage.hasLoaded)return!1;return!0},isZoomActive:function(){return!a.isNothing(this.zoomPanRotate)},onViewportTouch:function(b){switch(b.action){case g.Actions.gestureStart:this.createZoomPanRotate();break;case g.Actions.gestureChange:this.isZoomActive()&&this.zoomPanRotate.zoomRotate(b.scale,
this.settings.allowRotationOnUserZoom?b.rotation:0);break;case g.Actions.gestureEnd:this.isZoomActive()&&this.zoomPanRotate.setStartingScaleAndRotation(b.scale,this.settings.allowRotationOnUserZoom?b.rotation:0);break;case g.Actions.touchStart:this.stopSlideshow();this.isZoomActive()&&this.zoomPanRotate.panStart(b.point);break;case g.Actions.touchMove:this.isZoomActive()&&this.zoomPanRotate.pan(b.point);break;case g.Actions.click:this.stopSlideshow();this.settings.hideToolbar?this.hide():this.toggleCaptionAndToolbar();
a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onViewportClick,target:this});break;case g.Actions.doubleClick:if(this.isZoomActive()){var c=this;d.setTimeout(function(){c.removeZoomPanRotate()})}else{b.point.x-=a.DOM.windowScrollLeft();b.point.y-=a.DOM.windowScrollTop();var e=d.parseInt(a.DOM.getStyle(this.slider.currentItem.imageEl,"top"),10),f=d.parseInt(a.DOM.getStyle(this.slider.currentItem.imageEl,"left"),10),h=f+a.DOM.width(this.slider.currentItem.imageEl),i=e+a.DOM.height(this.slider.currentItem.imageEl);
if(b.point.x<f)b.point.x=f;else if(b.point.x>h)b.point.x=h;if(b.point.y<e)b.point.y=e;else if(b.point.y>i)b.point.y=i;this.createZoomPanRotate();this.zoomPanRotate.zoomAndPanToPoint(this.settings.doubleClickZoom,b.point)}break;case g.Actions.swipeLeft:this.stopSlideshow();this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.swipe;this.showNext();break;case g.Actions.swipeRight:this.stopSlideshow(),this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.swipe,this.showPrevious()}},onViewportFadeOut:function(){a.Events.remove(this.viewport,
b.EventTypes.onFadeOut,this.viewportFadeOutEventHandler);this.isActive=this.isBusy=!1;a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onHide,target:this});this.goBackInHistory()},hide:function(){if(!this.isBusy&&!this.settings.preventHide&&this.isActive)this.isBusy=!0,this.removeZoomPanRotate(),this.removeEventHandlers(),this.documentOverlay.hide(),this.captionAndToolbar.hide(),this.slider.hide(),a.DOM.removeClass(document.body,Code.PhotoSwipe.CssClasses.activeBody),a.Events.add(this.viewport,
b.EventTypes.onFadeOut,this.viewportFadeOutEventHandler),a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeHide,target:this}),this.viewport.fadeOut()},hideImmediately:function(){if(this.isActive)a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeHide,target:this}),this.removeZoomPanRotate(),this.removeEventHandlers(),this.documentOverlay.hide(),this.captionAndToolbar.hide(),this.slider.hide(),this.viewport.hide(),a.DOM.removeClass(document.body,Code.PhotoSwipe.CssClasses.activeBody),
this.isActive=this.isBusy=!1,a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onHide,target:this}),this.goBackInHistory()},goBackInHistory:function(){this.isBackEventSupported&&this.settings.backButtonHideEnabled&&(this.backButtonClicked||d.history.back())},showNext:function(){if(!this.isBusy)this.isBusy=!0,this.cleanUpZoomPanRotateForNextPrevious(),this.setCaptionAndToolbarOnShowPreviousNext(),this.slider.showNext(),a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onShowNext,target:this})},
showPrevious:function(){if(!this.isBusy)this.isBusy=!0,this.cleanUpZoomPanRotateForNextPrevious(),this.setCaptionAndToolbarOnShowPreviousNext(),this.wasUserZoomActive&&a.DOM.hide(this.slider.currentItem.imageEl),this.slider.showPrevious(),a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onShowPrevious,target:this})},cleanUpZoomPanRotateForNextPrevious:function(){a.isNothing(this.zoomPanRotate)||(this.settings.loop?a.DOM.hide(this.slider.currentItem.imageEl):this.currentIndex>0&&this.currentIndex<
this.fullSizeImages.length-2&&a.DOM.hide(this.slider.currentItem.imageEl));this.removeZoomPanRotate()},setCaptionAndToolbarOnShowPreviousNext:function(){if(!this.settings.captionAndToolbarHide){var a=!1;switch(this.lastShowPrevTrigger){case Code.PhotoSwipe.ShowPrevTriggers.toolbar:a=!0;break;case Code.PhotoSwipe.ShowPrevTriggers.slideshow:a=!1;break;default:a=!this.settings.captionAndToolbarHideOnSwipe}a?this.captionAndToolbar.resetAutoHideTimeout():this.fadeOutCaptionAndToolbar()}},onSliderDisplayCurrentFullSizeImage:function(b){this.currentIndex=
b.fullSizeImage.index;if(!this.settings.captionAndToolbarHide){this.settings.loop?(this.captionAndToolbar.setNextState(!1),this.captionAndToolbar.setPreviousState(!1)):(this.currentIndex>=this.fullSizeImages.length-1?this.captionAndToolbar.setNextState(!0):this.captionAndToolbar.setNextState(!1),this.currentIndex<1?this.captionAndToolbar.setPreviousState(!0):this.captionAndToolbar.setPreviousState(!1));this.captionAndToolbar.setCaptionValue(this.fullSizeImages[this.currentIndex].caption);b=!1;switch(this.lastShowPrevTrigger){case Code.PhotoSwipe.ShowPrevTriggers.toolbar:b=
!0;break;case Code.PhotoSwipe.ShowPrevTriggers.show:b=!0;break;case Code.PhotoSwipe.ShowPrevTriggers.slideshow:b=!1;break;default:b=!this.settings.captionAndToolbarHideOnSwipe}b&&(a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarShow,target:this}),this.captionAndToolbar.fadeIn());a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onDisplayImage,target:this,image:this.fullSizeImages[this.currentIndex]})}this.lastShowPrevTrigger="";this.setSliderPreviousAndNextFullSizeImages();
this.isSlideshowActive&&this.fireSlideshowTimeout();this.isBusy=!1},toggleCaptionAndToolbar:function(){this.settings.captionAndToolbarHide?this.captionAndToolbar.hide():this.captionAndToolbar.isHidden?(a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarShow,target:this}),this.captionAndToolbar.fadeIn()):(a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarHide,target:this}),this.captionAndToolbar.fadeOut())},fadeOutCaptionAndToolbar:function(){!this.settings.captionAndToolbarHide&&
!this.captionAndToolbar.isHidden&&(a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onBeforeCaptionAndToolbarHide,target:this}),this.captionAndToolbar.fadeOut())},onToolbarClick:function(a){this.stopSlideshow();switch(a.action){case i.Actions.previous:this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.toolbar;this.showPrevious();break;case i.Actions.next:this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.toolbar;this.showNext();break;case i.Actions.play:this.startSlideshow();break;
default:this.hide()}},startSlideshow:function(){if(!this.isBusy)a.isNothing(this.slideshowTimeout)||d.clearTimeout(this.slideshowTimeout),this.removeZoomPanRotate(),this.isSlideshowActive=!0,this.fadeOutCaptionAndToolbar(),this.fireSlideshowTimeout(),a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onSlideshowStart,target:this})},stopSlideshow:function(){a.isNothing(this.slideshowTimeout)||d.clearTimeout(this.slideshowTimeout);this.isSlideshowActive=!1;a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onSlideshowStop,
target:this})},fireSlideshowTimeout:function(){var a=!1;this.settings.loop?this.fullSizeImages.length>1&&(a=!0):this.currentIndex<this.fullSizeImages.length-1&&(a=!0);if(a)this.lastShowPrevTrigger=Code.PhotoSwipe.ShowPrevTriggers.slideshow,this.slideshowTimeout=d.setTimeout(this.showNext.bind(this),this.settings.slideshowDelay)},createZoomPanRotate:function(){if(this.canUserZoom()){this.stopSlideshow();if(!this.isZoomActive())this.zoomPanRotate=new k({maxZoom:this.settings.maxUserZoom,minZoom:this.settings.minUserZoom,
adjustPanToZoom:this.settings.adjustUserPanToZoom},this.viewport.el,this.slider.currentItem.imageEl);this.fadeOutCaptionAndToolbar()}},removeZoomPanRotate:function(){if(!a.isNothing(this.zoomPanRotate))this.zoomPanRotate.removeFromDOM(),this.zoomPanRotate=null},onCaptionAndToolbarShow:function(){a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onCaptionAndToolbarShow,target:this})},onCaptionAndToolbarHide:function(){a.Events.fire(this,{type:Code.PhotoSwipe.EventTypes.onCaptionAndToolbarHide,target:this})}});
Code.PhotoSwipe.CssClasses={activeBody:"ps-active"};Code.PhotoSwipe.ShowPrevTriggers={show:"show",toolbar:"toobar",swipe:"swipe",keyboard:"keyboard",slideshow:"slideshow"};Code.PhotoSwipe.EventTypes={onBeforeShow:"PhotoSwipeOnBeforeShow",onShow:"PhotoSwipeOnShow",onBeforeHide:"PhotoSwipeOnBeforeHide",onHide:"PhotoSwipeOnHide",onShowNext:"PhotoSwipeOnShowNext",onShowPrevious:"PhotoSwipeOnShowPrevious",onDisplayImage:"PhotoSwipeOnDisplayImage",onResetPosition:"PhotoSwipeOnResetPosition",onSlideshowStart:"PhotoSwipeOnSlideshowStart",
onSlideshowStop:"PhotoSwipeOnSlideshowStop",onBeforeCaptionAndToolbarShow:"PhotoSwipeOnBeforeCaptionAndToolbarShow",onCaptionAndToolbarShow:"PhotoSwipeOnCaptionAndToolbarShow",onBeforeCaptionAndToolbarHide:"PhotoSwipeOnBeforeCaptionAndToolbarHide",onCaptionAndToolbarHide:"PhotoSwipeOnCaptionAndToolbarHide",onViewportClick:"PhotoSwipeOnViewportClick"};Code.PhotoSwipe.GetImageSource=function(a){return a.href};Code.PhotoSwipe.GetImageCaption=function(b){if(b.nodeName==="IMG")return a.DOM.getAttribute(b,
"alt");var c,d;for(c=0;c<b.childNodes.length;c++)if(d=b.childNodes[c],b.childNodes[c].nodeName==="IMG")return a.DOM.getAttribute(d,"alt")};Code.PhotoSwipe.GetImageMetaData=function(){return{}};Code.PhotoSwipe.Current=new h;Code.photoSwipe=function(b,c,d){var e=!0;if(!a.isNothing(b)){if(a.isNothing(c))c=document.documentElement,e=!1;a.isString(c)&&(c=document.documentElement.querySelector(c));if(a.isNothing(c))throw"Unable to find container element";a.isString(b)&&(b=c.querySelectorAll(b));if(!a.isNothing(b)){var f=
function(a){a.preventDefault();g(a.currentTarget)},g=function(a){var c;for(c=0;c<b.length;c++)if(b[c]===a)break;Code.PhotoSwipe.Current.show(c)};Code.PhotoSwipe.Current.setOptions(d);Code.PhotoSwipe.Current.setImages(b);if(e)c.addEventListener("click",function(c){if(c.target!==c.currentTarget){c.preventDefault();var d=function(b,c,e){if(a.isNothing(b)||a.isNothing(c)||a.isNothing(e))return null;if(b.nodeName===c)return b;if(b===e)return null;return d(b.parentNode,c,e)},c=d(c.target,b[0].nodeName,
c.currentTarget);a.isNothing(c)||g(c)}},!1);else for(c=0;c<b.length;c++)b[c].addEventListener("click",f,!1);return b}}};if(!a.isNothing(d.jQuery))d.jQuery.fn.photoSwipe=function(a){var b=this;Code.PhotoSwipe.Current.setOptions(a);Code.PhotoSwipe.Current.setImages(b);$(b).die("click.photoswipe");$(b).live("click.photoswipe",function(a){a.preventDefault();a=$(b).index($(a.currentTarget));Code.PhotoSwipe.Current.show(a)})}})(window,Code.PhotoSwipe.Util,Code.PhotoSwipe.ElementClass,Code.PhotoSwipe.DocumentOverlayClass,
Code.PhotoSwipe.FullSizeImageClass,Code.PhotoSwipe.ViewportClass,Code.PhotoSwipe.SliderClass,Code.PhotoSwipe.CaptionClass,Code.PhotoSwipe.ToolbarClass,Code.PhotoSwipe.CaptionToolbarClass,Code.PhotoSwipe.ZoomPanRotateClass);
