/* Justified Image Grid - Aligns your images into a Flickr / Google+ style thumbnail-grid gallery v3.8 Copyright (c) 2012-2017 Firsh, http://www.justifiedgrid.com/ */ function loadJustifiedImageGrid(d){d.justifiedImageGrid=function(n,x){function q(a,c){return"hasOwnProperty"in a?a.hasOwnProperty(c):Object.prototype.hasOwnProperty.call(a,c)}function m(b,c){b=v(b);if("below"==a.caption)return b;c=(((c||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");return b.replace(/\x3c!--[\s\S]*?--\x3e|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(a,b){return-1")?a:""})}function v(a,c){if(void 0=== a)return"";var b=0,f=!1;"undefined"===typeof c&&(c=2);a=a.toString().replace(/</g,"<").replace(/>/g,">");var d={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};0===c&&(f=!0);if("number"!==typeof c){c=[].concat(c);for(var k=0,l=c.length;k a.jig-loaded").length;var c=a.element.find(".jig-imageContainer .jig-overflow > a").length;"no"==a.errorChecking&&(c-=5);"undefined"!==typeof a.loadCheckTimeout&&clearTimeout(a.loadCheckTimeout);ba.maxRetinaDensity?a.maxRetinaDensity:window.devicePixelRatio);"yes"==a.retinaReady&&("auto"==a.retinaQuality?(a.quality=Math.ceil(a.quality/ a.devicePixelRatio),a.quality=a.quality>a.minRetinaQuality?a.quality:a.minRetinaQuality):a.quality=a.retinaQuality);"yes"==a.disableCropping&&(a.minHeight=a.originalMinHeight=50);"captions"==a.specialFx&&"below"==a.caption&&(a.specialFx="off");if("yes"==a.customFonts&&"off"!==a.caption&&("below"==a.caption||"off"!==a.verticalCenterCaptions||"captions"==a.specialFx)){var b=d("body").find(".jig-fontCheck");if(0===b.length){d("body").append('
!"\'\\#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~ A quick brown fox jumps over the lazy dog.
'); var b=d("body").find(".jig-fontCheck"),c=b.width(),e=0,f=setInterval(function(){e++;var a=b.width();c==a||0===a?50'; for(r in a.filters)q(a.filters,r)&&(a.filteredImages[r]=[],C+="<"+g+' class="jig-filter'+a.filterType+'" data-filter-slug="'+r+'">'+a.filters[r]+"");a.element.before(C+"");"undefined"!==typeof a.filteredImages["all-items-nofilter"]&&(a.filteredImages["all-items-nofilter"]=a.selectedItems.slice());g=0;for(C=a.selectedItems.length;g';for(D in a.L2filters)q(a.L2filters,D)&&(a.L2filteredImages[D]=[],g+="<"+r+' class="jig-filter'+a.L2filterType+'" data-filter-slug="'+D+'">'+a.L2filters[D]+"");a.element.before(g+"");"undefined"!==typeof a.L2filteredImages["all-items-nofilter"]&&(a.L2filteredImages["all-items-nofilter"]=a.selectedItems.slice());r=0;for(g=a.selectedItems.length;rc)10a.screenHeightLimitRatio?(a.maxHeight=a.screenHeight,a.targetHeight=Math.round(a.maxHeight-a.heightDeviation*a.screenHeightLimitRatio),a.minHeight=50!=a.minHeight?Math.round(a.targetHeight-a.heightDeviation*a.screenHeightLimitRatio):50,a.defaultHeightRatio=a.targetHeight/a.maxHeight):(a.maxHeight=a.originalMaxHeight,a.targetHeight=a.originalTargetHeight,a.minHeight=a.originalMinHeight,a.defaultHeightRatio=a.originalDefaultHeightRatio);if(-1!=a.prevScreenHeightLimitRatio|| 1!=a.screenHeightLimitRatio)for(var g in a.selectedItems)q(a.selectedItems,g)&&("undefined"===typeof a.selectedItems[g].originalWidth&&(a.selectedItems[g].originalWidth=a.selectedItems[g].width),a.selectedItems[g].width=Math.round(a.selectedItems[g].originalWidth*a.screenHeightLimitRatio));a.prevScreenHeightLimitRatio=a.screenHeightLimitRatio}a.items=a.selectedItems.slice();if(!0===a.errorChecked&&!1===a.justResized){for(var k in a.items)if(q(a.items,k)&&-1!=d.inArray(void 0===a.items[k].photon?void 0=== a.items[k].thumbUrl?a.items[k].url:a.items[k].thumbUrl:a.items[k].photon,a.errorImages)&&(g=a.items[k],a.items.splice(k,1),a.filters)){c=d("#jig"+a.instance+"-filterButtons .jig-filterButtonSelected").attr("data-filter-slug");a.filteredImages[c]=a.items.slice();for(var c=1,l=a.filters.length;c
JIG
All of the images have failed to load. Please click here to reach the troubleshooting fix.
'; a.element.html(a.timThumbError);return}a.errorChecked=!1}if(""===a.maxRows||0===a.maxRows)a.maxRows=1E3;a.rowcount=0;a.imagesShown=0;""!==a.initiallyLoad&&"off"!==a.loadMore&&0===a.loadMoreCounter&&(a.limit=parseInt(a.initiallyLoad,10));for(a.whileUntil=0===a.limit?0:a.limita.whileUntil&&a.rowcount'+(0!==k?k:b)+"")),a.loadMoreButton=d('
'+a.loadMoreText+(""!==g?"
"+g:"")+"
"),a.element.find(".jig-clearfix").after(a.loadMoreButton),"yes"===a.loadMoreAutoWidth&&a.loadMoreButton.css("width",a.loadMoreButton.find(".jig-loadMoreButton-inner").width())),"scroll"!=a.loadMore&&"hybrid"!=a.loadMore||d(window).scroll(function(){if(("scroll"==a.loadMore|| "hybrid"==a.loadMore&&0=b.top-parseInt(a.loadMoreOffset,10)-d(window).height()&&y()}});if("no"!==a.wrapText){b=a.element.find(".jig-imageContainer:last");0===a.element.find(".jig-flowSpacer").length&&a.element.find(".jig-imageContainer:last").after('
').next().css({width:"1px",height:b.height()+3,"float":"ltr"==a.readingDirection?"left": "right"});var p=a.element.find(".jig-flowSpacer");setTimeout(function(){"ltr"==a.readingDirection?a.element.offset().left==p.offset().left?p.css("margin-right",0):p.css("margin-right",2*a.margins):a.element.offset().left==p.offset().left?p.css("margin-left",0):p.css("margin-left",2*a.margins)},1)}"yes"!=a.customFonts||"off"===a.caption||"below"!=a.caption&&"off"===a.verticalCenterCaptions&&"captions"!=a.specialFx||R(!0);a.prevInstanceID="#jig"+(a.instance-1);d(window).width()!=e||a.areaWidth!=Math.round(a.element.width())? (a.resizeCount++,1a.whileUntil&&a.extraa.whileUntil){for(var b="landscape",c=0,e=a.row.length;ca.row[c].ratio){b="portrait";break}"landscape"==b?W():"yes"!==a.disableCropping?z():W()}else if(0=a.selectedItems.length-a.limit?E():z("flexible");break;case "flexible-match-center":"off"!==a.loadMore&&0>=a.selectedItems.length-a.limit?E("center"):z("flexible-center");break;case "match":E();break;case "match-center":E("center");break;case "center":z("center");break;default:z("lastRow")}if(!0!==a.validRow)return a.imagesShown-=a.row.length,a.unshifts=a.row,a.whileUntil+=a.unshifts.length,!1}else"center"!==a.incompleteLastRow&&"match-center"!== a.incompleteLastRow&&"flexible-match-center"!==a.incompleteLastRow?z("lastRow"):z("center");return a.row},E=function(b){var c,e=0;c=0;for(var f=a.rows.length;ca.targetHeight&&(a.remaining=a.rowlen+a.marginsTotal-a.areaWidth,0 a.maxHeight?(a.row[c].newHeight=a.targetHeight,a.row[c].newWidth=Math.round(a.row[c].newHeight*a.row[c].ratio),b=!1):(a.row[c].newHeight=a.heights[c],a.rowlen+=a.row[c].newWidth)}b&&(a.remaining=a.rowlen+a.marginsTotal-a.areaWidth,I())},z=function(b){var c=!0;if(1!=a.row.length&&void 0===b){var e=a.row.pop();a.fullWidth-=Math.round(e.width*a.defaultHeightRatio)+a.margins+a.bordersTotal;a.items.unshift(e);a.extra=a.fullWidth-a.margins;a.extra-=a.areaWidth}a.marginsTotal=(a.row.length-1)*a.margins+ a.row.length*a.bordersTotal;a.rowlen=0;a.heights=[];for(var e=0,f=a.row.length;ea.maxHeight){if(void 0===b){b=a.items.shift();a.row.push(b);a.fullWidth+=Math.round(b.width*a.defaultHeightRatio)+a.margins+a.bordersTotal;a.extra=a.fullWidth-a.margins;a.extra-=a.areaWidth;X();return}"off"!==a.loadMore&& 0>=a.selectedItems.length-a.limit&&("flexible"==b?b="lastRow":"flexible-center"==b&&(b="center"));if("lastRow"==b){b=0;for(c=a.row.length;ba.remaining;)for(b=0,c=a.row.length;b< c&&(a.row[b].newWidth++,a.row[b].newHeight=a.heights[b]=a.row[b].newWidth/a.row[b].ratio,a.remaining++,0!==a.remaining);b+=1);for(var b=Math.floor(Math.min.apply(null,a.heights)),c=0,e=a.row.length;cc;)for(e=0,f=b.length;e'),g=d('
'), k=b.url,l=b.link_target?b.link_target:"_self",h=a.linkClass,n=a.linkRel,t,p;p=!0;""!==b.gallery&&(f.append(b.gallery.html),n=' rel="'+b.gallery.rel+'" ',f.addClass(b.gallery.lightbox_class),f.attr("id",b.gallery.id));!b.link||(k=b.link,"video"!==l&&"videoplayer"!==l?(h="foobox"!==l?'target="'+l+'" '+h.replace("jig-link","jig-customLink"):'target="'+l+'" '+h.replace("jig-link",""),n=b.link_rel?'rel="'+b.link_rel+'"':""):"magnific"==a.lightbox&&-1==h.indexOf("mfp-")&&(h=h.replace("jig-link","jig-link mfp-iframe")), "videoplayer"!=l&&"foobox"!=l)||-1===k.indexOf("&poster=")&&-1===k.indexOf("|poster=")||(p=!1);if(!0===p&&(k=(k+"").replace(/\+/g,"%20"),"https%3A%2F%2F"===k.substr(0,14)||"http%3A%2F%2F"===k.substr(0,13)))try{k=decodeURIComponent(k)}catch(da){}t=b[a.linkTitleField];p=b[a.imgAltField];b.download&&("yes"==a.downloadLink?(l=(0!==t.length?a.separatorCharacter:"")+b.download,t+=l):"alt"==a.downloadLink&&(l=(0!==p.length?a.separatorCharacter:"")+b.download,p+=l));b.lightbox_link&&("yes"==a.lightboxLink? (lightboxLink=(0!==t.length?a.separatorCharacter:"")+b.lightbox_link,t+=lightboxLink):"alt"==a.lightboxLink&&(lightboxLink=(0!==p.length?a.separatorCharacter:"")+b.lightbox_link,p+=lightboxLink));""!==t&&(t='title="'+t+'" ');""!==p&&(p='alt="'+p+'" ');"new_tab"==a.lightbox&&(h='target="_blank" ');k=d("');h=d("");b.carousel_data&&b.download&&("yes"==a.downloadLink?(l= (0!==h.attr("data-image-title").length?a.separatorCharacter:"")+d("