function _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){e.justifiedImageGrid=function(t,i){var r={targetHeight:190,heightDeviation:40,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",specialFxOptions:"",specialFxBlend:1,incompleteLastRow:"normal",errorChecking:"yes",suppressErrors:"no",retryCount:0,resizeCount:0,errorChecked:!1,errorImages:[],filters:!1,filterMultiple:"no",filterStyle:"buttons",L2filters:!1,L2FilterMultiple:"no",L2FilterStyle:"buttons",filterSmallestColor:"#A3A3A3",filterSmallestSize:11,filterLargestColor:"#000000",filterLargestSize:22,separatorCharacter:" - ",thumbnailFilename:"normal",cropZone:"",instance:1,element:e(t),lastWindowWidth:e(window).width()},a=this,o=e.extend({},r,i),n="object"===_typeof(e.support)&&"opacity"in e.support&&!e.support.opacity,l="",s=!!window.chrome&&!/opera|opr/i.test(navigator.userAgent);this.s=o;try{l=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")&&(l=!0)}catch(e){l=!1}var d=!1;"ontouchstart"in document.documentElement&&(d=!0),void 0!==t.dataset.touchedByJIG&&e("> *:not(.jig-clearfix)",t).remove(),a.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=n?.01:0,l&&o.element.addClass("jig-ua-ie"),n&&o.element.addClass("jig-ua-old-ie"),!1===d?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.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.linkRel="";if(""!==o.linkAttributeName&&(""!==o.linkAttributeValue?o.linkAttribute=" "+o.linkAttributeName+'="'+o.linkAttributeValue+'"':o.linkAttribute=" "+o.linkAttributeName+'=""'),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&&(void 0===window.devicePixelRatio||1==window.devicePixelRatio?(o.retinaReady="no",o.devicePixelRatio=1):window.devicePixelRatio>o.maxRetinaDensity?o.devicePixelRatio=o.maxRetinaDensity:o.devicePixelRatio=window.devicePixelRatio),"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 i=e("body").find(".jig-fontCheck");if(0===i.length){e("body").append('<div class="jig-fontCheck">!"\'\\#$%&amp;()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~ A quick brown fox jumps over the lazy dog.</div>');var r=(i=e("body").find(".jig-fontCheck")).width(),s=0,g=setInterval((function(){s++;var t=i.width();r!=t&&0!==t?(e("body").trigger("jig-fontLoaded"),i.remove(),clearInterval(g)):s>50&&(i.remove(),clearInterval(g))}),100)}}var h,p=function(){return!1},u=p,m=p,w=p,v=p,y=p,j=p,b=p,x=p,I=p,k=p,L=p,R=p,W=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=C(n,!0);n.JIGhoverFlow(r,{opacity:a},{duration:o.animSpeed,progress:function(){0!==e(this).closest(".jig-cw-role-real").length&&T(l)}})}},M=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=C(n);n.JIGhoverFlow(r,{height:a},{duration:o.animSpeed,easing:"JIGeaseInOutQuad",progress:function(){0!==e(this).closest(".jig-cw-role-real").length&&T(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=C(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&&T(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)},B=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){W(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseenter","show")},m=function(e){W(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseleave","hide")}):(u=function(e){W(e,"div.jig-overlay-wrapper","mouseenter","show")},m=function(e){W(e,"div.jig-overlay-wrapper","mouseleave","hide")});break;case"others":"on"===o.overlayIcon?(u=function(e){W(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseenter","hide")},m=function(e){W(e,"div.jig-overlay-wrapper, div.jig-overlay-icon-wrapper","mouseleave","show")}):(u=function(e){W(e,"div.jig-overlay-wrapper","mouseenter","hide")},m=function(e){W(e,"div.jig-overlay-wrapper","mouseleave","show")})}switch(o.innerBorder){case"hovered":switch(o.innerBorderAnimate){case"width":b=function(e){B(e,"div.jig-border","mouseenter",o.innerBorderWidth+"px")},x=function(e){B(e,"div.jig-border","mouseleave",0)};break;case"opacity":b=function(e){W(e,"div.jig-border","mouseenter","show")},x=function(e){W(e,"div.jig-border","mouseleave","hide")};break;case"off":b=function(t){e(t).find("div.jig-border").show()},x=function(t){e(t).find("div.jig-border").hide()}}break;case"others":switch(o.innerBorderAnimate){case"width":b=function(e){B(e,"div.jig-border","mouseenter",0)},x=function(e){B(e,"div.jig-border","mouseleave",o.innerBorderWidth+"px")};break;case"opacity":b=function(e){W(e,"div.jig-border","mouseenter","hide")},x=function(e){W(e,"div.jig-border","mouseleave","show")};break;case"off":b=function(t){e(t).find("div.jig-border").hide()},x=function(t){e(t).find("div.jig-border").show()}}}switch(o.middleBorder){case"hovered":I=function(t){e(t).parent().parent("div.jig-imageContainer").css("background",o.middleBorderColor)},k=function(t){e(t).parent().parent("div.jig-imageContainer").css("background","transparent")};break;case"others":I=function(t){e(t).parent().parent("div.jig-imageContainer").css("background","transparent")},k=function(t){e(t).parent().parent("div.jig-imageContainer").css("background",o.middleBorderColor)}}switch(o.outerBorder){case"hovered":L=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color",o.outerBorderColor)},R=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color","transparent")};break;case"others":L=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color","transparent")},R=function(t){e(t).parent().parent("div.jig-imageContainer").css("border-color",o.outerBorderColor)}}if(n)switch(o.specialFx){case"others":w=function(e){A(e,".jig-pixastic","mouseleave",.01)},v=function(e){A(e,".jig-pixastic","mouseleave",o.specialFxBlend)};break;case"hovered":w=function(e){A(e,".jig-pixastic","mouseenter",o.specialFxBlend)},v=function(e){A(e,".jig-pixastic","mouseleave",.01)}}else switch(o.specialFx){case"others":w=function(e){A(e,".jig-pixastic","mouseenter",.01)},v=function(e){A(e,".jig-pixastic","mouseleave",o.specialFxBlend)};break;case"hovered":w=function(e){A(e,".jig-pixastic","mouseenter",o.specialFxBlend)},v=function(e){A(e,".jig-pixastic","mouseleave",.01)}}switch(o.caption){case"fade":y=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},j=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")};break;case"reverse-fade":y=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},j=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseleave","show")};break;case"slide":n?(y=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},j=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")}):"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(y=function(e){M(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},j=function(e){M(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")}):(y=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseenter","show")},j=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseleave","hide")});break;case"reverse-slide":n?(y=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},j=function(e){W(e,".jig-caption-wrapper .jig-caption","mouseleave","show")}):"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(y=function(e){M(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},j=function(e){M(e,".jig-caption-wrapper .jig-caption","mouseleave","show")}):(y=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseenter","hide")},j=function(e){F(e,".jig-caption-wrapper .jig-caption","mouseleave","show")});break;case"mixed":"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(y=function(e){M(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","show")},j=function(e){M(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","hide")}):(y=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","show")},j=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","hide")});break;case"reverse-mixed":"off"==o.verticalCenterCaptions||"simple"==o.verticalCenterCaptions?(y=function(e){M(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","hide")},j=function(e){M(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseleave","show")}):(y=function(e){F(e,".jig-caption-wrapper .jig-caption-description-wrapper","mouseenter","hide")},j=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),w(i),y(i),b(i),I(i),L(i),i.data("title",i.attr("title")),i.removeAttr("title")):(m(i),v(i),j(i),x(i),k(i),R(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",c),"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",S)),"prettyphoto"==o.lightbox&&"undefined"!=typeof jigOtherPrettyPhotoIsPresent&&e(document).ready((function(){setTimeout((function(){window[o.lightboxInit]()}),10)})),o.filters||o.L2filters){if(o.filteredImages=[],o.filters){var _,G;o.filterMultiple=o.filterMultiple||"no",o.filterStyle=o.filterStyle||"buttons","buttons"==o.filterStyle?(o.filterType="Button",_="div"):(o.filterType="Tag",_="span");var P='<div id="jig'+o.instance+"-filter"+o.filterType+'s" class="jig-filter'+o.filterType+"s "+("no"!==o.filterMultiple?"jig-filterMultiple ":"jig-filterSingle ")+(d?"jig-touch ":"jig-no-touch ")+(l?"jig-ua-ie":"")+'jig-clearfix" data-filter-level="1">';for(G in o.filters)H(o.filters,G)&&(o.filteredImages[G]=[],P+="<"+_+' class="jig-filter'+o.filterType+'" data-filter-slug="'+G+'">'+o.filters[G]+"</"+_+">");P+="</div>",o.element.before(P),void 0!==o.filteredImages["all-items-nofilter"]&&(o.filteredImages["all-items-nofilter"]=o.selectedItems.slice());for(var z=0,E=o.selectedItems.length;z<E;z+=1)if(o.selectedItems[z].filters)for(var O=0,D=o.selectedItems[z].filters.length;O<D;O+=1)void 0!==o.filteredImages[o.selectedItems[z].filters[O][0]]&&"function"==typeof o.filteredImages[o.selectedItems[z].filters[O][0]].push&&o.filteredImages[o.selectedItems[z].filters[O][0]].push(o.selectedItems[z]);var N=e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType+'[data-filter-slug="all-items-nofilter"]');if(N.length>0&&e("#jig"+o.instance+"-filter"+o.filterType+"s .jig-filter"+o.filterType).first().attr("data-filter-slug")!==N.attr("data-filter-slug")&&N.parent().prepend(N),"tags"==o.filterStyle){for(G in o.filters)H(o.filters,G)&&e("#jig"+o.instance+"-filter"+o.filterType+'s .jig-filterTag[data-filter-slug="'+G+'"]').attr("rel",o.filteredImages[G].length);e.fn.tagcloud.defaults={size:{start:o.filterSmallestSize,end:o.filterLargestSize,unit:"px"},color:{start:o.filterSmallestColor,end:o.filterLargestColor}},N.length>0?(N.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()}e("#jig"+o.instance+"-filter"+o.filterType+"s").on("click",".jig-filter"+o.filterType,f)}if(o.L2filters){var J,Q;o.L2filterMultiple=o.L2filterMultiple||"no",o.L2filterStyle=o.L2filterStyle||"buttons","buttons"==o.L2filterStyle?(o.L2filterType="Button",J="div"):(o.L2filterType="Tag",J="span"),o.L2filteredImages=[];var q='<div id="jig'+o.instance+"-L2filter"+o.L2filterType+'s" class="jig-filter'+o.L2filterType+"s "+("no"!==o.L2filterMultiple?"jig-filterMultiple ":"jig-filterSingle ")+(d?"jig-touch ":"jig-no-touch ")+(l?"jig-ua-ie":"")+'jig-clearfix" data-filter-level="2">';for(Q in o.L2filters)H(o.L2filters,Q)&&(o.L2filteredImages[Q]=[],q+="<"+J+' class="jig-filter'+o.L2filterType+'" data-filter-slug="'+Q+'">'+o.L2filters[Q]+"</"+J+">");q+="</div>",o.element.before(q),void 0!==o.L2filteredImages["all-items-nofilter"]&&(o.L2filteredImages["all-items-nofilter"]=o.selectedItems.slice());for(var U=0,$=o.selectedItems.length;U<$;U+=1)if(o.selectedItems[U].L2filters)for(var V=0,Z=o.selectedItems[U].L2filters.length;V<Z;V+=1)void 0!==o.L2filteredImages[o.selectedItems[U].L2filters[V][0]]&&"function"==typeof o.L2filteredImages[o.selectedItems[U].L2filters[V][0]].push&&o.L2filteredImages[o.selectedItems[U].L2filters[V][0]].push(o.selectedItems[U]);var K=e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType+'[data-filter-slug="all-items-nofilter"]');if(K.length>0&&e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s .jig-filter"+o.L2filterType).first().attr("data-filter-slug")!==K.attr("data-filter-slug")&&K.parent().prepend(K),"tags"==o.L2filterStyle){for(Q in o.L2filters)H(o.L2filters,Q)&&e("#jig"+o.instance+"-L2filter"+o.L2filterType+'s .jig-filterTag[data-filter-slug="'+Q+'"]').attr("rel",o.L2filteredImages[Q].length);e.fn.tagcloud.defaults={size:{start:o.filterSmallestSize,end:o.filterLargestSize,unit:"px"},color:{start:o.filterSmallestColor,end:o.filterLargestColor}},K.length>0?(K.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()}e("#jig"+o.instance+"-L2filter"+o.L2filterType+"s").on("click",".jig-filter"+o.L2filterType,f)}f()}else a.createGallery();o.element.trigger("jig-created"),e(window).resize((function(){void 0!==h&&clearTimeout(h),h=setTimeout((function(){a.createGallery("resize"),o.element.trigger("jig-resized")}),100)})),t.dataset.touchedByJIG=!0},a.createGallery=function(t){if(!1===e.JIGjQueryMinVersion("1.7"))return JIGjQueryMinVersion("1.7",!0),!1;var i,r=Math.round(o.element.width()),l=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&&l==o.lastWindowWidth?o.element.css("width",r+"px"):(i=0,o.element.parents().each((function(t,r){var a=e(r),n=e(r).parent(),s=a.width();if(a.is(":visible")&&0!==s)return o.element.css("width",s-i+"px"),void 0===n.data("jigAddedTabsHandler")&&(n.on("click",(function(t){l!==e(window).width()&&n.find(".justified-image-grid").each((function(){var t=e(this);t.is(":visible")&&t.data("justifiedImageGrid").createGallery("resize")}))})),n.data("jigAddedTabsHandler",!0)),!1;i+=a.outerWidth(!0)-a.width()}))):o.element.css("width",o.fallbackWidth+"px"):o.element.width()>1e4&&(o.element.css("width",l),e(window).on("load",(function(){a.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++,a.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),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)H(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 f in o.items)if(H(o.items,f)&&-1!=e.inArray(void 0===o.items[f].photon?void 0===o.items[f].thumbUrl?o.items[f].url:o.items[f].thumbUrl:o.items[f].photon,o.errorImages)){var p=o.items[f];if(o.items.splice(f,1),o.filters){var u=e("#jig"+o.instance+"-filterButtons .jig-filterButtonSelected").attr("data-filter-slug");o.filteredImages[u]=o.items.slice();for(var m=1,w=o.filters.length;m<w;m+=1)for(var v=0,y=o.filteredImages[o.filters[m][0]].length;v<y;v+=1){var I=e.inArray(p,o.filteredImages[o.filters[m][0]]);-1!=I&&o.filteredImages[o.filters[m][0]].splice(I,1)}}}if(o.selectedItems=o.items.slice(),o.errorImages=[],0===o.selectedItems.length)return void M();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 L=h();!1!==L&&(o.rows.push(L),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 C,T=0,R=0,F=o.rows.length;R<F;R+=1)for(var A=0,B=o.rows[R].length;A<B;A+=1)T++,(C=o.rows[R][A]).container&&T<=o.imagesAlreadyAdded?b(C,o.rows[R].length,A):j(C,o.rows[R].length,A);if("links-off"!==o.lightbox&&"no"!==o.lightbox&&"new_tab"!==o.lightbox&&""!==o.linkrel){for(;o.unshifts.length>0;)void 0===(C=o.unshifts.shift()).linkContainer?x(C):o.currentHiddenLink=C.linkContainer;for(;o.items.length>0;)void 0===(C=o.items.shift()).linkContainer?x(C):o.currentHiddenLink=C.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)||n){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)e(this).clone().addClass("jig-pixastic").insertAfter(e(this)).on("load",k).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"),W()}})).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"),W()}})).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?g():"prettyphoto"==o.lightbox&&"undefined"!=typeof jigReCallPrettyPhotoAfterPossibleResize?setTimeout((function(){window[o.lightboxInit](),jigReCallPrettyPhotoAfterPossibleResize=void 0}),10):o.visibleImageCount!=e(".jig-imageContainer",o.element).length&&g(),"click"==o.loadMore||"scroll"==o.loadMore||"hybrid"==o.loadMore||"once"==o.loadMore){o.loadMoreButton=o.element.find(".jig-loadMoreButton");var _=o.selectedItems.length-o.limit,G=o.element.find(".jig-hiddenLink").length;if(1==o.loadMoreButton.length)_>0?(o.loadMoreButton.find(".jig-loadMoreButton-count").text(0!==G?G:_),"yes"===o.loadMoreAutoWidth&&o.loadMoreButton.css("width",o.loadMoreButton.find(".jig-loadMoreButton-inner").width())):o.loadMoreButton.remove();else if(_>0){var P="";o.loadMoreCountText&&"none"!==o.loadMoreCountText&&(P=(P=o.loadMoreCountText).replace("*count*",'<span class="jig-loadMoreButton-count">'+(0!==G?G:_)+"</span>")),o.loadMoreButton=e('<div class="jig-loadMoreButton"><span class="jig-loadMoreButton-inner">'+o.loadMoreText+(""!==P?"<br />"+P:"")+"</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()>=t.top-parseInt(o.loadMoreOffset,10)-e(window).height()&&S()}}))}if("no"!==o.wrapText){var z=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 E=o.element.find(".jig-flowSpacer").css({width:"1px",height:z.height()+3,float:"ltr"==o.readingDirection?"left":"right"});setTimeout((function(){"ltr"==o.readingDirection?o.element.offset().left==E.offset().left?E.css("margin-right",0):E.css("margin-right",2*o.margins):o.element.offset().left==E.offset().left?E.css("margin-left",0):E.css("margin-left",2*o.margins)}),1)}if("yes"!=o.customFonts||"off"===o.caption||"below"!=o.caption&&"off"===o.verticalCenterCaptions&&"captions"!=o.specialFx||c(!0),o.prevInstanceID="#jig"+(o.instance-1),e(window).width()!=l||o.areaWidth!=Math.round(o.element.width()))return o.resizeCount++,o.resizeCount>1&&o.element.css("min-height",o.element.height()),a.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=l,o.visibleImageCount=e(".jig-imageContainer",o.element).length};var c=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"),d=l.height(),c=l.find(".jig-caption"),g=("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||!g.is(":animated")?(0===d&&(c.css({opacity:0,display:"block"}),d=l.height(),c.removeAttr("style")),!0===t?a.css({bottom:"auto",top:Math.round(l.closest(".jig-imageContainer").height()/2-d/2)}):a.css({bottom:"auto"}).animate({top:Math.round(l.closest(".jig-imageContainer").height()/2-d/2)},o.animSpeed,"JIGeaseInOutQuad")):g.promise().done((function(){d=l.height();var e=g.height();"mixed"==o.caption&&0!==e?(g.css({display:"none"}),d=l.height(),g.css({display:"block"})):"reverse-mixed"==o.caption&&0===e&&(g.css({display:"block"}),d=l.height(),g.css({display:"none"})),a.css({bottom:"auto"}).animate({top:Math.round(l.closest(".jig-imageContainer").height()/2-d/2)},o.animSpeed,"JIGeaseInOutQuad")})):c.promise().done((function(){0===(d=l.height())&&(c.css({opacity:0,display:"block"}),d=l.height(),c.removeAttr("style")),a.css({bottom:"auto"}).animate({top:Math.round(l.closest(".jig-imageContainer").height()/2-d/2)},o.animSpeed,"JIGeaseInOutQuad")}))}"below"==o.caption&&R(n,!0),"captions"==o.specialFx&&(s&&"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"),T(C(a)))}))},g=function(){switch(o.lightbox){case"prettyphoto":case"colorbox":case"magnific":case"photoswipe":case"photoswipe3":case"foobox":case"custom":window[o.lightboxInit]();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()}))}},f=function(t){var i,r,n,l,s,d=e(this),c=d.attr("data-filter-slug"),g=!1;if(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],g=!0);else{var f=d.parent().find(".jig-filter"+o.filterType+"Selected").length;if(1==f&&"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"),f++;else{if(1==f){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"),f--}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(n=o.allItems.length,r=0;r<n;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],g=!0}g&&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(n=o.L1selectedItems.length,r=0;r<n;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],g=!0}if(g){o.element.find(".jig-imageContainer, .jig-hiddenLink").remove();for(var y=0,j=o.selectedItems.length;y<j;y+=1)o.selectedItems[y].linkContainer=void 0;a.createGallery("filter")}},h=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?u():"yes"!==o.disableCropping?m():u()}else{if(o.rows.length>0&&o.items.length==o.whileUntil){switch(o.incompleteLastRow){case"flexible":m("flexible");break;case"flexible-center":m("flexible-center");break;case"hide":m("hide");break;case"flexible-match":"off"!==o.loadMore&&o.selectedItems.length-o.limit<=0?p():m("flexible");break;case"flexible-match-center":"off"!==o.loadMore&&o.selectedItems.length-o.limit<=0?p("center"):m("flexible-center");break;case"match":p();break;case"match-center":p("center");break;case"center":m("center");break;default:m("lastRow")}return!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?m("lastRow"):m("center")}return o.row},p=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].width==o.rows[i][n].width?(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&&w()),void 0!==e&&o.rowlen+o.marginsTotal<o.areaWidth&&(o.row[0].spaceLeft=Math.floor(.5*(o.areaWidth-o.rowlen-o.marginsTotal)))}else m("lastRow")},u=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 m();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,w())},m=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 v()}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 g=0,f=0,h=o.row.length;f<h;f+=1)o.row[f].newHeight=o.targetHeight,o.row[f].newWidth=Math.round(o.row[f].newHeight*o.row[f].ratio),g+=o.row[f].newWidth;return void(o.row[0].spaceLeft=Math.floor(.5*(o.areaWidth-g-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 v();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,w())},w=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)},v=function(){for(var e=y(),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}},y=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,g=e.length;c<g&&(e[c]--,0!==++l);c+=1);return e},j=function(t,i,r){if(isNaN(t.newWidth)||!t.width)return!1;void 0!==t.linkContainer&&(e(t.linkContainer).remove(),t.linkContainer=void 0),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]=""),void 0===t.gallery&&(t.gallery="");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),t.off="",t.url=(t.link,t.url);var n,l=e('<div class="jig-imageContainer'+a+'"/>'),s=e('<div class="jig-overflow"/>'),d=t.url,c=t.link_target?t.link_target:"_self",g=o.linkClass,f=o.linkRel,h="",p="",u=!0;if(""!==t.gallery&&(l.append(t.gallery.html),f=' rel="'+t.gallery.rel+'" ',l.addClass(t.gallery.lightbox_class),l.attr("id",t.gallery.id)),t.link&&(d=t.link,"video"!==c&&"videoplayer"!==c?(g="foobox"!==c?'target="'+c+'" '+g.replace("jig-link","jig-customLink"):'target="'+c+'" '+g.replace("jig-link",""),f=t.link_rel?'rel="'+t.link_rel+'"':""):"magnific"==o.lightbox&&-1==g.indexOf("mfp-")&&(g=g.replace("jig-link","jig-link mfp-iframe")),"videoplayer"!=c&&"foobox"!=c||-1===d.indexOf("&poster=")&&-1===d.indexOf("|poster=")||(u=!1)),!0===u&&("https%3A%2F%2F"===(d=(d+"").replace(/\+/g,"%20")).substr(0,14)||"http%3A%2F%2F"===d.substr(0,13)))try{d=decodeURIComponent(d)}catch(e){}h=t[o.linkTitleField],p=t[o.imgAltField],t.download&&("yes"==o.downloadLink?h+=n=(0!==h.length?o.separatorCharacter:"")+t.download:"alt"==o.downloadLink&&(p+=n=(0!==p.length?o.separatorCharacter:"")+t.download)),t.lightbox_link&&("yes"==o.lightboxLink?h+=(0!==h.length?o.separatorCharacter:"")+t.lightbox_link:"alt"==o.lightboxLink&&(p+=(0!==p.length?o.separatorCharacter:"")+t.lightbox_link)),""!==h&&(h='title="'+h+'" '),""!==p&&(p='alt="'+p+'" '),"new_tab"==o.lightbox&&(g='target="_blank" ');var m=o.linkAttribute;t.extra_class&&(m=m.replace("*content*",t.extra_class.replace(/.*jig-contentID-[A-Z]{2}-(\d+).*/gm,"$1")));var w=e("<a "+g+f+m+h+(t.wh?'data-wh="'+t.wh+'" ':"")+'href="'+("links-off"!=o.lightbox?d:"#")+'" />'),v=e("<img "+p+t.carousel_data+"/>");if(t.carousel_data&&t.download&&("yes"==o.downloadLink?(n=(0!==v.attr("data-image-title").length?o.separatorCharacter:"")+e("<textarea />").html(t.download).val(),v.attr("data-image-title",v.attr("data-image-title")+n)):"alt"==o.downloadLink&&(n=(0!==v.attr("data-image-description").length?"<br />":"")+e("<textarea />").html(t.download).val(),v.attr("data-image-description",v.attr("data-image-description")+n))),void 0!==t.geo&&v.attr("data-geo",t.geo),r==i-1&&l.addClass("jig-last"),s.css("width",(t.containerWidth?t.containerWidth:t.newWidth)+"px"),s.css("height",(t.containerHeight?t.containerHeight:t.newHeight)+"px"),t.photon)v.attr("src",decodeURIComponent((t.photon+"").replace(/\+/g,"%20")));else{var y,j,b=t.thumbUrl?t.thumbUrl:t.url,x=o.originalMaxHeight,I="";"normal"==o.thumbnailFilename&&null!==(j=/.*\.(jpe?g|gif|bmp|png|webp)/im.exec(b))&&(I="&f=."+j[1]),o.aspectRatio||o.randomizeWidth?(y=o.maxWidth,""!==o.randomizeWidth&&(y=void 0!==t.originalWidth?t.originalWidth:t.width),"yes"==o.retinaReady&&(x=Math.floor(x*o.devicePixelRatio),y=Math.floor(y*o.devicePixelRatio)),v.attr("src",o.timthumb+"?src="+b+"&h="+x+"&w="+y+"&q="+o.quality+o.cropZone+I)):"yes"==o.retinaReady?(x=Math.floor(x*o.devicePixelRatio),y=Math.floor((void 0!==t.originalWidth?t.originalWidth:t.width)*o.devicePixelRatio),v.attr("src",o.timthumb+"?src="+b+"&h="+x+"&w="+y+"&q="+o.quality+o.cropZone+I)):v.attr("src",o.timthumb+"?src="+b+"&h="+x+"&q="+o.quality+o.cropZone+I)}if(v.attr("width",t.newWidth).css("width",t.newWidth+"px"),v.attr("height",t.newHeight).css("height",t.newHeight+"px"),t.marLeft&&v.css("margin-left",-t.marLeft+"px"),("center"==o.incompleteLastRow||"flexible-center"==o.incompleteLastRow||"flexible-match-center"==o.incompleteLastRow||"match-center"==o.incompleteLastRow)&&t.spaceLeft&&t.spaceLeft>0&&(l.css("ltr"==o.readingDirection?"margin-left":"margin-right",t.spaceLeft+"px"),t.spaceLeft=0),v.css("margin-top",0),w.append(v),"off"!==o.overlay&&w.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){""!==t.gallery&&(t[o.titleField]=void 0!==t.gallery[o.titleField]&&""!==t.gallery[o.titleField]&&" "!==t.gallery[o.titleField]?t.gallery[o.titleField]:"",t[o.captionField]=void 0!==t.gallery[o.captionField]&&""!==t.gallery[o.captionField]&&" "!==t.gallery[o.captionField]?t.gallery[o.captionField]:"");var k="";""!==t[o.titleField]&&" "!==t[o.titleField]&&(k+='<div class="jig-caption-title">'+F(t[o.titleField],"<br><hr><em><strong><mark><i><b><font><span><ul><ol><li>")+"</div>"),""!==t[o.captionField]&&" "!==t[o.captionField]&&(k+='<div class="jig-caption-description-wrapper"><div class="jig-caption-description'+(""!==k?"":" jig-alone")+'">'+F(t[o.captionField],"<br><hr><em><strong><mark><i><b><font><span><ul><ol><li>")+"</div></div>"),""!==k?(t.$captionWrapper=e('<div class="jig-caption-wrapper jig-cw-role-real"><div class="jig-caption">'+k+"</div></div>"),"below"!==o.caption?w.append(t.$captionWrapper):0!==o.middleBorderWidth&&"always"==o.innerBorder&&"always"!==o.middleBorder?l.append(t.$captionWrapper.width(s.width()-2*parseFloat(o.innerBorderWidth))):l.append(t.$captionWrapper.css({width:s.css("width")}))):"below"==o.caption&&(t.$captionWrapper=e('<div class="jig-caption-wrapper"></div>'),0!==o.middleBorderWidth&&"always"==o.innerBorder&&"always"!==o.middleBorder?l.append(t.$captionWrapper.width(s.width()-2*parseFloat(o.innerBorderWidth))):l.append(t.$captionWrapper.css({width:s.css("width")})))}if(0===o.bordersTotal&&0===o.innerBorderWidth||w.append('<div class="jig-border"></div>'),s.append(w),t.carousel_data&&t.caption&&s.append('<div class="tiled-gallery-caption">'+F(t.caption)+"</div>"),l.prepend(s),o.element.find(".jig-clearfix").before(l),"off"!==o.caption)if("below"==o.caption)R(l);else if("captions"==o.specialFx){var L,C=l.find(".jig-cw-role-real");0!==C.length&&((L="no"==o.captionMatchWidth||o.captionMatchWidthForceNo?e(C[0].cloneNode(!1)):C.clone()).removeClass("jig-cw-role-real").addClass("jig-cw-role-effect"),"off"!==o.overlay?l.find(".jig-overlay-wrapper").before(L):C.before(L))}return t.container=l,t.overflow=s,t.img=v,t.linkElement=w,l},b=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(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){var n=a.siblings(".jig-pixastic");0===n.length&&"captions"==o.specialFx&&(n=a.siblings(".jig-cw-role-effect").find(".jig-pixastic")),I(n,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 l=e.container.find(".jig-cw-role-real").clone();l.find(".jig-caption").css("display","block"),l.appendTo(e.linkElement).css({bottom:"auto",opacity:.01}).css("top",Math.round((e.containerHeight?e.containerHeight:e.newHeight)/2-l.height()/2));var s=l.css("top");l.remove(),e.container.find(".jig-caption-wrapper").css({bottom:"auto"}).animate({top:s},o.animSpeed,"JIGeaseInOutQuad")}},x=function(t){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 i="";t.carousel_data?(t.carousel_data=" "+t.carousel_data+" ",i=" tiled-gallery-item"):t.carousel_data="",t.extra_class&&(i+=" "+t.extra_class);var r,a=t.url,n="",l="",s=o.hiddenLinkClass,d=t.link_target?t.link_target:"_self",c=o.linkRel,g=!0;if(""!==i&&(s=s.replace('jig-hiddenLink"',"jig-hiddenLink"+i+'"')),t.link&&(a=t.link,"video"!==d&&"videoplayer"!==d?(s="foobox"!==d?'target="'+d+'" '+s.replace("jig-link","jig-customLink jig-hiddenLink"):'target="'+d+'" '+s.replace("jig-link","jig-hiddenLink"),c=t.link_rel?'rel="'+t.link_rel+'"':""):"magnific"==o.lightbox&&-1==s.indexOf("mfp-")&&(s=s.replace("jig-link","jig-link mfp-iframe")),"videoplayer"!=d&&"foobox"!=d||-1===a.indexOf("&poster=")&&-1===a.indexOf("|poster=")||(g=!1)),!0===g&&("https%3A%2F%2F"===(a=(a+"").replace(/\+/g,"%20")).substr(0,14)||"http%3A%2F%2F"===a.substr(0,13)))try{a=decodeURIComponent(a)}catch(e){}n=t[o.linkTitleField],l=t[o.imgAltField],t.download&&("yes"==o.downloadLink?n+=r=(0!==n.length?o.separatorCharacter:"")+t.download:"alt"==o.downloadLink&&(l+=r=(0!==l.length?o.separatorCharacter:"")+t.download)),t.lightbox_link&&("yes"==o.lightboxLink?n+=(0!==n.length?o.separatorCharacter:"")+t.lightbox_link:"alt"==o.lightboxLink&&(l+=(0!==l.length?o.separatorCharacter:"")+t.lightbox_link)),""!==n&&(n='title="'+n+'" '),""!==l&&(l='alt="'+l+'" ');var f=o.linkAttribute;t.extra_class&&(f=f.replace("*content*",t.extra_class.replace(/.*jig-contentID-[A-Z]{2}-(\d+).*/gm,"$1")));var h=e("<a "+s+c+f+n+(t.wh?'data-wh="'+t.wh+'" ':"")+'href="'+("links-off"!=o.lightbox?a:"#")+'"/>'),p=e('<img class="jig-hiddenImg" '+l+t.carousel_data+"/>");t.carousel_data&&t.download&&("yes"==o.downloadLink?(r=(0!==p.attr("data-image-title").length?o.separatorCharacter:"")+e("<textarea />").html(t.download).val(),p.attr("data-image-title",p.attr("data-image-title")+r)):"alt"==o.downloadLink&&(r=(0!==p.attr("data-image-description").length?"<br />":"")+e("<textarea />").html(t.download).val(),p.attr("data-image-description",p.attr("data-image-description")+r))),p.attr("src","data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D"),h.append(p),t.linkContainer=h,void 0!==o.currentHiddenLink?e(o.currentHiddenLink).after(h):o.element.find(".jig-clearfix").after(h),o.currentHiddenLink=h},I=function(t,i){i.off("load"),0!==t.length&&t.off("load").remove(),i.clone().addClass("jig-pixastic").insertAfter(i).on("load",k).each((function(){(this.complete||void 0!==this.naturalWidth&&0!==this.naturalWidth)&&e(this).trigger("load")}))},k=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},L);break;case"blur":Pixastic.process(this,"blurfast",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,amount:.5},L);break;case"glow":Pixastic.process(this,"glow",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,amount:.3,radius:.2},L);break;case"sepia":Pixastic.process(this,"sepia",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio},L);break;case"laplace_dark":Pixastic.process(this,"laplace",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,edgeStrength:2,invert:!1,greyLevel:0},L);break;case"laplace_light":Pixastic.process(this,"laplace",{retinaReady:o.retinaReady,devicePixelRatio:o.devicePixelRatio,edgeStrength:2,invert:!0,greyLevel:0},L)}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,L);break;case"blur":Pixastic.process(this,"blurfast",t,L);break;case"glow":Pixastic.process(this,"glow",t,L);break;case"sepia":Pixastic.process(this,"sepia",L);break;case"laplace_dark":case"laplace_light":Pixastic.process(this,"laplace",t,L)}}e(this).off("load")},L=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)}T(C(a))}},C=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},T=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"})}},R=function(e){e.find(".jig-caption-wrapper").dotdotdot({watch:!0,keep:"br"})};o.errorChecked=!1;var W=function(){e(".jig-unloadable").length>0&&(o.errorChecked=!0,o.element.find(".jig-unloadable").remove(),a.createGallery("errorCheck"))},M=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 H(e,t){return"hasOwnProperty"in e?e.hasOwnProperty(t):Object.prototype.hasOwnProperty.call(e,t)}function F(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(/&lt;/g,"<").replace(/&gt;/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 o=0,n=(t=[].concat(t)).length;o<n;o+=1)0===a[t[o]]?r=!0:a[t[o]]&&(i|=a[t[o]]);t=i}t&a.ENT_HTML_QUOTE_SINGLE&&(e=e.replace(/&#0*39;/g,"'"));r||(e=e.replace(/&quot;/g,'"'));return e=e.replace(/&amp;/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 S(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(){S()}),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),a.createGallery())}a.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,o){if(-1==e.inArray(t,["mouseover","mouseenter","mouseout","mouseleave"]))return this;var n="object"===_typeof(r)?r:{complete:o||!o&&a||"function"==typeof r&&r,duration:r,easing:o&&a||a&&"function"!=typeof a&&a};void 0===n.easing&&(n.easing="JIGswing"),n.queue=!1;var l=n.complete;return n.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,n):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,o=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=o,"#"+jQuery.map(a,(function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")};e.fn.tagcloud=function(a){var o,n,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&&(o=(l.size.end-l.size.start)/c),l.color&&(n=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*o+l.size.unit}),l.color&&e(this).css({color:r(l.color,n,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("."),o=r.split("."),n=[],l=[],s=!1;n[0]=isNaN(parseInt(a[0],10))?0:parseInt(a[0],10),n[1]=isNaN(parseInt(a[1],10))?0:parseInt(a[1],10),n[2]=isNaN(parseInt(a[2],10))?0:parseInt(a[2],10),n[3]=isNaN(parseInt(a[3],10))?0:parseInt(a[3],10),l[0]=isNaN(parseInt(o[0],10))?0:parseInt(o[0],10),l[1]=isNaN(parseInt(o[1],10))?0:parseInt(o[1],10),l[2]=isNaN(parseInt(o[2],10))?0:parseInt(o[2],10),l[3]=isNaN(parseInt(o[3],10))?0:parseInt(o[3],10);for(var d=0;d<4;d++){if(n[d]<=l[d]){if(s=!0,n[d]==l[d])continue;break}s=!1;break}if(!0===s)return!0;if(!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);