1function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function loadJustifiedImageGrid(e){function t(e,t,i,r,a,n){if("normal"!==e.thumbnailFilename||!e.directServe)return"";var o,l=function(e,t){if("webp"===t)return"webp";if("avif"===t)return"avif";var i=e.split("?")[0],r=/\.(jpe?g|png|gif|webp|avif)$/i.exec(i);if(!r)return null;var a=r[1].toLowerCase();return"jpeg"===a?"jpg":a}(t,e.imageFormat);if(!l)return"";try{o=decodeURIComponent(t)}catch(e){o=t}var s=function(e){function t(e,t){return e+t&4294967295}function i(e,i,r,a,n,o){return i=t(t(i,e),t(a,o)),t(i<<n|i>>>32-n,r)}function r(e,t,r,a,n,o,l){return i(t&r|~t&a,e,t,n,o,l)}function a(e,t,r,a,n,o,l){return i(t&a|r&~a,e,t,n,o,l)}function n(e,t,r,a,n,o,l){return i(t^r^a,e,t,n,o,l)}function o(e,t,r,a,n,o,l){return i(r^(t|~a),e,t,n,o,l)}function l(e,i){var l=e[0],s=e[1],d=e[2],c=e[3];l=r(l,s,d,c,i[0],7,-680876936),c=r(c,l,s,d,i[1],12,-389564586),d=r(d,c,l,s,i[2],17,606105819),s=r(s,d,c,l,i[3],22,-1044525330),l=r(l,s,d,c,i[4],7,-176418897),c=r(c,l,s,d,i[5],12,1200080426),d=r(d,c,l,s,i[6],17,-1473231341),s=r(s,d,c,l,i[7],22,-45705983),l=r(l,s,d,c,i[8],7,1770035416),c=r(c,l,s,d,i[9],12,-1958414417),d=r(d,c,l,s,i[10],17,-42063),s=r(s,d,c,l,i[11],22,-1990404162),l=r(l,s,d,c,i[12],7,1804603682),c=r(c,l,s,d,i[13],12,-40341101),d=r(d,c,l,s,i[14],17,-1502002290),l=a(l,s=r(s,d,c,l,i[15],22,1236535329),d,c,i[1],5,-165796510),c=a(c,l,s,d,i[6],9,-1069501632),d=a(d,c,l,s,i[11],14,643717713),s=a(s,d,c,l,i[0],20,-373897302),l=a(l,s,d,c,i[5],5,-701558691),c=a(c,l,s,d,i[10],9,38016083),d=a(d,c,l,s,i[15],14,-660478335),s=a(s,d,c,l,i[4],20,-405537848),l=a(l,s,d,c,i[9],5,568446438),c=a(c,l,s,d,i[14],9,-1019803690),d=a(d,c,l,s,i[3],14,-187363961),s=a(s,d,c,l,i[8],20,1163531501),l=a(l,s,d,c,i[13],5,-1444681467),c=a(c,l,s,d,i[2],9,-51403784),d=a(d,c,l,s,i[7],14,1735328473),l=n(l,s=a(s,d,c,l,i[12],20,-1926607734),d,c,i[5],4,-378558),c=n(c,l,s,d,i[8],11,-2022574463),d=n(d,c,l,s,i[11],16,1839030562),s=n(s,d,c,l,i[14],23,-35309556),l=n(l,s,d,c,i[1],4,-1530992060),c=n(c,l,s,d,i[4],11,1272893353),d=n(d,c,l,s,i[7],16,-155497632),s=n(s,d,c,l,i[10],23,-1094730640),l=n(l,s,d,c,i[13],4,681279174),c=n(c,l,s,d,i[0],11,-358537222),d=n(d,c,l,s,i[3],16,-722521979),s=n(s,d,c,l,i[6],23,76029189),l=n(l,s,d,c,i[9],4,-640364487),c=n(c,l,s,d,i[12],11,-421815835),d=n(d,c,l,s,i[15],16,530742520),l=o(l,s=n(s,d,c,l,i[2],23,-995338651),d,c,i[0],6,-198630844),c=o(c,l,s,d,i[7],10,1126891415),d=o(d,c,l,s,i[14],15,-1416354905),s=o(s,d,c,l,i[5],21,-57434055),l=o(l,s,d,c,i[12],6,1700485571),c=o(c,l,s,d,i[3],10,-1894986606),d=o(d,c,l,s,i[10],15,-1051523),s=o(s,d,c,l,i[1],21,-2054922799),l=o(l,s,d,c,i[8],6,1873313359),c=o(c,l,s,d,i[15],10,-30611744),d=o(d,c,l,s,i[6],15,-1560198380),s=o(s,d,c,l,i[13],21,1309151649),l=o(l,s,d,c,i[4],6,-145523070),c=o(c,l,s,d,i[11],10,-1120210379),d=o(d,c,l,s,i[2],15,718787259),s=o(s,d,c,l,i[9],21,-343485551),e[0]=t(l,e[0]),e[1]=t(s,e[1]),e[2]=t(d,e[2]),e[3]=t(c,e[3])}function s(e){var t,i=[];for(t=0;t<64;t+=4)i[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return i}var d,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(d=64;d<=e.length;d+=64)l(f,s(e.substring(d-64,d)));e=e.substring(d-64);var g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(d=0;d<e.length;d++)g[d>>2]|=e.charCodeAt(d)<<(d%4<<3);if(g[d>>2]|=128<<(d%4<<3),d>55)for(l(f,g),d=0;d<16;d++)g[d]=0;g[14]=8*c,l(f,g);for(var h="0123456789abcdef",p="",u=0;u<4;u++)for(var m=0;m<4;m++)p+=h.charAt(f[u]>>8*m+4&15)+h.charAt(f[u]>>8*m&15);return p}(function(e){var t=/^(https?:\/\/)([^\/:?#]+)(:\d+)?([^?#]*)(\?([^#]*))?/.exec(e);if(!t)return e;var i=t[2]||"";if(!/\.fbcdn\.net$/i.test(i))return e;var r=t[6]||"";if(!r)return e;for(var a=[],n=r.split("&"),o=0;o<n.length;o++){var l=n[o].indexOf("="),s=-1===l?n[o]:n[o].substring(0,l);"oh"!==s&&"oe"!==s&&"_nc_tpa"!==s&&"_nc_gid"!==s&&a.push(n[o])}var d=(t[1]||"")+i+(t[3]||"")+(t[4]||"");return a.length&&(d+="?"+a.join("&")),d}
1(o)+"|"+(i||0)+"|"+(r||0)+"|"+(a||0)+"|"+n);return"&c="+s+"."+l}e.jigMissingScripts=e.jigMissingScripts||{},e.justifiedImageGrid=function(i,r){var a={targetHeight:190,heightDeviation:40,limitByViewport:"yes",aspectRatio:"",disableCropping:"",randomizeWidth:"",margins:4,animSpeed:300,limit:0,initiallyLoad:"",maxRows:"",linkClass:"",linkRel:"jig[*instance*]",linkAttributeName:"",linkAttributeValue:"",linkAttribute:"",linkTitleField:"description",imgAltField:"title",wrapText:"no",readingDirection:"ltr",loadMore:"off",loadMoreText:"Load more",loadMoreCountText:"(*count* images remaining)",loadMoreOffset:100,loadMoreAutoWidth:"on",disableHover:"no",downloadLink:"no",lightboxLink:"no",verticalCenterCaptions:"off",customFonts:"yes",captionHeight:54,quality:90,retinaReady:"yes",retinaQuality:"auto",minRetinaQuality:30,maxRetinaDensity:3,caption:"fade",captionMatchWidth:"no",captionMatchWidthForceNo:!1,titleField:"title",captionField:"description",lightbox:"prettyphoto",lightboxInit:"jigAddLightbox1",overlay:"hovered",overlayIcon:"off",bordersTotal:0,innerBorder:"always",innerBorderWidth:0,innerBorderAnimate:"width",middleBorder:"always",middleBorderWidth:0,middleBorderColor:"white",outerBorder:"always",outerBorderColor:"black",specialFx:"off",specialFxType:"desaturate",captionFxVisibility:"in_front_of_overlay",specialFxOptions:"",specialFxBlend:1,incompleteLastRow:"normal",errorChecking:"yes",suppressErrors:"no",retryCount:0,resizeCount:0,errorChecked:!1,errorImages:[],filters:!1,filterMultiple:"no",filterStyle:"buttons",filterLabel:"",L2filters:!1,L2FilterMultiple:"no",L2FilterStyle:"buttons",L2filterLabel:"",filterSmallestColor:"#A3A3A3",filterSmallestSize:11,filterLargestColor:"#000000",filterLargestSize:22,separatorCharacter:" - ",thumbnailFilename:"normal",directServe:!1,imageFormat:"auto",cropZone:"",instance:1,element:e(i),lastWindowWidth:e(window).width()},n=this,o=e.extend({},a,r),l="object"===_typeof(e.support)&&"opacity"in e.support&&!e.support.opacity,s="",d=!!window.chrome&&!/opera|opr/i.test(navigator.userAgent);this.s=o;try{s=window.navigator.userAgent.indexOf("MSIE ")>0||!!navigator.userAgent.match(/Trident.*rv\:11\./),"Netscape"==navigator.appName&&-1===navigator.appVersion.indexOf("Trident")&&-1!==navigator.appVersion.indexOf("Edge")&&(s=!0)}catch(e){s=!1}var c=!1;"ontouchstart"in document.documentElement&&(c=!0);var f=function(e){"undefined"!=typeof console&&console.warn},g=function(t,i){e.jigMissingScripts[t]||(e.jigMissingScripts[t]=!0,f())},h={prettyphoto:"prettyPhoto",colorbox:"ColorBox",magnific:"Magnific Popup",photoswipe:"PhotoSwipe 4",photoswipe3:"PhotoSwipe 4"},p=function(){try{window[o.lightboxInit]()}catch(t){var e=h[o.lightbox];e?g(e):f(o.lightbox)}},u=function(){return"undefined"!=typeof Pixastic||(g("Pixastic"),!1)};void 0!==i.dataset.touchedByJIG&&e("> *:not(.jig-clearfix)",i).remove(),n.init=function(){if(o.originalTargetHeight=o.targetHeight,o.minHeight=o.originalMinHeight=o.targetHeight-o.heightDeviation,o.maxHeight=o.originalMaxHeight=o.targetHeight+o.heightDeviation,o.prevScreenHeightLimitRatio=-1,o.defaultHeightRatio=o.originalDefaultHeightRatio=o.targetHeight/o.maxHeight,o.originalLimit=o.limit,o.hiddenOpacity=l?.01:0,s&&o.element.addClass("jig-ua-ie"),l&&o.element.addClass("jig-ua-old-ie"),!1===c?o.element.addClass("jig-no-touch"):o.element.addClass("jig-touch"),"no"!==o.lightbox&&"links-off"!==o.lightbox&&"new_tab"!==o.lightbox)if(o.hiddenLinkClass=""!==o.linkClass?'class="jig-link jig-hiddenLink '+o.linkClass+'" ':'class="jig-link jig-hiddenLink" ',o.groupedLinkClass=""!==o.linkClass?'class="jig-link jig-groupedLink '+o.linkClass+'" ':'class="jig-link jig-groupedLink" ',o.linkClass=""!==o.linkClass?'class="jig-link '+o.linkClass+'" ':'class="jig-link" ',-1!==o.linkRel.indexOf("*instance*"))o.linkRel='rel="'+o.linkRel.replace("*instance*",o.instance)+'" ';else if(-1!==o.linkRel.indexOf("auto"))switch(o.lightbox){case"prettyphoto":o.linkRel='rel="'+o.linkRel.replace("auto","prettyPhoto["+o.instance+"]")+'" ';break;case"colorbox":o.linkRel='rel="'+o.linkRel.replace("auto","colorBox["+o.instance+"]")+'" ';break;default:o.linkRel='rel="'+o.linkRel.replace("auto","gallery["+o.instance+"]")+'" '}else o.linkRel='rel="'+o.linkRel+'" ';else o.linkClass="",o.hiddenLinkClass="",o.groupedLinkClass="",o.linkRel="";if(""!==o.linkAttributeName&&(""!==o.linkAttributeValue?o.linkAttribute=" "+o.linkAttributeName+'="'+o.linkAttributeValue+'"':o.linkAttribute=" "+o.linkAttributeName+'=""'),"function"==typeof window.jigHookItems&&(o.items=window.jigHookItems(o.items)),o.allItems=o.selectedItems=o.items.slice(),o.aspectRatio&&(o.maxWidth=Math.floor(o.maxHeight*parseFloat(o.aspectRatio)),"normal"==o.incompleteLastRow&&(o.incompleteLastRow="match","off"!==o.loadMore&&(o.incompleteLastRow="flexible-match"))),"yes"==o.retinaReady)if(void 0===window.devicePixelRatio||1==window.devicePixelRatio)o.retinaReady="no",o.devicePixelRatio=1;else{var t=Math.ceil(2*window.devicePixelRatio-1e-6)/2;t>o.maxRetinaDensity?o.devicePixelRatio=o.maxRetinaDensity:o.devicePixelRatio=t}if("yes"==o.retinaReady&&("auto"==o.retinaQuality?(o.quality=Math.ceil(o.quality/o.devicePixelRatio),o.quality=o.quality>o.minRetinaQuality?o.quality:o.minRetinaQuality):o.quality=o.retinaQuality),"yes"==o.disableCropping&&(o.minHeight=o.originalMinHeight=50),"captions"==o.specialFx&&"below"==o.caption&&(o.specialFx="off"),"yes"==o.customFonts&&"off"!==o.caption&&("below"==o.caption||"off"!==o.verticalCenterCaptions||"captions"==o.specialFx)){var r=e("body").find(".jig-fontCheck");if(0===r.length){e("body").append('<div class="jig-fontCheck">!"\'\\#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~ A quick brown fox jumps over the lazy dog.</div>');var a=(r=e("body").find(".jig-fontCheck")).width(),d=0,f=setInterval(function(){d++;var t=r.width();a!=t&&0!==t?(e("body").trigger("jig-fontLoaded"),r.remove(),clearInterval(f)):d>50&&(r.remove(),clearInterval(f))},100)}}var g,h=function(){return!1},u=h,w=h,b=h,x=h,k=h,I=h,L=h,C=h,T=h,R=h,M=h,W=h,H=function(t,i,r,a){if("captions"!==o.specialFx||".jig-caption-wrapper .jig-caption"!==i)t.find(i).JIGhoverFlow(r,{opacity:a},o.animSpeed);else{var n=t.find(i),l=B(n,!0);n.JIGhoverFlow(r,{opacity:a},{duration:o.animSpeed,progress:function(){0!==e(this).closest(".
1jig-cw-role-real").length&&P(l)}})}},S=function(t,i,r,a){if("captions"!==o.specialFx)t.find(i).JIGhoverFlow(r,{height:a},o.animSpeed,"JIGeaseInOutQuad");else{var n=t.find(i),l=B(n);n.JIGhoverFlow(r,{height:a},{duration:o.animSpeed,easing:"JIGeaseInOutQuad",progress:function(){0!==e(this).closest(".jig-cw-role-real").length&&P(l)}})}},F=function(t,i,r,a){if("captions"!==o.specialFx)t.find(i).JIGhoverFlow(r,{height:a},{duration:o.animSpeed,easing:"JIGeaseInOutQuad",progress:function(){var e=t.find(".jig-caption-wrapper"),i=t.parent();e.css("top",Math.round(i.height()/2-e.height()/2))}});else{var n=t.find(i),l=B(n),s=n.closest(".jig-caption");t.find(i).JIGhoverFlow(r,{height:a},{duration:o.animSpeed,easing:"JIGeaseInOutQuad",progress:function(){var i=t.find(".jig-caption-wrapper"),r=t.parent();i.css("top",Math.round(r.height()/2-s.height()/2)),0!==e(this).closest(".jig-cw-role-real").length&&P(l)},complete:function(){"slide"!=o.caption&&"reverse-slide"!=o.caption||"hide"!=a||t.find(".jig-cw-role-effect").height(.01)}})}},A=function(e,t,i,r){e.find(t).JIGhoverFlow(i,{opacity:r},o.animSpeed)},_=function(e,t,i,r){e.find(t).JIGhoverFlow(i,{borderLeftWidth:r,borderTopWidth:r,borderRightWidth:r,borderBottomWidth:r},o.animSpeed)};switch(o.overlay){case"hovered":"on"===o.overlayIcon?(u=function(e){H(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseenter","show")},w=function(e){H(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseleave","hide")}):(u=function(e){H(e,"div.jig-overlay-wrapper","mouseenter","show")},w=function(e){H(e,"div.jig-overlay-wrapper","mouseleave","hide")});break;case"others":"on"===o.overlayIcon?(u=function(e){H(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseenter","hide")},w=function(e){H(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseleave","show")}):(u=function(e){H(e,"div.jig-overlay-wrapper","mouseenter","hide")},w=function(e){H(e,"div.jig-overlay-wrapper","mouseleave","show")})}switch(o.innerBorder){case"hovered":switch(o.innerBorderAnimate){case"width":L=function(e){_(e,"div.jig-border","mouseenter",o.innerBorderWidth+"px")},C=function(e){_(e,"div.jig-border","mouseleave",0)};break;case"opacity":L=function(e){H(e,"div.jig-border","mouseenter","show")},C=function(e){H(e,"div.jig-border","mouseleave","hide")};break;case"off":L=function(t){e(t).find("div.jig-border").show()},C=function(t){e(t).find("div.jig-border").hide()}}break;case"others":switch(o.innerBorderAnimate){case"width":L=function(e){_(e,"div.jig-border","mouseenter",0)},C=function(e){_(e,"div.jig-border","mouseleave",o.innerBorderWidth+"px")};break;case"opacity":L=function(e){H(e,"div.jig-border","mouseenter","hide")},C=function(e){H(e,"div.jig-border","mouseleave","show")};break;case"off":L=function(t){e(t).find("div.jig-border").hide()},C=function(t){e(t).find("div.jig-border").show()}}}switch(o.middleBorder){case"hovered":T=function(t){e(t).parent().parent("div.jig-imageContainer").css("background",o.middleBorderColor)},R=function(t){e(t).parent().parent("div.jig-imageContainer").css("background","transparent")};break;case"others":T=function(t){e(t).parent().parent("div.jig-imageContainer").css("background","transparent")},R=function(t){e(t).parent().parent("div.jig-imageContainer").css("background",o.middleBorderColor)}}switch(o.outerBorder){case"hovered":M=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color",o.outerBorderColor)},W=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color","transparent")};break;case"others":M=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color","transparent")},W=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color",o.outerBorderColor)}}if(l)switch(o.specialFx){case"others":b=function(e){A(e,".jig-pixastic","mouseleave",.01)},x=function(e){A(e,".jig-pixastic","mouseleave",o.specialFxBlend)};break;case"hovered":b=function(e){A(e,".jig-pixastic","mouseenter",o.specialFxBlend)},x=function(e){A(e,".jig-pixastic","mouseleave",.01)}}else switch(o.specialFx){case"others":b=function(e){A(e,".jig-pixastic","mouseenter",.01)},x=function(e){A(e,".jig-pixastic","mouseleave",o.specialFxBlend)};break;case"hovered":b=function(e){A(e,".jig-pixastic","mouseenter",o.specialFxBlend)},x=function(e){A(e,".jig-pixastic","mouseleave",.01)}}switch(o.caption){case"fade":k=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},I=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")};break;case"reverse-fade":k=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},I=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseleave","show")};break;case"slide":l?(k=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},I=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")}):"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(k=function(e){
1S(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},I=function(e){S(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")}):(k=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},I=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")});break;case"reverse-slide":l?(k=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},I=function(e){H(e,".jig-caption-wrapper .jig-caption","mouseleave","show")}):"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(k=function(e){S(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},I=function(e){S(e,".jig-caption-wrapper .jig-caption","mouseleave","show")}):(k=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},I=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseleave","show")});break;case"mixed":"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(k=function(e){S(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","show")},I=function(e){S(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","hide")}):(k=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","show")},I=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","hide")});break;case"reverse-mixed":"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(k=function(e){S(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","hide")},I=function(e){S(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","show")}):(k=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","hide")},I=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","show")})}if("yes"!==o.disableHover&&(o.element.on("mouseenter mouseleave","a",function(t){var i=e(this);"none"!==i.css("display")&&(t.stopImmediatePropagation(),"mouseenter"===t.type?(u(i),b(i),k(i),L(i),T(i),M(i),i.data("title",i.attr("title")),i.removeAttr("title")):(w(i),x(i),I(i),C(i),R(i),W(i),i.attr("title",i.data("title"))))}),o.element.on("mousedown","a",function(t){e(this).attr("title",e(this).data("title"))})),e("body").one("jig-fontLoaded",m),"off"!==o.loadMore&&(o.loadMoreCounter=0,"carousel"==o.lightbox&&o.element.on("click",function(t){if(e(t.target).hasClass("justified-image-grid"))return t.stopPropagation(),void t.preventDefault()}),o.element.on("click",".jig-loadMoreButton",N)),"prettyphoto"==o.lightbox&&"undefined"!=typeof jigOtherPrettyPhotoIsPresent&&e(document).ready(function(){setTimeout(function(){p()},10)}),o.filters||o.L2filters){o.filteredImages=[];var G=function(){var t="jig"+o.instance+"-filterDropdownBar",i=e("#"+t);return i.length||(i=e('<div id="'+t+'" class="jig-filterDropdownBar"></div>'),o.element.before(i)),i};if(o.filters){var z;o.filterMultiple=o.filterMultiple||"no",o.filterStyle=o.filterStyle||"buttons";var E=v({level:1,style:o.filterStyle,filters:o.filters,multiple:o.filterMultiple,instance:o.instance,label:o.filterLabel,touch:c,ie:s});for(z in o.filterType=E.filterType,o.filterMultiple=E.filterMultiple,o.filters)O(o.filters,z)&&(o.filteredImages[z]=[]);"dropdown"==o.filterStyle?G().append(E.markup):o.element.before(E.markup),void 0!==o.filteredImages["all-items-nofilter"]&&(o.filteredImages["all-items-nofilter"]=o.selectedItems.slice());for(var D=0,Q=o.selectedItems.length;D<Q;D+=1)if(o.selectedItems[D].filters)for(var J=0,q=o.selectedItems[D].filters.length;J<q;J+=1)void 0!==o.filteredImages[o.selectedItems[D].filters[J][0]]&&"function"==typeof o.filteredImages[o.selectedItems[D].filters[J][0]].push&&o.filteredImages[o.selectedItems[D].filters[J][0]].push(o.selectedItems[D]);var U=e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType+'[data-filter-slug="all-items-nofilter"]');if(U.length>0&&e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).first().attr("data-filter-slug")!==U.attr("data-filter-slug")){var $=U.parent().children(".jig-filterLabel").first();$.length?U.insertAfter($):U.parent().prepend(U)}if("tags"==o.filterStyle){for(z in o.filters)O(o.filters,z)&&e("#jig"+o.instance+"-filter"+o.filterType+'s .jig-filterTag[data-filter-slug="'+z+'"]').attr("rel",o.filteredImages[z].length);e.fn.tagcloud.defaults={size:{start:o.filterSmallestSize,end:o.filterLargestSize,unit:"px"},color:{start:o.filterSmallestColor,end:o.filterLargestColor}},U.length>0?(U.css({"font-size":o.filterLargestSize,color:o.filterLargestColor}),e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).slice(1).tagcloud()):e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).tagcloud()}y({level:1,style:o.filterStyle,instance:o.instance,filterType:o.filterType})}if(o.L2filters){var V;o.L2filterMultiple=o.L2filterMultiple||"no",o.L2filterStyle=o.L2filterStyle||"buttons",o.L2filteredImages=[];var Z=v({level:2,style:o.L2filterStyle,filters:o.L2filters,multiple:o.L2filterMultiple,instance:o.instance,label:o.L2filterLabel,touch:c,ie:s});for(V in o.L2filterType=Z.filterType,o.L2filterMultiple=Z.filterMultiple,o.L2filters)O(o.L2filters,V)&&(o.L2filteredImages[V]=[]);"dropdown"==o.L2filterStyle?G().append(Z.markup):o.element.before(Z.markup),void 0!==o.L2filteredImages["all-items-nofilter"]&&(o.L2filteredImages["all-items-nofilter"]=o.selectedItems.slice());for(var K=0,Y=o.selectedItems.length;K<Y;K+=1)if(o.selectedItems[K].L2filters)for(var X=0,ee=o.selectedItems[K].L2filters.length;X<ee;X+=1)void 0!==o.L2filteredImages[o.selectedItems[K].L2filters[X][0]]&&"function"==typeof o.L2filteredImages[o.selectedItems[K].L2filters[X][0]].push&&o.L2filteredImages[o.selectedItems[K].L2filters[X][0]].push(o.selectedItems[K]);var te=e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType+'[data-filter-slug="all-items-nofilter"]');if(te.length>0&&e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).first().attr("data-filter-slug")!==te.attr("data-filter-slug")){var ie=te.parent().children(".jig-filterLabel").first();ie.length?te.insertAfter(ie):te.parent().prepend(te)}if("tags"==o.L2filterStyle){for(V in o.L2filters)O(o.L2filters,V)&&e("#jig"+o.instance+"-L2filter"+o.L2filterType+'s .jig-filterTag[data-filter-slug="'+V+'"]').attr("rel",o.L2filteredImages[V].length);e.fn.tagcloud.defaults={size:{start:o.filterSmallestSize,end:o.filterLargestSize,unit:"px"},color:{start:o.filterSmallestColor,end:o.filterLargestColor}},te.length>0?(te.css({"font-size":o.filterLargestSize,color:o.filterLargestColor}),e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).slice(1).tagcloud()):e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).tagcloud()}y({level:2,style:o.L2filterStyle,instance:o.instance,filterType:o.L2filterType})}j()}else n.createGallery();o.element.trigger("jig-created"),e(window).resize(function(){void 0!==g&&clearTimeout(g),g=setTimeout(function(){n.createGallery("resize"),o.element.trigger("jig-resized")},100)}),i.dataset.touchedByJIG=!0},n.createGallery=function(t){if(!1===e.JIGjQueryMinVersion("1.7"))return JIGjQueryMinVersion("1.7",!0),!1;var i,r=Math.round(o.element.width()),a=e(window).width();void 0===o.fixedWidth?(o.element.css("width","").css("width",Math.round(o.element.width())),0===o.element.width()?void 0===o.fallbackWidth?0!==r&&a==o.lastWindowWidth?o.element.css("width",r+"px"):(i=0,o.element.parents().each(function(t,r){var n=e(r),l=e(r).parent(),s=n.width();if(n.is(":visible")&&0!==s)return o.element.css("width",s-i+"px"),void 0===l.data("jigAddedTabsHandler")&&(l.on("click",function(t){a!==e(window).width()&&l.find(".justified-image-grid").each(function(){var t=e(this);t.is(":visible")&&t.data("justifiedImageGrid").createGallery("resize")})}),l.data("jigAddedTabsHandler",!0)),!1;i+=n.outerWidth(!0)-n.width()})):o.element.css("width",o.fallbackWidth+"px"):o.element.width()>1e4&&(o.element.css("width",a),e(window).on("load",function(){n.createGallery("resize")}))):o.element.css("width","").css("width",o.fixedWidth);var s=Math.round(o.element.width());if(s<9)return o.retryCount>10?void o.element.find(".jig-clearfix").html("The element is invisible or too thin, upon page loading. In case of using tabs, try a Custom width in the General settings and you may also use a fixed width. (Justified Image Grid)"):void(o.retryBuilding=setTimeout(function(){o.retryCount++,n.createGallery()},100));if(o.retryBuilding&&clearTimeout(o.retryBuilding),o.element.find(".jig-clearfix").empty(),o.justResized=!1,"resize"===t){if(o.areaWidth&&o.areaWidth==s)return;o.justResized=!0}if(o.element.find(".jig-overflow a *:not(div)").off(),o.areaWidth=s,o.row=[],o.fullWidth=o.extra=0,o.rows=[],o.unshifts=[],o.screenHeight=e(window).height(),o.screenHeightLimitRatio=Math.min(o.screenHeight/o.originalMaxHeight,1),"yes"===o.limitByViewport&&o.prevScreenHeightLimitRatio!==o.screenHeightLimitRatio){if(o.screenHeightLimitRatio<1?(o.maxHeight=o.screenHeight,o.targetHeight=Math.round(o.maxHeight-o.heightDeviation*o.screenHeightLimitRatio),o.minHeight=50!=o.minHeight?Math.round(o.targetHeight-o.heightDeviation*o.screenHeightLimitRatio):50,o.defaultHeightRatio=o.targetHeight/o.maxHeight):(o.maxHeight=o.originalMaxHeight,o.targetHeight=o.originalTargetHeight,o.minHeight=o.originalMinHeight,o.defaultHeightRatio=o.originalDefaultHeightRatio),-1!=o.prevScreenHeightLimitRatio||1!=o.screenHeightLimitRatio)for(var d in o.selectedItems)O(o.selectedItems,d)&&(void 0===o.selectedItems[d].originalWidth&&(o.selectedItems[d].originalWidth=o.selectedItems[d].width),o.selectedItems[d].width=Math.round(o.selectedItems[d].originalWidth*o.screenHeightLimitRatio));o.prevScreenHeightLimitRatio=o.screenHeightLimitRatio}if(o.items=o.selectedItems.slice(),!0===o.errorChecked&&!1===o.justResized){for(var c in o.items)if(O(o.items,c)&&-1!=e.inArray(void 0===o.items[c].photon?void 0===o.items[c].thumbUrl?o.items[c].url:o.items[c].thumbUrl:o.items[c].photon,o.errorImages)){var f=o.items[c];if(o.items.splice(c,1),o.filters){var g=e("#jig"+o.instance+"-filterButtons .jig-filterButtonSelected").attr("data-filter-slug");o.filteredImages[g]=o.items.slice();for(var h=1,v=o.filters.length;h<v;h+=1)for(var y=0,j=o.filteredImages[o.filters[h][0]].length;y<j;y+=1){var x=e.inArray(f,o.filteredImages[o.filters[h][0]]);
1-1!=x&&o.filteredImages[o.filters[h][0]].splice(x,1)}}}if(o.selectedItems=o.items.slice(),o.errorImages=[],0===o.selectedItems.length)return void E();o.errorChecked=!1}for(""!==o.maxRows&&0!==o.maxRows||(o.maxRows=1e3),o.rowcount=0,o.imagesShown=0,""!==o.initiallyLoad&&"off"!==o.loadMore&&0===o.loadMoreCounter&&(o.limit=parseInt(o.initiallyLoad,10)),0===o.limit?o.whileUntil=0:o.limit<o.selectedItems.length?o.whileUntil=o.items.length-o.limit:o.whileUntil=0;o.items.length>o.whileUntil&&o.rowcount<o.maxRows;){var k=b();!1!==k&&(o.rows.push(k),o.rowcount++)}o.imagesShown+=o.selectedItems.length-o.items.length,o.element.find(".jig-imageContainer").slice(o.imagesShown).remove(),o.imagesAlreadyAdded=o.element.find(".jig-imageContainer").length;for(var I,L=0,C=0,T=o.rows.length;C<T;C+=1)for(var W=0,H=o.rows[C].length;W<H;W+=1)L++,(I=o.rows[C][W]).container&&L<=o.imagesAlreadyAdded?M(I,o.rows[C].length,W):R(I,o.rows[C].length,W);if("links-off"!==o.lightbox&&"no"!==o.lightbox&&"new_tab"!==o.lightbox&&""!==o.linkrel){for(;o.unshifts.length>0;)void 0===(I=o.unshifts.shift()).linkContainer?S(I):o.currentHiddenLink=I.linkContainer;for(;o.items.length>0;)void 0===(I=o.items.shift()).linkContainer?S(I):o.currentHiddenLink=I.linkContainer;o.currentHiddenLink=void 0}if(void 0===o.fixedWidth&&(o.element.css("width","").css("width",Math.round(o.element.width())),0===o.element.width()&&o.element.css("width",o.areaWidth+"px")),e("img",o.element).not(".jig-hiddenImg").on("load",function(){if(this.complete||void 0!==this.naturalWidth&&0!==this.naturalWidth||void 0!==this.readyState&&("complete"===this.readyState||4===this.readyState)||l){var t=e(this).closest("a"),i=e(this).closest(".jig-overflow");if(0!==t.length&&!0!==t.hasClass("jig-loaded"))if(t.addClass("jig-loaded"),"0"===i.css("opacity")&&i.css("opacity",1),"off"!=o.specialFx&&u())e(this).clone().addClass("jig-pixastic").insertAfter(e(this)).on("load",A).each(function(){(this.complete||void 0!==this.naturalWidth&&0!==this.naturalWidth||void 0!==this.readyState&&("complete"===this.readyState||4===this.readyState))&&e(this).trigger("load")});e(this).off("load")}else if("yes"==o.errorChecking){var r=/(?:\?src=)(.*)(?:&h=)|^(https?:\/\/.+?wp\.com.*)$/g.exec(e(this).attr("src"));null!==r?void 0!==r[1]?o.errorImages.push(r[1]):void 0!==r[2]&&o.errorImages.push(r[2]):o.errorImages.push(e(this).attr("src")),e(this).closest(".jig-imageContainer").addClass("jig-unloadable"),z()}}).on("error",function(){if("yes"==o.errorChecking){var t=/(?:\?src=)(.*)(?:&h=)|^(https?:\/\/.+?wp\.com.*)$/g.exec(e(this).attr("src"));null!==t?void 0!==t[1]?o.errorImages.push(t[1]):void 0!==t[2]&&o.errorImages.push(t[2]):o.errorImages.push(e(this).attr("src")),e(this).closest(".jig-imageContainer").addClass("jig-unloadable"),z()}}).each(function(){(this.complete||void 0!==this.naturalWidth&&0!==this.naturalWidth||void 0!==this.readyState&&("complete"===this.readyState||4===this.readyState))&&e(this).trigger("load")}),"resize"!==t?w():"prettyphoto"==o.lightbox&&"undefined"!=typeof jigReCallPrettyPhotoAfterPossibleResize?setTimeout(function(){p(),jigReCallPrettyPhotoAfterPossibleResize=void 0},10):o.visibleImageCount!=e(".jig-imageContainer",o.element).length&&w(),"click"==o.loadMore||"scroll"==o.loadMore||"hybrid"==o.loadMore||"once"==o.loadMore){o.loadMoreButton=o.element.find(".jig-loadMoreButton");var F=o.selectedItems.length-o.limit,_=o.element.find(".jig-hiddenLink").length;if(1==o.loadMoreButton.length)F>0?(o.loadMoreButton.find(".jig-loadMoreButton-count").text(0!==_?_:F),"yes"===o.loadMoreAutoWidth&&o.loadMoreButton.css("width",o.loadMoreButton.find(".jig-loadMoreButton-inner").width())):o.loadMoreButton.remove();else if(F>0){var B="";o.loadMoreCountText&&"none"!==o.loadMoreCountText&&(B=(B=o.loadMoreCountText).replace("*count*",'<span class="jig-loadMoreButton-count">'+(0!==_?_:F)+"</span>")),o.loadMoreButton=e('<div class="jig-loadMoreButton"><span class="jig-loadMoreButton-inner">'+o.loadMoreText+(""!==B?"<br />"+B:"")+"</span></div>"),o.element.find(".jig-clearfix").after(o.loadMoreButton),"yes"===o.loadMoreAutoWidth&&o.loadMoreButton.css("width",o.loadMoreButton.find(".jig-loadMoreButton-inner").width())}"scroll"!=o.loadMore&&"hybrid"!=o.loadMore||e(window).scroll(function(){if(("scroll"==o.loadMore||"hybrid"==o.loadMore&&o.loadMoreCounter>0)&&o.selectedItems.length-o.limit>0){var t=o.element.find(".jig-loadMoreButton").offset();e(window).scrollTop()>
1=t.top-parseInt(o.loadMoreOffset,10)-e(window).height()&&N()}})}if("no"!==o.wrapText){var P=o.element.find(".jig-imageContainer").last();0===o.element.find(".jig-flowSpacer").length&&o.element.find(".jig-imageContainer").last().after('<div class="jig-flowSpacer"></div>');var G=o.element.find(".jig-flowSpacer").css({width:"1px",height:P.height()+3,float:"ltr"==o.readingDirection?"left":"right"});setTimeout(function(){"ltr"==o.readingDirection?o.element.offset().left==G.offset().left?G.css("margin-right",0):G.css("margin-right",2*o.margins):o.element.offset().left==G.offset().left?G.css("margin-left",0):G.css("margin-left",2*o.margins)},1)}if("yes"!=o.customFonts||"off"===o.caption||"below"!=o.caption&&"off"===o.verticalCenterCaptions&&"captions"!=o.specialFx||m(!0),o.prevInstanceID="#jig"+(o.instance-1),e(window).width()!=a||o.areaWidth!=Math.round(o.element.width()))return o.resizeCount++,o.resizeCount>1&&o.element.css("min-height",o.element.height()),n.createGallery("resize"),o.instance>1&&0!==e(o.prevInstanceID).length&&e(o.prevInstanceID).data("justifiedImageGrid").createGallery("resize"),void o.element.css("min-height","");o.instance>1&&0!==e(o.prevInstanceID).length&&(o.prevInstanceData=e(o.prevInstanceID).data("justifiedImageGrid"),o.prevInstanceData.s.element.css("width","").css("width",o.prevInstanceData.s.element.width()),o.prevInstanceData.s.areaWidth!=o.prevInstanceData.s.element.width()&&o.prevInstanceData.createGallery("resize")),o.resizeCount=0,o.lastWindowWidth=a,o.visibleImageCount=e(".jig-imageContainer",o.element).length};var m=function(t){!0!==t&&(t="captions"==o.specialFx),o.element.find(".jig-imageContainer").each(function(i,r){var a,n=e(r);if("off"!==o.verticalCenterCaptions){var l=(a=n.find(".jig-caption-wrapper")).filter(".jig-cw-role-real"),s=l.height(),c=l.find(".jig-caption"),f=("mixed"==o.caption||"reverse-mixed"==o.caption)&&l.find(".jig-caption-description-wrapper");"slide"!=o.caption&&"reverse-slide"!=o.caption||!c.is(":animated")?"mixed"!=o.caption&&"reverse-mixed"!=o.caption||!f.is(":animated")?(0===s&&(c.css({opacity:0,display:"block"}),s=l.height(),c.removeAttr("style")),!0===t?a.css({bottom:"auto",top:Math.round(l.closest(".jig-imageContainer").height()/2-s/2)}):a.css({bottom:"auto"}).animate({top:Math.round(l.closest(".jig-imageContainer").height()/2-s/2)},o.animSpeed,"JIGeaseInOutQuad")):f.promise().done(function(){s=l.height();var e=f.height();"mixed"==o.caption&&0!==e?(f.css({display:"none"}),s=l.height(),f.css({display:"block"})):"reverse-mixed"==o.caption&&0===e&&(f.css({display:"block"}),s=l.height(),f.css({display:"none"})),a.css({bottom:"auto"}).animate({top:Math.round(l.closest(".jig-imageContainer").height()/2-s/2)},o.animSpeed,"JIGeaseInOutQuad")}):c.promise().done(function(){0===(s=l.height())&&(c.css({opacity:0,display:"block"}),s=l.height(),c.removeAttr("style")),a.css({bottom:"auto"}).animate({top:Math.round(l.closest(".jig-imageContainer").height()/2-s/2)},o.animSpeed,"JIGeaseInOutQuad")})}"below"==o.caption&&G(n,!0),"captions"==o.specialFx&&(d&&"no"!==o.captionMatchWidth&&n.find(".jig-caption-title, .jig-caption-wrapper").each(function(){var t=e(this),i=t.css("width","")[0].getBoundingClientRect().width;i%2!=0&&(i=Math.ceil(i),t.css({width:i%2!=0?i+1:i}))}),a=a||n.find(".jig-caption-wrapper"),P(B(a)))})},w=function(){switch(o.lightbox){case"prettyphoto":case"colorbox":case"magnific":case"photoswipe":case"photoswipe3":case"foobox":case"custom":p();break;case"links-off":o.element.find("a").css("cursor","default"),o.element.on("click","a",function(e){e.preventDefault()}),e(o.element).on("click","a",function(e){2===e.which&&e.preventDefault()})}},v=function(e){var t,i,r=e.multiple;"buttons"==e.style?(t="Button",i="div"):"dropdown"==e.style?(t="Option",i="option",r="no"):(t="Tag",i="span");var a="dropdown"==e.style,n=2==e.level?"L2":"",o="jig"+e.instance+"-"+n+"filter"+t+"s",l="jig-filter"+t+"s "+("no"!==r?"jig-filterMultiple ":"jig-filterSingle ")+(e.touch?"jig-touch ":"jig-no-touch ")+(e.ie?"jig-ua-ie":"")+"jig-clearfix",s=a?'<select name="'+o+'" id="'+o+'" class="'+l+'" data-filter-level="'+e.level+'">':'<div id="'+o+'" class="'+l+'" data-filter-level="'+e.level+'">',d="";for(var c in e.filters)O(e.filters,c)&&(d+="<"+i+' class="jig-filter'+t+'" data-filter-slug="'+c+'"'+(a?' value="'+c+'"':"")+">"+e.filters[c]+"</"+i+">");var f=a?"</select>":"</div>",g=e.label?'<span class="jig-filterLabel">'+e.label+"</span>":"";return{markup:a?'<div class="jig-filterLevel">'+g+'<span class="jig-filterControl">'+s+d+f+"</span></div>":s+g+d+f,filterType:t,filterMultiple:r}},y=function(t){var i=2==t.level?"L2":"",r=e("#jig"+t.instance+"-"+i+"filter"+t.filterType+"s");"dropdown"==t.style?(r.on("change",function(t){j.call(e(this).find("option:selected")[0],t)}),r.prop("selectedIndex",0)):r.on("click",".jig-filter"+t.filterType,j)},j=function(t){var i,r,a,l,s,d=e(this),c=d.attr("data-filter-slug"),f=!1;
1if(void 0===t&&(!1!==o.filters?(d=e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).first(),c=d.attr("data-filter-slug")):(d=e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).first(),c=d.attr("data-filter-slug"))),1==(i=d.parent().attr("data-filter-level"))){if("no"==o.filterMultiple||"all-items-nofilter"==c)!1===d.hasClass("jig-filter"+o.filterType+"Selected")&&(d.siblings(".jig-filter"+o.filterType+"Selected").removeClass("jig-filter"+o.filterType+"Selected"),d.addClass("jig-filter"+o.filterType+"Selected"),o.selectedItems=o.filteredImages[c],f=!0);else{var g=d.parent().find(".jig-filter"+o.filterType+"Selected").length;if(1==g&&"all-items-nofilter"==d.siblings(".jig-filter"+o.filterType+"Selected").attr("data-filter-slug")&&d.siblings(".jig-filter"+o.filterType+"Selected").removeClass("jig-filter"+o.filterType+"Selected"),!1===d.hasClass("jig-filter"+o.filterType+"Selected"))d.addClass("jig-filter"+o.filterType+"Selected"),g++;else{if(1==g){if("all-items-nofilter"!=e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).first().attr("data-filter-slug"))return;e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).first().click().addClass("jig-filter"+o.filterType+"Selected")}d.removeClass("jig-filter"+o.filterType+"Selected"),g--}var h=[];if(d.parent().find(".jig-filter"+o.filterType+"Selected").each(function(){h.push(e(this).attr("data-filter-slug"))}),c=h.toString(),void 0===o.filteredImages[c]){o.filteredImages[c]=[];var p=0;for(a=o.allItems.length,r=0;r<a;r+=1)if(o.allItems[r].filters)for(p=0,s=o.allItems[r].filters.length,l=0;l<s;l+=1)"or"==o.filterMultiple?e.inArray(o.allItems[r].filters[l][0],h)>-1&&-1==e.inArray(o.allItems[r],o.filteredImages[c])&&o.filteredImages[c].push(o.allItems[r]):(e.inArray(o.allItems[r].filters[l][0],h)>-1&&p++,p==h.length&&-1==e.inArray(o.allItems[r],o.filteredImages[c])&&o.filteredImages[c].push(o.allItems[r]))}o.selectedItems=o.filteredImages[c],f=!0}f&&o.L2filters&&(o.L1selectedItems=o.selectedItems)}if(o.L2filters){if(void 0===t&&(i=(d=e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).first()).parent().attr("data-filter-level")),2==i)if("no"==o.L2filterMultiple||"all-items-nofilter"==c)d.siblings(".jig-filter"+o.L2filterType+"Selected").removeClass("jig-filter"+o.L2filterType+"Selected"),d.addClass("jig-filter"+o.L2filterType+"Selected");else{var u=d.parent().find(".jig-filter"+o.L2filterType+"Selected").length;if(1==u&&"all-items-nofilter"==d.siblings(".jig-filter"+o.L2filterType+"Selected").attr("data-filter-slug")&&d.siblings(".jig-filter"+o.L2filterType+"Selected").removeClass("jig-filter"+o.L2filterType+"Selected"),!1===d.hasClass("jig-filter"+o.L2filterType+"Selected"))d.addClass("jig-filter"+o.L2filterType+"Selected"),u++;else{if(1==u){if("all-items-nofilter"!=e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).first().attr("data-filter-slug"))return;e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).first().click().addClass("jig-filter"+o.L2filterType+"Selected")}d.removeClass("jig-filter"+o.L2filterType+"Selected"),u--}}var m=[];e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType+"Selected").each(function(){m.push(e(this).attr("data-filter-slug"))}),c=[],o.filters&&e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType+"Selected").each(function(){c.push(e(this).attr("data-filter-slug"))});var w=c.concat(m).toString();if(!1===o.filters&&(o.L1selectedItems=o.allItems),void 0===o.filteredImages[w])if(1==m.length&&"all-items-nofilter"==m[0])o.filteredImages[w]=o.L1selectedItems,o.selectedItems=o.filteredImages[w];else{o.filteredImages[w]=[];var v=0;for(a=o.L1selectedItems.length,r=0;r<a;r+=1)if(o.L1selectedItems[r].L2filters)for(v=0,s=o.L1selectedItems[r].L2filters.length,l=0;l<s;l+=1)"or"==o.L2filterMultiple?e.inArray(o.L1selectedItems[r].L2filters[l][0],m)>-1&&-1==e.inArray(o.L1selectedItems[r],o.filteredImages[w])&&o.filteredImages[w].push(o.L1selectedItems[r]):(e.inArray(o.L1selectedItems[r].L2filters[l][0],m)>-1&&v++,v==m.length&&-1==e.inArray(o.L1selectedItems[r],o.filteredImages[w])&&o.filteredImages[w].push(o.L1selectedItems[r]))}o.selectedItems=o.filteredImages[w],f=!0}if(f){o.element.find(".jig-imageContainer, .jig-hiddenLink, .jig-hiddenGallery").remove();for(var y=0,j=o.selectedItems.length;y<j;y+=1)o.selectedItems[y].linkContainer=void 0;n.createGallery("filter")}},b=function(){for(o.row=[],o.validRow=!0,o.fullWidth=0,o.extra=0;o.items.length>o.whileUntil&&o.extra<o.areaWidth;){var e=o.items.shift();e.newHeight=e.newWidth=e.containerHeight=e.containerWidth=e.marLeft=void 0,e.ratio=e.width/o.maxHeight,o.row.push(e),o.fullWidth+=Math.round(e.width*o.defaultHeightRatio)+o.margins+o.bordersTotal,o.extra=o.fullWidth-o.margins}if(o.extra-=o.areaWidth,o.row.length>0&&o.extra>0||0===o.rows.length&&o.items.length>o.whileUntil){for(var t="landscape",i=0,r=o.row.length;i<r;i+=1)if(o.row[i].ratio<1){t="portrait";break}"landscape"==t?k():"yes"!==o.disableCropping?I():k()}else{if(o.rows.length>0&&o.items.length==o.whileUntil){switch(o.incompleteLastRow){case"flexible":I("flexible");break;case"flexible-center":I("flexible-center");break;case"hide":I("hide");break;case"flexible-match":"off"!==o.loadMore&&o.selectedItems.length-o.limit<=0?x():I("flexible");break;case"flexible-match-center":"off"!==o.loadMore&&o.selectedItems.length-o.limit<=0?x("center"):I("flexible-center");break;case"match":x();break;case"match-center":x("center");break;case"center":I("center");break;default:I("lastRow")}
1return!0===o.validRow?o.row:(o.imagesShown-=o.row.length,o.unshifts=o.row,o.whileUntil+=o.unshifts.length,!1)}"center"!==o.incompleteLastRow&&"match-center"!==o.incompleteLastRow&&"flexible-match-center"!==o.incompleteLastRow?I("lastRow"):I("center")}return o.row},x=function(e){for(var t,i=0,r=0,a=o.rows.length;r<a;r+=1)i=r;if(void 0!==o.rows[i]&&void 0!==o.rows[i][0]){t=o.rows[i][0].containerHeight?o.rows[i][0].containerHeight:o.rows[i][0].newHeight,o.marginsTotal=(o.row.length-1)*o.margins+o.row.length*o.bordersTotal,o.rowlen=0;for(var n=0,l=o.row.length;n<l;n+=1)void 0!==o.rows[i][n]&&o.row[n].ratio==o.rows[i][n].ratio?(o.row[n].newHeight=o.rows[i][n].newHeight,o.row[n].containerHeight=o.rows[i][n].containerHeight,o.row[n].newWidth=o.rows[i][n].newWidth,o.row[n].containerWidth=o.rows[i][n].containerWidth,o.row[n].marLeft=o.rows[i][n].marLeft):(o.row[n].newHeight=t,o.row[n].newWidth=Math.round(o.row[n].newHeight*o.row[n].ratio)),o.rowlen+=o.row[n].newWidth,void 0!==o.row[n].marLeft&&(o.rowlen-=2*o.row[n].marLeft);t>o.targetHeight&&(o.remaining=o.rowlen+o.marginsTotal-o.areaWidth,o.remaining>0&&L()),void 0!==e&&o.rowlen+o.marginsTotal<o.areaWidth&&(o.row[0].spaceLeft=Math.floor(.5*(o.areaWidth-o.rowlen-o.marginsTotal)))}else I("lastRow")},k=function(){var e=!0;o.marginsTotal=(o.row.length-1)*o.margins+o.row.length*o.bordersTotal,o.rowlen=0,o.heights=[];for(var t=0,i=o.row.length;t<i;t+=1){var r=Math.round(o.row[t].width*o.defaultHeightRatio),a=Math.round((r+o.marginsTotal/o.row.length)/o.fullWidth*o.extra);if(o.row[t].newWidth=r-a,o.heights[t]=o.row[t].newWidth/o.row[t].ratio,o.heights[t]<o.minHeight)return void I();o.heights[t]>o.maxHeight?(o.row[t].newHeight=o.targetHeight,o.row[t].newWidth=Math.round(o.row[t].newHeight*o.row[t].ratio),e=!1):(o.row[t].newHeight=o.heights[t],o.rowlen+=o.row[t].newWidth)}e&&(o.remaining=o.rowlen+o.marginsTotal-o.areaWidth,L())},I=function(e){var t=!0;if(1!=o.row.length&&void 0===e){var i=o.row.pop();o.fullWidth-=Math.round(i.width*o.defaultHeightRatio)+o.margins+o.bordersTotal,o.items.unshift(i),o.extra=o.fullWidth-o.margins,o.extra-=o.areaWidth}o.marginsTotal=(o.row.length-1)*o.margins+o.row.length*o.bordersTotal,o.rowlen=0,o.heights=[];for(var r=0,a=o.row.length;r<a;r+=1){var n=Math.round(o.row[r].width*o.defaultHeightRatio),l=Math.round((n+o.marginsTotal/o.row.length)/o.fullWidth*o.extra);if(o.row[r].newWidth=n-l,o.heights[r]=o.row[r].newWidth/o.row[r].ratio,o.heights[r]>o.maxHeight){if(void 0===e){var s=o.items.shift();return o.row.push(s),o.fullWidth+=Math.round(s.width*o.defaultHeightRatio)+o.margins+o.bordersTotal,o.extra=o.fullWidth-o.margins,o.extra-=o.areaWidth,void C()}if("off"!==o.loadMore&&o.selectedItems.length-o.limit<=0&&("flexible"==e?e="lastRow":"flexible-center"==e&&(e="center")),"lastRow"==e){for(var d=0,c=o.row.length;d<c;d+=1)o.row[d].newHeight=o.targetHeight,o.row[d].newWidth=Math.round(o.row[d].newHeight*o.row[d].ratio);return}if("center"==e){for(var f=0,g=0,h=o.row.length;g<h;g+=1)o.row[g].newHeight=o.targetHeight,o.row[g].newWidth=Math.round(o.row[g].newHeight*o.row[g].ratio),f+=o.row[g].newWidth;return void(o.row[0].spaceLeft=Math.floor(.5*(o.areaWidth-f-o.marginsTotal)))}o.validRow=!1,o.row[r].newWidth=void 0,t=!1}else if(o.heights[r]<o.minHeight&&void 0===e)return void C();void 0!==o.row[r].newWidth&&(o.row[r].newHeight=o.heights[r],o.rowlen+=o.row[r].newWidth)}t&&(o.remaining=o.rowlen+o.marginsTotal-o.areaWidth,L())},L=function(){if(0!==o.remaining)if(o.remaining>0)for(;o.remaining>0;)for(var e=0,t=o.row.length;e<t&&(o.row[e].newWidth--,o.row[e].newHeight=o.heights[e]=o.row[e].newWidth/o.row[e].ratio,o.remaining--,0!==o.remaining);e+=1);else for(;o.remaining<0;)for(var i=0,r=o.row.length;i<r&&(o.row[i].newWidth++,o.row[i].newHeight=o.heights[i]=o.row[i].newWidth/o.row[i].ratio,o.remaining++,0!==o.remaining);i+=1);for(var a=Math.floor(Math.min.apply(null,o.heights)),n=0,l=o.row.length;n<l;n+=1)o.row[n].containerHeight=a,o.row[n].newHeight=Math.round(o.row[n].newHeight)},C=function(){for(var e=T(),t=0,i=o.row.length;t<i;t+=1){var r=e[t],a=o.row[t];a.marLeft=Math.round(r/2),a.containerWidth=a.newWidth-r}},T=function(){var e=[],t=0;o.marginsTotal=(o.row.length-1)*o.margins+o.row.length*o.bordersTotal;for(var i=0,r=o.row.length;i<r;i+=1){var a=o.row[i],n=Math.round(o.row[i].width*o.defaultHeightRatio);a.newHeight=o.targetHeight,a.newWidth=n,e[i]=Math.round((n+o.marginsTotal/o.row.length)/o.fullWidth*o.extra),t+=e[i]}var l=o.extra-t;if(0!==l)if(l>0)for(;l>0;)for(var s=0,d=e.length;s<d&&(e[s]++,0!==--l);s+=1);else for(;l<0;)for(var c=0,f=e.length;c<f&&(e[c]--,0!==++l);c+=1);return e},R=function(i,r,a){if(isNaN(i.newWidth)||!i.width)return!1;void 0!==i.linkContainer&&(e(i.linkContainer).remove(),i.linkContainer=void 0),void 0===i[o.linkTitleField]&&(i[o.linkTitleField]=""),void 0===i[o.imgAltField]&&(i[o.imgAltField]=""),void 0===i[o.titleField]&&(i[o.titleField]=""),void 0===i[o.captionField]&&(i[o.captionField]=""),void 0===i.gallery&&(i.gallery="");var n="";i.carousel_data?(i.carousel_data=" "+i.carousel_data+" ",n=" tiled-gallery-item"):i.carousel_data="",i.extra_class&&(n+=" "+i.extra_class),i.off="",i.url=(i.link,i.url);var l,s=e('<div class="jig-imageContainer'+n+'"/>'),d=e('<div class="jig-overflow"/>'),c=i.url,f=i.link_target?i.link_target:"_self",g=o.linkClass,h=o.linkRel,p="",u="",m=!0;if(""!==i.gallery&&(s.append(i.gallery.html),h=' rel="'+i.gallery.rel+'" ',s.addClass(i.gallery.lightbox_class),s.attr("id",i.gallery.id)),i.link&&(c=i.link,"video"!==f&&"videoplayer"!==f?(g="foobox"!==f?'target="'+f+'" '+g.replace("jig-link","jig-customLink"):'target="'+f+'" '+g.replace("jig-link",""),h=i.link_rel?'rel="'+i.link_rel+'"'
1:""):"magnific"==o.lightbox&&-1==g.indexOf("mfp-")&&(g=g.replace("jig-link","jig-link mfp-iframe")),"videoplayer"!=f&&"foobox"!=f||-1===c.indexOf("&poster=")&&-1===c.indexOf("|poster=")||(m=!1)),!0===m&&("https%3A%2F%2F"===(c=(c+"").replace(/\+/g,"%20")).substr(0,14)||"http%3A%2F%2F"===c.substr(0,13)))try{c=decodeURIComponent(c)}catch(e){}p=i[o.linkTitleField],u=i[o.imgAltField],i.download&&("yes"==o.downloadLink?p+=l=(0!==p.length?o.separatorCharacter:"")+i.download:"alt"==o.downloadLink&&(u+=l=(0!==u.length?o.separatorCharacter:"")+i.download)),i.lightbox_link&&("yes"==o.lightboxLink?p+=(0!==p.length?o.separatorCharacter:"")+i.lightbox_link:"alt"==o.lightboxLink&&(u+=(0!==u.length?o.separatorCharacter:"")+i.lightbox_link)),""!==p&&(p='title="'+p+'" '),""!==u&&(u='alt="'+u+'" '),"new_tab"==o.lightbox&&(g='target="_blank" ');var w=o.linkAttribute;i.extra_class&&(w=w.replace("*content*",i.extra_class.replace(/.*jig-contentID-[A-Z]{2}-(\d+).*/gm,"$1"))),void 0!==i.link_attribute_name&&(w=void 0!==i.link_attribute_value?" "+i.link_attribute_name+'="'+i.link_attribute_value+'"':" "+i.link_attribute_name+'=""');var v=e("<a "+g+h+w+p+(i.wh?'data-wh="'+i.wh+'" ':"")+'href="'+("links-off"!=o.lightbox?c:"#")+'" />'),y=e("<img "+u+i.carousel_data+"/>");if(i.carousel_data&&i.download&&("yes"==o.downloadLink?(l=(0!==y.attr("data-image-title").length?o.separatorCharacter:"")+e("<textarea />").html(i.download).val(),y.attr("data-image-title",y.attr("data-image-title")+l)):"alt"==o.downloadLink&&(l=(0!==y.attr("data-image-description").length?"<br />":"")+e("<textarea />").html(i.download).val(),y.attr("data-image-description",y.attr("data-image-description")+l))),void 0!==i.geo&&y.attr("data-geo",i.geo),a==r-1&&s.addClass("jig-last"),d.css("width",(i.containerWidth?i.containerWidth:i.newWidth)+"px"),d.css("height",(i.containerHeight?i.containerHeight:i.newHeight)+"px"),i.thumbCandidates){for(var j=i.newHeight*o.devicePixelRatio,b=null,x=0;x<i.thumbCandidates.length;x++)if(i.thumbCandidates[x].height>=j){b=i.thumbCandidates[x];break}b||(b=i.thumbCandidates[i.thumbCandidates.length-1]),y.attr("src",b.url)}else if(i.photon){var k=i.photon;"yes"==o.retinaReady&&(k=(k=k.replace(/([?&])h=(\d+)/,function(e,t,i){return t+"h="+Math.floor(parseInt(i,10)*o.devicePixelRatio)})).replace(/([?&])resize=(\d+),(\d+)/,function(e,t,i,r){return t+"resize="+Math.floor(parseInt(i,10)*o.devicePixelRatio)+","+Math.floor(parseInt(r,10)*o.devicePixelRatio)}),o.devicePixelRatio>1&&/\.jpe?g\?/i.test(k)&&(k+="&quality="+o.quality)),y.attr("src",decodeURIComponent((k+"").replace(/\+/g,"%20")))}else{var I,L,C=i.thumbUrl?i.thumbUrl:i.url,T=o.originalMaxHeight,R=function(e){if(!e)return"c";var t=/^&a=(.+)$/.exec(e);return t?t[1]:"c"}(o.cropZone);o.aspectRatio||o.randomizeWidth?(I=o.maxWidth,""!==o.randomizeWidth&&(I=void 0!==i.originalWidth?i.originalWidth:i.width),"yes"==o.retinaReady&&(T=Math.floor(T*o.devicePixelRatio),I=Math.floor(I*o.devicePixelRatio)),L=t(o,C,I,T,o.quality,R),y.attr("src",o.timthumb+"?src="+C+"&h="+T+"&w="+I+"&q="+o.quality+o.cropZone+L)):"yes"==o.retinaReady?(T=Math.floor(T*o.devicePixelRatio),I=Math.floor((void 0!==i.originalWidth?i.originalWidth:i.width)*o.devicePixelRatio),L=t(o,C,I,T,o.quality,R),y.attr("src",o.timthumb+"?src="+C+"&h="+T+"&w="+I+"&q="+o.quality+o.cropZone+L)):(L=t(o,C,0,T,o.quality,R),y.attr("src",o.timthumb+"?src="+C+"&h="+T+"&q="+o.quality+o.cropZone+L))}if(y.attr("width",i.newWidth).css("width",i.newWidth+"px"),y.attr("height",i.newHeight).css("height",i.newHeight+"px"),i.marLeft&&y.css("margin-left",-i.marLeft+"px"),("center"==o.incompleteLastRow||"flexible-center"==o.incompleteLastRow||"flexible-match-center"==o.incompleteLastRow||"match-center"==o.incompleteLastRow)&&i.spaceLeft&&i.spaceLeft>0&&(s.css("ltr"==o.readingDirection?"margin-left":"margin-right",i.spaceLeft+"px"),i.spaceLeft=0),y.css("margin-top",0),v.append(y),"off"!==o.overlay&&v.append('<div class="jig-overlay-wrapper"><div class="jig-overlay"></div></div>'+("on"===o.overlayIcon?'<div class="jig-overlay-icon-wrapper"><div class="jig-overlay-icon"></div></div>':"")),"off"!==o.caption){""!==i.gallery&&(i[o.titleField]=void 0!==i.gallery[o.titleField]&&""!==i.gallery[o.titleField]&&" "!==i.gallery[o.titleField]?i.gallery[o.titleField]:"",i[o.captionField]=void 0!==i.gallery[o.captionField]&&""!==i.gallery[o.captionField]&&" "!==i.gallery[o.captionField]?i.gallery[o.captionField]:"");var M="";""!==i[o.titleField]&&" "!==i[o.titleField]&&(M+='<div class="jig-caption-title">'+D(i[o.titleField],"<br><hr><em><strong><mark><i><b><font><span><ul><ol><li>")+"</div>"),""!==i[o.captionField]&&" "!==i[o.captionField]&&(M+='<div class="jig-caption-description-wrapper"><div class="jig-caption-description'+(""!==M?"":" jig-alone")+'">'+D(i[o.captionField],"<br><hr><em><strong><mark><i><b><font><span><ul><ol><li>")+"</div></div>"),""!==M?(i.$captionWrapper=e('<div class="jig-caption-wrapper jig-cw-role-real"><div class="jig-caption">'+M+"</div></div>"),"below"!==o.caption?v.append(i.$captionWrapper):0!==o.middleBorderWidth&&"always"==o.innerBorder&&"always"!==o.middleBorder?s.append(i.$captionWrapper.width(d.width()-2*parseFloat(o.innerBorderWidth))
1):s.append(i.$captionWrapper.css({width:d.css("width")}))):"below"==o.caption&&(i.$captionWrapper=e('<div class="jig-caption-wrapper"></div>'),0!==o.middleBorderWidth&&"always"==o.innerBorder&&"always"!==o.middleBorder?s.append(i.$captionWrapper.width(d.width()-2*parseFloat(o.innerBorderWidth))):s.append(i.$captionWrapper.css({width:d.css("width")})))}if(0===o.bordersTotal&&0===o.innerBorderWidth||v.append('<div class="jig-border"></div>'),d.append(v),i.carousel_data&&i.caption&&d.append('<div class="tiled-gallery-caption">'+D(i.caption)+"</div>"),s.prepend(d),H(i,s),o.element.find(".jig-clearfix").before(s),"off"!==o.caption)if("below"==o.caption)G(s);else if("captions"==o.specialFx){var W,S=s.find(".jig-cw-role-real");0!==S.length&&((W="no"==o.captionMatchWidth||o.captionMatchWidthForceNo?e(S[0].cloneNode(!1)):S.clone()).removeClass("jig-cw-role-real").addClass("jig-cw-role-effect"),"off"!==o.overlay?"in_front_of_overlay"==o.captionFxVisibility?s.find(".jig-overlay-wrapper").after(W):s.find(".jig-overlay-wrapper").before(W):S.before(W))}return i.container=s,i.overflow=d,i.img=y,i.linkElement=v,s},M=function(e,t,i){i==t-1?e.container.addClass("jig-last"):e.container.removeClass("jig-last");var r=e.overflow,a=e.img;if(e.thumbCandidates){for(var n=e.newHeight*o.devicePixelRatio,l=null,s=0;s<e.thumbCandidates.length;s++)if(e.thumbCandidates[s].height>=n){l=e.thumbCandidates[s];break}l||(l=e.thumbCandidates[e.thumbCandidates.length-1]),a.attr("src")!==l.url&&a.attr("src",l.url)}if(r.css("width",(e.containerWidth?e.containerWidth:e.newWidth)+"px").width(),r.css("height",(e.containerHeight?e.containerHeight:e.newHeight)+"px"),a.attr("width",e.newWidth).css("width",e.newWidth+"px"),a.attr("height",e.newHeight).css("height",e.newHeight+"px"),e.marLeft?a.css("margin-left",-e.marLeft+"px"):a.css("margin-left",""),"center"!=o.incompleteLastRow&&"flexible-center"!=o.incompleteLastRow&&"flexible-match-center"!=o.incompleteLastRow&&"match-center"!=o.incompleteLastRow||(e.spaceLeft&&e.spaceLeft>0?(e.container.css("ltr"==o.readingDirection?"margin-left":"margin-right",e.spaceLeft+"px"),e.spaceLeft=0):e.container.css("ltr"==o.readingDirection?"margin-left":"margin-right","")),"off"!=o.specialFx&&u()){var d=a.siblings(".jig-pixastic");0===d.length&&"captions"==o.specialFx&&(d=a.siblings(".jig-cw-role-effect").find(".jig-pixastic")),F(d,a)}if("below"==o.caption&&(0!==o.middleBorderWidth&&"always"==o.innerBorder&&"always"!==o.middleBorder?e.$captionWrapper.width((e.containerWidth?e.containerWidth:e.newWidth)-2*parseFloat(o.innerBorderWidth)):e.container.css({width:(e.containerWidth?e.containerWidth:e.newWidth)+"px"})),"off"!==o.caption&&"off"!==o.verticalCenterCaptions){var c=e.container.find(".jig-cw-role-real").clone();c.find(".jig-caption").css("display","block"),c.appendTo(e.linkElement).css({bottom:"auto",opacity:.01}).css("top",Math.round((e.containerHeight?e.containerHeight:e.newHeight)/2-c.height()/2));var f=c.css("top");c.remove(),e.container.find(".jig-caption-wrapper").css({bottom:"auto"}).animate({top:f},o.animSpeed,"JIGeaseInOutQuad")}},W=function(t,i,r){void 0===t[o.linkTitleField]&&(t[o.linkTitleField]=""),void 0===t[o.imgAltField]&&(t[o.imgAltField]=""),void 0===t[o.titleField]&&(t[o.titleField]=""),void 0===t[o.captionField]&&(t[o.captionField]=""),t.off="";var a="";t.carousel_data?(t.carousel_data=" "+t.carousel_data+" ",a=" tiled-gallery-item"):t.carousel_data="",t.extra_class&&(a+=" "+t.extra_class);var n,l=t.url,s="",d="",c=t.link_target?t.link_target:"_self",f=o.linkRel,g=!0;if(""!==a&&(i=i.replace(r+'"',r+a+'"')),t.link&&(l=t.link,"video"!==c&&"videoplayer"!==c?(i="foobox"!==c?'target="'+c+'" '+i.replace("jig-link","jig-customLink "+r):'target="'+c+'" '+i.replace("jig-link",r),f=t.link_rel?'rel="'+t.link_rel+'"':""):"magnific"==o.lightbox&&-1==i.indexOf("mfp-")&&(i=i.replace("jig-link","jig-link mfp-iframe")),"videoplayer"!=c&&"foobox"!=c||-1===l.indexOf("&poster=")&&-1===l.indexOf("|poster=")||(g=!1)),!0===g&&("https%3A%2F%2F"===(l=(l+"").replace(/\+/g,"%20")).substr(0,14)||"http%3A%2F%2F"===l.substr(0,13)))try{l=decodeURIComponent(l)}catch(e){}s=t[o.linkTitleField],d=t[o.imgAltField],t.download&&("yes"==o.downloadLink?s+=n=(0!==s.length?o.separatorCharacter:"")+t.download:"alt"==o.downloadLink&&(d+=n=(0!==d.length?o.separatorCharacter:"")+t.download)),t.lightbox_link&&("yes"==o.lightboxLink?s+=(0!==s.length?o.separatorCharacter:"")+t.lightbox_link:"alt"==o.lightboxLink&&(d+=(0!==d.length?o.separatorCharacter:"")+t.lightbox_link)),""!==s&&(s='title="'+s+'" '),""!==d&&(d='alt="'+d+'" ');var h=o.linkAttribute;t.extra_class&&(h=h.replace("*content*",t.extra_class.replace(/.*jig-contentID-[A-Z]{2}-(\d+).*/gm,"$1"))),void 0!==t.link_attribute_name&&(h=void 0!==t.link_attribute_value?" "+t.link_attribute_name+'="'+t.link_attribute_value+'"'
1:" "+t.link_attribute_name+'=""');var p=e("<a "+i+f+h+s+(t.wh?'data-wh="'+t.wh+'" ':"")+'href="'+("links-off"!=o.lightbox?l:"#")+'"/>'),u=e('<img class="jig-hiddenImg" '+d+t.carousel_data+"/>");return t.carousel_data&&t.download&&("yes"==o.downloadLink?(n=(0!==u.attr("data-image-title").length?o.separatorCharacter:"")+e("<textarea />").html(t.download).val(),u.attr("data-image-title",u.attr("data-image-title")+n)):"alt"==o.downloadLink&&(n=(0!==u.attr("data-image-description").length?"<br />":"")+e("<textarea />").html(t.download).val(),u.attr("data-image-description",u.attr("data-image-description")+n))),u.attr("src","data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D"),p.append(u),p},H=function(e,t){if(e.grouped&&0!==e.grouped.length&&o.groupedLinkClass)for(var i=0;i<e.grouped.length;i++)t.append(W(e.grouped[i],o.groupedLinkClass,"jig-groupedLink"))},S=function(t){var i=W(t,o.hiddenLinkClass,"jig-hiddenLink"),r=i;t.grouped&&0!==t.grouped.length&&o.groupedLinkClass&&(r=e('<div class="jig-hiddenGallery"/>').append(i),H(t,r)),t.linkContainer=r,void 0!==o.currentHiddenLink?e(o.currentHiddenLink).after(r):o.element.find(".jig-clearfix").after(r),o.currentHiddenLink=r},F=function(t,i){i.off("load"),0!==t.length&&t.off("load").remove(),i.clone().addClass("jig-pixastic").insertAfter(i).on("load",A).each(function(){(this.complete||void 0!==this.naturalWidth&&0!==this.naturalWidth)&&e(this).trigger("load")})},A=function(){if(!0!==e(this).hasClass("jig-specialfx-complete"))if(e(this).stop().css("display","block").css("opacity",1),""===o.specialFxOptions)switch(o.specialFxType){case"desaturate":Pixastic.process(this,"desaturate",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,average:!1},_);break;case"blur":Pixastic.process(this,"blurfast",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,amount:.5},_);break;case"glow":Pixastic.process(this,"glow",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,amount:.3,radius:.2},_);break;case"sepia":Pixastic.process(this,"sepia",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio},_);break;case"laplace_dark":Pixastic.process(this,"laplace",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,edgeStrength:2,invert:!1,greyLevel:0},_);break;case"laplace_light":Pixastic.process(this,"laplace",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,edgeStrength:2,invert:!0,greyLevel:0},_)}else{var t=function(e){for(var t={},i=0,r=e.length;i<r;i+=1){var a=e[i].split(":");t[a[0]]=a[1]}return t.retinaReady=o.retinaReady,t.devicePixelRatio=o.devicePixelRatio,t}(o.specialFxOptions);switch(o.specialFxType){case"desaturate":Pixastic.process(this,"desaturate",t,_);break;case"blur":Pixastic.process(this,"blurfast",t,_);break;case"glow":Pixastic.process(this,"glow",t,_);break;case"sepia":Pixastic.process(this,"sepia",_);break;case"laplace_dark":case"laplace_light":Pixastic.process(this,"laplace",t,_)}}e(this).off("load")},_=function(t,i){if(!1===t){var r=e(i);return r.siblings(".jig-cw-role-effect").remove(),void r.remove()}if(t=e(t),"hovered"===o.specialFx?t.css("opacity",o.hiddenOpacity):t.css("opacity",o.specialFxBlend),t.addClass("jig-specialfx-complete"),"captions"==o.specialFx){var a=t.closest(".jig-imageContainer").find(".jig-cw-role-effect");if("no"==o.captionMatchWidth)t.appendTo(a);else try{var n=t[0].toDataURL("image/jpeg"),l=t.css("width")+" "+t.css("height");t.remove(),a.find(".jig-caption-title").css({"background-image":"url("+n+")","background-size":l}),a.find(".jig-caption-description").css({"background-image":"url("+n+")","background-size":l})}catch(e){o.captionMatchWidthForceNo=!0;var s=t.closest(".jig-imageContainer");s.find(".jig-cw-role-effect .jig-caption").remove(),s.find(".jig-caption-title").css({display:"block"}),t.appendTo(a)}P(B(a))}},B=function(e,t){var i={};if(i.roleEffect=e.eq(0).closest(".jig-caption-wrapper"),0===i.roleEffect.length)return!1;if("no"==o.captionMatchWidth||o.captionMatchWidthForceNo)i.roleEffect.hasClass("jig-cw-role-effect")?i.roleReal=i.roleEffect.siblings(".jig-cw-role-real"):(i.roleReal=i.roleEffect,i.roleEffect=i.roleEffect.siblings(".jig-cw-role-effect")),t&&(i.fadeZeroHeight=t),i.captionElement=i.roleReal.find(".jig-caption");else{if(i.roleEffect=i.roleEffect.filter(".jig-cw-role-effect"),!i.roleEffect.hasClass("jig-cw-role-effect"))return!1;i.img=i.roleEffect.siblings("img"),i.captionTitle=i.roleEffect.find(".jig-caption-title"),i.captionDescription=i.roleEffect.find(".jig-caption-description")}return i},P=function(e){if(!1===e)return!1;if("no"==o.captionMatchWidth||o.captionMatchWidthForceNo){var t=e.roleReal.position();0!==e.roleReal.height()?(e.roleEffect.css({height:e.captionElement.height()+"px"}).find(".jig-pixastic").css({top:-t.top+"px"}),e.fadeZeroHeight&&e.roleEffect.css({opacity:e.captionElement.css("opacity")})):e.roleEffect.find(".jig-pixastic").css({top:-t.top+"px"})}else{var i=e.roleEffect.position(),r=e.captionTitle.position(),a=e.captionDescription.position(),n=parseInt(e.img.css("margin-left"),10);r&&e.captionTitle.css({"background-position":n-r.left+"px "+-i.top+"px"}),a&&e.captionDescription.css({"background-position":n+"px "+(-a.top-i.top)+"px"})}},G=function(t){"function"==typeof e.fn.dotdotdot?t.find(".jig-caption-wrapper").dotdotdot({watch:!0,keep:"br"}):g("jQuery.dotdotdot")};o.errorChecked=!1;var z=function(){e(".jig-unloadable").length>0&&(o.errorChecked=!0,o.element.find(".jig-unloadable").remove(),n.createGallery("errorCheck"))}
1,E=function(){"yes"!==o.suppressErrors&&("publicly"!==o.suppressErrors||e("body").hasClass("logged-in"))&&o.element.html('<a href="https://justifiedgrid.com/support/fix/all-of-the-images-have-failed-to-load/" target="_blank" rel="external nofollow" style="border-style:none; text-decoration: none; font-weight: bold;"><div style="background-color: #212121; color: white; padding: 10px; display: inline-block;">JIG</div><div style="background-color: #b71c1c; color:white; color: rgba(255, 255, 255, 0.87); padding: 10px; display: inline-block;">All of the images have failed to load. Please click here to reach the troubleshooting fix.</div></a>')};function O(e,t){return"hasOwnProperty"in e?e.hasOwnProperty(t):Object.prototype.hasOwnProperty.call(e,t)}function D(e,t){if(e=function(e,t){if(void 0===e)return"";var i=0,r=!1;void 0===t&&(t=2);e=e.toString().replace(/</g,"<").replace(/>/g,">");var a={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};0===t&&(r=!0);if("number"!=typeof t){for(var n=0,o=(t=[].concat(t)).length;n<o;n+=1)0===a[t[n]]?r=!0:a[t[n]]&&(i|=a[t[n]]);t=i}t&a.ENT_HTML_QUOTE_SINGLE&&(e=e.replace(/�*39;/g,"'"));r||(e=e.replace(/"/g,'"'));return e=e.replace(/&/g,"&")}(e),"below"==o.caption)return e;t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");return e.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(e,i){return t.indexOf("<"+i.toLowerCase()+">")>-1?e:""})}function N(e){void 0!==e&&e.stopPropagation();var t=o.element.find(".jig-overflow > a.jig-loaded").length,i=o.element.find(".jig-imageContainer .jig-overflow > a").length;"no"==o.errorChecking&&(i-=5),void 0!==o.loadCheckTimeout&&clearTimeout(o.loadCheckTimeout),t<i?(o.loadCheckTimeout=setTimeout(function(){N()},500),o.loadMoreButton.animate({opacity:.5},300,"JIGswing")):(o.loadMoreButton.animate({opacity:1},300,"JIGswing"),o.limit+=o.originalLimit,o.loadMoreCounter++,"once"==o.loadMore&&(o.limit=o.allItems.length),n.createGallery())}n.init()},e.fn.justifiedImageGrid=function(t){return this.each(function(){if(void 0===e(this).data("justifiedImageGrid")){var i=new e.justifiedImageGrid(this,t);e(this).data("justifiedImageGrid",i)}})},e.extend(e.easing,{JIGswing:function(e){return.5-Math.cos(e*Math.PI)/2},JIGeaseInOutQuad:function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2}}),e.fn.JIGhoverFlow=function(t,i,r,a,n){if(-1==e.inArray(t,["mouseover","mouseenter","mouseout","mouseleave"]))return this;var o="object"===_typeof(r)?r:{complete:n||!n&&a||"function"==typeof r&&r,duration:r,easing:n&&a||a&&"function"!=typeof a&&a};void 0===o.easing&&(o.easing="JIGswing"),o.queue=!1;var l=o.complete;return o.complete=function(){e(this).dequeue(),"function"==typeof l&&l.call(this)},this.each(function(){var r=e(this);"mouseover"==t||"mouseenter"==t?r.data("jQuery.JIGhoverFlow",!0):r.removeData("jQuery.JIGhoverFlow"),r.queue(function(){("mouseover"==t||"mouseenter"==t?void 0!==r.data("jQuery.JIGhoverFlow"):void 0===r.data("jQuery.JIGhoverFlow"))?r.animate(i,o):r.queue([])})})},function(e){"use strict";var t=function(e,t){return e-t},i=function(e){4===e.length&&(e=e.replace(/(\w)(\w)(\w)/gi,"$1$1$2$2$3$3"));var t=/(\w{2})(\w{2})(\w{2})/.exec(e);return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]},r=function(e,t,r){var a,n=jQuery.map(i(e.start),function(e,i){var a=Math.round(e+t[i]*r);return a>255?a=255:a<0&&(a=0),a});return a=n,"#"+jQuery.map(a,function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}).join("")};e.fn.tagcloud=function(a){var n,o,l=e.extend({},e.fn.tagcloud.defaults,a),s=this.map(function(){return e(this).attr("rel")}),d=(s=jQuery.makeArray(s).sort(t))[0],c=s.pop()-d;return 0===c&&(c=1),l.size&&(n=(l.size.end-l.size.start)/c),l.color&&(o=function(e,t){return jQuery.map(i(e.end),function(r,a){return(r-i(e.start)[a])/t})}(l.color,c)),this.each(function(){var t=e(this).attr("rel")-d;l.size&&e(this).css({"font-size":l.size.start+t*n+l.size.unit}),l.color&&e(this).css({color:r(l.color,o,t)})})},e.fn.tagcloud.defaults={size:{start:14,end:18,unit:"pt"}}}(jQuery),e.JIGjQueryMinVersion=function(t,i){if(t){var r=e().jquery,a=t.split("."),n=r.split("."),o=[],l=[],s=!1;o[0]=isNaN(parseInt(a[0],10))?0:parseInt(a[0],10),o[1]=isNaN(parseInt(a[1],10))?0:parseInt(a[1],10),o[2]=isNaN(parseInt(a[2],10))?0:parseInt(a[2],10),o[3]=isNaN(parseInt(a[3],10))?0:parseInt(a[3],10),l[0]=isNaN(parseInt(n[0],10))?0:parseInt(n[0],10),l[1]=isNaN(parseInt(n[1],10))?0:parseInt(n[1],10),l[2]=isNaN(parseInt(n[2],10))?0:parseInt(n[2],10),l[3]=isNaN(parseInt(n[3],10))?0:parseInt(n[3],10);for(var d=0;d<4;d++){if(o[d]<=l[d]){if(s=!0,o[d]==l[d])continue;break}s=!1;break}if(!0===s)return!0;
1if(!0!==i)return!1;e(".justified-image-grid").html('<span style="color:red;font-weight:bold">Your jQuery version ('+e().jquery+") is old, this plugin needs at least 1.7, please go to the plugin settings and choose another jQuery source. If this does not work then your theme or a plugin is not using WordPress best practices and forces the loading of an old version. In that case contact the author of Justified Image Grid.</span>")}return!1}}loadJustifiedImageGrid(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.