function getBoolean(n){switch(n){case!0:case"true":case"True":case"TRUE":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function trimLastCommaAndTrailingWhiteSpace(n){return n.replace(/,\s*$/,"")}function trimLastCollonAndTrailingWhiteSpace(n){return n.replace(/;\s*$/,"")}function watermarkImage(n,t){var i=new Image;i.onload=function(){var u=i.height,f=i.width,r=new Image;r.onload=function(){var e=Object.assign(document.createElement("canvas"),{width:f,height:u}),o=e.getContext("2d");o.drawImage(i,0,0);o.drawImage(r,0,0);try{n.src=e.toDataURL("image/png")}catch(s){console.error("Cannot watermark image with text:",{src:n.src,text:t,error:s})}};r.src="data:image/svg+xml;base64,"+window.btoa('<svg xmlns="http://www.w3.org/5000/svg" height="'+u+'" width="'+f+'"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><div style="position: absolute;right: 0;bottom: 0;font-family: Tahoma;font-size: 10pt;background: #000;color: #fff;padding: 0.25em;border-radius: 0.25em;opacity: 0.6;margin: 0 0.125em 0.125em 0;">'+t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"<\/div><\/div><\/foreignObject><\/svg>")};i.src=n.src}function mutuallyExclusive(n){var t=jQuery(n).prop("checked");jQuery(n).closest("div.mutuallyExclusiveElementsContainer").find(".mutuallyExclusiveElement:checked").prop("checked",!1).prop("value",!1);jQuery(n).prop("checked",t).prop("value",!0)}function applyMutuallyExclusiveness(){jQuery("div.mutuallyExclusiveElementsContainer").find(".mutuallyExclusiveElement").on("click",function(){var n=jQuery(this).prop("checked");jQuery(this).closest("div.mutuallyExclusiveElementsContainer").find(".mutuallyExclusiveElement:checked").prop("checked",!1);jQuery(this).prop("checked",n)})}function createPagination(n,t){var o=parseInt(n.attr("data-totalitems")),i="compact-theme",r="Prev",u="Next",f=[],e=!0,s=5;n.attr("data-pagingstyles")=="Bullets"?(i="bullets-theme",r="",u="",f=Array.apply(null,Array(o)).map(String.prototype.valueOf,"&nbsp;"),e=!1,s=o*2+5):n.attr("data-pagingstyles")=="Buttons"?(i="",r="<<",u=">>",f=[],e=!0):n.attr("data-pagingstyles")=="Arrows"&&(i="arrow-theme",r="<<<",u=">>>",f=[],e=!0);$(t).pagination({items:o,itemsOnPage:parseInt(n.attr("data-itemperpage")),prevText:r,nextText:u,labelMap:f,ellipsePageSet:e,displayedPages:s,hrefTextPrefix:null,cssStyle:i,onPageClick:function(r){var e=n.attr("data-imagetransition"),u,f;e=="FadeInFadeOut"?(u=jQuery(n).find("div[data-pageindex='"+r.previousPage+"']"),f=jQuery(n).find("div[data-pageindex='"+r.currentPage+"']"),f.animate({opacity:1,duration:5e3,display:"block",queue:!1},{duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){var n=jQuery(this);n.fadeIn();n.css("opacity",1)}}),u.animate({opacity:0,display:"none",duration:5e3,queue:!1},{duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){u.hide();u.css({left:"0px"})},start:function(){}})):e=="Slideshow"?(u=jQuery(n).find("div[data-pageindex='"+r.previousPage+"']"),f=jQuery(n).find("div[data-pageindex='"+r.currentPage+"']"),f.css({right:"-="+f.width()*2,marginRight:"-="+f.width()*2}),f.show(),f.animate({display:"block",right:"+=0px",marginRight:"+=0px"},{queue:!0,duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){var n=jQuery(this);n.show();n.css({right:"0px",marginTop:"0px",marginRight:"0px",left:"0px",marginLeft:"0px",opacity:1})}}),u.animate({display:"none",left:"-="+u.width(),marginLeft:"-="+u.width(),opacity:0},{queue:!0,duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){u.hide();u.css({right:"0px",marginTop:"0px",marginRight:"0px",left:"0px",marginLeft:"0px",opacity:1});u.detach();jQuery(n).find(".galleryInnerContainer").append(u)},start:function(){}})):(jQuery(n).find("div[data-pageindex='"+r.previousPage+"']").hide(),jQuery(n).find("div[data-pageindex='"+r.currentPage+"']").show());i!=="bullets-theme"&&i!=="arrow-theme"&&$(t).find("ul:first-child").addClass("pagination pagination-sm")}});i!=="bullets-theme"&&i!=="arrow-theme"&&$(t).find("ul:first-child").addClass("pagination pagination-sm")}function updatePageNumbers(n){jQuery(n).find(".justified-gallery").each(function(n,t){jQuery(t).attr("data-pageindex",n+1)})}function autoPageSwitcher(n){var u=jQuery(n).find(".flexpage-pagination"),e=n.attr("data-imagetransition"),t,f,i,r;if(e=="FadeInFadeOut")t=u.pagination("getCurrentPage"),f=t,t=t+1,i=jQuery(n).find("div[data-pageindex='"+f+"']"),r=jQuery(n).find("div[data-pageindex='"+t+"']"),r.animate({opacity:1,display:"block",duration:"slow",queue:!1},{duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){var n=jQuery(this);n.fadeIn();n.css("opacity",1)}}),i.animate({opacity:0,display:"none",duration:"slow",queue:!1},{duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){i.hide();i.css({left:"0px"})},start:function(){}}),u.pagination("selectPage",t);else if(e=="Slideshow"){var t=u.pagination("getCurrentPage"),f=t,o=u.pagination("getPagesCount");t=t>=o?1:t+1;i=jQuery(n).find("div[data-pageindex='"+f+"']");r=jQuery(n).find("div[data-pageindex='"+t+"']");r.css({right:"-="+r.width()*2,marginRight:"-="+r.width()*2});r.show();r.animate({display:"block",right:"+=0px",marginRight:"+=0px"},{queue:!0,duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){var n=jQuery(this);n.show();n.css({right:"0px",marginTop:"0px",marginRight:"0px",left:"0px",marginLeft:"0px",opacity:1})}});i.animate({display:"none",left:"-="+i.width(),marginLeft:"-="+i.width(),opacity:0},{queue:!0,duration:n.attr("data-imageschangeinterval"),easing:"linear",complete:function(){i.hide();i.css({right:"0px",marginTop:"0px",marginRight:"0px",left:"0px",marginLeft:"0px",opacity:1});i.detach();jQuery(n).find(".galleryInnerContainer").append(i)},start:function(){}});u.pagination("selectPage",t)}}function imageZoom(n,t){function s(){i.parentNode.removeChild(i)}function f(n){var s,t,f;n.preventDefault();s=h(n);t=s.x-i.offsetWidth/2;f=s.y-i.offsetHeight/2;t>r.width-i.offsetWidth&&(t=r.width-i.offsetWidth);t<0&&(t=0);f>r.height-i.offsetHeight&&(f=r.height-i.offsetHeight);f<0&&(f=0);i.style.left=t+"px";i.style.top=f+"px";u.style.backgroundPosition="-"+t*e+"px -"+f*o+"px"}function h(n){var u,t=0,i=0;return n=n||window.event,u=r.getBoundingClientRect(),t=n.pageX-u.left,i=n.pageY-u.top,t=t-window.pageXOffset,i=i-window.pageYOffset,{x:t,y:i}}var r,i,u,e,o;r=jQuery(n)[0];u=document.getElementById(t);i=document.createElement("div");i.setAttribute("class","img-zoom-lens");r.parentElement.insertBefore(i,r);e=u.offsetWidth/i.offsetWidth;o=u.offsetHeight/i.offsetHeight;u.style.backgroundImage="url('"+r.src+"')";u.style.backgroundSize=r.width*e+"px "+r.height*o+"px";i.addEventListener("mousemove",f);r.addEventListener("mousemove",f);r.addEventListener("mouseout",s);i.addEventListener("touchmove",f);r.addEventListener("touchmove",f)}function magnify(n,t){function s(){jQuery(r).hide()}function e(n){jQuery(r).show();var c,e,s;n.preventDefault();c=h(n);e=c.x;s=c.y;e>i.width-u/t&&(e=i.width-u/t);e<u/t&&(e=u/t);s>i.height-f/t&&(s=i.height-f/t);s<f/t&&(s=f/t);r.style.left=e-u-i.style.marginleft+"px";r.style.top=s-f-i.style.margintop+"px";r.style.backgroundPosition="-"+(e*t-u+o)+"px -"+(s*t-f+o)+"px"}function h(n){var u,t=0,r=0;return n=n||window.event,u=i.getBoundingClientRect(),t=n.pageX-u.left,r=n.pageY-u.top,t=t-window.pageXOffset,r=r-window.pageYOffset,{x:t,y:r}}var i,r,u,f,o;i=jQuery(n)[0];r=document.createElement("DIV");r.setAttribute("class","img-magnifier-glass");i.parentElement.insertBefore(r,i);r.style.backgroundImage="url('"+jQuery(i).attr("data-zoom-image")+"')";r.style.backgroundRepeat="no-repeat";r.style.backgroundSize=i.width*t+"px "+i.height*t+"px";o=3;u=r.offsetWidth/2;f=r.offsetHeight/2;r.addEventListener("mousemove",e);i.addEventListener("mousemove",e);i.addEventListener("mouseout",s);r.addEventListener("mouseout",s);r.addEventListener("touchmove",e);i.addEventListener("touchmove",e)}!function(){"use strict";var i={autostart:!0,autostartAtImage:1,autostartAtAlbum:1,backgroundColor:"#fff",browserHistory:!0,canChangeMode:!0,canClose:!1,canMinimalizeThumbnails:!0,canZoom:!0,disabledOnIE8AndOlder:!0,draggableZoom:!0,draggableZoomHideNavigationOnMobile:!0,height:"600px",hideThumbnailsOnInit:!1,items:null,maxMobileWidth:767,mode:"standard",preloadAll:!1,slideshow:!0,slideshowAutostart:!1,slideshowCanRandom:!0,slideshowInterval:"8s",slideshowRandom:!1,swipeEvents:!0,textColor:"#000",thumbnails:!0,thumbHeight:75,thumbHeightOnFullScreen:100,thumbnailsFullScreen:!0,thumbnailsHideOnMobile:!0,thumbnailsPosition:"bottom",thumbType:"image",thumbWidth:75,thumbWidthOnFullScreen:100,title:!0,titleExpanded:!1,tooltipClose:"Close",tooltipFullScreen:"Full screen",tooltipRandom:"Random",tooltips:!0,tooltipSeeAllPhotos:"See all photos",tooltipSeeOtherAlbums:"See other albums",tooltipSlideshow:"Slideshow",tooltipToggleThumbnails:"Toggle thumbnails",tooltipZoom:"Zoom",transition:"moveToLeft_moveFromRight",transitionBackward:"auto",transitionCols:1,transitionDuration:"0.7s",transitionRows:1,transitionTimingFunction:"cubic-bezier(0,1,1,1)",transitionWaveDirection:"forward",width:"100%",zoomSize:"fit",afterLoadPhoto:function(){},beforeLoadPhoto:function(){},closeGallery:function(){},initGallery:function(){},showGallery:function(){},showPhoto:function(){}},n={moveToLeft_moveFromRight:["pt-page-moveToLeft","pt-page-moveFromRight"],moveToRight_moveFromLeft:["pt-page-moveToRight","pt-page-moveFromLeft"],moveToTop_moveFromBottom:["pt-page-moveToTop","pt-page-moveFromBottom"],moveToBottom_moveFromTop:["pt-page-moveToBottom","pt-page-moveFromTop"],fade_moveFromRight:["pt-page-fade","pt-page-moveFromRight pt-page-ontop"],fade_moveFromLeft:["pt-page-fade","pt-page-moveFromLeft pt-page-ontop"],fade_moveFromBottom:["pt-page-fade","pt-page-moveFromBottom pt-page-ontop"],fade_moveFromTop:["pt-page-fade","pt-page-moveFromTop pt-page-ontop"],moveToLeftFade_moveFromRightFade:["pt-page-moveToLeftFade","pt-page-moveFromRightFade"],moveToRightFade_moveFromLeftFade:["pt-page-moveToRightFade","pt-page-moveFromLeftFade"],moveToTopFade_moveFromBottomFade:["pt-page-moveToTopFade","pt-page-moveFromBottomFade"],moveToBottomFade_moveFromTopFade:["pt-page-moveToBottomFade","pt-page-moveFromTopFade"],moveToLeftEasing_moveFromRight:["pt-page-moveToLeftEasing pt-page-ontop","pt-page-moveFromRight"],moveToRightEasing_moveFromLeft:["pt-page-moveToRightEasing pt-page-ontop","pt-page-moveFromLeft"],moveToTopEasing_moveFromBottom:["pt-page-moveToTopEasing pt-page-ontop","pt-page-moveFromBottom"],moveToBottomEasing_moveFromTop:["pt-page-moveToBottomEasing pt-page-ontop","pt-page-moveFromTop"],scaleDown_moveFromRight:["pt-page-scaleDown","pt-page-moveFromRight pt-page-ontop"],scaleDown_moveFromLeft:["pt-page-scaleDown","pt-page-moveFromLeft pt-page-ontop"],scaleDown_moveFromBottom:["pt-page-scaleDown","pt-page-moveFromBottom pt-page-ontop"],scaleDown_moveFromTop:["pt-page-scaleDown","pt-page-moveFromTop pt-page-ontop"],scaleDown_scaleUpDown:["pt-page-scaleDown","pt-page-scaleUpDown pt-page-delay300"],scaleDownUp_scaleUp:["pt-page-scaleDownUp","pt-page-scaleUp pt-page-delay300"],moveToLeft_scaleUp:["pt-page-moveToLeft pt-page-ontop","pt-page-scaleUp"],moveToRight_scaleUp:["pt-page-moveToRight pt-page-ontop","pt-page-scaleUp"],moveToTop_scaleUp:["pt-page-moveToTop pt-page-ontop","pt-page-scaleUp"],moveToBottom_scaleUp:["pt-page-moveToBottom pt-page-ontop","pt-page-scaleUp"],scaleDownCenter_scaleUpCenter:["pt-page-scaleDownCenter","pt-page-scaleUpCenter pt-page-delay400"],rotateRightSideFirst_moveFromRight:["pt-page-rotateRightSideFirst","pt-page-moveFromRight pt-page-delay200 pt-page-ontop"],rotateLeftSideFirst_moveFromLeft:["pt-page-rotateLeftSideFirst","pt-page-moveFromLeft pt-page-delay200 pt-page-ontop"],rotateTopSideFirst_moveFromTop:["pt-page-rotateTopSideFirst","pt-page-moveFromTop pt-page-delay200 pt-page-ontop"],rotateBottomSideFirst_moveFromBottom:["pt-page-rotateBottomSideFirst","pt-page-moveFromBottom pt-page-delay200 pt-page-ontop"],flipOutRight_flipInLeft:["pt-page-flipOutRight","pt-page-flipInLeft pt-page-delay500"],flipOutLeft_flipInRight:["pt-page-flipOutLeft","pt-page-flipInRight pt-page-delay500"],flipOutTop_flipInBottom:["pt-page-flipOutTop","pt-page-flipInBottom pt-page-delay500"],flipOutBottom_flipInTop:["pt-page-flipOutBottom","pt-page-flipInTop pt-page-delay500"],rotateFall_scaleUp:["pt-page-rotateFall pt-page-ontop","pt-page-scaleUp"],rotateOutNewspaper_rotateInNewspaper:["pt-page-rotateOutNewspaper","pt-page-rotateInNewspaper pt-page-delay500"],rotatePushLeft_moveFromRight:["pt-page-rotatePushLeft","pt-page-moveFromRight"],rotatePushRight_moveFromLeft:["pt-page-rotatePushRight","pt-page-moveFromLeft"],rotatePushTop_moveFromBottom:["pt-page-rotatePushTop","pt-page-moveFromBottom"],rotatePushBottom_moveFromTop:["pt-page-rotatePushBottom","pt-page-moveFromTop"],rotatePushLeft_rotatePullRight:["pt-page-rotatePushLeft","pt-page-rotatePullRight pt-page-delay180"],rotatePushRight_rotatePullLeft:["pt-page-rotatePushRight","pt-page-rotatePullLeft pt-page-delay180"],rotatePushTop_rotatePullBottom:["pt-page-rotatePushTop","pt-page-rotatePullBottom pt-page-delay180"],rotatePushBottom_page:["pt-page-rotatePushBottom","pt-page-rotatePullTop pt-page-delay180"],rotateFoldLeft_moveFromRightFade:["pt-page-rotateFoldLeft","pt-page-moveFromRightFade"],rotateFoldRight_moveFromLeftFade:["pt-page-rotateFoldRight","pt-page-moveFromLeftFade"],rotateFoldTop_moveFromBottomFade:["pt-page-rotateFoldTop","pt-page-moveFromBottomFade"],rotateFoldBottom_moveFromTopFade:["pt-page-rotateFoldBottom","pt-page-moveFromTopFade"],moveToRightFade_rotateUnfoldLeft:["pt-page-moveToRightFade","pt-page-rotateUnfoldLeft"],moveToLeftFade_rotateUnfoldRight:["pt-page-moveToLeftFade","pt-page-rotateUnfoldRight"],moveToBottomFade_rotateUnfoldTop:["pt-page-moveToBottomFade","pt-page-rotateUnfoldTop"],moveToTopFade_rotateUnfoldBottom:["pt-page-moveToTopFade","pt-page-rotateUnfoldBottom"],rotateRoomLeftOut_rotateRoomLeftIn:["pt-page-rotateRoomLeftOut pt-page-ontop","pt-page-rotateRoomLeftIn"],rotateRoomRightOut_rotateRoomRightIn:["pt-page-rotateRoomRightOut pt-page-ontop","pt-page-rotateRoomRightIn"],rotateRoomTopOut_rotateRoomTopIn:["pt-page-rotateRoomTopOut pt-page-ontop","pt-page-rotateRoomTopIn"],rotateRoomBottomOut_rotateRoomBottomIn:["pt-page-rotateRoomBottomOut pt-page-ontop","pt-page-rotateRoomBottomIn"],rotateCubeLeftOut_rotateCubeLeftIn:["pt-page-rotateCubeLeftOut pt-page-ontop","pt-page-rotateCubeLeftIn"],rotateCubeRightOut_rotateCubeRightIn:["pt-page-rotateCubeRightOut pt-page-ontop","pt-page-rotateCubeRightIn"],rotateCubeTopOut_rotateCubeTopIn:["pt-page-rotateCubeTopOut pt-page-ontop","pt-page-rotateCubeTopIn"],rotateCubeBottomOut_rotateCubeBottomIn:["pt-page-rotateCubeBottomOut pt-page-ontop","pt-page-rotateCubeBottomIn"],rotateCarouselLeftOut_rotateCarouselLeftIn:["pt-page-rotateCarouselLeftOut pt-page-ontop","pt-page-rotateCarouselLeftIn"],rotateCarouselRightOut_rotateCarouselRightIn:["pt-page-rotateCarouselRightOut pt-page-ontop","pt-page-rotateCarouselRightIn"],rotateCarouselTopOut_rotateCarouselTopIn:["pt-page-rotateCarouselTopOut pt-page-ontop","pt-page-rotateCarouselTopIn"],rotateCarouselBottomOut_rotateCarouselBottomIn:["pt-page-rotateCarouselBottomOut pt-page-ontop","pt-page-rotateCarouselBottomIn"],rotateSidesOut_rotateSidesInDelay:["pt-page-rotateSidesOut","pt-page-rotateSidesIn pt-page-delay200"],rotateSlideOut_rotateSlideIn:["pt-page-rotateSlideOut","pt-page-rotateSlideIn"]},c=function(n){var i=jQuery,t=[];return i.each(n,function(n,i){t.push(i)}),t}(n),r=function(){return this.length?this[0].outerHTML||function(n){var t=document.createElement("div"),i;return t.appendChild(n.cloneNode(!0)),i=t.innerHTML,t=null,i}(this[0]):this},u=function(){var n=jQuery;return function(t){var i={show:!1,hide:!1,showLoader:!1,hideLoader:!1,showProgress:!1,hideProgress:!1,resetProgress:!1,fadeIn:!0,fadeOut:!0,fadeInLoader:!0,fadeOutLoader:!0,afterInit:function(){}};t=n.extend({},i,t);this.each(function(){var r,i,f,e,u=n(this),o=u.is(".overlayContainer:has(.overlay)"),s=function(){t.fadeIn?r.fadeIn(500):r.show()},h=function(){t.fadeOut?r.fadeOut(500):r.hide()},c=function(){t.fadeInLoader?i.not(":visible").fadeIn(500):i.not(":visible").show()},l=function(){t.fadeOutLoader?i.filter(":visible").fadeOut(500):i.filter(":visible").hide()};o||(u.addClass("overlayContainer"),u.append('<span class="overlay" style="display: none;"><span class="imageLoaderPositionAbsolute" style="display: none;"><span class="fa fa-spin fa-spinner"><\/span><span class="progress-value" style="display: none;">0<\/span><\/span><\/span>'),t.afterInit());r=u.children(".overlay");i=u.find(".imageLoaderPositionAbsolute");f=i.find(".progress-value");e=i.find(".fa-spinner");t.resetProgress&&f.html("0");t.showProgress?(i.addClass("preloadAll"),f.show(),e.hide()):t.hideProgress&&(i.removeClass("preloadAll"),f.hide(),e.show());r.stop(!1,!0);i.stop(!1,!0);t.show?s():t.hide&&h();t.showLoader?c():t.hideLoader&&l()})}}(),t=function(n){var t=jQuery;return t.fn.overlay=n,function(n){n=t.extend({interval:1e3,skip:":not(*)",start:function(){t("body").overlay({fadeIn:!1,fadeOut:!1,show:!0,showLoader:!0});t("body").show()},success:function(){t("body").overlay({hide:!0})},progress:function(){}},n);this.each(function(){function f(){var i,s=!0,h=0;r.each(function(){t(this)[0].complete&&t(this)[0].naturalWidth>0?h++:s=!1});i=parseInt(100*h/o);n.progress({percent:i});s?(clearTimeout(e),u.remove(),n.success()):e=setTimeout(f,n.interval)}var e,i=t(this),u=t(),r=t(),o=0;i.append('<div class="jLoaderTmp" style="position: absolute; width: 0; height: 0; line-height: 0; font-size: 0; visibility: hidden; overflow: hidden; z-index: -1;"><\/div>');u=i.children(".jLoaderTmp:last-child");t(i).add(i.find("*")).not(n.skip).each(function(){var n;"none"!==t(this).css("background-image")&&(n=t(this).css("background-image"),/url/.exec(n)&&(n=n.replace('"',"").replace("'","").replace(" ","").replace("url(","").replace(")",""),u.append('<img src="'+n+'">')))});r=i.find("img:not( "+n.skip+")");i.is("img")&&(i.is(n.skip)||(r=r.add(i)));o=parseInt(r.length);n.start();f()})}}(u),f=function(){var n=jQuery,t=n("title");return function(i){i=n.extend({},{stateObj:{},title:t.html(),path:""},i);window.history.pushState(i.stateObj,i.title,document.location.href.split("#")[0]+"#"+i.path)}}(),l=function(){var n=!1,t;return"Microsoft Internet Explorer"===navigator.appName&&(t=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(n=!0)),n},e=function(){var n=!1,t;return"Microsoft Internet Explorer"===navigator.appName&&(t=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(n=parseFloat(RegExp.$1),n=n<9)),n},o=function(){var t=jQuery,n=t("html");return function(){0===n.find(".jgallery").length?n.removeClass("has-jgallery"):n.addClass("has-jgallery");0===n.find(".jgallery.hidden").length?n.removeClass("has-hidden-jgallery"):n.addClass("has-hidden-jgallery");0===n.find(".jgallery:not(.hidden)").length?n.removeClass("has-visible-jgallery"):n.addClass("has-visible-jgallery")}},a=function(n){var t=jQuery,i=t("head"),u=0,r=function(n){n.is("[data-advanced-animation-id]")||(this.cols=1,this.rows=1,this.direction="forward",this.animation=!0,this.$element=n,this.$element.filter(":not( [data-advanced-animation-id] )").attr("data-advanced-animation-id",++u),this.$element.find(".pt-item").wrap('<div class="pt-page" />'),this.$element.wrapInner('<div class="pt-part" />'),this.generateHtml(),this._showParts(this.$element.find(".pt-part"),1))};return r.prototype={next:function(){var n=this.$element.find(".pt-part").eq("backward"===this.direction?-1:0).find(".pt-page-current:not(.pt-page-prev)").next();n.length?this.show(n):this.show(this.$element.find(".pt-part").eq("backward"===this.direction?-1:0).find(".pt-page").eq(0))},show:function(n,i){var r=n.prevAll().length+1;n.is(".pt-page-current:not(.pt-page-prev)")||(i=t.extend({},{animation:!0},i),this.animation=i.animation,this._waveJumpToEnd(),this.animation?this._runWave(r):this._showParts(this.$element.find(".pt-part"),r),this.intPrevPtPageNumber=r)},setQuantityParts:function(n,t){this.cols=n;this.rows=t;this.generateHtml()},setAnimationProperties:function(t){var r=this.$element.attr("data-advanced-animation-id"),u=i.find('style[data-advanced-animation-id="'+r+'"]');this.duration=t.duration;n()||(0===u.length&&(u=i.append('<style type="text/css" data-advanced-animation-id="'+r+'" />').children(":last-child")),u.html('                [data-advanced-animation-id="'+r+'"] .pt-page {                    -webkit-animation-duration: '+t.duration+";                    -moz-animation-duration: "+t.duration+";                    animation-duration: "+t.duration+";                    -webkit-animation-timing-function: "+t.transitionTimingFunction+";                    -moz-animation-timing-function: "+t.transitionTimingFunction+";                    animation-timing-function: "+t.transitionTimingFunction+";                }            "))},setHideEffect:function(n){this.prevHideEffect=this.hideEffect;this.hideEffect=n;/moveTo|rotateRoom|rotateCarousel|rotateSlideOut/.test(n)?this.$element.find(".pt-part").addClass("hide-overflow"):this.$element.find(".pt-part").removeClass("hide-overflow")},setShowEffect:function(n){this.prevShowEffect=this.showEffect;this.showEffect=n},setDirection:function(n){this.direction=n},_runWave:function(n){this.$element.find(".pt-part").addClass("in-queue");this._showNextPart(n)},_waveJumpToEnd:function(){clearTimeout(this.showPartsTimeout);void 0!==this.intPrevPtPageNumber&&this._showParts(this.$element.find(".pt-part.in-queue").removeClass("in-queue"),this.intPrevPtPageNumber)},_showNextPart:function(n){var i=this,t=this.$element.find(".pt-part.in-queue").eq("backward"===this.direction?-1:0);0!==t.length&&(this._showParts(t.removeClass("in-queue"),n),0!==t.length&&(clearTimeout(this.showPartsTimeout),this.showPartsTimeout=setTimeout(function(){i._showNextPart(n)},1e3*parseFloat(this.duration)*.25/Math.max(1,this.$element.find(".pt-part").length-1))))},_showParts:function(n,t){n.find(".pt-page-current.pt-page-prev").removeClass("pt-page-prev").removeClass("pt-page-current");n.find(".pt-page-current").addClass("pt-page-prev");n.find(".pt-page:nth-child("+t+")").addClass("pt-page-current");n.find(".pt-page").removeClass(this.hideEffect).removeClass(this.showEffect);void 0!==this.prevHideEffect&&n.find(".pt-page").removeClass(this.prevHideEffect);void 0!==this.prevShowEffect&&n.find(".pt-page").removeClass(this.prevShowEffect);this.animation&&(n.find(".pt-page-prev").addClass(this.hideEffect),n.find(".pt-page-current:not(.pt-page-prev)").addClass(this.showEffect))},hideActive:function(){this.$element.find(".pt-page-current").addClass("pt-page-prev").addClass(this.hideEffect)},generateHtml:function(){var n,t,i;for(this.$element.html(this.$element.find(".pt-part").eq(0).html()),i=this.$element.html(),this.$element.children(".pt-part").remove(),t=0;t<this.rows;t++)for(n=0;n<this.cols;n++)this.$element.append('<div class="pt-part pt-perspective" data-col-no="'+n+'" data-row-no="'+t+'" style="position: absolute;"><\/div>').children(":last-child").html(i).find(".pt-item");this.setPositionParts();this.$element.children(":not(.pt-part)").remove()},setPositionParts:function(){var n=this,i=this.$element.outerWidth(),r=this.$element.outerHeight(),u=i/this.cols,f=r/this.rows;this.$element.find(".pt-part").each(function(){var e=t(this),o=e.attr("data-col-no"),s=e.attr("data-row-no");e.css({left:n.$element.outerWidth()*100/n.cols*o/100+"px",top:n.$element.outerHeight()*100/n.rows*s/100+"px",width:n.$element.outerWidth()*(100/n.cols)/100+1+"px",height:n.$element.outerHeight()*(100/n.rows)/100+1+"px"}).find(".pt-item").css({width:i,height:r,left:-u*o,top:-f*s})})}},r}(e),s=function(){var n=jQuery,i=n("html"),t=function(n,t){this.$element=n;this.jGallery=t;this.$title=this.$element.find(".title")};return t.prototype={bindEvents:function(t){var r=this;this.getElement().on({click:function(n){r.menuToggle();n.stopPropagation()}});this.getItemsOfMenu().on({click:function(){var i=n(this);i.is(".active")||t.thumbnails.setActiveAlbum(t.thumbnails.$albums.filter('[data-jgallery-album-title="'+i.attr("data-jgallery-album-title")+'"]'))}});i.on("click",function(){r.menuHide()})},setTitle:function(n){this.$title.html(n)},getTitle:function(){return this.$title.html()},getListOfAlbums:function(){return this.getElement().find(".menu")},getElement:function(){return this.$element},getItemsOfMenu:function(){return this.getListOfAlbums().find(".item")},appendToMenu:function(n){this.getListOfAlbums().append(n)},menuToggle:function(){this.getElement().toggleClass("active")},menuHide:function(){this.getElement().removeClass("active")},clearMenu:function(){this.getListOfAlbums().html("")},refreshMenuHeight:function(){this.getListOfAlbums().css("max-height",this.jGallery.zoom.$container.outerHeight()-8)}},t}(),v=function(){var n=function(n,t){this.jGallery=t;this.$element=n};return n.prototype={clear:function(){return this.$element.stop(!1,!0).css({width:0}),this},start:function(n,t){var r=1e3*parseInt(this.jGallery.options.slideshowInterval),i=this.$element;return i.animate({width:n},r-r*(i.width()/i.parent().width()),"linear",t),this},pause:function(){return this.$element.stop(),this}},n}(),h=function(){var n=jQuery,t=function(t){n.extend(this,{photoId:0,number:0,url:"",link:"",target:"",thumbUrl:"",title:"",bgColor:"",textColor:""},t)};return t.prototype={generateImgTag:function(t){var i=n('<img src="'+t.src+'" />');return t.alt&&i.attr("alt",t.alt),t.bgColor&&i.attr("data-jgallery-bg-color",t.bgColor),t.textColor&&i.attr("data-jgallery-text-color",t.textColor),i},preload:function(){var n=this.$element;n.jLoader({start:function(){n.overlay({fadeIn:!1,fadeOut:!1,show:!0,showLoader:!0})},success:function(){n.overlay({hide:!0})}})},render:function(){var t=this.$element=n('<a href="'+this.url+'">'+this.generateImgTag({src:this.thumbUrl,bgColor:this.bgColor,textColor:this.textColor,alt:this.title}).outerHtml()+"<\/a>");return this.target&&t.attr("target",this.target),this.link&&t.attr("link",this.link),t.attr("data-jgallery-photo-id",this.photoId).attr("data-jgallery-number",this.number),t}},t}(),y=function(n){var t=jQuery,u=t("head"),i=t(window),r;return t.fn.jLoader=n,r=function(n){this.$element=n.$element.find(".jgallery-thumbnails");this.$a=this.getElement().find("a");this.$img=this.getElement().find("img");this.$container=this.getElement().find(".jgallery-container");this.$albums=this.getElement().find(".album").length?this.getElement().find(".album"):this.getElement().find(".jgallery-container-inner").addClass("active");this.$btnNext=this.getElement().children(".next");this.$btnPrev=this.getElement().children(".prev");this.intJgalleryId=n.$element.attr("data-jgallery-id");this.isJgalleryInitialized=n.$element.is("[data-jgallery-id]");this.zoom=n.zoom;this.$iconToggleThumbsVisibility=this.zoom.$container.find(".minimalize-thumbnails");this.jGallery=n;this.jGallery.options.swipeEvents&&this.initSwipeEvents()},r.prototype={getElement:function(){return this.$element},init:function(){this.getElement().removeClass("square number images jgallery-thumbnails-left jgallery-thumbnails-right jgallery-thumbnails-top jgallery-thumbnails-bottom jgallery-thumbnails-horizontal jgallery-thumbnails-vertical");this.getElement().addClass("jgallery-thumbnails-"+this.jGallery.options.thumbnailsPosition);this.isVertical()&&this.getElement().addClass("jgallery-thumbnails-vertical");this.isHorizontal()&&this.getElement().addClass("jgallery-thumbnails-horizontal");"image"===this.jGallery.options.thumbType&&this._initImages();"square"===this.jGallery.options.thumbType&&this._initSquare();"number"===this.jGallery.options.thumbType&&this._initNumber()},initSwipeEvents:function(){if(t.fn.swipe){var r,u,f=this.$container,n=this,i=function(t){n.isVertical()||n.isFullScreen()?f.css({"-webkit-transform":"translateY("+t+"px)",transform:"translateY("+t+"px)"}):f.css({"-webkit-transform":"translateX("+t+"px)",transform:"translateX("+t+"px)"})};f.swipe({swipeStatus:function(t,f,e,o){"start"===f?(r=n.canScrollToPrev(),u=n.canScrollToNext()):"move"===f?!u||"left"!==e&&"down"!==e?r&&i(o):i(-o):"end"===f?!u||"left"!==e&&"down"!==e?r&&(n._scrollToPrev(),i(0)):(n._scrollToNext(),i(0)):i(0)}})}},show:function(){var n=this;this.getElement().is(".hidden")&&(this.jGallery.isMobile()&&this.jGallery.options.thumbnailsHideOnMobile||this.getElement().removeClass("hidden"),this.getElement().is(".loaded")?(this._showNextThumb(),this.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden")):this.getElement().jLoader({start:function(){},success:function(){n._showNextThumb();n.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden");n.getElement().addClass("loaded")}}),this.$iconToggleThumbsVisibility.removeClass("inactive"))},showThumbsForActiveAlbum:function(){this.$a.addClass("hidden");this._showNextThumb()},hide:function(n){n=t.extend({hideEachThumb:!0},n);this.getElement().addClass("hidden");n.hideEachThumb&&this.$a.addClass("hidden");this.$iconToggleThumbsVisibility.addClass("inactive")},toggle:function(){this.getElement().is(".hidden")?this.show():this.hide({hideEachThumb:!1})},setActiveThumb:function(n){var i=n.find("img"),t=this.$albums.filter(".active"),n=t.find('img[src="'+i.attr("src")+'"]').parent("a").eq(0);this.getElement().find("a").removeClass("active");n.addClass("active");0===t.find("a.active").length&&t.find("a:first-child").eq(0).addClass("active");this.center(n)},isHorizontal:function(){return"top"===this.jGallery.options.thumbnailsPosition||"bottom"===this.jGallery.options.thumbnailsPosition},isVertical:function(){return"left"===this.jGallery.options.thumbnailsPosition||"right"===this.jGallery.options.thumbnailsPosition},isFullScreen:function(){return this.getElement().is(".full-screen")},refreshNavigation:function(){this.canScrollToPrev()?this.$btnPrev.addClass("visible"):this.$btnPrev.removeClass("visible");this.canScrollToNext()?this.$btnNext.addClass("visible"):this.$btnNext.removeClass("visible")},center:function(n){this.isHorizontal()&&this._horizontalCenter(n);this.isVertical()&&this._verticalCenter(n)},reload:function(){this.$a=this.getElement().find("a");this.$img=this.getElement().find("img");this.$albums=this.getElement().find(".album").length?this.getElement().find(".album"):this.getElement().find(".jgallery-container-inner");this.zoom.showPhoto(this.$albums.find("a").eq(0))},bindEvents:function(){var n=this;this.$btnNext.on("click",function(){n._scrollToNext()});this.$btnPrev.on("click",function(){n._scrollToPrev()});this.zoom.$container.find(".full-screen").on({click:function(){n.zoom.slideshowPause();n.changeViewToFullScreen()}});this.getElement().find(".jgallery-close").on({click:function(){n.changeViewToBar();n.zoom.refreshSize()}})},changeViewToBar:function(){this.getElement().removeClass("full-screen");this.isHorizontal()&&this.getElement().addClass("jgallery-thumbnails-horizontal").removeClass("jgallery-thumbnails-vertical");this.refreshNavigation()},changeViewToFullScreen:function(){this.getElement().addClass("full-screen");this.isHorizontal()&&this.getElement().addClass("jgallery-thumbnails-vertical").removeClass("jgallery-thumbnails-horizontal");this.refreshNavigation()},setActiveAlbum:function(n){this.jGallery.booIsAlbums&&!n.is(".active")&&(this.$albums.not(n.get(0)).removeClass("active"),n.addClass("active"),this.jGallery.iconChangeAlbum.getListOfAlbums().find(".item").removeClass("active").filter('[data-jgallery-album-title="'+n.attr("data-jgallery-album-title")+'"]').addClass("active"),this.jGallery.iconChangeAlbum.setTitle(n.attr("data-jgallery-album-title")),this.refreshNavigation(),!this.getElement().is(".full-screen")&&this.jGallery.$element.is(":visible")&&this.zoom.showPhoto(n.find("a").eq(0)),this.showThumbsForActiveAlbum(),this.zoom.slideshowStop())},_initSquare:function(){this.getElement().addClass("square")},_initNumber:function(){this.getElement().addClass("number");this._initSquare()},_initImages:function(){var n=u.find('style.jgallery-thumbnails[data-jgallery-id="'+this.intJgalleryId+'"]'),t='                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails a {\n                        width: '+this.jGallery.options.thumbWidth+"px;\n                        height: "+this.jGallery.options.thumbHeight+"px;\n                        font-size: "+this.jGallery.options.thumbHeight+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails.full-screen a {\n                        width: '+this.jGallery.options.thumbWidthOnFullScreen+"px;\n                        height: "+this.jGallery.options.thumbHeightOnFullScreen+"px;\n                        font-size: "+this.jGallery.options.thumbHeightOnFullScreen+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails-horizontal {\n                        height: '+parseInt(this.jGallery.options.thumbHeight+2)+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails-vertical {\n                        width: '+parseInt(this.jGallery.options.thumbWidth+2)+"px;\n                    }\n            ";this.getElement().addClass("images");n.length?n.html(t):u.append('                <style type="text/css" class="jgallery-thumbnails" data-jgallery-id="'+this.intJgalleryId+'">                    '+t+"                <\/style>            ");this.isHorizontal()?this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-h").removeClass("fa-ellipsis-v"):this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-v").removeClass("fa-ellipsis-h");this.isJgalleryInitialized||this.hide()},_showNextThumb:function(){var t=this,n=this.$a.parent(".active").children(".hidden").eq(0);setTimeout(function(){n.removeClass("hidden");n.length&&t._showNextThumb()},70)},_horizontalCenter:function(n){var t=this;1===n.length&&this.$container.stop(!1,!0).animate({scrollLeft:n.position().left- -1*this.$container.scrollLeft()-n.outerWidth()/-2-this.$container.outerWidth()/2},function(){t.refreshNavigation()})},_verticalCenter:function(n){var t=this;1===n.length&&this.$container.stop(!1,!0).animate({scrollTop:n.position().top- -1*this.$container.scrollTop()-n.outerHeight()/-2-this.$container.outerHeight()/2},function(){t.refreshNavigation()})},canScrollToPrev:function(){return this.isVertical()||this.isFullScreen()?this.$container.scrollTop()>0:this.$container.scrollLeft()>0},canScrollToNext:function(){if(this.isVertical()||this.isFullScreen())return this.$container.find(".jgallery-container-inner").height()>this.$container.height()+this.$container.scrollTop();var n=this.getElement().find("div.active");return("image"===this.jGallery.options.thumbType?this.$a.outerWidth(!0)*n.find("img").length:this.$a.outerWidth(!0)*n.find("a").length)>this.$container.width()+this.$container.scrollLeft()},_scrollToPrev:function(){var n=this;this.isVertical()||this.isFullScreen()?this.$container.stop(!1,!0).animate({scrollTop:"-="+.7*i.height()},function(){n.refreshNavigation()}):this.isHorizontal()&&this.$container.stop(!1,!0).animate({scrollLeft:"-="+.7*i.width()},function(){n.refreshNavigation()})},_scrollToNext:function(){var n=this;this.isVertical()||this.isFullScreen()?this.$container.stop(!1,!0).animate({scrollTop:"+="+.7*i.height()},function(){n.refreshNavigation()}):this.isHorizontal()&&this.$container.stop(!1,!0).animate({scrollLeft:"+="+.7*i.width()},function(){n.refreshNavigation()})}},r}(t),p=function(n,t){var i=jQuery,r;return i.fn.outerHtml=n,i.fn.jLoader=t,r=function(n,t){this.options=i.extend({},{thumbsHidden:!0},t);this.jGallery=n;this.isSlider=n.isSlider();this.$element=n.$this;this.booIsAlbums=n.booIsAlbums;this.$tmp;this.intI=1;this.intJ=1;this.intNo;this.$thumbnailsContainerInner=this.jGallery.$jgallery.find(".jgallery-thumbnails .jgallery-container-inner");this.start()},r.prototype={start:function(){this.$thumbnailsContainerInner.html("");this.jGallery.options.items?this.processOptions():this.processHtml();this.refreshThumbsSize()},processOptions:function(){function n(n,t){var r=new h(i.extend({photoId:this.intI++,number:this.intNo++},n));t.append(r.render());r.preload()}this.booIsAlbums?this.jGallery.options.items.forEach(function(t){var i=this.$thumbnailsContainerInner.append('<div class="album" data-jgallery-album-title="'+t.title+'"><\/div>').children(":last-child");this.intNo=1;t.images.forEach(function(t){n.call(this,t,i)},this)},this):(this.intNo=1,this.jGallery.options.items.forEach(function(t){n.call(this,t,this.$thumbnailsContainerInner)},this))},processHtml:function(){var n=this,t=this.jGallery.isSlider()?".album:has(img)":".album:has(a:has(img))";i("body").append('<div id="jGalleryTmp" style="position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: -1; overflow: hidden;">'+this.$element.html()+"<\/div>");this.$tmp=i("#jGalleryTmp");this.booIsAlbums?this.$tmp.find(t).each(function(){n.insertAlbum(i(this))}):this.insertImages(this.$tmp,this.$thumbnailsContainerInner);this.$tmp.remove()},insertAlbum:function(n){var i=n.is("[data-jgallery-album-title]")?n.attr("data-jgallery-album-title"):"Album "+this.intJ,t=this.$thumbnailsContainerInner.append('<div class="album" data-jgallery-album-title="'+i+'"><\/div>').children(":last-child");1===this.intJ&&t.addClass("active");this.insertImages(n,t);this.intJ++},insertImages:function(n,t){var r=this,u=this.jGallery.isSlider()?"img":"a:has(img)";this.intNo=1;n.find(u).each(function(){r.insertImage(i(this),t)})},insertImage:function(n,t){var i=n.parent(),r=n.is("img")?n:n.find("img").eq(0),u=new h({photoId:this.intI++,number:this.intNo++,url:n.is("img")&&this.isSlider?n.attr("src"):n.attr("href"),link:n.is("img")&&this.isSlider&&i.is("a")?i.attr("href"):void 0,target:n.is("img")&&this.isSlider&&i.is("a")&&i.is("[target]")?i.attr("target"):void 0,thumbUrl:r.attr("src"),title:r.attr("alt"),bgColor:r.attr("data-jgallery-bg-color"),textColor:r.attr("data-jgallery-text-color")});t.append(u.render());u.preload()},refreshThumbsSize:function(){var n=this.jGallery.options;this.$thumbnailsContainerInner.find("img").each(function(){var t=i(this),r=new Image;r.src=t.attr("src");r.width/r.height<n.thumbWidth/n.thumbHeight?t.addClass("thumb-vertical").removeClass("thumb-horizontal"):t.addClass("thumb-horizontal").removeClass("thumb-vertical");r.width/r.height<n.thumbWidthOnFullScreen/n.thumbHeightOnFullScreen?t.addClass("thumb-on-full-screen-vertical").removeClass("thumb-on-full-screen-horizontal"):t.addClass("thumb-on-full-screen-horizontal").removeClass("thumb-on-full-screen-vertical")})}},r}(r,t),w=function(n,t,i,r,u,f,e,o){var s=jQuery,c=s("body"),h;return s.fn.jLoader=n,s.fn.overlay=t,h=function(n){this.$container=n.$element.children(".zoom-container");this.$element=this.$container.children(".zoom");this.$title=this.$container.find(".nav-bottom > .title");this.$btnPrev=this.$container.children(".prev");this.$btnNext=this.$container.children(".next");this.thumbnails=n.thumbnails;this.$jGallery=n.$element;this.jGallery=n;this.$resize=this.$container.find(".resize");this.$dragNav=this.$container.find(".drag-nav");this.$dragNavCrop=s();this.$dragNavCropImg=s();this.$changeMode=this.$container.find(".fa.change-mode");this.$random=this.$container.find(".random");this.$slideshow=this.$container.find(".slideshow");this.intJGalleryId=this.$jGallery.attr("data-jgallery-id");this.booSlideshowPlayed=!1;this.booLoadingInProgress=!1;this.booLoadedAll=!1;this.$title.on("click",function(){s(this).toggleClass("expanded")});this.update();this.enableDrag()},h.prototype={update:function(){var n=r[this.jGallery.options.transition];this.$container.attr("data-size",this.jGallery.options.zoomSize);this.$element.find(".pt-page").removeClass(this.jGallery.options.hideEffect).removeClass(this.jGallery.options.showEffect);void 0!==n&&(this.jGallery.options.hideEffect=n[0],this.jGallery.options.showEffect=n[1]);this.initAdvancedAnimation()},initAdvancedAnimation:function(){void 0===this.advancedAnimation&&(this.advancedAnimation=new e(this.$element));this.advancedAnimation.setAnimationProperties({duration:this.jGallery.options.transitionDuration,transitionTimingFunction:this.jGallery.options.transitionTimingFunction});this.advancedAnimation.setDirection(this.jGallery.options.transitionWaveDirection);this.advancedAnimation.setQuantityParts(this.jGallery.options.transitionCols,this.jGallery.options.transitionRows);this.advancedAnimation.setHideEffect(this.jGallery.options.hideEffect);this.advancedAnimation.setShowEffect(this.jGallery.options.showEffect)},setThumbnails:function(n){this.thumbnails=n},showDragNav:function(){this.$dragNav.removeClass("hide").addClass("show")},hideDragNav:function(){this.$dragNav.removeClass("show").addClass("hide")},refreshDragNavVisibility:function(){var n=this.$element.find("img.active");n.width()<=this.$element.outerWidth()||n.height()<=this.$element.outerHeight()?this.hideDragNav():this.showDragNav()},enableDrag:function(){var u,e,f,o,t,i,n=this,l=function(){return parseInt(u)-parseInt(i.css("margin-left"))},s=function(s){f=s.pageX;o=s.pageY;t=s;i=n.$element.find("img.active");u=i.css("margin-left");e=i.css("margin-top");n.$element.on({mousemove:h,touchmove:h,mouseleave:r,touchend:r});"fill"===n.jGallery.options.zoomSize&&n.$dragNav.removeClass("hide").addClass("show");c(0,0)},r=function(){var r=l(),i=f-t.pageX;n.$element.off("mousemove touchmove mouseleave touchend");"fill"===n.jGallery.options.zoomSize&&n.$dragNav.removeClass("show").addClass("hide");n.jGallery.options.swipeEvents&&0===r&&(i>0?n.showNextPhoto():i<0&&n.showPrevPhoto())},h=function(i){t="touchmove"===i.type?i.originalEvent.touches[0]:i;var r={x:t.pageX-f,y:t.pageY-o},u={};n.jGallery.options.draggableZoom&&(u=c(r.x,r.y));Math.abs(r.y)>Math.abs(r.x)&&u.y?i.preventDefault():Math.abs(r.x)>=Math.abs(r.y)&&u.x&&i.preventDefault()},c=function(t,i){var f=parseFloat(parseFloat(u)+t),o=parseFloat(parseFloat(e)+i),r=n.$element.find("img.active"),b=r.eq(0),a=b.position(),v=a.left,y=a.top,s=r.eq(-1),p=s.position(),w=s.parent(),h=n.$dragNavCrop,c=h.position(),l={x:v+f<0&&p.left+s.width()+f>w.outerWidth(),y:y+o<0&&p.top+s.height()+o>w.outerHeight()};return l.x&&(r.css({"margin-left":f}),h.css({left:-(v+f)/r.width()*100+"%"})),l.y&&(r.css({"margin-top":o}),h.css({top:-(y+o)/r.height()*100+"%"})),c&&n.$dragNavCropImg.css({"margin-left":-c.left,"margin-top":-c.top}),l};this.refreshDragNavCropSize();this.jGallery.options.draggableZoom&&(this.refreshCursor(),window.addEventListener("resize",this.refreshCursor.bind(this)));this.$element.on({mousedown:function(t){s(t);n.slideshowPause()},touchstart:function(t){s(t.originalEvent.touches[0]);n.slideshowPause()},mouseup:function(){r()},touchend:function(){r()}})},refreshCursor:function(){this.$element.get(0).style.cursor=this.canDrag()?"move":"default"},canDrag:function(){var n=this.$element.get(0),t=n.querySelector("img.active");return t&&this.jGallery.options.draggableZoom&&(t.clientWidth>n.clientWidth||t.clientHeight>n.clientHeight)},refreshContainerSize:function(){var i=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight(),n=!this.jGallery.isSlider()&&!this.thumbnails.getElement().is(".hidden"),t=n?this.jGallery.options.thumbnailsPosition:"";this.$container.css({width:n&&this.thumbnails.isVertical()?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(!0):"auto",height:n&&this.thumbnails.isHorizontal()?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(!0)-i:this.$jGallery.height()-i,"margin-top":"top"===t?this.thumbnails.getElement().outerHeight(!0):0,"margin-left":"left"===t?this.thumbnails.getElement().outerWidth(!0):0,"margin-right":"right"===t?this.thumbnails.getElement().outerWidth(!0):0});this.jGallery.options.draggableZoom&&this.refreshDragNavCropSize()},refreshSize:function(){this.thumbnails.isFullScreen()||(this.refreshContainerSize(),"original"===this.jGallery.options.zoomSize?this.original():"fill"===this.jGallery.options.zoomSize?this.fill():this.fit(),this.jGallery.options.draggableZoom&&(this.refreshDragNavCropSize(),this.refreshDragNavVisibility()),this.$element.addClass("visible"),this.refreshCursor())},refreshDragNavCropSize:function(){var t,i,n=this.$element.find("img.active");this.$dragNavCrop.css({width:this.$element.width()/n.width()*100+"%",height:this.$element.height()/n.height()*100+"%"});t=n.attr("data-width")<this.$container.outerWidth()?0:(this.$dragNav.width()-this.$dragNavCrop.width())/2;i=n.attr("data-height")<this.$container.outerHeight()?0:(this.$dragNav.height()-this.$dragNavCrop.height())/2;this.$dragNavCrop.css({left:t,top:i});this.$dragNavCropImg.length&&this.$dragNavCropImg.css({"margin-left":-t,"margin-top":-i})},changeSize:function(){if("fit"===this.jGallery.options.zoomSize)this.jGallery.options.zoomSize="fill";else if("fill"===this.jGallery.options.zoomSize){var n=this.$element.find("img.active").eq(0);this.jGallery.options.zoomSize=this.$element.outerWidth().toString()===n.attr("data-width")?"fit":"original"}else"original"===this.jGallery.options.zoomSize&&(this.jGallery.options.zoomSize="fit");this.refreshSize();this.$container.attr("data-size",this.jGallery.options.zoomSize)},original:function(){var n=this.$element.find("img.active");this.advancedAnimation.setPositionParts();this.setImgSizeForOriginal(n);this.setImgSizeForOriginal(this.$element.find(".pt-page.init img"));n.attr("data-width")<=this.$element.outerWidth()&&n.attr("data-height")<=this.$element.outerHeight()?this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus"):this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus")},fit:function(){var n=this.$element.find("img.active").add(this.$element.find(".pt-page.init img"));this.advancedAnimation.setPositionParts();this.setImgSizeForFit(n.filter(".active"));this.setImgSizeForFit(n.filter(":not( .active )"));this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus")},fill:function(){var n=this.$element.find("img.active");this.setImgSizeForFill(n);this.setImgSizeForFill(this.$element.find(".pt-page.init img"));this.advancedAnimation.setPositionParts();n.attr("data-width")>n.width()&&n.attr("data-height")>n.height()?this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus"):this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus")},setImgSizeForOriginal:function(n){n.css({width:n.attr("data-width"),height:n.attr("data-height"),"min-width":0,"min-height":0,"max-width":"none","max-height":"none"});n.css({"margin-top":-n.height()/2,"margin-left":-n.width()/2})},setImgSizeForFit:function(n){var t=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight(),i=!this.jGallery.isSlider()&&!this.thumbnails.getElement().is(".hidden");n.css({width:"auto",height:"auto","min-width":0,"min-height":0,"max-width":i&&this.thumbnails.isVertical()?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(!0):this.$jGallery.width(),"max-height":i&&this.thumbnails.isHorizontal()?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(!0)-t:this.$jGallery.height()-t});n.width()/n.height()/this.jGallery.getCanvasRatioWidthToHeight()<1?n.css({width:"auto",height:i&&this.thumbnails.isHorizontal()?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(!0)-t:this.$jGallery.height()-t}):n.css({width:i&&this.thumbnails.isVertical()?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(!0):this.$jGallery.width(),height:"auto"});n.css({"margin-top":-n.height()/2,"margin-left":-n.width()/2})},setImgSizeForFill:function(n){var t=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight(),i=!this.jGallery.isSlider()&&!this.thumbnails.getElement().is(".hidden");n.css({width:"auto",height:"auto","max-width":"none","max-height":"none","min-width":0,"min-height":0});n.width()/n.height()/this.jGallery.getCanvasRatioWidthToHeight()>1?n.css({width:"auto",height:i&&this.thumbnails.isHorizontal()?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(!0)-t:this.$jGallery.height()-t}):n.css({width:i&&this.thumbnails.isVertical()?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(!0):this.$jGallery.width(),height:"auto"});n.css({"min-width":i&&this.thumbnails.isVertical()?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(!0):this.$jGallery.width(),"min-height":i&&this.thumbnails.isHorizontal()?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(!0)-t:this.$jGallery.height()-t});n.css({"margin-top":-n.height()/2,"margin-left":-n.width()/2})},isAddedToLoad:function(n){return this.$element.find("img").filter('[src="'+n.attr("href")+'"]').length>0},isLoaded:function(n){var t=this.$element.find("img").filter('[src="'+n.attr("href")+'"]').get(0);if(t)return this.imgIsLoaded(t)},imgIsLoaded:function(n){return n.complete&&n.naturalWidth>0},refreshNav:function(){var n=this.thumbnails.getElement().find("div.active a.active");1===n.prev("a").length?this.$btnPrev.removeClass("hidden"):this.$btnPrev.addClass("hidden");1===n.next("a").length?this.$btnNext.removeClass("hidden"):this.$btnNext.addClass("hidden")},slideshowStop:function(){this.slideshowPause();this.jGallery.progress.clear()},slideshowPause:function(){this.jGallery.progress.pause();this.$slideshow.removeClass("fa-pause").addClass("fa-play");this.booSlideshowPlayed=!1;this.jGallery.options.slideshowCanRandom&&this.$random.hide()},slideshowPlay:function(){this.booLoadingInProgress||this.booSlideshowPlayed||(this.booSlideshowPlayed=!0,this.$slideshow.removeClass("fa-play").addClass("fa-pause"),this.slideshowSetTimeout(),this.jGallery.options.slideshowCanRandom&&this.$random.show())},slideshowPlayPause:function(){this.$slideshow.is(".fa-play")?this.slideshowPlay():this.slideshowPause()},slideshowSetTimeout:function(){var n=this;this.jGallery.progress.start(this.$container.width(),function(){n.jGallery.progress.clear();n.jGallery.options.slideshowRandom?n.showRandomPhoto():n.showNextPhotoLoop()})},slideshowRandomToggle:function(){this.jGallery.options.slideshowRandom?(this.$random.removeClass("active"),this.jGallery.options.slideshowRandom=!1):(this.$random.addClass("active"),this.jGallery.options.slideshowRandom=!0)},showNextPhotoLoop:function(){var n=this.thumbnails.$a.filter(".active").next("a");0===n.length&&(n=this.thumbnails.$albums.filter(".active").find("a").eq(0));this.showPhoto(n)},showRandomPhoto:function(){var n=this.thumbnails.$albums.filter(".active").find("a:not(.active)");this.showPhoto(n.eq(Math.floor(Math.random()*n.length)))},showPrevPhoto:function(){var n=this.thumbnails.$a.filter(".active").prev("a");1===n.length&&this.showPhoto(n)},showNextPhoto:function(){var n=this.thumbnails.$a.filter(".active").next("a");1===n.length&&this.showPhoto(n)},showPhotoInit:function(){this.jGallery.init()},showPhoto:function(n,t){var h,c,u,e,i=this,o=n.children("img"),l=n.next(),s;if(l.length>0&&(i.isAddedToLoad(l)||this.appendPhoto(l)),s=n.prev(),s.length>0&&(i.isAddedToLoad(s)||this.appendPhoto(s)),this.jGallery.initialized()||this.showPhotoInit(),!this.booLoadingInProgress){if(this.booLoadingInProgress=!0,e=this.jGallery.options[n.nextAll(".active").length>0?"transitionBackward":"transition"],"random"===e?this.setRandomTransition():"auto"===e?(u=r[f[this.jGallery.options.transition]],this.advancedAnimation.setHideEffect(u[0]),this.advancedAnimation.setShowEffect(u[1])):(u=r[e],this.advancedAnimation.setHideEffect(u[0]),this.advancedAnimation.setShowEffect(u[1])),this.$element.find(".pt-page.init").remove(),this.jGallery.options.showPhoto(n,o),this.jGallery.$element.is(":not(:visible)")&&this.jGallery.show(),this.thumbnails.changeViewToBar(),this.jGallery.booIsAlbums&&""===this.jGallery.iconChangeAlbum.getTitle()&&(c=n.parents(".album").eq(0).attr("data-jgallery-album-title"),this.jGallery.iconChangeAlbum.setTitle(c),this.jGallery.iconChangeAlbum.$element.find('[data-jgallery-album-title="'+c+'"]').addClass("active"),n.parents(".album").addClass("active").siblings(".album").removeClass("active")),this.thumbnails.setActiveAlbum(this.thumbnails.$albums.filter('[data-jgallery-album-title="'+n.parents("[data-jgallery-album-title]").attr("data-jgallery-album-title")+'"]')),this.thumbnails.setActiveThumb(n),this.$element.find("img.active").attr("src")===n.attr("href"))return this.booLoadingInProgress=!1,void this.setJGalleryColoursForActiveThumb();n.is("[link]")?(this.$element.addClass("is-link"),n.is('[target="_blank"]')?this.$element.attr("onclick",'window.open("'+n.attr("link")+'")'):this.$element.attr("onclick",'window.location="'+n.attr("link")+'"')):(this.$element.removeClass("is-link"),this.$element.removeAttr("onclick"));this.refreshNav();this.jGallery.options.title&&this.$title.addClass("after fade");h=i.isLoaded(n);h||(i.jGallery.options.preloadAll&&!i.booLoadedAll?this.appendAllPhotos():this.isAddedToLoad(n)||this.appendPhoto(n));this.$element.find("img.active").addClass("prev-img");i.$container.find("img.active").removeClass("active");i.$container.find('[src="'+n.attr("href")+'"]').addClass("active");i.jGallery.options.title&&o.is("[alt]")&&i.$title.removeClass("after").addClass("before");!h||i.jGallery.options.preloadAll&&!i.booLoadedAll?(i.booLoadedAll=!0,i.$container.overlay({show:!0,showLoader:!0,showProgress:i.jGallery.options.preloadAll,resetProgress:i.jGallery.options.preloadAll}),i.jGallery.options.beforeLoadPhoto(n,o),i.loadPhoto(i.$element,n,t)):i.showPhotoSuccess(n,o,t)}},appendPhoto:function(n){this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page">                    <div class="pt-item"><img src="'+n.attr("href")+'" /><\/div>                <\/div>')},appendAllPhotos:function(){var n=this;this.jGallery.options.preloadAll&&(this.thumbnails.$a.each(function(){var t=s(this);n.isAddedToLoad(t)||n.$element.find(".pt-part").append('<div class="jgallery-container pt-page"><div class="pt-item"><img src="'+t.attr("href")+'" /><\/div><\/div>')}),this.appendInitPhoto(this.thumbnails.$a.eq(-1)))},appendInitPhoto:function(n){1===n.length&&this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page pt-page-current pt-page-ontop init" style="visibility: hidden;">                    <div class="pt-item"><img src="'+n.attr("href")+'" class="active loaded" /><\/div>                <\/div>')},loadPhoto:function(n,t,i){var r=this,e=t.children("img"),u=0,f=n.find(".pt-part").eq(0);(this.jGallery.options.preloadAll?f:f.find("img.active")).jLoader({interval:500,skip:".loaded",start:function(){},success:function(){n.find("img").each(function(){var n=s(this);r.imgIsLoaded(n.get(0))&&n.addClass("loaded")});r.$container.overlay({hide:!0,hideLoader:!0});r.showPhotoSuccess(t,e,i)},progress:function(n){r.jGallery.options.preloadAll&&(u=n.percent,r.$container.find(".overlay .imageLoaderPositionAbsolute").find(".progress-value").html(u))}})},showPhotoSuccess:function(n,t,r){var f,u=this.$element.find("img.active");r=s.extend({},{historyPushState:!0},r);u.is(":not([data-width])")&&(f=new Image,f.src=u.attr("src"),u.attr("data-width",f.width),u.attr("data-height",f.height));this.jGallery.options.title&&t.attr("alt")?(this.$title.html(t.attr("alt")).removeClass("before").removeClass("after"),this.jGallery.$element.addClass("has-title")):this.jGallery.$element.removeClass("has-title");this.setJGalleryColoursForActiveThumb();this.$element.find(".pt-page.init").css({visibility:"visible"});this.$element.find("img.prev-img").removeClass("prev-img");this.advancedAnimation.show(u.eq(0).parent().parent(),{animation:1===this.$element.find(".pt-part").eq(0).find(".pt-page-current:not(.pt-page-prev)").length});this.refreshSize();this.thumbnails.refreshNavigation();this.booSlideshowPlayed&&this.slideshowSetTimeout();this.jGallery.options.afterLoadPhoto(n,t);this.booLoadingInProgress=!1;this.jGallery.options.autostart&&this.jGallery.options.slideshowAutostart&&this.jGallery.options.slideshow&&(this.jGallery.options.slideshowAutostart=!1,this.slideshowPlay());this.jGallery.options.draggableZoom&&(this.$dragNav.html('<img src="'+u.attr("src")+'" class="bg">                    <div class="crop"><img src="'+u.attr("src")+'"><\/div>'),this.$dragNavCrop=this.$dragNav.find(".crop"),this.$dragNavCropImg=this.$dragNavCrop.find("img"),this.refreshDragNavCropSize());r.historyPushState&&this.jGallery.options.browserHistory&&i({path:u.attr("src")})},showPhotoByPath:function(n){var t=this.thumbnails.$albums.filter(".active").find('a[href="'+n+'"]');0===t.length&&(t=this.thumbnails.$a.filter('a[href="'+n+'"]').eq(0));0!==t.length&&this.showPhoto(t,{historyPushState:!1})},setJGalleryColoursForActiveThumb:function(){var n=this.thumbnails.$a.filter(".active").find("img");this.jGallery.setColours({strBg:n.is("[data-jgallery-bg-color]")?n.attr("data-jgallery-bg-color"):this.jGallery.options.backgroundColor,strText:n.is("[data-jgallery-bg-color]")?n.attr("data-jgallery-text-color"):this.jGallery.options.textColor})},setTransition:function(n){this.jGallery.options.hideEffect=r[n][0];this.jGallery.options.showEffect=r[n][1];this.advancedAnimation.setHideEffect(this.jGallery.options.hideEffect);this.advancedAnimation.setShowEffect(this.jGallery.options.showEffect)},setRandomTransition:function(){var n;this.$element.find(".pt-page").removeClass(this.jGallery.options.hideEffect).removeClass(this.jGallery.options.showEffect);n=Math.floor(Math.random()*u.length);this.jGallery.options.hideEffect=u[n][0];this.jGallery.options.showEffect=u[n][1];this.advancedAnimation.setHideEffect(this.jGallery.options.hideEffect);this.advancedAnimation.setShowEffect(this.jGallery.options.showEffect)},unmarkActive:function(){this.$element.find("img.active").removeClass("active")},changeMode:function(){var n=this.jGallery.options.mode;"slider"!==n&&("standard"===n?this.goToFullScreenMode():"full-screen"===n&&this.goToStandardMode(),this.jGallery.iconChangeAlbum instanceof o&&this.jGallery.iconChangeAlbum.refreshMenuHeight())},goToFullScreenMode:function(){c.css({overflow:"hidden"});this.jGallery.$element.removeClass("jgallery-standard").addClass("jgallery-full-screen").css({width:"auto",height:"auto"});this.$changeMode.removeClass("fa-expand").addClass("fa-compress");this.jGallery.options.mode="full-screen";this.jGallery.refreshDimensions()},goToStandardMode:function(){c.css({overflow:"visible"});this.jGallery.$element.removeClass("jgallery-full-screen").addClass("jgallery-standard").css({width:this.jGallery.options.width,height:this.jGallery.options.height});this.$changeMode.removeClass("fa-compress").addClass("fa-expand");this.jGallery.options.mode="standard";this.jGallery.refreshDimensions()}},h}(t,u,f,n,c,{moveToLeft_moveFromRight:"moveToRight_moveFromLeft",moveToRight_moveFromLeft:"moveToLeft_moveFromRight",moveToTop_moveFromBottom:"moveToBottom_moveFromTop",moveToBottom_moveFromTop:"moveToTop_moveFromBottom",fade_moveFromRight:"fade_moveFromLeft",fade_moveFromLeft:"fade_moveFromRight",fade_moveFromBottom:"fade_moveFromTop",fade_moveFromTop:"fade_moveFromBottom",moveToLeftFade_moveFromRightFade:"moveToRightFade_moveFromLeftFade",moveToRightFade_moveFromLeftFade:"moveToLeftFade_moveFromRightFade",moveToTopFade_moveFromBottomFade:"moveToBottomFade_moveFromTopFade",moveToBottomFade_moveFromTopFade:"moveToTopFade_moveFromBottomFade",moveToLeftEasing_moveFromRight:"moveToRightEasing_moveFromLeft",moveToRightEasing_moveFromLeft:"moveToLeftEasing_moveFromRight",moveToTopEasing_moveFromBottom:"moveToBottomEasing_moveFromTop",moveToBottomEasing_moveFromTop:"moveToTopEasing_moveFromBottom",scaleDown_moveFromRight:"scaleDown_moveFromLeft",scaleDown_moveFromLeft:"scaleDown_moveFromRight",scaleDown_moveFromBottom:"scaleDown_moveFromTop",scaleDown_moveFromTop:"scaleDown_moveFromBottom",scaleDown_scaleUpDown:"scaleDownUp_scaleUp",scaleDownUp_scaleUp:"scaleDown_scaleUpDown",moveToLeft_scaleUp:"moveToRight_scaleUp",moveToRight_scaleUp:"moveToLeft_scaleUp",moveToTop_scaleUp:"moveToBottom_scaleUp",moveToBottom_scaleUp:"moveToTop_scaleUp",scaleDownCenter_scaleUpCenter:"scaleDownCenter_scaleUpCenter",rotateRightSideFirst_moveFromRight:"rotateLeftSideFirst_moveFromLeft",rotateLeftSideFirst_moveFromLeft:"rotateRightSideFirst_moveFromRight",rotateTopSideFirst_moveFromTop:"rotateBottomSideFirst_moveFromBottom",rotateBottomSideFirst_moveFromBottom:"rotateTopSideFirst_moveFromTop",flipOutRight_flipInLeft:"flipOutLeft_flipInRight",flipOutLeft_flipInRight:"flipOutRight_flipInLeft",flipOutTop_flipInBottom:"flipOutBottom_flipInTop",flipOutBottom_flipInTop:"flipOutTop_flipInBottom",rotateFall_scaleUp:"rotateFall_scaleUp",rotateOutNewspaper_rotateInNewspaper:"rotateOutNewspaper_rotateInNewspaper",rotatePushLeft_moveFromRight:"rotatePushRight_moveFromLeft",rotatePushRight_moveFromLeft:"rotatePushLeft_moveFromRight",rotatePushTop_moveFromBottom:"rotatePushBottom_moveFromTop",rotatePushBottom_moveFromTop:"rotatePushTop_moveFromBottom",rotatePushLeft_rotatePullRight:"rotatePushRight_rotatePullLeft",rotatePushRight_rotatePullLeft:"rotatePushLeft_rotatePullRight",rotatePushTop_rotatePullBottom:"rotatePushTop_rotatePullBottom",rotatePushBottom_page:"rotatePushBottom_page",rotateFoldLeft_moveFromRightFade:"rotateFoldRight_moveFromLeftFade",rotateFoldRight_moveFromLeftFade:"rotateFoldLeft_moveFromRightFade",rotateFoldTop_moveFromBottomFade:"rotateFoldBottom_moveFromTopFade",rotateFoldBottom_moveFromTopFade:"rotateFoldTop_moveFromBottomFade",moveToRightFade_rotateUnfoldLeft:"moveToLeftFade_rotateUnfoldRight",moveToLeftFade_rotateUnfoldRight:"moveToRightFade_rotateUnfoldLeft",moveToBottomFade_rotateUnfoldTop:"moveToTopFade_rotateUnfoldBottom",moveToTopFade_rotateUnfoldBottom:"moveToBottomFade_rotateUnfoldTop",rotateRoomLeftOut_rotateRoomLeftIn:"rotateRoomRightOut_rotateRoomRightIn",rotateRoomRightOut_rotateRoomRightIn:"rotateRoomLeftOut_rotateRoomLeftIn",rotateRoomTopOut_rotateRoomTopIn:"rotateRoomBottomOut_rotateRoomBottomIn",rotateRoomBottomOut_rotateRoomBottomIn:"rotateRoomTopOut_rotateRoomTopIn",rotateCubeLeftOut_rotateCubeLeftIn:"rotateCubeRightOut_rotateCubeRightIn",rotateCubeRightOut_rotateCubeRightIn:"rotateCubeLeftOut_rotateCubeLeftIn",rotateCubeTopOut_rotateCubeTopIn:"rotateCubeBottomOut_rotateCubeBottomIn",rotateCubeBottomOut_rotateCubeBottomIn:"rotateCubeTopOut_rotateCubeTopIn",rotateCarouselLeftOut_rotateCarouselLeftIn:"rotateCarouselRightOut_rotateCarouselRightIn",rotateCarouselRightOut_rotateCarouselRightIn:"rotateCarouselLeftOut_rotateCarouselLeftIn",rotateCarouselTopOut_rotateCarouselTopIn:"rotateCarouselBottomOut_rotateCarouselBottomIn",rotateCarouselBottomOut_rotateCarouselBottomIn:"rotateCarouselTopOut_rotateCarouselTopIn",rotateSidesOut_rotateSidesInDelay:"rotateSidesOut_rotateSidesInDelay",rotateSlideOut_rotateSlideIn:"rotateSlideOut_rotateSlideIn"},a,s),b=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){var p=jQuery,g=p("html"),d=p("head"),w=p("body"),b=p(window),k;return p.fn.outerHtml=n,k=function(n,t,i){var f=this;t&&!n.is("[data-jgallery-id]")&&(this.$this=n,this.intId=t,this.$this.attr("data-jgallery-id",this.intId),this.overrideOptions(i),this.booIsAlbums=this.options.items&&this.options.items[0].images||n.find(".album:has(a:has(img))").length>1,this.options.disabledOnIE8AndOlder&&r()||this.init({success:function(){f.options.browserHistory&&f.browserHistory();f.options.autostart&&f.autostart();u();g.on({keydown:function(n){if(f.$element.is(":visible")){if(27===n.which){if(n.preventDefault(),f.thumbnails.getElement().is(".full-screen"))return f.thumbnails.changeViewToBar(),void f.zoom.refreshSize();f.isFullScreenMode()&&!f.canClose()&&f.zoom.changeMode();f.hide()}37===n.which&&(n.preventDefault(),f.zoom.slideshowStop(),f.zoom.showPrevPhoto());39===n.which&&(n.preventDefault(),f.zoom.slideshowStop(),f.zoom.showNextPhoto())}}})}}))},k.prototype={isFullScreenMode:function(){return"full-screen"===this.options.mode},canClose:function(){return this.options.canClose},template:{html:'<div class="jgallery" style="display: none;">                        <div class="jgallery-thumbnails hidden">                            <div class="jgallery-container"><div class="jgallery-container-inner"><\/div><\/div>                            <span class="prev jgallery-btn"><span class="fa fa-chevron-left ico"><\/span><\/span>                            <span class="next jgallery-btn"><span class="fa fa-chevron-right ico"><\/span><\/span>                        <\/div>                        <div class="zoom-container">                            <div class="zoom before pt-perspective"><\/div>                            <div class="drag-nav hide"><\/div>                            <div class="left"><\/div>                            <div class="right"><\/div>                            <span class="fa fa-chevron-left prev jgallery-btn jgallery-btn-large"><\/span>                            <span class="fa fa-chevron-right next jgallery-btn jgallery-btn-large"><\/span>                            <span class="progress"><\/span>                            <div class="nav">                                <span class="fa resize jgallery-btn jgallery-btn-small" tooltip-position="bottom right"><\/span>                                <span class="fa change-mode jgallery-btn jgallery-btn-small" tooltip-position="bottom right"><\/span>                                <span class="fa fa-times jgallery-close jgallery-btn jgallery-btn-small" tooltip-position="bottom right"><\/span>                            <\/div>                            <div class="nav-bottom">                                <div class="icons">                                    <span class="fa fa-play slideshow jgallery-btn jgallery-btn-small"><\/span>                                    <span class="fa fa-random random jgallery-btn jgallery-btn-small inactive"><\/span>                                    <span class="fa fa-th full-screen jgallery-btn jgallery-btn-small"><\/span>                                    <span class="fa fa-ellipsis-h minimalize-thumbnails jgallery-btn jgallery-btn-small"><\/span>                                <\/div>                                <div class="title before"><\/div>                            <\/div>                        <\/div>                    <\/div>',done:function(n){n(this.html)}},initialized:function(){return this.$this.is("[data-jgallery-id]")},update:function(n){var t=this;this.template.done(function(){t.overrideOptions(n);t.options.disabledOnIE8AndOlder&&r()||(t.booIsAlbums=t.$this.find(".album:has(a:has(img))").length>1,t.zoom.update(),t.thumbnails.init(),t.setUserOptions(),t.reloadThumbnails(),t.refreshDimensions())})},overrideOptions:function(n){var t=void 0!==n&&void 0!==n.mode;this.options=p.extend({},f,this.options);this.options=t&&"full-screen"===n.mode?p.extend({},this.options,e,n,s):t&&"slider"===n.mode?p.extend({},this.options,o,n,h):p.extend({},this.options,n)},reloadThumbnails:function(){new v(this,{thumbsHidden:!1});this.generateAlbumsDropdown();this.thumbnails.reload()},setVariables:function(){this.$element=p(".jgallery").filter('[data-jgallery-id="'+this.intId+'"]');this.progress=new l(this.$element.find(".zoom-container").children(".progress"),this);this.zoom=new y(this);this.thumbnails=new a(this);this.zoom.setThumbnails(this.thumbnails)},show:function(){this.options.items||this.$this.hide();b.on("resize",{jGallery:this},this.windowOnResize);"full-screen"===this.options.mode&&(this.bodyOverflowBeforeShow=w.css("overflow"),w.css({overflow:"hidden"}));this.$element.not(":visible").removeClass("hidden").stop(!1,!0).fadeIn(500);this.zoom.refreshContainerSize();this.zoom.$title.removeClass("hidden");this.options.showGallery();this.iconChangeAlbum instanceof c&&this.iconChangeAlbum.refreshMenuHeight();u()},hide:function(n){var i=this;this.options.canClose&&(n=p.extend({},{historyPushState:!0},n),this.$element.filter(":visible").stop(!1,!0).addClass("hidden").fadeOut(500,function(){"full-screen"===i.options.mode&&w.css({overflow:i.bodyOverflowBeforeShow});u()}),this.zoom.booLoadingInProgress=!1,clearTimeout(this.zoom.showPhotoTimeout),this.zoom.$title.addClass("hidden"),this.zoom.$btnPrev.addClass("hidden"),this.zoom.$btnNext.addClass("hidden"),this.zoom.slideshowPause(),this.zoom.advancedAnimation.hideActive(),this.zoom.unmarkActive(),b.off("resize",this.windowOnResize),this.$this.show(),n.historyPushState&&this.options.browserHistory&&t(),this.options.closeGallery())},autostart:function(){var n,t;this.$element.is(":visible")||(this.booIsAlbums?(n=this.thumbnails.getElement().find(".album").eq(this.options.autostartAtAlbum-1),0===n.length&&(n=this.thumbnails.getElement().find(".album").eq(0))):n=this.thumbnails.getElement(),t=n.find("a").eq(this.options.autostartAtImage-1),0===t.length&&(t=n.find("a").eq(0)),t.trigger("click"))},browserHistory:function(){function n(){var n;if(document.location.hash)switch(n=document.location.hash.replace("#","")){case"":t.hide({historyPushState:!1});break;default:t.zoom.showPhotoByPath(n)}}var t=this,i=window.onpopstate;window.onpopstate=function(){"function"==typeof i&&i();n()};this.options.autostart&&n()},generateAlbumsDropdown:function(){var n=this;this.$element.find(".change-album").remove();this.booIsAlbums&&(this.zoom.$container.find(".nav-bottom > .icons").append('                <span class="fa fa-list-ul change-album jgallery-btn jgallery-btn-small" tooltip="'+n.options.tooltipSeeOtherAlbums+'">                    <span class="menu jgallery-btn"><\/span>                    <span class="title"><\/span>                <\/span>            '),this.iconChangeAlbum=new c(n.zoom.$container.find(".change-album"),this),this.iconChangeAlbum.clearMenu(),this.thumbnails.$albums.each(function(){var t=p(this).attr("data-jgallery-album-title");n.iconChangeAlbum.appendToMenu('<span class="item" data-jgallery-album-title="'+t+'">'+t+"<\/span>")}),this.thumbnails.getElement().append(this.iconChangeAlbum.getElement().outerHtml()),this.iconChangeAlbum=new c(this.iconChangeAlbum.getElement().add(this.thumbnails.getElement().children(":last-child")),this),this.iconChangeAlbum.bindEvents(this))},init:function(n){var t=this;n=p.extend({success:function(){}},n);d.append('<style type="text/css" class="colours" data-jgallery-id="'+this.intId+'"><\/style>');this.options.initGallery();this.generateHtml({success:function(){new v(t);t.setVariables();t.thumbnails.init();t.thumbnails.getElement().append('<span class="fa fa-times jgallery-btn jgallery-close jgallery-btn-small"><\/span>');t.generateAlbumsDropdown();t.setUserOptions();"fit"!==t.options.zoomSize&&"original"!==t.options.zoomSize||t.zoom.$resize.addClass("fa-search-plus");"fill"===t.options.zoomSize&&t.zoom.$resize.addClass("fa-search-minus");i()||t.$element.addClass("text-shadow");t.thumbnails.refreshNavigation();t.zoom.refreshNav();t.zoom.refreshSize();t.$this.on("click","a:has(img)",function(n){var i=p(this);n.preventDefault();t.zoom.showPhoto(i)});t.thumbnails.$element.on("click","a",function(n){var i=p(this);n.preventDefault();i.is(":not(.active)")?(t.zoom.slideshowStop(),t.zoom.showPhoto(i)):t.thumbnails.isFullScreen()&&(t.thumbnails.changeViewToBar(),t.zoom.refreshSize())});t.zoom.$btnPrev.add(t.zoom.$container.find(".left")).on({click:function(){t.zoom.slideshowStop();t.zoom.showPrevPhoto()}});t.zoom.$btnNext.add(t.zoom.$container.find(".right")).on({click:function(){t.zoom.slideshowStop();t.zoom.showNextPhoto()}});t.zoom.$container.find(".jgallery-close").on({click:function(){t.hide()}});t.zoom.$random.on({click:function(){t.zoom.slideshowRandomToggle()}});t.zoom.$resize.on({click:function(){t.zoom.changeSize();t.zoom.slideshowPause()}});t.zoom.$changeMode.on({click:function(){t.zoom.changeMode()}});t.zoom.$slideshow.on({click:function(){t.zoom.slideshowPlayPause()}});t.zoom.$container.find(".minimalize-thumbnails").on({click:function(){t.thumbnails.toggle();t.zoom.refreshSize()}});t.thumbnails.bindEvents();n.success();t.options.hideThumbnailsOnInit&&t.zoom.$container.find(".minimalize-thumbnails").addClass("inactive")}});this.refreshCssClassJGalleryMobile()},isSlider:function(){return"slider"===this.options.mode},windowOnResize:function(n){var t=n.data.jGallery;t.refreshThumbnailsVisibility();t.refreshCssClassJGalleryMobile()},refreshCssClassJGalleryMobile:function(){this.isMobile()?this.$jgallery.addClass("jgallery-mobile"):this.$jgallery.removeClass("jgallery-mobile")},refreshDimensions:function(){this.zoom.refreshSize();this.iconChangeAlbum instanceof c&&this.iconChangeAlbum.refreshMenuHeight();this.thumbnails.refreshNavigation()},getCanvasRatioWidthToHeight:function(){var n,t;return this.thumbnails.isHorizontal()?(n=this.$element.width(),t=this.$element.height()-this.thumbnails.getElement().outerHeight(!0)):this.thumbnails.isVertical()?(n=this.$element.width()-this.thumbnails.getElement().outerWidth(!0),t=this.$element.height()):(n=this.$element.width(),t=this.$element.height()),n/t},hideThumbnailsBar:function(){this.thumbnails.getElement().addClass("hidden");this.zoom.$container.find(".minimalize-thumbnails").hide()},showThumbnailsBar:function(){this.thumbnails.getElement().removeClass("hidden");this.options.canMinimalizeThumbnails&&this.options.thumbnails?this.zoom.$container.find(".minimalize-thumbnails").show():this.zoom.$container.find(".minimalize-thumbnails").hide()},refreshThumbnailsVisibility:function(){this.isMobile()?this.options.thumbnailsHideOnMobile&&this.hideThumbnailsBar():this.options.thumbnails?this.showThumbnailsBar():this.hideThumbnailsBar();this.refreshDimensions()},isMobile:function(){return b.width()<=this.options.maxMobileWidth},setUserOptions:function(){var n=this.options,t=n.mode,i="full-screen"===t?"auto":n.width,r="full-screen"===t?"auto":n.height;this.refreshAttrClasses();this.options.canZoom?this.zoom.$resize.show():this.zoom.$resize.hide();this.options.canChangeMode?this.zoom.$changeMode.show():this.zoom.$changeMode.hide();"standard"===this.options.mode?this.zoom.$changeMode.removeClass("fa-compress").addClass("fa-expand"):this.zoom.$changeMode.removeClass("fa-expand").addClass("fa-compress");this.options.canClose?this.zoom.$container.find(".jgallery-close").show():this.zoom.$container.find(".jgallery-close").hide();this.refreshThumbnailsVisibility();this.zoom.refreshSize();this.options.slideshow?this.zoom.$slideshow.show():this.zoom.$slideshow.hide();this.options.slideshow&&this.options.slideshowCanRandom&&this.options.slideshowAutostart?this.zoom.$random.show():this.zoom.$random.hide();this.options.slideshow&&this.options.slideshowCanRandom&&this.options.slideshowRandom?this.zoom.$random.addClass("active"):this.zoom.$random.removeClass("active");this.options.thumbnailsFullScreen&&this.options.thumbnails?this.zoom.$container.find(".full-screen").show():this.zoom.$container.find(".full-screen").hide();this.options.hideThumbnailsOnInit&&this.options.thumbnails?this.thumbnails.hide():this.thumbnails.show();this.options.titleExpanded?this.zoom.$title.addClass("expanded"):this.zoom.$title.removeClass("expanded");this.setColours({strBg:this.options.backgroundColor,strText:this.options.textColor});this.options.tooltips?this.$jgallery.addClass("jgallery-tooltips"):this.$jgallery.removeClass("jgallery-tooltips");this.$jgallery.css({width:i,height:r});this.options.draggableZoomHideNavigationOnMobile?this.$jgallery.addClass("jgallery-hide-draggable-navigation-on-mobile"):this.$jgallery.removeClass("jgallery-hide-draggable-navigation-on-mobile")},refreshAttrClasses:function(){var n=this;p.each(["standard","full-screen","slider"],function(t,i){n.$jgallery.removeClass("jgallery-"+i)});this.$jgallery.addClass("jgallery-"+this.options.mode)},setColours:function(n){d.find('style[data-jgallery-id="'+this.intId+'"].colours').html(this.getCssForColours(n))},generateHtml:function(n){var t=this;n=p.extend({},{success:function(){}},n);this.template.done(function(i){!function(){var n=t.options,r=n.mode;n.items?t.$jgallery=t.$this.append(i).children(":last-child"):"full-screen"===r?t.$jgallery=t.$this.after(i).next():(n.autostart&&t.$this.hide(),t.$jgallery=t.$this.after(i).next());t.$jgallery.addClass("jgallery-"+r).attr("data-jgallery-id",t.intId);t.$jgallery.find(".fa.slideshow").attr("tooltip",n.tooltipSlideshow);t.$jgallery.find(".fa.resize").attr("tooltip",n.tooltipZoom);t.$jgallery.find(".fa.change-mode").attr("tooltip",n.tooltipFullScreen);t.$jgallery.find(".fa.jgallery-close").attr("tooltip",n.tooltipClose);t.$jgallery.find(".fa.random").attr("tooltip",n.tooltipRandom);t.$jgallery.find(".fa.full-screen").attr("tooltip",n.tooltipSeeAllPhotos);t.$jgallery.find(".fa.minimalize-thumbnails").attr("tooltip",n.tooltipToggleThumbnails)}();n.success()})},getCssForColours:function(n){n=p.extend({strBg:"rgb( 0, 0, 0 )",strText:"rgb( 255, 255, 255 )"},n);var i,r,t;return"function"==typeof tinycolor?(i=tinycolor(n.strText).toRgb(),r=tinycolor(n.strBg).toRgb(),r.r+r.g+r.b>375?(r=tinycolor.darken(n.strBg).toRgb(),t=tinycolor(n.strBg).toRgb()):(r=tinycolor(n.strBg).toRgb(),t=tinycolor.lighten(n.strBg).toRgb())):(r={r:230,g:230,b:230},t={r:255,g:255,b:255},i={r:0,g:0,b:0}),'                .jgallery[data-jgallery-id="'+this.intId+'"] {                  background: rgb('+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] [tooltip]:after {                  background: rgba('+i.r+","+i.g+", "+i.b+", .9);                  color: rgb("+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn {                  color: rgb('+i.r+","+i.g+", "+i.b+");                  text-shadow: 0 0 1px rgb("+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn.active {                  color: rgb('+i.r+","+i.g+", "+i.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn:hover {                  text-shadow: none;                  text-shadow: 0 0 .15em rgba('+i.r+","+i.g+", "+i.b+",.75), 0 0 .45em rgba("+i.r+","+i.g+", "+i.b+',.5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .change-album > .title {                  background: rgb('+t.r+","+t.g+", "+t.b+");                  box-shadow: 4px 0 4px rgb("+t.r+","+t.g+", "+t.b+')                }                .jgallery[data-jgallery-id="'+this.intId+'"] .full-screen .change-album .menu {                  background: rgb('+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item {                  border-color: rgb('+r.r+","+r.g+", "+r.b+");                  color: rgb("+i.r+","+i.g+", "+i.b+");                  background: rgb("+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .full-screen .change-album .menu .item {                  border-color: rgb('+t.r+","+t.g+", "+t.b+");                  background: rgb("+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item.active,                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item:hover {                  background: rgb('+i.r+","+i.g+", "+i.b+");                  color: rgb("+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container:not([data-size="fill"]) .jgallery-container {                  background: rgb('+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom {                  background: rgb('+t.r+","+t.g+", "+t.b+");                  -webkit-box-shadow: 0 -3px rgba("+t.r+","+t.g+", "+t.b+", .5);                  box-shadow: 0 -3px rgba("+t.r+","+t.g+", "+t.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .icons,                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .icons .fa {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title {                  color: rgb('+i.r+","+i.g+", "+i.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba('+r.r+","+r.g+", "+r.b+',.7);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .drag-nav {                  background: rgb('+t.r+","+t.g+", "+t.b+");                  -webkit-box-shadow: 0 0 0 3px rgba("+t.r+","+t.g+", "+t.b+", .5);                  box-shadow: 0 0 0 3px rgba("+t.r+","+t.g+", "+t.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .drag-nav .crop {                  -webkit-box-shadow: 0 0 0 3px rgba('+i.r+","+i.g+", "+i.b+", .5);                  box-shadow: 0 0 0 3px rgba("+i.r+","+i.g+", "+i.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .ico {                  color: rgb('+i.r+","+i.g+", "+i.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .jgallery-container {                  -webkit-box-shadow: 0 0 0 3px rgba('+t.r+","+t.g+", "+t.b+", .5);                  box-shadow: 0 0 0 3px rgba("+t.r+","+t.g+", "+t.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+t.r+","+t.g+", "+t.b+", 1 )),to(rgba( "+t.r+","+t.g+", "+t.b+", 0)));                  background-image: -webkit-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 1 ),0%,rgba( "+t.r+","+t.g+", "+t.b+", 0),100%);                  background-image: -moz-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+", 0) 100%);                  background-image: linear-gradient(to bottom,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+', 0) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+t.r+","+t.g+", "+t.b+", 0)),to(rgba( "+t.r+","+t.g+", "+t.b+", 1)));                  background-image: -webkit-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 0),0%,rgba( "+t.r+","+t.g+", "+t.b+", 1),100%);                  background-image: -moz-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 0) 0%,rgba( "+t.r+","+t.g+", "+t.b+", 1) 100%);                  background-image: linear-gradient(to bottom,rgba( "+t.r+","+t.g+", "+t.b+", 0) 0%,rgba( "+t.r+","+t.g+", "+t.b+', 1) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.images a:after {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .prev,                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .next {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.square:not(.full-screen) a {                  background: rgb('+i.r+","+i.g+", "+i.b+");                  color: rgb("+r.r+","+r.g+", "+r.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .overlayContainer .overlay {                  background: rgba('+r.r+","+r.g+", "+r.b+",.8);                  color: rgb("+i.r+","+i.g+", "+i.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .overlayContainer .imageLoaderPositionAbsolute:after {                  border-color: rgba('+i.r+","+i.g+", "+i.b+', .5 );                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .overlayContainer .overlay {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .prev {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .prev:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( '+t.r+","+t.g+", "+t.b+", 1 )),to(rgba( "+t.r+","+t.g+", "+t.b+", 0 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%),color-stop(rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 100%);                  background-image: linear-gradient(to right,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .next {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .next:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( '+t.r+","+t.g+", "+t.b+", 0 )),to(rgba( "+t.r+","+t.g+", "+t.b+", 1 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 0%),color-stop(rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 100%);                  background-image: linear-gradient(to right,rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .prev {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+t.r+","+t.g+", "+t.b+", 1 )),to(rgba( "+t.r+","+t.g+", "+t.b+", 0 )));                  background-image: -webkit-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 1 ),0%,rgba( "+t.r+","+t.g+", "+t.b+", 0 ),100%);                  background-image: -moz-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 100%);                  background-image: linear-gradient(to bottom,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .next {                  background: rgb('+t.r+","+t.g+", "+t.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+t.r+","+t.g+", "+t.b+", 0 )),to(rgba( "+t.r+","+t.g+", "+t.b+", 1 )));                  background-image: -webkit-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 0 ),0%,rgba( "+t.r+","+t.g+", "+t.b+", 1 ),100%);                  background-image: -moz-linear-gradient(top,rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+", 1 ) 100%);                  background-image: linear-gradient(to bottom,rgba( "+t.r+","+t.g+", "+t.b+", 0 ) 0%,rgba( "+t.r+","+t.g+", "+t.b+', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom,                .jgallery.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: none;                }                .jgallery.has-title.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom,                .jgallery.has-title.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba('+r.r+","+r.g+", "+r.b+",.7);                  color: rgb("+i.r+","+i.g+", "+i.b+');                }                .jgallery.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .jgallery-btn {                  background: rgba('+r.r+","+r.g+", "+r.b+",.8);                  color: rgb("+i.r+","+i.g+", "+i.b+");                }            "}},k}(r,f,l,e,o,i,{},{width:"940px",height:"360px",canZoom:!1,draggableZoom:!1,browserHistory:!1,thumbnailsFullScreen:!1,thumbType:"square",thumbWidth:20,thumbHeight:20,canMinimalizeThumbnails:!1,transition:"rotateCubeRightOut_rotateCubeRightIn",transitionBackward:"rotateCubeRightOut_rotateCubeRightIn",transitionCols:6,transitionRows:1,slideshow:!0,slideshowAutostart:!0,zoomSize:"fill"},{},{autostart:!0,canClose:!1,zoomSize:"fill",canChangeMode:!1},s,v,y,p,w);!function(n,t,i,r){var f=[""],u=jQuery,o=u("html"),e=0;u.fn.jGallery=function(s){var h=this;return this.each(function(){var n=u(this);n.is("[data-jgallery-id]")?u.isPlainObject(s)&&f[n.attr("data-jgallery-id")].update(s):f[++e]=new r(n,e,s)}),u.extend(h,{getDefaults:function(){return t},getTransitions:function(){return i},restoreDefaults:function(){return h.each(function(){u(this).jGallery(t)})},getOptions:function(){return f[u(h).eq(0).attr("data-jgallery-id")].options},destroy:function(){return h.each(function(){var t=u(this),i=t.attr("data-jgallery-id");f[i]="";t.removeAttr("data-jgallery-id").show();o.find('.jgallery[data-jgallery-id="'+i+'"]').remove();n()})}}),this}}(o,i,n,b)}();!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),n(i),i}:n(jQuery)}(function(n){function r(){return n("body").height()>n(window).height()}var t=function(t,i){this.settings=i;this.checkSettings();this.imgAnalyzerTimeout=null;this.entries=null;this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0};this.lastFetchedEntry=null;this.lastAnalyzedIndex=-1;this.yield={every:2,flushed:0};this.border=0<=i.border?i.border:i.margins;this.maxRowHeight=this.retrieveMaxRowHeight();this.suffixRanges=this.retrieveSuffixRanges();this.offY=this.border;this.rows=0;this.spinner={phase:0,timeSlot:150,$el:n('<div class="spinner"><span><\/span><span><\/span><span><\/span><\/div>'),intervalId:null};this.scrollBarOn=!1;this.checkWidthIntervalId=null;this.galleryWidth=t.width();this.$gallery=t},i;t.prototype.getSuffix=function(n,t){for(var r=t<n?n:t,i=0;i<this.suffixRanges.length;i++)if(r<=this.suffixRanges[i])return this.settings.sizeRangeSuffixes[this.suffixRanges[i]];return this.settings.sizeRangeSuffixes[this.suffixRanges[i-1]]};t.prototype.removeSuffix=function(n,t){return n.substring(0,n.length-t.length)};t.prototype.endsWith=function(n,t){return-1!==n.indexOf(t,n.length-t.length)};t.prototype.getUsedSuffix=function(n){for(var t in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(t)){if(0===this.settings.sizeRangeSuffixes[t].length)continue;if(this.endsWith(n,this.settings.sizeRangeSuffixes[t]))return this.settings.sizeRangeSuffixes[t]}return""};t.prototype.newSrc=function(n,t,i,r){var u,f,e;return this.settings.thumbnailPath?u=this.settings.thumbnailPath(n,t,i,r):(f=n.match(this.settings.extension),e=null!==f?f[0]:"",u=n.replace(this.settings.extension,""),u=this.removeSuffix(u,this.getUsedSuffix(u)),u+=this.getSuffix(t,i)+e),u};t.prototype.showImg=function(n,t){this.settings.cssAnimation?(n.addClass("entry-visible"),t&&t()):(n.stop().fadeTo(this.settings.imagesAnimationDuration,1,t),n.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,t))};t.prototype.extractImgSrcFromImage=function(n){var t=void 0!==n.data("safe-src")?n.data("safe-src"):n.attr("src");return n.data("jg.originalSrc",t),t};t.prototype.imgFromEntry=function(n){var t=n.find(this.settings.imgSelector);return 0===t.length?null:t};t.prototype.captionFromEntry=function(n){var t=n.find("> .caption");return 0===t.length?null:t};t.prototype.displayEntry=function(t,i,r,u,f,e){var o,s,h,c;if(t.width(u),t.height(e),t.css("top",r),t.css("left",i),o=this.imgFromEntry(t),null!==o){o.css("width",u);o.css("height",f);o.css("margin-left",-u/2);o.css("margin-top",-f/2);s=o.attr("src");h=this.newSrc(s,u,f,o[0]);o.one("error",function(){o.attr("src",o.data("jg.originalSrc"))});c=function(){s!==h&&o.attr("src",h)};"skipped"===t.data("jg.loaded")?this.onImageEvent(s,n.proxy(function(){this.showImg(t,c);t.data("jg.loaded",!0)},this)):this.showImg(t,c)}else this.showImg(t);this.displayEntryCaption(t)};t.prototype.displayEntryCaption=function(t){var u=this.imgFromEntry(t),i,r;null!==u&&this.settings.captions?(i=this.captionFromEntry(t),null===i&&(r=u.attr("alt"),this.isValidCaption(r)||(r=t.attr("title")),this.isValidCaption(r)&&(i=n('<div class="caption">'+r+"<\/div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)};t.prototype.isValidCaption=function(n){return void 0!==n&&0<n.length};t.prototype.onEntryMouseEnterForCaption=function(t){var i=this.captionFromEntry(n(t.currentTarget));this.settings.cssAnimation?i.addClass("caption-visible").removeClass("caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)};t.prototype.onEntryMouseLeaveForCaption=function(t){var i=this.captionFromEntry(n(t.currentTarget));this.settings.cssAnimation?i.removeClass("caption-visible").removeClass("caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)};t.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:n.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:n.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))};t.prototype.removeCaptionEventsHandlers=function(n){var t=n.data("jg.captionMouseEvents");void 0!==t&&(n.off("mouseenter",void 0,t.mouseenter),n.off("mouseleave",void 0,t.mouseleave),n.removeData("jg.captionMouseEvents"))};t.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[];this.buildingRow.aspectRatio=0;this.buildingRow.width=0};t.prototype.prepareBuildingRow=function(n){var t,i,o,f,r,e=!0,s=0,u=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,c=u/this.buildingRow.aspectRatio,h=this.settings.rowHeight,l=this.buildingRow.width/u>this.settings.justifyThreshold;if(n&&"hide"===this.settings.lastRow&&!l){for(t=0;t<this.buildingRow.entriesBuff.length;t++)i=this.buildingRow.entriesBuff[t],this.settings.cssAnimation?i.removeClass("entry-visible"):(i.stop().fadeTo(0,.1),i.find("> img, > a > img").fadeTo(0,0));return-1}for(n&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(e=!1,0<this.rows&&(e=(h=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/u>this.settings.justifyThreshold)),t=0;t<this.buildingRow.entriesBuff.length;t++)o=(i=this.buildingRow.entriesBuff[t]).data("jg.width")/i.data("jg.height"),e?(f=t===this.buildingRow.entriesBuff.length-1?u:c*o,r=c):(f=h*o,r=h),u-=Math.round(f),i.data("jg.jwidth",Math.round(f)),i.data("jg.jheight",Math.ceil(r)),(0===t||r<s)&&(s=r);return this.buildingRow.height=s,e};t.prototype.flushRow=function(n){var r,e,t,i=this.settings,u=this.border,f,o;if(e=this.prepareBuildingRow(n),n&&"hide"===i.lastRow&&-1===e)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),n&&("center"===i.lastRow||"right"===i.lastRow)){for(f=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*i.margins,t=0;t<this.buildingRow.entriesBuff.length;t++)f-=(r=this.buildingRow.entriesBuff[t]).data("jg.jwidth");"center"===i.lastRow?u+=f/2:"right"===i.lastRow&&(u+=f)}for(o=this.buildingRow.entriesBuff.length-1,t=0;t<=o;t++)r=this.buildingRow.entriesBuff[this.settings.rtl?o-t:t],this.displayEntry(r,u,this.offY,r.data("jg.jwidth"),r.data("jg.jheight"),this.buildingRow.height),u+=r.data("jg.jwidth")+i.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border;this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight());(!n||this.buildingRow.height<=i.rowHeight&&e)&&(this.offY+=this.buildingRow.height+i.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};i=0;t.prototype.rememberGalleryHeight=function(){i=this.$gallery.height();this.$gallery.height(i)};t.prototype.setGalleryTempHeight=function(n){i=Math.max(n,i);this.$gallery.height(i)};t.prototype.setGalleryFinalHeight=function(n){i=n;this.$gallery.height(n)};t.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(n.proxy(function(){if(this.$gallery.is(":visible")){var n=parseFloat(this.$gallery.width());r()===this.scrollBarOn?Math.abs(n-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=n,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=r(),this.galleryWidth=n)}},this),this.settings.refreshTime)};t.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId};t.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()};t.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId);this.spinner.intervalId=null;this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight());this.spinner.$el.detach()};t.prototype.startLoadingSpinnerAnimation=function(){var n=this.spinner,t=n.$el.find("span");clearInterval(n.intervalId);this.$gallery.append(n.$el);this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight());n.intervalId=setInterval(function(){n.phase<t.length?t.eq(n.phase).fadeTo(n.timeSlot,1):t.eq(n.phase-t.length).fadeTo(n.timeSlot,0);n.phase=(n.phase+1)%(2*t.length)},n.timeSlot)};t.prototype.rewind=function(){this.lastFetchedEntry=null;this.lastAnalyzedIndex=-1;this.offY=this.border;this.rows=0;this.clearBuildingRow()};t.prototype.updateEntries=function(t){var i;return t&&null!=this.lastFetchedEntry?i=n(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],i=this.$gallery.children(this.settings.selector).toArray()),0<i.length&&(n.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0};t.prototype.insertToGallery=function(t){var i=this;n.each(t,function(){n(this).appendTo(i.$gallery)})};t.prototype.shuffleArray=function(n){for(var i,r,t=n.length-1;0<t;t--)i=Math.floor(Math.random()*(t+1)),r=n[t],n[t]=n[i],n[i]=r;return this.insertToGallery(n),n};t.prototype.sortArray=function(n){return n.sort(this.settings.sort),this.insertToGallery(n),n};t.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)n(t[i]).removeClass("jg-filtered")};t.prototype.filterArray=function(t){var r=this.settings,u,i;if("string"===n.type(r.filter))return t.filter(function(t){var i=n(t);return i.is(r.filter)?(i.removeClass("jg-filtered"),!0):(i.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(n.isFunction(r.filter)){for(u=t.filter(r.filter),i=0;i<t.length;i++)-1===u.indexOf(t[i])?n(t[i]).addClass("jg-filtered").removeClass("jg-visible"):n(t[i]).removeClass("jg-filtered");return u}};t.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId);n.each(this.entries,n.proxy(function(t,i){var r=n(i),u,f;r.css("width","");r.css("height","");r.css("top","");r.css("left","");r.data("jg.loaded",void 0);r.removeClass("jg-entry");u=this.imgFromEntry(r);u.css("width","");u.css("height","");u.css("margin-left","");u.css("margin-top","");u.attr("src",u.data("jg.originalSrc"));u.data("jg.originalSrc",void 0);this.removeCaptionEventsHandlers(r);f=this.captionFromEntry(r);r.data("jg.createdCaption")?(r.data("jg.createdCaption",void 0),null!==f&&f.remove()):null!==f&&f.fadeTo(0,1)},this));this.$gallery.css("height","");this.$gallery.removeClass("justified-gallery");this.$gallery.data("jg.controller",void 0)};t.prototype.analyzeImages=function(t){for(var i,f,u,r=this.lastAnalyzedIndex+1;r<this.entries.length;r++)if(i=n(this.entries[r]),!0===i.data("jg.loaded")||"skipped"===i.data("jg.loaded")){if(f=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,u=i.data("jg.width")/i.data("jg.height"),f/(this.buildingRow.aspectRatio+u)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(i);this.buildingRow.aspectRatio+=u;this.buildingRow.width+=u*this.settings.rowHeight;this.lastAnalyzedIndex=r}else if("error"!==i.data("jg.loaded"))return;0<this.buildingRow.entriesBuff.length&&this.flushRow(!0);this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation();this.stopImgAnalyzerStarter();this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete");this.setGalleryFinalHeight(this.galleryHeightToSet)};t.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0;null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)};t.prototype.startImgAnalyzer=function(n){var t=this;this.stopImgAnalyzerStarter();this.imgAnalyzerTimeout=setTimeout(function(){t.analyzeImages(n)},.001)};t.prototype.onImageEvent=function(t,i,r){if(i||r){var u=new Image,f=n(u);i&&f.one("load",function(){f.off("load error");i(u)});r&&f.one("error",function(){f.off("load error");r(u)});u.src=t}};t.prototype.init=function(){var i=!1,r=!1,t=this;n.each(this.entries,function(u,f){var e=n(f),o=t.imgFromEntry(e),s,h,c;if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==t.settings.rel&&e.attr("rel",t.settings.rel),null!==t.settings.target&&e.attr("target",t.settings.target),null!==o){if(s=t.extractImgSrcFromImage(o),(o.attr("src",s),!1===t.settings.waitThumbnailsLoad)&&(h=parseFloat(o.prop("width")),c=parseFloat(o.prop("height")),!isNaN(h)&&!isNaN(c)))return e.data("jg.width",h),e.data("jg.height",c),e.data("jg.loaded","skipped"),r=!0,t.startImgAnalyzer(!1),!0;e.data("jg.loaded",!1);i=!0;t.isSpinnerActive()||t.startLoadingSpinnerAnimation();t.onImageEvent(s,function(n){e.data("jg.width",n.width);e.data("jg.height",n.height);e.data("jg.loaded",!0);t.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error");t.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)});i||r||this.startImgAnalyzer(!1);this.checkWidth()};t.prototype.checkOrConvertNumber=function(t,i){if("string"===n.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==n.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i;};t.prototype.checkSizeRangesSuffixes=function(){var t,u,r,i;if("object"!==n.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";t=[];for(u in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(u)&&t.push(u);for(r={0:""},i=0;i<t.length;i++)if("string"===n.type(t[i]))try{r[parseInt(t[i].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[t[i]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")";}else r[t[i]]=this.settings.sizeRangeSuffixes[t[i]];this.settings.sizeRangeSuffixes=r};t.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===n.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==n.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage";}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t};t.prototype.checkSettings=function(){this.checkSizeRangesSuffixes();this.checkOrConvertNumber(this.settings,"rowHeight");this.checkOrConvertNumber(this.settings,"margins");this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==n.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==n.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==n.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==n.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!n.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!n.isFunction(this.settings.filter)&&"string"!==n.type(this.settings.filter))throw"filter must be false, a string or a filter function";};t.prototype.retrieveSuffixRanges=function(){var n=[];for(var t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&n.push(parseInt(t,10));return n.sort(function(n,t){return t<n?1:n<t?-1:0}),n};t.prototype.updateSettings=function(t){this.settings=n.extend({},this.settings,t);this.checkSettings();this.border=0<=this.settings.border?this.settings.border:this.settings.margins;this.maxRowHeight=this.retrieveMaxRowHeight();this.suffixRanges=this.retrieveSuffixRanges()};t.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(n){this.$gallery.trigger(n)}};n.fn.justifiedGallery=function(i){return this.each(function(r,u){var e=n(u),f;if(e.addClass("justified-gallery"),f=e.data("jg.controller"),void 0===f){if(null!=i&&"object"!==n.type(i)){if("destroy"===i)return;throw"The argument must be an object";}f=new t(e,n.extend({},t.prototype.defaults,i));e.data("jg.controller",f)}else if("norewind"!==i){if("destroy"===i)return void f.destroy();f.updateSettings(i);f.rewind()}f.updateEntries("norewind"===i)&&f.init()})}}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(window.jQuery||window.Zepto)}(function(n){var o="Close",pt="BeforeClose",ti="AfterClose",ii="BeforeAppend",it="MarkupParse",rt="Open",wt="Change",ut="mfp",u="."+ut,p="mfp-ready",bt="mfp-removing",ft="mfp-prevent-close",t,w=function(){},et=!!window.jQuery,ot,s=n(window),f,b,h,kt,r=function(n,i){t.ev.on(ut+n+u,i)},l=function(t,i,r,u){var f=document.createElement("div");return f.className="mfp-"+t,r&&(f.innerHTML=r),u?i&&i.appendChild(f):(f=n(f),i&&f.appendTo(i)),f},i=function(i,r){t.ev.triggerHandler(ut+i,r);t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,n.isArray(r)?r:[r]))},st=function(i){return i===kt&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=n(t.st.closeMarkup.replace("%title%",t.st.tClose)),kt=i),t.currTemplate.closeBtn},ht=function(){n.magnificPopup.instance||(t=new w,t.init(),n.magnificPopup.instance=t)},ri=function(){var n=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(n.transition!==undefined)return!0;while(t.length)if(t.pop()+"Transition"in n)return!0;return!1},k,a,d,g,ct,e,dt,lt,gt,nt,at,tt;w.prototype={constructor:w,init:function(){var i=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener;t.isAndroid=/android/gi.test(i);t.isIOS=/iphone|ipad|ipod/gi.test(i);t.supportsTransition=ri();t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);f=n(document);t.popupsCache={}},open:function(e){var o,w,c,b,a,k,v,d,y;if(e.isObj===!1){for(t.items=e.items.toArray(),t.index=0,w=e.items,o=0;o<w.length;o++)if(c=w[o],c.parsed&&(c=c.el[0]),c===e.el[0]){t.index=o;break}}else t.items=n.isArray(e.items)?e.items:[e.items],t.index=e.index||0;if(t.isOpen){t.updateItemHTML();return}for(t.types=[],h="",t.ev=e.mainEl&&e.mainEl.length?e.mainEl.eq(0):f,e.key?(t.popupsCache[e.key]||(t.popupsCache[e.key]={}),t.currTemplate=t.popupsCache[e.key]):t.currTemplate={},t.st=n.extend(!0,{},n.magnificPopup.defaults,e),t.fixedContentPos=t.st.fixedContentPos==="auto"?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=l("bg").on("click"+u,function(){t.close()}),t.wrap=l("wrap").attr("tabindex",-1).on("click"+u,function(n){t._checkIfClose(n.target)&&t.close()}),t.container=l("container",t.wrap)),t.contentContainer=l("content"),t.st.preloader&&(t.preloader=l("preloader",t.container,t.st.tLoading)),b=n.magnificPopup.modules,o=0;o<b.length;o++)a=b[o],a=a.charAt(0).toUpperCase()+a.slice(1),t["init"+a].call(t);if(i("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(r(it,function(n,t,i,r){i.close_replaceWith=st(r.type)}),h+=" mfp-close-btn-in"):t.wrap.append(st())),t.st.alignTop&&(h+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:s.scrollTop(),position:"absolute"}),t.st.fixedBgPos!==!1&&(t.st.fixedBgPos!=="auto"||t.fixedContentPos)||t.bgOverlay.css({height:f.height(),position:"absolute"}),t.st.enableEscapeKey)f.on("keyup"+u,function(n){n.keyCode===27&&t.close()});s.on("resize"+u,function(){t.updateSize()});return t.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&t.wrap.addClass(h),k=t.wH=s.height(),v={},t.fixedContentPos&&t._hasScrollBar(k)&&(d=t._getScrollbarSize(),d&&(v.marginRight=d)),t.fixedContentPos&&(t.isIE7?n("body, html").css("overflow","hidden"):v.overflow="hidden"),y=t.st.mainClass,t.isIE7&&(y+=" mfp-ie7"),y&&t._addClassToMFP(y),t.updateItemHTML(),i("BuildControls"),n("html").css(v),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||n(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(p),t._setFocus()):t.bgOverlay.addClass(p);f.on("focusin"+u,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(k),i(rt),e},close:function(){t.isOpen&&(i(pt),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(bt),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){var r,e;i(o);r=bt+" "+p+" ";t.bgOverlay.detach();t.wrap.detach();t.container.empty();t.st.mainClass&&(r+=t.st.mainClass+" ");t._removeClassFromMFP(r);t.fixedContentPos&&(e={marginRight:""},t.isIE7?n("body, html").css("overflow",""):e.overflow="",n("html").css(e));f.off("keyup"+u+" focusin"+u);t.ev.off(u);t.wrap.attr("class","mfp-wrap").removeAttr("style");t.bgOverlay.attr("class","mfp-bg");t.container.attr("class","mfp-container");t.st.showCloseBtn&&(!t.st.closeBtnInside||t.currTemplate[t.currItem.type]===!0)&&t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach();t.st.autoFocusLast&&t._lastFocusedEl&&n(t._lastFocusedEl).focus();t.currItem=null;t.content=null;t.currTemplate=null;t.prevHeight=0;i(ti)},updateSize:function(n){if(t.isIOS){var u=document.documentElement.clientWidth/window.innerWidth,r=window.innerHeight*u;t.wrap.css("height",r);t.wH=r}else t.wH=n||s.height();t.fixedContentPos||t.wrap.css("height",t.wH);i("Resize")},updateItemHTML:function(){var u=t.items[t.index],r,f,e;t.contentContainer.detach();t.content&&t.content.detach();u.parsed||(u=t.parseEl(t.index));r=u.type;i("BeforeChange",[t.currItem?t.currItem.type:"",r]);t.currItem=u;t.currTemplate[r]||(f=t.st[r]?t.st[r].markup:!1,i("FirstMarkupParse",f),t.currTemplate[r]=f?n(f):!0);b&&b!==u.type&&t.container.removeClass("mfp-"+b+"-holder");e=t["get"+r.charAt(0).toUpperCase()+r.slice(1)](u,t.currTemplate[r]);t.appendContent(e,r);u.preloaded=!0;i(wt,u);b=u.type;t.container.prepend(t.contentContainer);i("AfterChange")},appendContent:function(n,r){t.content=n;n?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[r]===!0?t.content.find(".mfp-close").length||t.content.append(st()):t.content=n:t.content="";i(ii);t.container.addClass("mfp-"+r+"-holder");t.contentContainer.append(t.content)},parseEl:function(r){var u=t.items[r],o,e,f;if(u.tagName?u={el:n(u)}:(o=u.type,u={data:u,src:u.src}),u.el){for(e=t.types,f=0;f<e.length;f++)if(u.el.hasClass("mfp-"+e[f])){o=e[f];break}u.src=u.el.attr("data-mfp-src");u.src||(u.src=u.el.attr("base64Image")?u.el.attr("base64Image"):u.el.attr("href"))}return u.type=o||t.st.type||"inline",u.index=r,u.parsed=!0,t.items[r]=u,i("ElementParse",u),t.items[r]},addGroup:function(n,i){var u=function(r){r.mfpEl=this;t._openClick(r,n,i)},r;if(i||(i={}),r="click.magnificPopup",i.mainEl=n,i.items){i.isObj=!0;n.off(r).on(r,u)}else if(i.isObj=!1,i.delegate)n.off(r).on(r,i.delegate,u);else{i.items=n;n.off(r).on(r,u)}},_openClick:function(i,r,u){var e=u.midClick!==undefined?u.midClick:n.magnificPopup.defaults.midClick,f;if(e||!(i.which===2||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){if(f=u.disableOn!==undefined?u.disableOn:n.magnificPopup.defaults.disableOn,f)if(n.isFunction(f)){if(!f.call(t))return!0}else if(s.width()<f)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation());u.el=n(i.mfpEl);u.delegate&&(u.items=r.find(u.delegate));t.open(u)}},updateStatus:function(n,r){if(t.preloader){ot!==n&&t.container.removeClass("mfp-s-"+ot);r||n!=="loading"||(r=t.st.tLoading);var u={status:n,text:r};i("UpdateStatus",u);n=u.status;r=u.text;t.preloader.html(r);t.preloader.find("a").on("click",function(n){n.stopImmediatePropagation()});t.container.addClass("mfp-s-"+n);ot=n}},_checkIfClose:function(i){if(!n(i).hasClass(ft)){var r=t.st.closeOnContentClick,u=t.st.closeOnBgClick;if(r&&u||!t.content||n(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||n.contains(t.content[0],i)){if(r)return!0}else if(u&&n.contains(document,i))return!0;return!1}},_addClassToMFP:function(n){t.bgOverlay.addClass(n);t.wrap.addClass(n)},_removeClassFromMFP:function(n){this.bgOverlay.removeClass(n);t.wrap.removeClass(n)},_hasScrollBar:function(n){return(t.isIE7?f.height():document.body.scrollHeight)>(n||s.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){if(i.target!==t.wrap[0]&&!n.contains(t.wrap[0],i.target))return t._setFocus(),!1},_parseMarkup:function(t,r,f){var e;f.data&&(r=n.extend(f.data,r));i(it,[t,r,f]);n.each(r,function(i,r){var f,o;if(r===undefined||r===!1)return!0;e=i.split("_");e.length>1?(f=t.find(u+"-"+e[0]),f.length>0&&(o=e[1],o==="replaceWith"?f[0]!==r[0]&&f.replaceWith(r):o==="img"?f.is("img")?f.attr("src",r):f.replaceWith(n("<img>").attr("src",r).attr("class",f.attr("class"))):f.attr(e[1],r))):t.find(u+"-"+i).html(r)})},_getScrollbarSize:function(){if(t.scrollbarSize===undefined){var n=document.createElement("div");n.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(n);t.scrollbarSize=n.offsetWidth-n.clientWidth;document.body.removeChild(n)}return t.scrollbarSize}};n.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,i){return ht(),t=t?n.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return n.magnificPopup.instance&&n.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(n.magnificPopup.defaults[t]=i.options);n.extend(this.proto,i.proto);this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;<\/button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}};n.fn.magnificPopup=function(i){var r,u,f,e;return ht(),r=n(this),typeof i=="string"?i==="open"?(f=et?r.data("magnificPopup"):r[0].magnificPopup,e=parseInt(arguments[1],10)||0,f.items?u=f.items[e]:(u=r,f.delegate&&(u=u.find(f.delegate)),u=u.eq(e)),t._openClick({mfpEl:u},r,f)):t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1)):(i=n.extend(!0,{},i),et?r.data("magnificPopup",i):r[0].magnificPopup=i,t.addGroup(r,i)),r};k="inline";ct=function(){g&&(d.after(g.addClass(a)).detach(),g=null)};n.magnificPopup.registerModule(k,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(k);r(o+"."+k,function(){ct()})},getInline:function(i,r){var f,u,e;return(ct(),i.src)?(f=t.st.inline,u=n(i.src),u.length?(e=u[0].parentNode,e&&e.tagName&&(d||(a=f.hiddenClass,d=l(a),a="mfp-"+a),g=u.after(d).detach().removeClass(a)),t.updateStatus("ready")):(t.updateStatus("error",f.tNotFound),u=n("<div>")),i.inlineElement=u,u):(t.updateStatus("ready"),t._parseMarkup(r,{},i),r)}}});var v="ajax",y,vt=function(){y&&n(document.body).removeClass(y)},ni=function(){vt();t.req&&t.req.abort()};n.magnificPopup.registerModule(v,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content<\/a> could not be loaded.'},proto:{initAjax:function(){t.types.push(v);y=t.st.ajax.cursor;r(o+"."+v,ni);r("BeforeChange."+v,ni)},getAjax:function(r){y&&n(document.body).addClass(y);t.updateStatus("loading");var u=n.extend({url:r.src,success:function(u,f,e){var o={data:u,xhr:e};i("ParseAjax",o);t.appendContent(n(o.data),v);r.finished=!0;vt();t._setFocus();setTimeout(function(){t.wrap.addClass(p)},16);t.updateStatus("ready");i("AjaxContentAdded")},error:function(){vt();r.finished=r.loadError=!0;t.updateStatus("error",t.st.ajax.tError.replace("%url%",r.src))}},t.st.ajax.settings);return t.req=n.ajax(u),""}}});dt=function(i){if(i.data&&i.data.title!==undefined)return i.data.title;var r=t.st.image.titleSrc;if(r){if(n.isFunction(r))return r.call(t,i);if(i.el)return i.el.attr(r)||""}return""};n.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"><\/div><figure><div class="mfp-img"><\/div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"><\/div><div class="mfp-counter"><\/div><\/div><\/figcaption><\/figure><\/div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image<\/a> could not be loaded.'},proto:{initImage:function(){var i=t.st.image,f=".image";t.types.push("image");r(rt+f,function(){t.currItem.type==="image"&&i.cursor&&n(document.body).addClass(i.cursor)});r(o+f,function(){i.cursor&&n(document.body).removeClass(i.cursor);s.off("resize"+u)});r("Resize"+f,t.resizeImage);t.isLowIE&&r("AfterChange",t.resizeImage)},resizeImage:function(){var n=t.currItem,i;n&&n.img&&t.st.image.verticalFit&&(i=0,t.isLowIE&&(i=parseInt(n.img.css("padding-top"),10)+parseInt(n.img.css("padding-bottom"),10)),n.img.css("max-height",t.wH-i))},_onImageHasSize:function(n){n.img&&(n.hasSize=!0,e&&clearInterval(e),n.isCheckingImgSize=!1,i("ImageHasSize",n),n.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),n.imgHidden=!1))},findImageSize:function(n){var i=0,u=n.img[0],r=function(f){e&&clearInterval(e);e=setInterval(function(){if(u.naturalWidth>0){t._onImageHasSize(n);return}i>200&&clearInterval(e);i++;i===3?r(10):i===40?r(50):i===100&&r(500)},f)};r(1)},getImage:function(r,u){var o=0,s=function(){r&&(r.img[0].complete?(r.img.off(".mfploader"),r===t.currItem&&(t._onImageHasSize(r),t.updateStatus("ready")),r.hasSize=!0,r.loaded=!0,i("ImageLoadComplete")):(o++,o<200?setTimeout(s,100):h()))},h=function(){r&&(r.img.off(".mfploader"),r===t.currItem&&(t._onImageHasSize(r),t.updateStatus("error",c.tError.replace("%url%",r.src))),r.hasSize=!0,r.loaded=!0,r.loadError=!0)},c=t.st.image,l=u.find(".mfp-img"),f;return(l.length&&(f=document.createElement("img"),f.className="mfp-img",r.el&&r.el.find("img").length&&(f.alt=r.el.find("img").attr("alt")),r.img=n(f).on("load.mfploader",s).on("error.mfploader",h),f.src=r.src,l.is("img")&&(r.img=r.img.clone()),f=r.img[0],f.naturalWidth>0?r.hasSize=!0:f.width||(r.hasSize=!1)),t._parseMarkup(u,{title:dt(r),img_replaceWith:r.img},r),t.resizeImage(),r.hasSize)?(e&&clearInterval(e),r.loadError?(u.addClass("mfp-loading"),t.updateStatus("error",c.tError.replace("%url%",r.src))):(u.removeClass("mfp-loading"),t.updateStatus("ready")),u):(t.updateStatus("loading"),r.loading=!0,r.hasSize||(r.imgHidden=!0,u.addClass("mfp-loading"),t.findImageSize(r)),u)}}});gt=function(){return lt===undefined&&(lt=document.createElement("p").style.MozTransform!==undefined),lt};n.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(n){return n.is("img")?n:n.find("img")}},proto:{initZoom:function(){var f=t.st.zoom,s=".zoom",u;if(f.enabled&&t.supportsTransition){var c=f.duration,l=function(n){var r=n.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),u="all "+f.duration/1e3+"s "+f.easing,t={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},i="transition";return t["-webkit-"+i]=t["-moz-"+i]=t["-o-"+i]=t[i]=u,r.css(t),r},h=function(){t.content.css("visibility","visible")},e,n;r("BuildControls"+s,function(){if(t._allowZoom()){if(clearTimeout(e),t.content.css("visibility","hidden"),u=t._getItemToZoom(),!u){h();return}n=l(u);n.css(t._getOffset());t.wrap.append(n);e=setTimeout(function(){n.css(t._getOffset(!0));e=setTimeout(function(){h();setTimeout(function(){n.remove();u=n=null;i("ZoomAnimationEnded")},16)},c)},16)}});r(pt+s,function(){if(t._allowZoom()){if(clearTimeout(e),t.st.removalDelay=c,!u){if(u=t._getItemToZoom(),!u)return;n=l(u)}n.css(t._getOffset(!0));t.wrap.append(n);t.content.css("visibility","hidden");setTimeout(function(){n.css(t._getOffset())},16)}});r(o+s,function(){t._allowZoom()&&(h(),n&&n.remove(),u=null)})}},_allowZoom:function(){return t.currItem.type==="image"},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var r,u;r=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var f=r.offset(),e=parseInt(r.css("padding-top"),10),o=parseInt(r.css("padding-bottom"),10);return f.top-=n(window).scrollTop()-e,u={width:r.width(),height:(et?r.innerHeight():r[0].offsetHeight)-o-e},gt()?u["-moz-transform"]=u.transform="translate("+f.left+"px,"+f.top+"px)":(u.left=f.left,u.top=f.top),u}}});var c="iframe",ui="//about:blank",yt=function(n){if(t.currTemplate[c]){var i=t.currTemplate[c].find("iframe");i.length&&(n||(i[0].src=ui),t.isIE8&&i.css("display",n?"block":"none"))}};n.magnificPopup.registerModule(c,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"><\/div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen><\/iframe><\/div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(c);r("BeforeChange",function(n,t,i){t!==i&&(t===c?yt():i===c&&yt(!0))});r(o+"."+c,function(){yt()})},getIframe:function(i,r){var u=i.src,f=t.st.iframe,e;return n.each(f.patterns,function(){if(u.indexOf(this.index)>-1)return this.id&&(u=typeof this.id=="string"?u.substr(u.lastIndexOf(this.id)+this.id.length,u.length):this.id.call(this,u)),u=this.src.replace("%id%",u),!1}),e={},f.srcAction&&(e[f.srcAction]=u),t._parseMarkup(r,e,i),t.updateStatus("ready"),r}}});nt=function(n){var i=t.items.length;return n>i-1?n-i:n<0?i+n:n};at=function(n,t,i){return n.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};n.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"><\/button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var u=t.st.gallery,i=".mfp-gallery";if(t.direction=!0,!u||!u.enabled)return!1;h+=" mfp-gallery";r(rt+i,function(){if(u.navigateByImgClick)t.wrap.on("click"+i,".mfp-img",function(){if(t.items.length>1)return t.next(),!1});f.on("keydown"+i,function(n){n.keyCode===37?t.prev():n.keyCode===39&&t.next()})});r("UpdateStatus"+i,function(n,i){i.text&&(i.text=at(i.text,t.currItem.index,t.items.length))});r(it+i,function(n,i,r,f){var e=t.items.length;r.counter=e>1?at(u.tCounter,f.index,e):""});r("BuildControls"+i,function(){if(t.items.length>1&&u.arrows&&!t.arrowLeft){var i=u.arrowMarkup,r=t.arrowLeft=n(i.replace(/%title%/gi,u.tPrev).replace(/%dir%/gi,"left")).addClass(ft),f=t.arrowRight=n(i.replace(/%title%/gi,u.tNext).replace(/%dir%/gi,"right")).addClass(ft);r.click(function(){t.prev()});f.click(function(){t.next()});t.container.append(r.add(f))}});r(wt+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout);t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages();t._preloadTimeout=null},16)});r(o+i,function(){f.off(i);t.wrap.off("click"+i);t.arrowRight=t.arrowLeft=null})},next:function(){t.direction=!0;t.index=nt(t.index+1);t.updateItemHTML()},prev:function(){t.direction=!1;t.index=nt(t.index-1);t.updateItemHTML()},goTo:function(n){t.direction=n>=t.index;t.index=n;t.updateItemHTML()},preloadNearbyImages:function(){for(var i=t.st.gallery.preload,r=Math.min(i[0],t.items.length),u=Math.min(i[1],t.items.length),n=1;n<=(t.direction?u:r);n++)t._preloadItem(t.index+n);for(n=1;n<=(t.direction?r:u);n++)t._preloadItem(t.index-n)},_preloadItem:function(r){if(r=nt(r),!t.items[r].preloaded){var u=t.items[r];u.parsed||(u=t.parseEl(r));i("LazyLoad",u);u.type==="image"&&(u.img=n('<img class="mfp-img" />').on("load.mfploader",function(){u.hasSize=!0}).on("error.mfploader",function(){u.hasSize=!0;u.loadError=!0;i("LazyLoadError",u)}).attr("src",u.src));u.preloaded=!0}}}});tt="retina";n.magnificPopup.registerModule(tt,{options:{replaceSrc:function(n){return n.src.replace(/\.\w+$/,function(n){return"@2x"+n})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var i=t.st.retina,n=i.ratio;n=isNaN(n)?n():n;n>1&&(r("ImageHasSize."+tt,function(t,i){i.img.css({"max-width":i.img[0].naturalWidth/n,width:"100%"})}),r("ElementParse."+tt,function(t,r){r.src=i.replaceSrc(r,n)}))}}}});ht()});!function(n,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():n.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(n,t){var e,u,a,c,rt,ut,s,ft,b,f,et,ot,st,ht,i,y,yt,k,d,r=this,g=!1,h=!0,o=!0,pt={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(n,t){return n.title?(t.children[0].innerHTML=n.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return n.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return n.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},ct=function(n){var e;if(y)return!0;n=n||window.event;i.timeToIdle&&i.mouseUsed&&!b&&it();for(var r,f,o=n.target||n.srcElement,s=o.getAttribute("class")||"",u=0;u<w.length;u++)r=w[u],r.onTap&&s.indexOf("pswp__"+r.name)>-1&&(r.onTap(),f=!0);f&&(n.stopPropagation&&n.stopPropagation(),y=!0,e=t.features.isOldAndroid?600:30,yt=setTimeout(function(){y=!1},e))},wt=function(){return!n.likelyTouchDevice||i.mouseUsed||screen.width>i.fitControlsWidth},l=function(n,i,r){t[(r?"add":"remove")+"Class"](n,"pswp__"+i)},lt=function(){var n=1===i.getNumItemsFn();n!==ht&&(l(u,"ui--one-slide",n),ht=n)},at=function(){l(s,"share-modal--hidden",o)},v=function(){return o=!o,o?(t.removeClass(s,"pswp__share-modal--fade-in"),setTimeout(function(){o&&at()},300)):(at(),setTimeout(function(){o||t.addClass(s,"pswp__share-modal--fade-in")},30)),o||kt(),!1},bt=function(t){t=t||window.event;var i=t.target||t.srcElement;return n.shout("shareLinkClick",t,i),!!i.href&&(!!i.hasAttribute("download")||(window.open(i.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),o||v(),!1))},kt=function(){for(var n,f,r,e,o,t="",u=0;u<i.shareButtons.length;u++)n=i.shareButtons[u],r=i.getImageURLForShare(n),e=i.getPageURLForShare(n),o=i.getTextForShare(n),f=n.url.replace("{{url}}",encodeURIComponent(e)).replace("{{image_url}}",encodeURIComponent(r)).replace("{{raw_image_url}}",r).replace("{{text}}",encodeURIComponent(o)),t+='<a href="'+f+'" target="_blank" class="pswp__share--'+n.id+'"'+(n.download?"download":"")+">"+n.label+"<\/a>",i.parseShareButtonOut&&(t=i.parseShareButtonOut(n,t));s.children[0].innerHTML=t;s.children[0].onclick=bt},nt=function(n){for(var r=0;r<i.closeElClasses.length;r++)if(t.hasClass(n,"pswp__"+i.closeElClasses[r]))return!0},tt=0,it=function(){clearTimeout(d);tt=0;b&&r.setIdle(!1)},vt=function(n){n=n?n:window.event;var t=n.relatedTarget||n.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(d),d=setTimeout(function(){r.setIdle(!0)},i.timeToIdleOutside))},dt=function(){i.fullscreenEl&&!t.features.isOldAndroid&&(e||(e=r.getFullscreenAPI()),e?(t.bind(document,e.eventK,r.updateFullscreen),r.updateFullscreen(),t.addClass(n.template,"pswp--supports-fs")):t.removeClass(n.template,"pswp--supports-fs"))},gt=function(){i.preloaderEl&&(p(!0),f("beforeChange",function(){clearTimeout(st);st=setTimeout(function(){n.currItem&&n.currItem.loading?(!n.allowProgressiveImg()||n.currItem.img&&!n.currItem.img.naturalWidth)&&p(!1):p(!0)},i.loadingIndicatorDelay)}),f("imageLoadComplete",function(t,i){n.currItem===i&&p(!0)}))},p=function(n){ot!==n&&(l(et,"preloader--active",!n),ot=n)},ni=function(n){var r=n.vGap,f,e;wt()?(f=i.barsSize,i.captionEl&&"auto"===f.bottom?(c||(c=t.createEl("pswp__caption pswp__caption--fake"),c.appendChild(t.createEl("pswp__caption__center")),u.insertBefore(c,a),t.addClass(u,"pswp__ui--fit")),i.addCaptionHTMLFn(n,c,!0))?(e=c.clientHeight,r.bottom=parseInt(e,10)||44):r.bottom=f.top:r.bottom="auto"===f.bottom?0:f.bottom,r.top=f.top):r.top=r.bottom=0},ti=function(){i.timeToIdle&&f("mouseUsed",function(){t.bind(document,"mousemove",it);t.bind(document,"mouseout",vt);k=setInterval(function(){tt++;2===tt&&r.setIdle(!0)},i.timeToIdle/2)})},ii=function(){f("onVerticalDrag",function(n){h&&n<.95?r.hideControls():!h&&n>=.95&&r.showControls()});var n;f("onPinchClose",function(t){h&&t<.9?(r.hideControls(),n=!0):n&&!h&&t>.9&&r.showControls()});f("zoomGestureEnded",function(){n=!1;n&&!h&&r.showControls()})},w=[{name:"caption",option:"captionEl",onInit:function(n){a=n}},{name:"share-modal",option:"shareEl",onInit:function(n){s=n},onTap:function(){v()}},{name:"button--share",option:"shareEl",onInit:function(n){ut=n},onTap:function(){v()}},{name:"button--zoom",option:"zoomEl",onTap:n.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(n){rt=n}},{name:"button--close",option:"closeEl",onTap:n.close},{name:"button--arrow--left",option:"arrowEl",onTap:n.prev},{name:"button--arrow--right",option:"arrowEl",onTap:n.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){e.isFullscreen()?e.exit():e.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(n){et=n}}],ri=function(){var n,e,r,o=function(u){var s,f,o;if(u)for(s=u.length,f=0;f<s;f++)for(n=u[f],e=n.className,o=0;o<w.length;o++)r=w[o],e.indexOf("pswp__"+r.name)>-1&&(i[r.option]?(t.removeClass(n,"pswp__element--disabled"),r.onInit&&r.onInit(n)):t.addClass(n,"pswp__element--disabled"))},f;o(u.children);f=t.getChildByClass(u,"pswp__top-bar");f&&o(f.children)};r.init=function(){t.extend(n.options,pt,!0);i=n.options;u=t.getChildByClass(n.scrollWrap,"pswp__ui");f=n.listen;ii();f("beforeChange",r.update);f("doubleTap",function(t){var r=n.currItem.initialZoomLevel;n.getZoomLevel()!==r?n.zoomTo(r,t,333):n.zoomTo(i.getDoubleTapZoom(!1,n.currItem),t,333)});f("preventDragEvent",function(n,t,i){var r=n.target||n.srcElement;r&&r.getAttribute("class")&&n.type.indexOf("mouse")>-1&&(r.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(r.tagName))&&(i.prevent=!1)});f("bindEvents",function(){t.bind(u,"pswpTap click",ct);t.bind(n.scrollWrap,"pswpTap",r.onGlobalTap);n.likelyTouchDevice||t.bind(n.scrollWrap,"mouseover",r.onMouseOver)});f("unbindEvents",function(){o||v();k&&clearInterval(k);t.unbind(document,"mouseout",vt);t.unbind(document,"mousemove",it);t.unbind(u,"pswpTap click",ct);t.unbind(n.scrollWrap,"pswpTap",r.onGlobalTap);t.unbind(n.scrollWrap,"mouseover",r.onMouseOver);e&&(t.unbind(document,e.eventK,r.updateFullscreen),e.isFullscreen()&&(i.hideAnimationDuration=0,e.exit()),e=null)});f("destroy",function(){i.captionEl&&(c&&u.removeChild(c),t.removeClass(a,"pswp__caption--empty"));s&&(s.children[0].onclick=null);t.removeClass(u,"pswp__ui--over-close");t.addClass(u,"pswp__ui--hidden");r.setIdle(!1)});i.showAnimationDuration||t.removeClass(u,"pswp__ui--hidden");f("initialZoomIn",function(){i.showAnimationDuration&&t.removeClass(u,"pswp__ui--hidden")});f("initialZoomOut",function(){t.addClass(u,"pswp__ui--hidden")});f("parseVerticalMargin",ni);ri();i.shareEl&&ut&&s&&(o=!0);lt();ti();dt();gt()};r.setIdle=function(n){b=n;l(u,"ui--idle",n)};r.update=function(){h&&n.currItem?(r.updateIndexIndicator(),i.captionEl&&(i.addCaptionHTMLFn(n.currItem,a),l(a,"caption--empty",!n.currItem.title)),g=!0):g=!1;o||v();lt()};r.updateFullscreen=function(i){i&&setTimeout(function(){n.setScrollOffset(0,t.getScrollY())},50);t[(e.isFullscreen()?"add":"remove")+"Class"](n.template,"pswp--fs")};r.updateIndexIndicator=function(){i.counterEl&&(rt.innerHTML=n.getCurrentIndex()+1+i.indexIndicatorSep+i.getNumItemsFn())};r.onGlobalTap=function(u){u=u||window.event;var f=u.target||u.srcElement;if(!y)if(u.detail&&"mouse"===u.detail.pointerType){if(nt(f))return void n.close();t.hasClass(f,"pswp__img")&&(1===n.getZoomLevel()&&n.getZoomLevel()<=n.currItem.fitRatio?i.clickToCloseNonZoomable&&n.close():n.toggleDesktopZoom(u.detail.releasePoint))}else if(i.tapToToggleControls&&(h?r.hideControls():r.showControls()),i.tapToClose&&(t.hasClass(f,"pswp__img")||nt(f)))return void n.close()};r.onMouseOver=function(n){n=n||window.event;var t=n.target||n.srcElement;l(u,"ui--over-close",nt(t))};r.hideControls=function(){t.addClass(u,"pswp__ui--hidden");h=!1};r.showControls=function(){h=!0;g||r.update();t.removeClass(u,"pswp__ui--hidden")};r.supportsFullscreen=function(){var n=document;return!!(n.exitFullscreen||n.mozCancelFullScreen||n.webkitExitFullscreen||n.msExitFullscreen)};r.getFullscreenAPI=function(){var t,r=document.documentElement,u="fullscreenchange";return r.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:u}:r.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+u}:r.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+u}:r.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return ft=i.closeOnScroll,i.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?n.template[this.enterK]():void n.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return i.closeOnScroll=ft,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}}});!function(n,t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(n){t(n)}):"object"==typeof module&&module.exports?module.exports=n.EasyZoom=t(require("jquery")):n.EasyZoom=t(n.jQuery)}(this,function(n){"use strict";function t(t,i){this.$target=n(t);this.opts=n.extend({},s,i,this.$target.data());void 0===this.isOpen&&this._init()}var i,r,e,o,u,f,s={loadingNotice:"Loading image",errorNotice:"The image could not be loaded",errorDuration:2500,linkAttribute:"href",preventClicks:!0,beforeShow:n.noop,beforeHide:n.noop,onShow:n.noop,onHide:n.noop,onMove:n.noop};t.prototype._init=function(){this.$link=this.$target.find("a");this.$image=this.$target.find("img");this.$flyout=n('<div class="easyzoom-flyout" />');this.$notice=n('<div class="easyzoom-notice" />');this.$target.on({"mousemove.easyzoom touchmove.easyzoom":n.proxy(this._onMove,this),"mouseleave.easyzoom touchend.easyzoom":n.proxy(this._onLeave,this),"mouseenter.easyzoom touchstart.easyzoom":n.proxy(this._onEnter,this)});this.opts.preventClicks&&this.$target.on("click.easyzoom",function(n){n.preventDefault()})};t.prototype.show=function(n,t){var u,f,s,h,c=this;if(this.opts.beforeShow.call(this)!==!1){if(!this.isReady)return this._loadImage(this.$link.attr(this.opts.linkAttribute),function(){!c.isMouseOver&&t||c.show(n)});this.$target.append(this.$flyout);u=this.$target.width();f=this.$target.height();s=this.$flyout.width();h=this.$flyout.height();i=this.$zoom.width()-s;r=this.$zoom.height()-h;i<0&&(i=0);r<0&&(r=0);e=i/u;o=r/f;this.isOpen=!0;this.opts.onShow.call(this);n&&this._move(n)}};t.prototype._onEnter=function(n){var t=n.originalEvent.touches;this.isMouseOver=!0;t&&1!=t.length||(n.preventDefault(),this.show(n,!0))};t.prototype._onMove=function(n){this.isOpen&&(n.preventDefault(),this._move(n))};t.prototype._onLeave=function(){this.isMouseOver=!1;this.isOpen&&this.hide()};t.prototype._onLoad=function(n){n.currentTarget.width&&(this.isReady=!0,this.$notice.detach(),this.$flyout.html(this.$zoom),this.$target.removeClass("is-loading").addClass("is-ready"),n.data.call&&n.data())};t.prototype._onError=function(){var n=this;this.$notice.text(this.opts.errorNotice);this.$target.removeClass("is-loading").addClass("is-error");this.detachNotice=setTimeout(function(){n.$notice.detach();n.detachNotice=null},this.opts.errorDuration)};t.prototype._loadImage=function(t,i){var r=new Image;this.$target.addClass("is-loading").append(this.$notice.text(this.opts.loadingNotice));this.$zoom=n(r).on("error",n.proxy(this._onError,this)).on("load",i,n.proxy(this._onLoad,this));r.style.position="absolute";r.src=t};t.prototype._move=function(n){var t,c,l;0===n.type.indexOf("touch")?(t=n.touches||n.originalEvent.touches,u=t[0].pageX,f=t[0].pageY):(u=n.pageX||u,f=n.pageY||f);var a=this.$target.offset(),v=f-a.top,y=u-a.left,s=Math.ceil(v*o),h=Math.ceil(y*e);h<0||s<0||h>i||s>r?this.hide():(c=s*-1,l=h*-1,this.$zoom.css({top:c,left:l}),this.opts.onMove.call(this,c,l))};t.prototype.hide=function(){this.isOpen&&this.opts.beforeHide.call(this)!==!1&&(this.$flyout.detach(),this.isOpen=!1,this.opts.onHide.call(this))};t.prototype.swap=function(t,i,r){this.hide();this.isReady=!1;this.detachNotice&&clearTimeout(this.detachNotice);this.$notice.parent().length&&this.$notice.detach();this.$target.removeClass("is-loading is-ready is-error");this.$image.attr({src:t,srcset:n.isArray(r)?r.join():r});this.$link.attr(this.opts.linkAttribute,i)};t.prototype.teardown=function(){this.hide();this.$target.off(".easyzoom").removeClass("is-loading is-ready is-error");this.detachNotice&&clearTimeout(this.detachNotice);delete this.$link;delete this.$zoom;delete this.$image;delete this.$notice;delete this.$flyout;delete this.isOpen;delete this.isReady};n.fn.easyZoom=function(i){return this.each(function(){var r=n.data(this,"easyZoom");r?void 0===r.isOpen&&r._init():n.data(this,"easyZoom",new t(this,i))})}});typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t}),function(n,t,i,r){var u={init:function(t,i){function f(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t==="x"?i:i&3|8).toString(16)})}var r=this,u;if(r.elem=i,r.$elem=n(i),r.options=n.extend({},n.fn.ezPlus.options,r.responsiveConfig(t||{})),r.imageSrc=r.$elem.attr("data-"+r.options.attrImageZoomSrc)?r.$elem.attr("data-"+r.options.attrImageZoomSrc):r.$elem.attr("src"),r.options.enabled){r.options.tint&&(r.options.lensColour="transparent",r.options.lensOpacity="1");r.options.zoomType==="inner"&&(r.options.showLens=!1);r.options.zoomType==="lens"&&(r.options.zoomWindowWidth=0);r.options.zoomId===-1&&(r.options.zoomId=f());r.$elem.parent().removeAttr("title").removeAttr("alt");r.zoomImage=r.imageSrc;r.refresh(1);u=r.options.galleryEvent+".ezpspace";u+=r.options.touchEnabled?" touchend.ezpspace":"";r.$galleries=n(r.options.gallery?"#"+r.options.gallery:r.options.gallerySelector);r.$galleries.on(u,r.options.galleryItem,function(t){return r.options.galleryActiveClass&&(n(r.options.galleryItem,r.$galleries).removeClass(r.options.galleryActiveClass),n(this).addClass(r.options.galleryActiveClass)),this.tagName==="A"&&t.preventDefault(),r.zoomImagePre=n(this).data(r.options.attrImageZoomSrc)?n(this).data(r.options.attrImageZoomSrc):n(this).data("image"),r.swaptheimage(n(this).data("image"),r.zoomImagePre),this.tagName==="A"?!1:void 0})}},refresh:function(n){var t=this;setTimeout(function(){t.fetch(t.imageSrc,t.$elem,t.options.minZoomLevel)},n||t.options.refresh)},fetch:function(n,t,i){var r=this,u=new Image;u.onload=function(){r.largeWidth=u.width/t.width()<=i?t.width()*i:u.width;r.largeHeight=u.height/t.height()<=i?t.height()*i:u.height;r.startZoom();r.currentImage=r.imageSrc;r.options.onZoomedImageLoaded(r.$elem)};r.setImageSource(u,n);return},setImageSource:function(n,t){n.src=t},startZoom:function(){function e(){return{display:"none",position:"absolute",height:t.options.zoomWindowHeight,width:t.options.zoomWindowWidth,border:""+t.options.borderSize+"px solid "+t.options.borderColour,backgroundSize:""+t.largeWidth/t.currentZoomLevel+"px "+t.largeHeight/t.currentZoomLevel+"px",backgroundPosition:"0px 0px",backgroundRepeat:"no-repeat",backgroundColor:""+t.options.zoomWindowBgColour,overflow:"hidden",zIndex:100}}function o(){var i=t.$elem.css("border-left-width");return t.options.scrollZoom&&(t.zoomLens=n('<div class="zoomLens"/>')),{display:"none",position:"absolute",height:t.nzHeight,width:t.nzWidth,marginTop:i,marginLeft:i,border:""+t.options.borderSize+"px solid "+t.options.borderColour,backgroundPosition:"0px 0px",backgroundRepeat:"no-repeat",cursor:t.options.cursor,overflow:"hidden",zIndex:t.options.zIndex}}function s(){return t.lensHeight=t.nzHeight<t.options.zoomWindowHeight/t.heightRatio?t.nzHeight:t.options.zoomWindowHeight/t.heightRatio,t.lensWidth=t.largeWidth<t.options.zoomWindowWidth?t.nzWidth:t.options.zoomWindowWidth/t.widthRatio,{display:"none",position:"absolute",height:t.lensHeight,width:t.lensWidth,border:""+t.options.lensBorderSize+"px solid "+t.options.lensBorderColour,backgroundPosition:"0px 0px",backgroundRepeat:"no-repeat",backgroundColor:t.options.lensColour,opacity:t.options.lensOpacity,cursor:t.options.cursor,zIndex:999,overflow:"hidden"}}function f(n){(t.lastX!==n.clientX||t.lastY!==n.clientY)&&(t.setPosition(n),t.currentLoc=n);t.lastX=n.clientX;t.lastY=n.clientY}var t=this,r,u,i;if(t.nzWidth=t.$elem.width(),t.nzHeight=t.$elem.height(),t.isWindowActive=!1,t.isLensActive=!1,t.isTintActive=!1,t.overWindow=!1,t.options.imageCrossfade&&(r=n('<div class="zoomWrapper"/>').css({height:t.nzHeight,width:t.nzWidth}),t.zoomWrap=t.$elem.wrap(r),t.$elem.css({position:"absolute"})),t.zoomLock=1,t.scrollingLock=!1,t.changeBgSize=!1,t.currentZoomLevel=t.options.zoomLevel,t.updateOffset(t),t.widthRatio=t.largeWidth/t.currentZoomLevel/t.nzWidth,t.heightRatio=t.largeHeight/t.currentZoomLevel/t.nzHeight,t.options.zoomType==="window"&&(t.zoomWindowStyle=e()),t.options.zoomType==="inner"&&(t.zoomWindowStyle=o()),t.options.zoomType==="window"&&(t.lensStyle=s()),t.tintStyle={display:"block",position:"absolute",height:t.nzHeight,width:t.nzWidth,backgroundColor:t.options.tintColour,opacity:0},t.lensRound={},t.options.zoomType==="lens"&&(t.lensStyle={display:"none",position:"absolute",float:"left",height:t.options.lensSize,width:t.options.lensSize,border:""+t.options.borderSize+"px solid "+t.options.borderColour,backgroundPosition:"0px 0px",backgroundRepeat:"no-repeat",backgroundColor:t.options.lensColour,cursor:t.options.cursor}),t.options.lensShape==="round"&&(t.lensRound={borderRadius:t.options.lensSize/2+t.options.borderSize}),t.zoomContainer=n('<div class="'+t.options.container+'" uuid="'+t.options.zoomId+'"/>'),t.zoomContainer.css({position:"absolute",top:t.nzOffset.top,left:t.nzOffset.left,height:t.nzHeight,width:t.nzWidth,zIndex:t.options.zIndex}),t.$elem.attr("id")&&t.zoomContainer.attr("id",t.$elem.attr("id")+"-"+t.options.container),n(t.options.zoomContainerAppendTo).append(t.zoomContainer),t.options.containLensZoom&&t.options.zoomType==="lens"&&t.zoomContainer.css("overflow","hidden"),t.options.zoomType!=="inner"&&(t.zoomLens=n('<div class="zoomLens"/>').css(n.extend({},t.lensStyle,t.lensRound)).appendTo(t.zoomContainer).click(function(){t.$elem.trigger("click")}),t.options.tint&&(t.tintContainer=n('<div class="tintContainer"/>'),t.zoomTint=n('<div class="zoomTint"/>').css(t.tintStyle),t.zoomLens.wrap(t.tintContainer),t.zoomTintcss=t.zoomLens.after(t.zoomTint),t.zoomTintImage=n('<img src="'+t.$elem.attr("src")+'">').css({position:"absolute",top:0,left:0,height:t.nzHeight,width:t.nzWidth,maxWidth:"none"}).appendTo(t.zoomLens).click(function(){t.$elem.trigger("click")}))),u=isNaN(t.options.zoomWindowPosition)?"body":t.zoomContainer,t.zoomWindow=n('<div class="zoomWindow"/>').css(n.extend({zIndex:999,top:t.windowOffsetTop,left:t.windowOffsetLeft},t.zoomWindowStyle)).appendTo(u).click(function(){t.$elem.trigger("click")}),t.zoomWindowContainer=n('<div class="zoomWindowContainer" />').css({width:t.options.zoomWindowWidth}),t.zoomWindow.wrap(t.zoomWindowContainer),t.options.zoomType==="lens"&&(t.zoomContainer.css("display","none"),t.zoomLens.css({backgroundImage:'url("'+t.imageSrc+'")'})),t.options.zoomType==="window"&&t.zoomWindow.css({backgroundImage:'url("'+t.imageSrc+'")'}),t.options.zoomType==="inner"&&t.zoomWindow.css({backgroundImage:'url("'+t.imageSrc+'")'}),t.options.touchEnabled){t.$elem.on("touchmove.ezpspace",function(n){n.preventDefault();var i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0];t.setPosition(i)});t.zoomContainer.on("touchmove.ezpspace",function(n){t.setElements("show");n.preventDefault();var i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0];t.setPosition(i)});t.zoomContainer.on("touchend.ezpspace",function(){t.showHideWindow("hide");t.options.showLens&&t.showHideLens("hide");t.options.tint&&t.options.zoomType!=="inner"&&t.showHideTint("hide")});t.$elem.on("touchend.ezpspace",function(){t.showHideWindow("hide");t.options.showLens&&t.showHideLens("hide");t.options.tint&&t.options.zoomType!=="inner"&&t.showHideTint("hide")});if(t.options.showLens){t.zoomLens.on("touchmove.ezpspace",function(n){n.preventDefault();var i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0];t.setPosition(i)});t.zoomLens.on("touchend.ezpspace",function(){t.showHideWindow("hide");t.options.showLens&&t.showHideLens("hide");t.options.tint&&t.options.zoomType!=="inner"&&t.showHideTint("hide")})}}t.$elem.on("mousemove.ezpspace",function(n){t.overWindow===!1&&t.setElements("show");(t.lastX!==n.clientX||t.lastY!==n.clientY)&&(t.setPosition(n),t.currentLoc=n);t.lastX=n.clientX;t.lastY=n.clientY});t.zoomContainer.on("click.ezpspace touchstart.ezpspace",t.options.onImageClick);t.zoomContainer.on("mousemove.ezpspace",function(n){t.overWindow===!1&&t.setElements("show");f(n)});if(i=null,t.options.zoomType!=="inner"&&(i=t.zoomLens),t.options.tint&&t.options.zoomType!=="inner"&&(i=t.zoomTint),t.options.zoomType==="inner"&&(i=t.zoomWindow),i)i.on("mousemove.ezpspace",f);if(t.zoomContainer.add(t.$elem).mouseenter(function(){t.overWindow===!1&&t.setElements("show")}).mouseleave(function(){if(!t.scrollLock){t.setElements("hide");t.options.onDestroy(t.$elem)}}),t.options.zoomType!=="inner"&&t.zoomWindow.mouseenter(function(){t.overWindow=!0;t.setElements("hide")}).mouseleave(function(){t.overWindow=!1}),t.minZoomLevel=t.options.minZoomLevel?t.options.minZoomLevel:t.options.scrollZoomIncrement*2,t.options.scrollZoom)t.zoomContainer.add(t.$elem).on("wheel DOMMouseScroll MozMousePixelScroll",function(i){var u,r;return(t.scrollLock=!0,clearTimeout(n.data(this,"timer")),n.data(this,"timer",setTimeout(function(){t.scrollLock=!1},250)),u=i.originalEvent.deltaY||i.originalEvent.detail*-1,i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault(),u===0)?!1:(u/120>0?(r=parseFloat(t.currentZoomLevel)-t.options.scrollZoomIncrement,r>=parseFloat(t.minZoomLevel)&&t.changeZoomLevel(r)):(t.fullheight||t.fullwidth)&&t.options.mantainZoomAspectRatio||(r=parseFloat(t.currentZoomLevel)+t.options.scrollZoomIncrement,t.options.maxZoomLevel?r<=t.options.maxZoomLevel&&t.changeZoomLevel(r):t.changeZoomLevel(r)),!1)})},destroy:function(){var t=this;t.$elem.off(".ezpspace");t.$galleries.off(".ezpspace");n(t.zoomContainer).remove();!t.options.loadingIcon||!t.spinner||!t.spinner.length||(t.spinner.remove(),delete t.spinner)},getIdentifier:function(){var n=this;return n.options.zoomId},setElements:function(n){var t=this;if(!t.options.zoomEnabled)return!1;n==="show"&&t.isWindowSet&&(t.options.zoomType==="inner"&&t.showHideWindow("show"),t.options.zoomType==="window"&&t.showHideWindow("show"),t.options.showLens&&(t.showHideZoomContainer("show"),t.showHideLens("show")),t.options.tint&&t.options.zoomType!=="inner"&&t.showHideTint("show"));n==="hide"&&(t.options.zoomType==="window"&&t.showHideWindow("hide"),t.options.tint||t.showHideWindow("hide"),t.options.showLens&&(t.showHideZoomContainer("hide"),t.showHideLens("hide")),t.options.tint&&t.showHideTint("hide"))},setPosition:function(n){var t=this,i,u;if(!t.options.zoomEnabled||n===r)return!1;if(t.nzHeight=t.$elem.height(),t.nzWidth=t.$elem.width(),t.updateOffset(t),t.options.tint&&t.options.zoomType!=="inner"&&t.zoomTint.css({top:0,left:0}),t.options.responsive&&!t.options.scrollZoom&&t.options.showLens&&(t.lensHeight=t.nzHeight<t.options.zoomWindowWidth/t.widthRatio?t.nzHeight:t.options.zoomWindowHeight/t.heightRatio,t.lensWidth=t.largeWidth<t.options.zoomWindowWidth?t.nzWidth:t.options.zoomWindowWidth/t.widthRatio,t.widthRatio=t.largeWidth/t.nzWidth,t.heightRatio=t.largeHeight/t.nzHeight,t.options.zoomType!=="lens"&&(t.lensHeight=t.nzHeight<t.options.zoomWindowWidth/t.widthRatio?t.nzHeight:t.options.zoomWindowHeight/t.heightRatio,t.lensWidth=t.nzWidth<t.options.zoomWindowHeight/t.heightRatio?t.nzWidth:t.options.zoomWindowWidth/t.widthRatio,t.zoomLens.css({width:t.lensWidth,height:t.lensHeight}),t.options.tint&&t.zoomTintImage.css({width:t.nzWidth,height:t.nzHeight})),t.options.zoomType==="lens"&&t.zoomLens.css({width:t.options.lensSize,height:t.options.lensSize})),t.zoomContainer.css({top:t.nzOffset.top,left:t.nzOffset.left,width:t.nzWidth,height:t.nzHeight}),t.mouseLeft=parseInt(n.pageX-t.nzOffset.left),t.mouseTop=parseInt(n.pageY-t.nzOffset.top),t.options.zoomType==="window"&&(i=t.zoomLens.height()/2,u=t.zoomLens.width()/2,t.Etoppos=t.mouseTop<0+i,t.Eboppos=t.mouseTop>t.nzHeight-i-t.options.lensBorderSize*2,t.Eloppos=t.mouseLeft<0+u,t.Eroppos=t.mouseLeft>t.nzWidth-u-t.options.lensBorderSize*2),t.options.zoomType==="inner"&&(t.Etoppos=t.mouseTop<t.nzHeight/2/t.heightRatio,t.Eboppos=t.mouseTop>t.nzHeight-t.nzHeight/2/t.heightRatio,t.Eloppos=t.mouseLeft<0+t.nzWidth/2/t.widthRatio,t.Eroppos=t.mouseLeft>t.nzWidth-t.nzWidth/2/t.widthRatio-t.options.lensBorderSize*2),t.mouseLeft<0||t.mouseTop<0||t.mouseLeft>t.nzWidth||t.mouseTop>t.nzHeight){t.setElements("hide");return}t.options.showLens&&(t.lensLeftPos=Math.floor(t.mouseLeft-t.zoomLens.width()/2),t.lensTopPos=Math.floor(t.mouseTop-t.zoomLens.height()/2));t.Etoppos&&(t.lensTopPos=0);t.Eloppos&&(t.windowLeftPos=0,t.lensLeftPos=0,t.tintpos=0);t.options.zoomType==="window"&&(t.Eboppos&&(t.lensTopPos=Math.max(t.nzHeight-t.zoomLens.height()-t.options.lensBorderSize*2,0)),t.Eroppos&&(t.lensLeftPos=t.nzWidth-t.zoomLens.width()-t.options.lensBorderSize*2));t.options.zoomType==="inner"&&(t.Eboppos&&(t.lensTopPos=Math.max(t.nzHeight-t.options.lensBorderSize*2,0)),t.Eroppos&&(t.lensLeftPos=t.nzWidth-t.nzWidth-t.options.lensBorderSize*2));t.options.zoomType==="lens"&&(t.windowLeftPos=((n.pageX-t.nzOffset.left)*t.widthRatio-t.zoomLens.width()/2)*-1,t.windowTopPos=((n.pageY-t.nzOffset.top)*t.heightRatio-t.zoomLens.height()/2)*-1,t.zoomLens.css({backgroundPosition:""+t.windowLeftPos+"px "+t.windowTopPos+"px"}),t.changeBgSize&&(t.nzHeight>t.nzWidth?(t.options.zoomType==="lens"&&t.zoomLens.css({backgroundSize:""+t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px"}),t.zoomWindow.css({backgroundSize:""+t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px"})):(t.options.zoomType==="lens"&&t.zoomLens.css({backgroundSize:""+t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvaluewidth+"px"}),t.zoomWindow.css({backgroundSize:""+t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvaluewidth+"px"})),t.changeBgSize=!1),t.setWindowPosition(n));t.options.tint&&t.options.zoomType!=="inner"&&t.setTintPosition(n);t.options.zoomType==="window"&&t.setWindowPosition(n);t.options.zoomType==="inner"&&t.setWindowPosition(n);t.options.showLens&&(t.fullwidth&&t.options.zoomType!=="lens"&&(t.lensLeftPos=0),t.zoomLens.css({left:t.lensLeftPos,top:t.lensTopPos}))},showHideZoomContainer:function(n){var t=this;n==="show"&&t.zoomContainer&&t.zoomContainer.show();n==="hide"&&t.zoomContainer&&t.zoomContainer.hide()},showHideWindow:function(n){var t=this;if(n==="show"&&!t.isWindowActive&&t.zoomWindow){t.options.onShow(t);t.options.zoomWindowFadeIn?t.zoomWindow.stop(!0,!0,!1).fadeIn(t.options.zoomWindowFadeIn):t.zoomWindow.show();t.isWindowActive=!0}if(n==="hide"&&t.isWindowActive){t.options.zoomWindowFadeOut?t.zoomWindow.stop(!0,!0).fadeOut(t.options.zoomWindowFadeOut,function(){t.loop&&(clearInterval(t.loop),t.loop=!1)}):t.zoomWindow.hide();t.options.onHide(t);t.isWindowActive=!1}},showHideLens:function(n){var t=this;n==="show"&&(t.isLensActive||(t.zoomLens&&(t.options.lensFadeIn?t.zoomLens.stop(!0,!0,!1).fadeIn(t.options.lensFadeIn):t.zoomLens.show()),t.isLensActive=!0));n==="hide"&&t.isLensActive&&(t.zoomLens&&(t.options.lensFadeOut?t.zoomLens.stop(!0,!0).fadeOut(t.options.lensFadeOut):t.zoomLens.hide()),t.isLensActive=!1)},showHideTint:function(n){var t=this;n==="show"&&!t.isTintActive&&t.zoomTint&&(t.options.zoomTintFadeIn?t.zoomTint.css("opacity",t.options.tintOpacity).animate().stop(!0,!0).fadeIn("slow"):(t.zoomTint.css("opacity",t.options.tintOpacity).animate(),t.zoomTint.show()),t.isTintActive=!0);n==="hide"&&t.isTintActive&&(t.options.zoomTintFadeOut?t.zoomTint.stop(!0,!0).fadeOut(t.options.zoomTintFadeOut):t.zoomTint.hide(),t.isTintActive=!1)},setLensPosition:function(){},setWindowPosition:function(t){var i=this,u,r;if(isNaN(i.options.zoomWindowPosition))i.externalContainer=n(i.options.zoomWindowPosition),i.externalContainer.length||(i.externalContainer=n("#"+i.options.zoomWindowPosition)),i.externalContainerWidth=i.externalContainer.width(),i.externalContainerHeight=i.externalContainer.height(),i.externalContainerOffset=i.externalContainer.offset(),i.windowOffsetTop=i.externalContainerOffset.top,i.windowOffsetLeft=i.externalContainerOffset.left;else switch(i.options.zoomWindowPosition){case 1:i.windowOffsetTop=i.options.zoomWindowOffsetY;i.windowOffsetLeft=+i.nzWidth;break;case 2:i.options.zoomWindowHeight>i.nzHeight?(i.windowOffsetTop=(i.options.zoomWindowHeight/2-i.nzHeight/2)*-1,i.windowOffsetLeft=i.nzWidth):n.noop();break;case 3:i.windowOffsetTop=i.nzHeight-i.zoomWindow.height()-i.options.borderSize*2;i.windowOffsetLeft=i.nzWidth;break;case 4:i.windowOffsetTop=i.nzHeight;i.windowOffsetLeft=i.nzWidth;break;case 5:i.windowOffsetTop=i.nzHeight;i.windowOffsetLeft=i.nzWidth-i.zoomWindow.width()-i.options.borderSize*2;break;case 6:i.options.zoomWindowHeight>i.nzHeight?(i.windowOffsetTop=i.nzHeight,i.windowOffsetLeft=(i.options.zoomWindowWidth/2-i.nzWidth/2+i.options.borderSize*2)*-1):n.noop();break;case 7:i.windowOffsetTop=i.nzHeight;i.windowOffsetLeft=0;break;case 8:i.windowOffsetTop=i.nzHeight;i.windowOffsetLeft=(i.zoomWindow.width()+i.options.borderSize*2)*-1;break;case 9:i.windowOffsetTop=i.nzHeight-i.zoomWindow.height()-i.options.borderSize*2;i.windowOffsetLeft=(i.zoomWindow.width()+i.options.borderSize*2)*-1;break;case 10:i.options.zoomWindowHeight>i.nzHeight?(i.windowOffsetTop=(i.options.zoomWindowHeight/2-i.nzHeight/2)*-1,i.windowOffsetLeft=(i.zoomWindow.width()+i.options.borderSize*2)*-1):n.noop();break;case 11:i.windowOffsetTop=i.options.zoomWindowOffsetY;i.windowOffsetLeft=(i.zoomWindow.width()+i.options.borderSize*2)*-1;break;case 12:i.windowOffsetTop=(i.zoomWindow.height()+i.options.borderSize*2)*-1;i.windowOffsetLeft=(i.zoomWindow.width()+i.options.borderSize*2)*-1;break;case 13:i.windowOffsetTop=(i.zoomWindow.height()+i.options.borderSize*2)*-1;i.windowOffsetLeft=0;break;case 14:i.options.zoomWindowHeight>i.nzHeight?(i.windowOffsetTop=(i.zoomWindow.height()+i.options.borderSize*2)*-1,i.windowOffsetLeft=(i.options.zoomWindowWidth/2-i.nzWidth/2+i.options.borderSize*2)*-1):n.noop();break;case 15:i.windowOffsetTop=(i.zoomWindow.height()+i.options.borderSize*2)*-1;i.windowOffsetLeft=i.nzWidth-i.zoomWindow.width()-i.options.borderSize*2;break;case 16:i.windowOffsetTop=(i.zoomWindow.height()+i.options.borderSize*2)*-1;i.windowOffsetLeft=i.nzWidth;break;default:i.windowOffsetTop=i.options.zoomWindowOffsetY;i.windowOffsetLeft=i.nzWidth}i.isWindowSet=!0;i.windowOffsetTop=i.windowOffsetTop+i.options.zoomWindowOffsetY;i.windowOffsetLeft=i.windowOffsetLeft+i.options.zoomWindowOffsetX;i.zoomWindow.css({top:i.windowOffsetTop,left:i.windowOffsetLeft});i.options.zoomType==="inner"&&i.zoomWindow.css({top:0,left:0});i.windowLeftPos=((t.pageX-i.nzOffset.left)*i.widthRatio-i.zoomWindow.width()/2)*-1;i.windowTopPos=((t.pageY-i.nzOffset.top)*i.heightRatio-i.zoomWindow.height()/2)*-1;i.Etoppos&&(i.windowTopPos=0);i.Eloppos&&(i.windowLeftPos=0);i.Eboppos&&(i.windowTopPos=(i.largeHeight/i.currentZoomLevel-i.zoomWindow.height())*-1);i.Eroppos&&(i.windowLeftPos=(i.largeWidth/i.currentZoomLevel-i.zoomWindow.width())*-1);i.fullheight&&(i.windowTopPos=0);i.fullwidth&&(i.windowLeftPos=0);(i.options.zoomType==="window"||i.options.zoomType==="inner")&&(i.zoomLock===1&&(i.widthRatio<=1&&(i.windowLeftPos=0),i.heightRatio<=1&&(i.windowTopPos=0)),i.options.zoomType==="window"&&(i.largeHeight<i.options.zoomWindowHeight&&(i.windowTopPos=0),i.largeWidth<i.options.zoomWindowWidth&&(i.windowLeftPos=0)),i.options.easing?(i.xp||(i.xp=0),i.yp||(i.yp=0),u=16,r=parseInt(i.options.easing),typeof r=="number"&&isFinite(r)&&Math.floor(r)===r&&(u=r),i.loop||(i.loop=setInterval(function(){i.xp+=(i.windowLeftPos-i.xp)/i.options.easingAmount;i.yp+=(i.windowTopPos-i.yp)/i.options.easingAmount;i.scrollingLock?(clearInterval(i.loop),i.xp=i.windowLeftPos,i.yp=i.windowTopPos,i.xp=((t.pageX-i.nzOffset.left)*i.widthRatio-i.zoomWindow.width()/2)*-1,i.yp=((t.pageY-i.nzOffset.top)*i.heightRatio-i.zoomWindow.height()/2)*-1,i.changeBgSize&&(i.nzHeight>i.nzWidth?(i.options.zoomType==="lens"&&i.zoomLens.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})):(i.options.zoomType!=="lens"&&i.zoomLens.css({backgroundSize:""+i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"})),i.changeBgSize=!1),i.zoomWindow.css({backgroundPosition:""+i.windowLeftPos+"px "+i.windowTopPos+"px"}),i.scrollingLock=!1,i.loop=!1):Math.round(Math.abs(i.xp-i.windowLeftPos)+Math.abs(i.yp-i.windowTopPos))<1?(clearInterval(i.loop),i.zoomWindow.css({backgroundPosition:""+i.windowLeftPos+"px "+i.windowTopPos+"px"}),i.loop=!1):(i.changeBgSize&&(i.nzHeight>i.nzWidth?(i.options.zoomType==="lens"&&i.zoomLens.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})):(i.options.zoomType!=="lens"&&i.zoomLens.css({backgroundSize:""+i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"}),i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"})),i.changeBgSize=!1),i.zoomWindow.css({backgroundPosition:""+i.xp+"px "+i.yp+"px"}))},u))):(i.changeBgSize&&(i.nzHeight>i.nzWidth?(i.options.zoomType==="lens"&&i.zoomLens.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"}),i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})):(i.options.zoomType==="lens"&&i.zoomLens.css({backgroundSize:""+i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"}),i.largeHeight/i.newvaluewidth<i.options.zoomWindowHeight?i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvaluewidth+"px "+i.largeHeight/i.newvaluewidth+"px"}):i.zoomWindow.css({backgroundSize:""+i.largeWidth/i.newvalueheight+"px "+i.largeHeight/i.newvalueheight+"px"})),i.changeBgSize=!1),i.zoomWindow.css({backgroundPosition:""+i.windowLeftPos+"px "+i.windowTopPos+"px"})))},setTintPosition:function(n){var t=this,i=t.zoomLens.width(),r=t.zoomLens.height();t.updateOffset(t);t.tintpos=(n.pageX-t.nzOffset.left-i/2)*-1;t.tintposy=(n.pageY-t.nzOffset.top-r/2)*-1;t.Etoppos&&(t.tintposy=0);t.Eloppos&&(t.tintpos=0);t.Eboppos&&(t.tintposy=(t.nzHeight-r-t.options.lensBorderSize*2)*-1);t.Eroppos&&(t.tintpos=(t.nzWidth-i-t.options.lensBorderSize*2)*-1);t.options.tint&&(t.fullheight&&(t.tintposy=0),t.fullwidth&&(t.tintpos=0),t.zoomTintImage.css({left:t.tintpos,top:t.tintposy}))},swaptheimage:function(t,i){var r=this,u=new Image,f;r.options.loadingIcon&&!r.spinner?(f={background:'url("'+r.options.loadingIcon+'") no-repeat',height:r.nzHeight,width:r.nzWidth,zIndex:2e3,position:"absolute",backgroundPosition:"center center"},r.options.zoomType==="inner"&&f.setProperty("top",0),r.spinner=n('<div class="ezp-spinner"><\/div>').css(f),r.$elem.after(r.spinner)):r.spinner&&r.spinner.show();r.options.onImageSwap(r.$elem);u.onload=function(){r.largeWidth=u.width;r.largeHeight=u.height;r.zoomImage=i;r.zoomWindow.css({backgroundSize:""+r.largeWidth+"px "+r.largeHeight+"px"});r.swapAction(t,i);return};r.setImageSource(u,i)},swapAction:function(t,i){var r=this,f=r.$elem.width(),u=r.$elem.height(),s=new Image,l,a,v,y,h,e,c,o;s.onload=function(){r.nzHeight=s.height;r.nzWidth=s.width;r.options.onImageSwapComplete(r.$elem);r.doneCallback();return};r.setImageSource(s,t);r.currentZoomLevel=r.options.zoomLevel;r.options.maxZoomLevel=!1;r.options.zoomType==="lens"&&r.zoomLens.css("background-image",'url("'+i+'")');r.options.zoomType==="window"&&r.zoomWindow.css("background-image",'url("'+i+'")');r.options.zoomType==="inner"&&r.zoomWindow.css("background-image",'url("'+i+'")');r.currentImage=i;r.options.imageCrossfade?(l=r.$elem,a=l.clone(),r.$elem.attr("src",t),r.$elem.after(a),a.stop(!0).fadeOut(r.options.imageCrossfade,function(){n(this).remove()}),r.$elem.width("auto").removeAttr("width"),r.$elem.height("auto").removeAttr("height"),l.fadeIn(r.options.imageCrossfade),r.options.tint&&r.options.zoomType!=="inner"&&(v=r.zoomTintImage,y=v.clone(),r.zoomTintImage.attr("src",i),r.zoomTintImage.after(y),y.stop(!0).fadeOut(r.options.imageCrossfade,function(){n(this).remove()}),v.fadeIn(r.options.imageCrossfade),r.zoomTint.css({height:u,width:f})),r.zoomContainer.css({height:u,width:f}),r.options.zoomType==="inner"&&(r.options.constrainType||(r.zoomWrap.parent().css({height:u,width:f}),r.zoomWindow.css({height:u,width:f}))),r.options.imageCrossfade&&r.zoomWrap.css({height:u,width:f})):(r.$elem.attr("src",t),r.options.tint&&(r.zoomTintImage.attr("src",i),r.zoomTintImage.attr("height",u),r.zoomTintImage.css("height",u),r.zoomTint.css("height",u)),r.zoomContainer.css({height:u,width:f}),r.options.imageCrossfade&&r.zoomWrap.css({height:u,width:f}));r.options.constrainType&&(r.options.constrainType==="height"&&(h={height:r.options.constrainSize,width:"auto"},r.zoomContainer.css(h),r.options.imageCrossfade?(r.zoomWrap.css(h),r.constwidth=r.zoomWrap.width()):(r.$elem.css(h),r.constwidth=f),e={height:r.options.constrainSize,width:r.constwidth},r.options.zoomType==="inner"&&(r.zoomWrap.parent().css(e),r.zoomWindow.css(e)),r.options.tint&&(r.tintContainer.css(e),r.zoomTint.css(e),r.zoomTintImage.css(e))),r.options.constrainType==="width"&&(c={height:"auto",width:r.options.constrainSize},r.zoomContainer.css(c),r.options.imageCrossfade?(r.zoomWrap.css(c),r.constheight=r.zoomWrap.height()):(r.$elem.css(c),r.constheight=u),o={height:r.constheight,width:r.options.constrainSize},r.options.zoomType==="inner"&&(r.zoomWrap.parent().css(o),r.zoomWindow.css(o)),r.options.tint&&(r.tintContainer.css(o),r.zoomTint.css(o),r.zoomTintImage.css(o))))},doneCallback:function(){var n=this;!n.options.loadingIcon||!n.spinner||!n.spinner.length||n.spinner.hide();n.updateOffset(n);n.nzWidth=n.$elem.width();n.nzHeight=n.$elem.height();n.currentZoomLevel=n.options.zoomLevel;n.widthRatio=n.largeWidth/n.nzWidth;n.heightRatio=n.largeHeight/n.nzHeight;n.options.zoomType==="window"&&(n.lensHeight=n.nzHeight<n.options.zoomWindowHeight/n.heightRatio?n.nzHeight:n.options.zoomWindowHeight/n.heightRatio,n.lensWidth=n.nzWidth<n.options.zoomWindowWidth?n.nzWidth:n.options.zoomWindowWidth/n.widthRatio,n.zoomLens&&n.zoomLens.css({width:n.lensWidth,height:n.lensHeight}))},getCurrentImage:function(){var n=this;return n.zoomImage},getGalleryList:function(){var t=this;return t.gallerylist=[],t.options.gallery?n("#"+t.options.gallery+" a").each(function(){var i="";n(this).data(t.options.attrImageZoomSrc)?i=n(this).data(t.options.attrImageZoomSrc):n(this).data("image")&&(i=n(this).data("image"));i===t.zoomImage?t.gallerylist.unshift({href:""+i+"",title:n(this).find("img").attr("title")}):t.gallerylist.push({href:""+i+"",title:n(this).find("img").attr("title")})}):t.gallerylist.push({href:""+t.zoomImage+"",title:n(this).find("img").attr("title")}),t.gallerylist},changeZoomLevel:function(n){var t=this,f;t.scrollingLock=!0;t.newvalue=parseFloat(n).toFixed(2);var i=t.newvalue,r=t.largeHeight/(t.options.zoomWindowHeight/t.nzHeight*t.nzHeight),u=t.largeWidth/(t.options.zoomWindowWidth/t.nzWidth*t.nzWidth);t.options.zoomType!=="inner"&&(r<=i?(t.heightRatio=t.largeHeight/r/t.nzHeight,t.newvalueheight=r,t.fullheight=!0):(t.heightRatio=t.largeHeight/i/t.nzHeight,t.newvalueheight=i,t.fullheight=!1),u<=i?(t.widthRatio=t.largeWidth/u/t.nzWidth,t.newvaluewidth=u,t.fullwidth=!0):(t.widthRatio=t.largeWidth/i/t.nzWidth,t.newvaluewidth=i,t.fullwidth=!1),t.options.zoomType==="lens"&&(r<=i?(t.fullwidth=!0,t.newvaluewidth=r):(t.widthRatio=t.largeWidth/i/t.nzWidth,t.newvaluewidth=i,t.fullwidth=!1)));t.options.zoomType==="inner"&&(r=parseFloat(t.largeHeight/t.nzHeight).toFixed(2),u=parseFloat(t.largeWidth/t.nzWidth).toFixed(2),i>r&&(i=r),i>u&&(i=u),r<=i?(t.heightRatio=t.largeHeight/i/t.nzHeight,t.newvalueheight=i>r?r:i,t.fullheight=!0):(t.heightRatio=t.largeHeight/i/t.nzHeight,t.newvalueheight=i>r?r:i,t.fullheight=!1),u<=i?(t.widthRatio=t.largeWidth/i/t.nzWidth,t.newvaluewidth=i>u?u:i,t.fullwidth=!0):(t.widthRatio=t.largeWidth/i/t.nzWidth,t.newvaluewidth=i,t.fullwidth=!1));f=!1;t.options.zoomType==="inner"&&(t.nzWidth>=t.nzHeight&&(t.newvaluewidth<=u?f=!0:(f=!1,t.fullheight=!0,t.fullwidth=!0)),t.nzHeight>t.nzWidth&&(t.newvaluewidth<=u?f=!0:(f=!1,t.fullheight=!0,t.fullwidth=!0)));t.options.zoomType!=="inner"&&(f=!0);f&&(t.zoomLock=0,t.changeZoom=!0,t.options.zoomWindowHeight/t.heightRatio<=t.nzHeight&&(t.currentZoomLevel=t.newvalueheight,t.options.zoomType!=="lens"&&t.options.zoomType!=="inner"&&(t.changeBgSize=!0,t.zoomLens.css({height:t.options.zoomWindowHeight/t.heightRatio})),(t.options.zoomType==="lens"||t.options.zoomType==="inner")&&(t.changeBgSize=!0)),t.options.zoomWindowWidth/t.widthRatio<=t.nzWidth&&(t.options.zoomType!=="inner"&&t.newvaluewidth>t.newvalueheight&&(t.currentZoomLevel=t.newvaluewidth),t.options.zoomType!=="lens"&&t.options.zoomType!=="inner"&&(t.changeBgSize=!0,t.zoomLens.css({width:t.options.zoomWindowWidth/t.widthRatio})),(t.options.zoomType==="lens"||t.options.zoomType==="inner")&&(t.changeBgSize=!0)),t.options.zoomType==="inner"&&(t.changeBgSize=!0,t.nzWidth>t.nzHeight?t.currentZoomLevel=t.newvaluewidth:t.nzHeight>=t.nzWidth&&(t.currentZoomLevel=t.newvaluewidth)));t.setPosition(t.currentLoc)},closeAll:function(){var n=this;n.zoomWindow&&n.zoomWindow.hide();n.zoomLens&&n.zoomLens.hide();n.zoomTint&&n.zoomTint.hide()},updateOffset:function(t){if(t.options.zoomContainerAppendTo!=="body"){t.nzOffset=t.$elem.offset();var i=n(t.options.zoomContainerAppendTo).offset();t.nzOffset.top=t.$elem.offset().top-i.top;t.nzOffset.left=t.$elem.offset().left-i.left}else t.nzOffset=t.$elem.offset()},changeState:function(n){var t=this;n==="enable"&&(t.options.zoomEnabled=!0);n==="disable"&&(t.options.zoomEnabled=!1)},responsiveConfig:function(t){return t.respond&&t.respond.length>0?n.extend({},t,this.configByScreenWidth(t)):t},configByScreenWidth:function(i){var r=n(t).width(),u=n.grep(i.respond,function(n){var t=n.range.split("-");return r>=t[0]&&r<=t[1]});return u.length>0?u[0]:i}};n.fn.ezPlus=function(t){return this.each(function(){var i=Object.create(u);i.init(t,this);n.data(this,"ezPlus",i)})};n.fn.ezPlus.options={container:"ZoomContainer",attrImageZoomSrc:"zoom-image",borderColour:"#888",borderSize:4,constrainSize:!1,constrainType:!1,containLensZoom:!1,cursor:"inherit",debug:!1,easing:!1,easingAmount:12,enabled:!0,gallery:!1,galleryActiveClass:"zoomGalleryActive",gallerySelector:!1,galleryItem:"a",galleryEvent:"click",imageCrossfade:!1,lensBorderColour:"#000",lensBorderSize:1,lensColour:"white",lensFadeIn:!1,lensFadeOut:!1,lensOpacity:.4,lensShape:"square",lensSize:200,lenszoom:!1,loadingIcon:!1,mantainZoomAspectRatio:!1,maxZoomLevel:!1,minZoomLevel:1.01,onComplete:n.noop,onDestroy:n.noop,onImageClick:n.noop,onImageSwap:n.noop,onImageSwapComplete:n.noop,onShow:n.noop,onHide:n.noop,onZoomedImageLoaded:n.noop,preloading:1,respond:[],responsive:!0,scrollZoom:!1,scrollZoomIncrement:.1,showLens:!0,tint:!1,tintColour:"#333",tintOpacity:.4,touchEnabled:!0,zoomActivation:"hover",zoomContainerAppendTo:"body",zoomId:-1,zoomLevel:1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,zoomType:"window",zoomWindowAlwaysShow:!1,zoomWindowBgColour:"#fff",zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowHeight:400,zoomWindowOffsetX:0,zoomWindowOffsetY:0,zoomWindowPosition:1,zoomWindowWidth:400,zoomEnabled:!0,zIndex:999}}(window.jQuery,window,document),function(n){var t={init:function(i){var r=n.extend({items:1,itemsOnPage:1,pages:0,displayedPages:5,edges:2,currentPage:0,useAnchors:!0,hrefTextPrefix:"#page-",hrefTextSuffix:"",prevText:"Prev",nextText:"Next",ellipseText:"&hellip;",ellipsePageSet:!0,cssStyle:"light-theme",listStyle:"",labelMap:[],selectOnClick:!0,nextAtFront:!1,invertPageOrder:!1,useStartEdge:!0,useEndEdge:!0,onPageClick:function(){},onInit:function(){},targetContainer:null},i||{}),u=this;return r.pages=r.pages?r.pages:Math.ceil(r.items/r.itemsOnPage)?Math.ceil(r.items/r.itemsOnPage):1,r.currentPage=r.currentPage?r.currentPage-1:r.invertPageOrder?r.pages-1:0,r.halfDisplayed=r.displayedPages/2,r.previousPage=r.currentPage,this.each(function(){u.addClass(r.cssStyle+" simple-pagination").data("pagination",r);t._draw.call(u)}),r.onInit(),this},getTargetContainer:function(){return this.data("pagination").targetContainer},selectPage:function(n){return t._selectPage.call(this,n-1),this},prevPage:function(){var n=this.data("pagination");return n.invertPageOrder?n.currentPage<n.pages-1&&t._selectPage.call(this,n.currentPage+1):n.currentPage>0&&t._selectPage.call(this,n.currentPage-1),this},nextPage:function(){var n=this.data("pagination");return n.invertPageOrder?n.currentPage>0&&t._selectPage.call(this,n.currentPage-1):n.currentPage<n.pages-1&&t._selectPage.call(this,n.currentPage+1),this},getPagesCount:function(){return this.data("pagination").pages},setPagesCount:function(n){this.data("pagination").pages=n},getPreviousPage:function(){return this.data("pagination").previousPage+1},getCurrentPage:function(){return this.data("pagination").currentPage+1},destroy:function(){return this.empty(),this},drawPage:function(n){var i=this.data("pagination");return i.currentPage=n-1,this.data("pagination",i),t._draw.call(this),this},redraw:function(){return t._draw.call(this),this},disable:function(){var n=this.data("pagination");return n.disabled=!0,this.data("pagination",n),t._draw.call(this),this},enable:function(){var n=this.data("pagination");return n.disabled=!1,this.data("pagination",n),t._draw.call(this),this},updateItems:function(n){var i=this.data("pagination");i.items=n;i.pages=t._getPages(i);this.data("pagination",i);t._draw.call(this)},updateItemsOnPage:function(n){var i=this.data("pagination");return i.itemsOnPage=n,i.pages=t._getPages(i),this.data("pagination",i),t._selectPage.call(this,0),this},getItemsOnPage:function(){return this.data("pagination").itemsOnPage},_draw:function(){var i=this.data("pagination"),r=t._getInterval(i),u,s,f,e,o;if(t.destroy.call(this),s=typeof this.prop=="function"?this.prop("tagName"):this.attr("tagName"),f=s==="UL"?this:n("<ul "+(i.listStyle?' class="'+i.listStyle+'"':"")+"><\/ul>").appendTo(this),i.prevText&&t._appendItem.call(this,i.invertPageOrder?i.currentPage+1:i.currentPage-1,{text:i.prevText,classes:"prev"}),i.nextText&&i.nextAtFront&&t._appendItem.call(this,i.invertPageOrder?i.currentPage-1:i.currentPage+1,{text:i.nextText,classes:"next"}),i.invertPageOrder){if(r.end<i.pages&&i.edges>0){if(i.useStartEdge)for(e=Math.max(i.pages-i.edges,r.end),u=i.pages-1;u>=e;u--)t._appendItem.call(this,u);i.pages-i.edges>r.end&&i.pages-i.edges-r.end!=1&&i.ellipsePageSet?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):i.pages-i.edges-r.end==1&&t._appendItem.call(this,r.end)}}else if(r.start>0&&i.edges>0){if(i.useStartEdge)for(o=Math.min(i.edges,r.start),u=0;u<o;u++)t._appendItem.call(this,u);i.edges<r.start&&r.start-i.edges!=1?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):r.start-i.edges==1&&t._appendItem.call(this,i.edges)}if(i.invertPageOrder)for(u=r.end-1;u>=r.start;u--)t._appendItem.call(this,u);else for(u=r.start;u<r.end;u++)t._appendItem.call(this,u);if(i.invertPageOrder){if(r.start>0&&i.edges>0&&(i.edges<r.start&&r.start-i.edges!=1&&i.ellipsePageSet?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):r.start-i.edges==1&&t._appendItem.call(this,i.edges),i.useEndEdge))for(o=Math.min(i.edges,r.start),u=o-1;u>=0;u--)t._appendItem.call(this,u)}else if(r.end<i.pages&&i.edges>0&&(i.pages-i.edges>r.end&&i.pages-i.edges-r.end!=1&&i.ellipsePageSet?f.append('<li class="disabled"><span class="ellipse">'+i.ellipseText+"<\/span><\/li>"):i.pages-i.edges-r.end==1&&t._appendItem.call(this,r.end),i.useEndEdge))for(e=Math.max(i.pages-i.edges,r.end),u=e;u<i.pages;u++)t._appendItem.call(this,u);i.nextText&&!i.nextAtFront&&t._appendItem.call(this,i.invertPageOrder?i.currentPage-1:i.currentPage+1,{text:i.nextText,classes:"next"});i.ellipsePageSet&&!i.disabled&&t._ellipseClick.call(this,f)},_getPages:function(n){var t=Math.ceil(n.items/n.itemsOnPage);return t||1},_getInterval:function(n){return{start:Math.ceil(n.currentPage>n.halfDisplayed?Math.max(Math.min(n.currentPage-n.halfDisplayed,n.pages-n.displayedPages),0):0),end:Math.ceil(n.currentPage>n.halfDisplayed?Math.min(n.currentPage+n.halfDisplayed,n.pages):Math.min(n.displayedPages,n.pages))}},_appendItem:function(i,r){var s=this,f,e,u=s.data("pagination"),o=n("<li><\/li>"),h=s.find("ul");i=i<0?0:i<u.pages?i:u.pages-1;f={text:i+1,classes:""};u.labelMap.length&&typeof u.labelMap[i]!=undefined&&u.labelMap[i]!=null&&(f.text=u.labelMap[i]);f=n.extend(f,r||{});i==u.currentPage||u.disabled?(u.disabled||f.classes==="prev"||f.classes==="next"?o.addClass("disabled"):o.addClass("active"),e=n('<span class="current">'+f.text+"<\/span>")):(e=u.useAnchors?u.hrefTextPrefix?n('<a href="'+u.hrefTextPrefix+(i+1)+u.hrefTextSuffix+'" class="page-link">'+f.text+"<\/a>"):n('<a href="javascript:void(0);" class="page-link">'+f.text+"<\/a>"):n("<span >"+f.text+"<\/span>"),e.click(function(n){return t._selectPage.call(s,i,n)}));f.classes&&e.addClass(f.classes);o.append(e);h.length?h.append(o):s.append(o)},_selectPage:function(n,i){var r=this.data("pagination"),u,f;return r.currentPage=n,r.selectOnClick&&t._draw.call(this),u={currentPage:n+1,previousPage:r.previousPage+1,totalItems:r.items,pages:r.pages},f=r.onPageClick(u,i),r.previousPage=n,f},_ellipseClick:function(i){var f=this,r=this.data("pagination"),u=i.find(".ellipse");u.addClass("clickable").parent().removeClass("disabled");u.click(function(){if(!r.disable){var i=n(this),e=(parseInt(i.parent().prev().text(),10)||0)+1;i.html('<input type="number" min="1" max="'+r.pages+'" step="1" value="'+e+'">').find("input").focus().click(function(n){n.stopPropagation()}).keyup(function(i){var e=n(this).val();i.which===13&&e!==""?e>0&&e<=r.pages&&t._selectPage.call(f,e-1):i.which===27&&u.empty().html(r.ellipseText)}).bind("blur",function(){var i=n(this).val();return i!==""&&t._selectPage.call(f,i-1),u.empty().html(r.ellipseText),!1})}return!1})}};n.fn.pagination=function(i){if(t[i]&&i.charAt(0)!="_")return t[i].apply(this,Array.prototype.slice.call(arguments,1));if(typeof i!="object"&&i)n.error("Method "+i+" does not exist on jQuery.pagination");else return t.init.apply(this,arguments)}}(jQuery);String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};jQuery(document).ready(function(){var n,t;applyMutuallyExclusiveness();jQuery(".color-picker").colorpicker();n=jQuery(".justified-gallery").justifiedGallery({rowHeight:200,mobileRowHeight:200,margins:5,lastRow:"nojustify",fixedHeight:!1,captions:!0,captionsColor:"#000000",captionsOpacity:.7,randomize:!1,maxRowHeight:0,target:null,cssAnimation:!0,captionsAnimationDuration:500,imagesAnimationDuration:300,captionsVisibleOpacity:.7,sizeRangeSuffixes:{512:"_ltsmall",1024:"_ltbig"}}).on("jg.complete",function(){var n=this,t,i,r;if(getBoolean(jQuery(n).attr("data-initializedonce"))===!1){jQuery(n).attr("data-initializedonce",!0);t=jQuery(n).attr("data-thumbnailheight");t=parseInt(t);Number.isInteger(t)===!1&&(t=200);i=jQuery(n);r=jQuery(n).attr("data-lookuptoapplypopupvalue");typeof r!==undefined&&r!==null&&r.trim()!==""&&(i=jQuery(n).closest(jQuery(n).attr("data-lookuptoapplypopupvalue")));var f=jQuery(n).attr("data-imagealignment"),e=!1,u="nojustify";f=="LeftToRight"?u="left":f=="RightToLeft"?(u="right",e=!0):f=="Justify"&&(parseInt(jQuery(i).attr("data-itemperpage"))<=1||jQuery(i).attr("data-renderthumbnailactualSize")=="true")&&(u="justify");jQuery(n).justifiedGallery({rowHeight:t,mobileRowHeight:t,rtl:e,lastRow:u})}});jQuery(n).each(function(n,t){var i=jQuery(t),u=jQuery(t).attr("data-lookuptoapplypopupvalue"),r,f;typeof u!==undefined&&u!==null&&u.trim()!==""&&(i=jQuery(t).closest(jQuery(t).attr("data-lookuptoapplypopupvalue")));getBoolean(i.attr("data-enableclicktoenlarge"))===!0&&getBoolean(i.attr("data-popupadded"))===!1&&(i.attr("data-popupadded","true"),i.find(".justified-gallery a").magnificPopup({type:"image",closeOnContentClick:!1,closeBtnInside:!1,mainClass:"mfp-with-zoom mfp-img-mobile",gallery:{enabled:!0,navigateByImgClick:!1,preload:[0,1],arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"><\/button>',tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:'<span class="mfp-counter">%curr% of %total%<\/span>'},image:{tError:'<a href="%url%">The image #%curr%<\/a> could not be loaded.',verticalFit:!0,titleSrc:function(n){return n.el.attr("title")+' &middot; <a class="image-source-link" href="'+n.el.attr("data-source")+'" target="_blank">image source<\/a>'}}}));getBoolean(i.attr("data-zoomapplied"))===!1&&(i.attr("data-zoomapplied","true"),getBoolean(i.attr("data-enablezoom"))===!0&&(r=jQuery(t).attr("data-zoomfactor"),r=parseFloat(r.replace(/[,]+/g,".")).toFixed(2),r<1&&(r=1),r!=1&&(i.find("img").css({position:"absolute",transform:"translate(0, 0) scale(1)","-moz-transition ":"all .5s ease-in-out, transform .60s","-ms-transition":"all .5s ease-in-out, transform .60s","-webkit-transition":"all .5s ease-in-out, transform .60s","-o-transition":"all .5s ease-in-out, transform .60s",transition:"all .5s ease-in-out, transform .60s"}),i.find("img").hover(function(){var n=jQuery(this);n.css({position:"absolute",transform:"scale("+r+")","-moz-transform":"scale("+r+")","-webkit-transform":"scale("+r+")","-o-transform":"scale("+r+")","-ms-transform":"scale("+r+")","-ms-filter":"progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand')",filter:"progid:DXImageTransform.Microsoft.Matrix(M11 = 1.5, M12 = 0, M21 = 0, M22 = 1.5, SizingMethod = 'auto expand')"})},function(){var n=jQuery(this);n.css({position:"absolute",transform:"scale(1)","-moz-transform":"scale(1)","-webkit-transform":"scale(1)","-o-transform":"scale(1)","-ms-transform":"scale(1)"})}))));getBoolean(i.attr("data-pagingenabled"))===!0&&getBoolean(i.attr("data-pagingapplied"))===!1&&(jQuery(i).attr("data-pagingapplied",!0),f=jQuery(i).attr("data-paginationId"),createPagination(i,$(f)));getBoolean(i.attr("data-randomimages"))==!0&&getBoolean(i.attr("data-randomimagesapplied"))==!1&&(jQuery(i).attr("data-randomimagesapplied",!0),setInterval(function(){autoPageSwitcher(i)},parseInt(i.attr("data-imageschangeinterval"))))});jQuery(".easyzoom").easyZoom({preventClicks:!1});jQuery("img.ezPlus").ezPlus({responsive:!1,scrollZoom:!0,imageCrossfade:!0,easing:!0,zoomType:"Lens",tint:!0,minZoomLevel:1});t=jQuery(".slider-block .galleryInnerContainer").each(function(n,t){t=$(t);var i=parseInt(t.parent().attr("data-imageschangeinterval"));$(t).jGallery({autostart:!0,autostartAtImage:1,browserHistory:!1,canChangeMode:!0,canClose:!1,canMinimalizeThumbnails:!0,canZoom:!0,disabledOnIE8AndOlder:!1,draggableZoom:!0,hideThumbnailsOnInit:!0,mode:"slider",preloadAll:!1,slideshow:!0,slideshowAutostart:!0,slideshowCanRandom:!0,slideshowInterval:(isNaN(i)?3:i/1e3)+"s",swipeEvents:!0,thumbnails:!1,thumbnailsHideOnMobile:!0,thumbnailsPosition:"bottom",title:!0,titleExpanded:!1,transition:"moveToLeft_moveFromRight",transitionBackward:"auto",transitionCols:1,transitionDuration:"2s",transitionRows:1,transitionTimingFunction:"cubic-bezier(0,1,1,1)",transitionWaveDirection:"forward",width:"100%",zoomSize:"fit"})})});var GalleryFlexpage=function(n,t){this.itemsPerPage=n;this.glBlockClassName=".gl-block-"+t;this.glBlockLink=this.glBlockClassName+" a";this.glBlockImage=this.glBlockClassName+" a img";this.glBlock=$(this.glBlockClassName)};GalleryFlexpage.prototype.setActualSize=function(){var t,n,i,r;if($(this.glBlock).data("actualsize")===!1)for(t=0,n=[],i=0;i<this.glBlock.length;i++)n.push(this.glBlock[i]),$(this.glBlock[i]).height()>=t&&(t=$(this.glBlock[i]).height()),n.length==this.itemsPerPage&&(r=$(n[0]).find("img").height(),r>t?$(n).height(r):$(n).height(t),n=[],t=0)};GalleryFlexpage.prototype.GetWidthParentBlock=function(){for(var t=20,n=0;n<this.itemsPerPage;n++)t+=$(this.glBlock[n]).find("img").width();return t};GalleryFlexpage.prototype.setCssGlBlock=function(n,t,i){$(this.glBlock).css({float:n,left:t,"margin-left":i})};GalleryFlexpage.prototype.resizeGalery=function(){var n=this.GetWidthParentBlock();$(this.glBlock).parents(".galleryInnerContainer").width()<=n?(this.setCssGlBlock("none","50%",$(this.glBlockClassName).find("img").width()/-2+"px"),$(this.glBlockClassName).parent().css("min-width","unset")):(this.setCssGlBlock("left",0,0),$(this.glBlock).data("actualsize")===!1&&$(this.glBlockClassName).parent().css("min-width",n+"px"))};GalleryFlexpage.prototype.EnableZoom=function(){var n=this;$(this.glBlockImage).mouseover(function(){var t=$(this).parents(n.glBlockClassName).data("zoomfactor");t=t>0?t:1;$(this).css("transform","scale("+t+")")});$(this.glBlockImage).mouseout(function(){$(this).css("transform","scale(1)")})};GalleryFlexpage.prototype.init=function(){var n=this;this.setActualSize();$(this.glBlock).data("actualsize")===!1&&(this.resizeGalery(),$(window).resize(function(){n.resizeGalery()}))}