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 loadJIGprettyPhoto(e){function t(){var e,t,i=!1,p=location.hash;return e=/^#!?([\w\-[\]]+?\/(?:(\d+)(?=\/))?(https?:\/\/[^&]*)?([A-Z]{2}\/[_\w]*)?)/im,null!==(t=(p=(p=(p=p.replace("%5B","[")).replace("%5D","]")).replace(/([^|])(poster=|videoplayer)/gm,"$1|$2")).match(e))&&(i=t[1]),i}function i(e){if("undefined"!=typeof theRel){var t=!1;if(1==settings.smart_deeplinking&&e){var i="",p=e.filter("[href='"+pp_images[set_position]+"']"),o=p.attr("class"),a=/(?:jig-contentID)-(\w{2})-([^\s]*)/im;if(-1!==o.indexOf("jig-contentID")||(o=p.closest(".jig-imageContainer").attr("class")),null!=(i=a.exec(o))&&(i=i[1]+"/"+i[2]),i)return void(location.hash="!"+theRel+"/"+i);t=!0}1==settings.advanced_deeplinking||1==t?location.hash="!"+theRel+"/"+pp_images[set_position]:location.hash=theRel+"/"+rel_index+"/"}}function p(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null==i?"":i[1]}e.prettyPhoto={version:"3.1.6"},e.prettyPhoto.JIG=!0,e.fn.prettyPhoto=function(o){if(void 0===o||void 0!==o&&void 0===o.jig_call?jigReCallPrettyPhotoAfterPossibleResize=!0:jigReCallPrettyPhotoAfterPossibleResize=void 0,!1===(o=jQuery.extend({jig_call:!1,jig_socials:"ftp",title_position:"inside",videoplayer:!1,hook:"rel",advanced_deeplinking:!1,smart_deeplinking:!0,animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:300,keyboard_shortcuts:!0,analytics:!1,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> <div class="ppt">&nbsp;</div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <a class="pp_next" href="#">next</a> <a class="pp_previous" href="#">previous</a> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <a href="#" class="pp_arrow_next">Next</a> <p class="currentTextHolder">0/0</p> </div> <p class="pp_description"></p> <div class="pp_bottom_right"> <a class="pp_close" href="#">Close</a> <div class="pp_social">{pp_social}</div> </div> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src="{path}" width="{width}" height="{height}" frameborder="no" allowfullscreen></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:!0,jig_facebook:'<div class="jig_pp_social_btn jig_pp_facebook" data-src="//www.facebook.com/plugins/like.php?href={f_location_href}&amp;width=135&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=21"></div>',jig_twitter:'<div class="jig_pp_social_btn jig_pp_twitter" data-src="//platform.twitter.com/widgets/tweet_button.html?url={location_href}&text={twitter_text}"></div>',jig_pinterest:'<div class="jig_pp_social_btn jig_pp_pinterest" data-href="//www.pinterest.com/pin/create/button/?url={location_href}&media={location_img}&description={d}"></div>'},o)).jig_call&&!0===o.smart_deeplinking&&!0===o.deeplinking&&(o.smart_deeplinking=!1,o.advanced_deeplinking=!0),o.social_tools){var a=o.jig_socials;a=(a=(a=a.toLowerCase()).replace(/[^ftp]/gi,"")).split("");var s=e.inArray("f",a),n=e.inArray("t",a),l=e.inArray("p",a);-1!==s&&(a[s]=o.jig_facebook),-1!==n&&(a[n]=o.jig_twitter),-1!==l&&(a[l]=o.jig_pinterest,void 0===window.jigBuildPinterestButton&&(window.jigBuildPinterestButton=function(e){setTimeout((function(){window.jigBuildPinterestButton(e)}),500)}),!0===o.jig_call&&void 0===window.jigPinterestTrickRan&&(window.jigPinterestTrick(),e(window).off("load",window.jigPinterestTrick).on("load",window.jigPinterestTrick))),o.social_tools=a.join("")}var d,c,_,h,g,f,m,u,v=this,w=!1,y=e(window).height(),b=e(window).width();function k(e,t){e=function(e,t){if(void 0===e)return"";var i=0,p=!1;void 0===t&&(t=2);e=e.toString().replace(/&lt;/g,"<").replace(/&gt;/g,">");var o={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};0===t&&(p=!0);if("number"!=typeof t){for(var a=0,s=(t=[].concat(t)).length;a<s;a+=1)0===o[t[a]]?p=!0:o[t[a]]&&(i|=o[t[a]]);t=i}t&o.ENT_HTML_QUOTE_SINGLE&&(e=e.replace(/&#0*39;/g,"'"));p||(e=e.replace(/&quot;/g,'"'));return e=e.replace(/&amp;/g,"&")}(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 P(){e(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(y/2-d.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1,"JIGswing"),$pp_pic_holder.find(".pp_content").animate({height:d.imageHeight,width:d.imageWidth},settings.animation_speed,"JIGeaseInOutQuad"),$pp_pic_holder.animate({top:projectedTop,left:b/2-d.containerWidth/2<0?0:b/2-d.containerWidth/2,width:d.containerWidth},settings.animation_speed,"JIGeaseInOutQuad",(function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(d.height).width(d.width),$pp_pic_holder.find(".pp_fade").fadeIn({duration:settings.animation_speed,easing:"JIGswing",complete:function(){var t,i,p,o,a,d;settings.social_tools&&(-1!==s&&(a=e(".jig_pp_facebook"),d=e('<iframe src="'+a.data("src")+'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe>'),a.empty().append(d)),-1!==n&&(p=e(".jig_pp_twitter"),o=e('<iframe src="'+p.data("src")+'" width="73" height="20" title="Twitter Tweet Button" style="border: 0; overflow: hidden;" scrolling="no"></iframe>'),p.empty().append(o)),-1!==l&&(t=jQuery(".jig_pp_pinterest"),i=jQuery('<a href="'+t.data("href")+'" class="pin-it-button" data-pin-do="buttonPin" data-pin-config="beside" data-pin-save="true"></a>'),t.empty().append(i),window.jigBuildPinterestButton(t[0]),r()))}}),isSet&&"image"==T(pp_images[set_position])&&pp_images.length>1?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(d.resized?e("a.pp_expand,a.pp_contract").show():e("a.pp_expand").hide()),!settings.autoplay_slideshow||m||c||e.prettyPhoto.startSlideshow(),settings.changepicturecallback(),c=!0})),isSet&&settings.overlay_gallery&&"image"==T(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((d.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div").first().width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,e.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.eq(set_position).addClass("selected")):$pp_pic_holder.find(".pp_content").off("mouseenter mouseleave"),o.ajaxcallback()}function j(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut({duration:settings.animation_speed,easing:"JIGswing",complete:function(){e(".pp_loaderIcon").show(),t()}})}function $(t){t>1?e(".pp_nav").removeClass("pp_nav_hidden"):e(".pp_nav").addClass("pp_nav_hidden")}function x(e,t){I(e,t),s=!1;var i=b-50,p=y-40,o=e,a=t;if((f>i||g>p)&&doresize&&settings.allow_resize&&!w)for(var s=!0,n=!0,r=!1;n;)f>i&&(a=t/e*(o=Math.min(i,o)-20),o<200&&(a=t/e*(o=200),n=!1,r=!0)),g>p&&(o=e/t*(a=Math.min(p,a)-20),a<200&&(o=e/t*(a=200),n=!1,r=!0)),I(o,a),n=0==r&&(f>i||g>p);return O(),{width:Math.floor(o),height:Math.floor(a),containerHeight:Math.floor(g),containerWidth:Math.floor(f)+2*settings.horizontal_padding,imageHeight:Math.floor(_),imageWidth:Math.floor(h),resized:s}}function I(t,i){t=parseFloat(t),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(t);var p=0,o="facebook"!==settings.theme?settings.theme:"pp_facebook",a=e('<div class="prettyPhotoTemporaryMeasure"><div class="pp_content_container"></div></div>').addClass(o).css({position:"absolute",top:-1e4}).appendTo("body");if($pp_details=$pp_details.clone().width(t).appendTo(a.find(".pp_content_container")),"inside"==settings.title_position){e(".pp_details.pp_includes_title").removeClass("pp_alt_x_position pp_alt_br_position pp_socials_own_line"),e(".pp_details .pp_nav, .pp_details .pp_description, .pp_details .pp_bottom_right").removeAttr("style");var s=$pp_details.find(".pp_description:visible");0!==s.length&&0===s.position().left?(e(".pp_details .pp_description").css("margin-right",0).prev().css("margin-right",48),$pp_details.find(".pp_social").outerWidth(!0)<$pp_details.width()-$pp_details.find(".pp_nav").outerWidth(!0)?e(".pp_details.pp_includes_title").addClass("pp_alt_br_position"):e(".pp_details.pp_includes_title").addClass("pp_alt_x_position")):$pp_details.find(".pp_bottom_right").position().top&&(0===s.length||$pp_details.find(".pp_social").height()>30?e(".pp_details.pp_includes_title").addClass("pp_alt_x_position"):e(".pp_details .pp_description").css("margin-right",0),e(".pp_details .pp_bottom_right").css("float","none"),1==$pp_details.find(".pp_social").length&&e(".pp_details.pp_includes_title").addClass("pp_socials_own_line"))}p=(p+=a.outerHeight(!0))<=34?36:p,a.remove(),titleHeight=0,"inside"!==settings.title_position&&($pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(t),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove()),h=t,g=(_=i+p)+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),f=t}function T(e){return e.match(/\b\|videoplayer\b/i)?"videoplayer":e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)?"youtube":e.match(/vimeo\.com/i)?"vimeo":e.match(/\b.mov\b/i)?"quicktime":e.match(/\b.swf\b/i)?"flash":e.match(/\biframe=true\b/i)?"iframe":e.match(/\bajax=true\b/i)?"ajax":e.match(/\bcustom=true\b/i)?"custom":"#"==e.substr(0,1)?"inline":"image"}function O(){if(doresize&&"undefined"!=typeof $pp_pic_holder){scroll_pos=A();var e=$pp_pic_holder.height(),t=$pp_pic_holder.width();if(projectedTop=y/2+scroll_pos.scrollTop-e/2,projectedTop<0&&(projectedTop=0),e>y)return;$pp_pic_holder.css({top:projectedTop,left:b/2+scroll_pos.scrollLeft-t/2})}}function A(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function C(t){if(settings.markup=settings.markup.replace("{pp_social}",""),e("body").append(settings.markup),$pp_pic_holder=e(".pp_pic_holder"),$ppt=e(".ppt"),$pp_overlay=e("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|webp|bmp|gif)\b/gi)?(classname="",void 0!==u?(img_src=u.find('a.jig-link[href="'+pp_images[i]+'"]:not(.jig-hiddenLink) img').eq(0).attr("src"),"undefined"!=typeof img_src&&"data:"!==img_src.substr(0,5)||(img_src=pp_images[i])):img_src=pp_images[i]):(classname=' class="default"',img_src=""),toInject+="<li"+classname+'><a href="#"><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" style="background-image: url('+img_src+');" alt="'+encodeURIComponent(k(pp_titles[i].replace(/<a(?:.+?)href=['"](.+?)['"](?:.+?>)(.+?)(?:<\/a>)/gm,"$2: $1")))+'" /></a></li>';toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=e(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click((function(){return e.prettyPhoto.changeGalleryPage("next"),e.prettyPhoto.stopSlideshow(),!1})),$pp_gallery.find(".pp_arrow_previous").click((function(){return e.prettyPhoto.changeGalleryPage("previous"),e.prettyPhoto.stopSlideshow(),!1})),$pp_pic_holder.find(".pp_content").hover((function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn({duration:400,easing:"JIGswing"})}),(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut({duration:400,easing:"JIGswing"})})),itemWidth=57,$pp_gallery_li.each((function(t){e(this).find("a").click((function(){return e.prettyPhoto.changePage(t),e.prettyPhoto.stopSlideshow(),!1}))}))}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click((function(){return e.prettyPhoto.startSlideshow(),!1})));var p="facebook"!==settings.theme?settings.theme:"pp_facebook";$pp_pic_holder.attr("class","pp_pic_holder "+p),$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).on("click",(function(){settings.modal||e.prettyPhoto.close()})),e("a.pp_close").on("click",(function(){return e.prettyPhoto.close(),!1})),settings.allow_expand&&e("a.pp_expand").on("click",(function(t){return e(this).hasClass("pp_expand")?(e(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(e(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),j((function(){e.prettyPhoto.open()})),!1})),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").on("click",(function(){return e.prettyPhoto.changePage("previous"),e.prettyPhoto.stopSlideshow(),!1})),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").on("click",(function(){return e.prettyPhoto.changePage("next"),e.prettyPhoto.stopSlideshow(),!1})),O()}if(1==o.jig_call&&(u=v.first().closest(".justified-image-grid")),doresize=!0,scroll_pos=A(),void 0!==v.selector&&-1==v.selector.indexOf("#jig")&&(v=v.filter(":not(.justified-image-grid a)")),o.matchedObjects=v,e(window).off("resize.prettyphoto").on("resize.prettyphoto",(function(){y=e(window).height(),b=e(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(e(document).height()).width(b),O()})),o.keyboard_shortcuts&&e(document).off("keydown.prettyphoto").on("keydown.prettyphoto",(function(t){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous"),t.preventDefault();break;case 13:case 39:e.prettyPhoto.changePage("next"),t.preventDefault();break;case 27:settings.modal||e.prettyPhoto.close(),t.preventDefault()}})),e.prettyPhoto.initialize=function(){settings=o,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=e(this).attr(settings.hook).split(" ").shift();return isSet=!!/\[(?:.*)\]/.exec(theRel),isSet?(pp_images=jQuery.map(v,(function(t,i){if(e(t).attr(settings.hook)&&-1!=e(t).attr(settings.hook).indexOf(theRel))return e(t).attr("href")})),pp_titles=jQuery.map(v,(function(t,i){if(e(t).attr(settings.hook)&&-1!=e(t).attr(settings.hook).indexOf(theRel))return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""})),pp_descriptions=jQuery.map(v,(function(t,i){if(e(t).attr(settings.hook)&&-1!=e(t).attr(settings.hook).indexOf(theRel))return e(t).attr("title")?e(t).attr("title"):""}))):(pp_images=e.makeArray(e(this).attr("href")),pp_titles=e.makeArray(e(this).find("img").attr("alt")),pp_descriptions=e.makeArray(e(this).attr("title"))),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(e(this).attr("href"),pp_images),rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this)),C(this),settings.allow_resize&&e(window).on("scroll.prettyphoto",(function(){y=e(window).height(),b=e(window).width(),O()})),e.prettyPhoto.open(),!1},e.prettyPhoto.open=function(t){"undefined"==typeof settings&&(settings=o,pp_images=e.makeArray(arguments[0]),pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray(""),pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,C(t.target)),settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),$(e(pp_images).length),e(".pp_loaderIcon").show(),settings.deeplinking&&i(settings.matchedObjects),1==settings.analytics&&"undefined"!=typeof _gaq&&_gaq.push(["_trackEvent","Photos","View",pp_images[set_position]]);var a="";if(1==settings.advanced_deeplinking||1==settings.smart_deeplinking){var s=(a=decodeURI(document.location.href)).split("#!");a=s[0]+"#!"+s[1]}else a=location.href;if(settings.social_tools){var n;n=settings.social_tools.replace(/{location_href}/g,encodeURIComponent(location.href));-1!==a.indexOf("?")&&a.indexOf("?")<a.indexOf("#!")&&"&",n=n.replace(/{f_location_href}/g,encodeURIComponent(a));var r=pp_images[set_position],l=/(?:poster=)(.*)(?:\|videoplayer)/m.exec(r),c="";-1!==(n=null===l?n.replace(/{location_img}/g,encodeURIComponent(pp_images[set_position])):n.replace(/{location_img}/g,encodeURIComponent(l[1]))).indexOf("{twitter_text}")&&(void 0!==pp_titles[set_position]?(c=pp_titles[set_position],n=n.replace(/{twitter_text}/g,encodeURIComponent(k(c.replace(/<a(?:.+?)href=['"](.+?)['"](?:.+?>)(.+?)(?:<\/a>)/gm,"$2: $1"))))):n=n.replace(/{twitter_text}/g,encodeURIComponent(document.title))),void 0!==pp_descriptions[set_position]&&(c+=""!==c?" "+pp_descriptions[set_position]:pp_descriptions[set_position]),n=n.replace(/{d}/g,encodeURIComponent(k(c.replace(/<a(?:.+?)href=['"](.+?)['"](?:.+?>)(.+?)(?:<\/a>)/gm,"$2: $1")))),$pp_pic_holder.find(".pp_social").html(n)}else $pp_pic_holder.find(".pp_social").remove();$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity,"JIGswing"),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).length),"inside"==settings.title_position&&(pp_descriptions[set_position]=(settings.show_title&&""!=pp_titles[set_position]&&void 0!==pp_titles[set_position]?'<div class="ppt_inside">'+pp_titles[set_position]+"</div>":"")+(void 0!==pp_descriptions[set_position]?pp_descriptions[set_position]:""),pp_titles[set_position]=void 0,$pp_pic_holder.find(".pp_details").addClass("pp_includes_title")),void 0!==pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").html(pp_descriptions[set_position]):$pp_pic_holder.find(".pp_description").empty();var _=parseFloat(p("width",pp_images[set_position]))?p("width",pp_images[set_position]):settings.default_width.toString(),h=parseFloat(p("height",pp_images[set_position]))?p("height",pp_images[set_position]):settings.default_height.toString();return w=!1,-1!=h.indexOf("%")&&(h=parseFloat(e(window).height()*parseFloat(h)/100-150),w=!0),-1!=_.indexOf("%")&&(_=parseFloat(e(window).width()*parseFloat(_)/100-150),w=!0),$pp_pic_holder.fadeIn({duration:400,easing:"JIGswing",complete:function(){settings.show_title&&""!=pp_titles[set_position]&&void 0!==pp_titles[set_position]?$ppt.html(pp_titles[set_position]):$ppt.remove();var t="",i=!1;switch(T(pp_images[set_position])){case"image":t=new Image;var o=new Image;isSet&&set_position<e(pp_images).length-1&&(o.src=pp_images[set_position+1]);var a=new Image;isSet&&pp_images[set_position-1]&&(a.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),t.onload=function(){d=x(t.width,t.height),P()},t.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),e.prettyPhoto.close()},t.src=pp_images[set_position];break;case"youtube":d=x(_,h),movie_id=p("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,p("rel",pp_images[set_position])?movie+="?rel="+p("rel",pp_images[set_position]):movie+="?rel=0",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,d.width).replace(/{height}/g,d.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":d=x(_,h),movie_id=pp_images[set_position];var s=movie_id.match(/https?:\/\/(?:www\.)?vimeo\.com\/(?:(\d+)|channels\/\w+?\/(\d+))/m),n=s[1]|s[2];movie="//player.vimeo.com/video/"+n+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=d.width+"/embed/?moog_width="+d.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,d.height).replace(/{path}/g,movie);break;case"quicktime":(d=x(_,h)).height+=15,d.imageHeight+=15,d.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,d.width).replace(/{height}/g,d.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":d=x(_,h),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,d.width).replace(/{height}/g,d.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":d=x(_,h),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,d.width).replace(/{height}/g,d.height).replace(/{path}/g,frame_url);break;case"videoplayer":d=x(_,h),frame_url=pp_images[set_position],!1!==settings.videoplayer&&(frame_url=settings.videoplayer+encodeURIComponent(frame_url)),toInject=settings.iframe_markup.replace(/{width}/g,d.width).replace(/{height}/g,d.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,d=x(_,h),doresize=!0,i=!0,e.get(pp_images[set_position],(function(e){toInject=settings.inline_markup.replace(/{content}/g,e),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,P()}));break;case"custom":d=x(_,h),toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show(),doresize=!1,d=x(e(myClone).width(),e(myClone).height()),doresize=!0,e(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html())}t||i||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,P())}}),!1},e.prettyPhoto.changePage=function(t){currentGalleryPage=0,"previous"==t?(set_position--,set_position<0&&(set_position=e(pp_images).length-1)):"next"==t?(set_position++,set_position>e(pp_images).length-1&&(set_position=0)):set_position=t,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&e(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),j((function(){e.prettyPhoto.open()}))},e.prettyPhoto.changeGalleryPage=function(e){"next"==e?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==e?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=e,slide_speed="next"==e||"previous"==e?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed,"JIGeaseInOutQuad")},e.prettyPhoto.startSlideshow=function(){void 0===m?($pp_pic_holder.find(".pp_play").off("click").removeClass("pp_play").addClass("pp_pause").click((function(){return e.prettyPhoto.stopSlideshow(),!1})),m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)):e.prettyPhoto.changePage("next")},e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").off("click").removeClass("pp_pause").addClass("pp_play").click((function(){return e.prettyPhoto.startSlideshow(),!1})),clearInterval(m),m=void 0},e.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(e.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut({duration:settings.animation_speed,easing:"JIGswing",complete:function(){e(this).remove()}}),$pp_overlay.fadeOut({duration:settings.animation_speed,easing:"JIGswing",complete:function(){settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),e(this).remove(),e(window).off("scroll.prettyphoto"),function(){if("undefined"==typeof theRel)return;var e,t=location.hash,i=theRel.replace("[",")\\[");-1===(i=i.replace("]","\\]")).indexOf(")")&&(i+=")");e=new RegExp("^#(!?"+i+"/(\\d+?/)?(https?://.*)?([A-Z]{2}/[_w]*)?"),null!==t.match(e)&&(location.hash="!")}(),settings.callback(),doresize=!0,c=!1,settings=void 0}}))},!pp_alreadyInitialized&&t()&&1==o.jig_call){var R,S,z,G,E,B,W=!1;B=(E=t()).substring(0,E.indexOf("/")),E=E.substring(E.indexOf("/")+1,E.length),/^([A-Z]{2}\/[_\w]*)$/im.test(E)?(E=E.replace("/","-"),0===(G=u.find(".jig-contentID-"+E).find("a["+o.hook+"^='"+B+"']").first()).length&&(G=u.find("a["+o.hook+"^='"+B+"'].jig-contentID-"+E).first()),0!==G.length?(pp_alreadyInitialized=!0,e(window).one("jigPrettyPhotoActivation",(function(){jigOtherPrettyPhotoIsPresent=void 0,G.trigger("click")})),W=!1):W=!0):W=!0,1==W&&(R=new RegExp("(^\\d+)?/?(https?://.+$)"),null!==(G=E.match(R))&&(E=G[1],z=G[2],(S=u.find("a["+o.hook+"^='"+B+"']").eq(E)).attr("href")!==z&&(S=u.find("a["+o.hook+"^='"+B+"'][href^='"+z+"']")),0!==S.length?(pp_alreadyInitialized=!0,e(window).one("jigPrettyPhotoActivation",(function(){jigOtherPrettyPhotoIsPresent=void 0,S.trigger("click")})),W=!1):W=!0,W=!1)),1==W&&0!==u.find("a["+o.hook+"^='"+B+"']").eq(E).trigger("click").length&&(pp_alreadyInitialized=!0)}return v.off("click.prettyphoto").on("click.prettyphoto",e.prettyPhoto.initialize)};var o,a=0,s=-1,n=-1;function r(){var t=e(".jig_pp_pinterest"),i=e(".pp_bottom_right");if(-1===s&&(s=e(".pp_details .pp_social").height()),-1===n&&0!==i.length&&(n=i.position().top),0!==t.length){var p=t.find("> a");if(void 0!==p.attr("data-pin-log")){var l=p.find("> span"),d=0;0!==l.length&&(d=Math.abs(parseInt(l.css("right"),10)))>0&&p.css("margin-right",d),e(".jig_pp_pinterest").addClass("jig_pp_measured_pinterest"),0!==i.length&&n<i.position().top?e(".pp_content").height(e(".pp_content").height()+i.position().top-n):s<e(".pp_details .pp_social").height()&&e(".pp_content").height(e(".pp_content").height()+e(".pp_details .pp_social").height()-s),void 0!==o&&(a=0,clearTimeout(o)),s=-1,n=-1}else a<30&&(o=setTimeout((function(){a++,r()}),200))}}window.jigPinterestTrick=function(){var t=e('.jig_pp_social_btn.jig_pp_pinterest span[class$="_button_pin"]'),i=t.length;if(i>1&&t.each((function(t,p){t!==i-1&&e(p).remove()})),void 0===window.jigPinterestTrickRan||1!==window.jigPinterestTrickRan){window.jigPinterestTrickRan="pending";for(var p,o=!1,a=Object.keys(window),s=a.length,n=0;n<s;n+=1)try{if(-1!==a[n].indexOf("webkit"))continue;if(p=a[n],"function"==typeof window[p]&&"function (a){d.f.build(a)}"==window[p]){o=window[p];break}}catch(e){}if(0==o){for(var r=0;r<s;r+=1)try{if(-1!==a[r].indexOf("webkit"))continue;if(0===(p=a[r]).indexOf("PIN_"))if(p.length>12){if("function"==typeof window[p].f.build){o=window[p].f.build;break}}else o="almost"}catch(e){}if(!1===o){window.jigPinterestTrickRan=1;var l=document.createElement("script");l.type="text/javascript",l.async=!0,l.src="//assets.pinterest.com/js/pinit.js",l.setAttribute("data-pin-build","jigBuildPinterestButton"),e("body").append(l)}else"function"==typeof o&&(window.jigPinterestTrickRan=1,window.jigBuildPinterestButton=o)}else window.jigPinterestTrickRan=1,window.jigBuildPinterestButton=o}},Object.keys||(Object.keys=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=i.length;return function(o){if("object"!==_typeof(o)&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var a,s,n=[];for(a in o)e.call(o,a)&&n.push(a);if(t)for(s=0;s<p;s++)e.call(o,i[s])&&n.push(i[s]);return n}}())}void 0!==jQuery.prettyPhoto&&(jigOtherPrettyPhotoIsPresent=!0),loadJIGprettyPhoto(jQuery),pp_alreadyInitialized=!1;
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,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",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",imageFormat:"auto",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+'=""'),"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&&(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),"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)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&&("auto"===o.imageFormat?null!==(j=/.*\.(jpe?g|gif|bmp|png|webp)/im.exec(b))&&(I="&f=."+j[1]):"webp"===o.imageFormat?I="&f=.webp":"avif"===o.imageFormat&&(I="&f=.avif")),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);
(()=>{var e=0,r={};function i(t){if(!t)throw new Error("No options passed to Waypoint constructor");if(!t.element)throw new Error("No element option passed to Waypoint constructor");if(!t.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=i.Adapter.extend({},i.defaults,t),this.element=this.options.element,this.adapter=new i.Adapter(this.element),this.callback=t.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=i.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=i.Context.findOrCreateByElement(this.options.context),i.offsetAliases[this.options.offset]&&(this.options.offset=i.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),r[this.key]=this,e+=1}i.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},i.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},i.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete r[this.key]},i.prototype.disable=function(){return this.enabled=!1,this},i.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},i.prototype.next=function(){return this.group.next(this)},i.prototype.previous=function(){return this.group.previous(this)},i.invokeAll=function(t){var e,i=[];for(e in r)i.push(r[e]);for(var o=0,n=i.length;o<n;o++)i[o][t]()},i.destroyAll=function(){i.invokeAll("destroy")},i.disableAll=function(){i.invokeAll("disable")},i.enableAll=function(){for(var t in i.Context.refreshAll(),r)r[t].enabled=!0;return this},i.refreshAll=function(){i.Context.refreshAll()},i.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},i.viewportWidth=function(){return document.documentElement.clientWidth},i.adapters=[],i.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},i.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.VcWaypoint=i})(),(()=>{function e(t){window.setTimeout(t,1e3/60)}var i=0,o={},u=window.VcWaypoint,t=window.onload;function n(t){this.element=t,this.Adapter=u.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,u.windowContext||(u.windowContext=!0,u.windowContext=new n(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}n.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},n.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".vcwaypoints"),delete o[this.key])},n.prototype.createThrottledResizeHandler=function(){var t=this;function e(){t.handleResize(),t.didResize=!1}this.adapter.on("resize.vcwaypoints",function(){t.didResize||(t.didResize=!0,u.requestAnimationFrame(e))})},n.prototype.createThrottledScrollHandler=function(){var t=this;function e(){t.handleScroll(),t.didScroll=!1}this.adapter.on("scroll.vcwaypoints",function(){t.didScroll&&!u.isTouch||(t.didScroll=!0,u.requestAnimationFrame(e))})},n.prototype.handleResize=function(){u.Context.refreshAll()},n.prototype.handleScroll=function(){var t,e,i={},o={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(t in o){var n,r=o[t],s=r.newScroll>r.oldScroll?r.forward:r.backward;for(n in this.waypoints[t]){var a,l,h=this.waypoints[t][n];null!==h.triggerPoint&&(a=r.oldScroll<h.triggerPoint,l=r.newScroll>=h.triggerPoint,a&&l||!a&&!l)&&(h.queueTrigger(s),i[h.group.id]=h.group)}}for(e in i)i[e].flushTriggers();this.oldScroll={x:o.horizontal.newScroll,y:o.vertical.newScroll}},n.prototype.innerHeight=function(){return this.element==this.element.window?u.viewportHeight():this.adapter.innerHeight()},n.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},n.prototype.innerWidth=function(){return this.element==this.element.window?u.viewportWidth():this.adapter.innerWidth()},n.prototype.destroy=function(){var t,e=[];for(t in this.waypoints)for(var i in this.waypoints[t])e.push(this.waypoints[t][i]);for(var o=0,n=e.length;o<n;o++)e[o].destroy()},n.prototype.refresh=function(){var t,e,i=this.element==this.element.window,o=i?void 0:this.adapter.offset(),n={};for(e in this.handleScroll(),t={horizontal:{contextOffset:i?0:o.left,contextScroll:i?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:i?0:o.top,contextScroll:i?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var r,s=t[e];for(r in this.waypoints[e]){var a,l=this.waypoints[e][r],h=l.options.offset,p=l.triggerPoint,c=0,d=null==p;l.element!==l.element.window&&(c=l.adapter.offset()[s.offsetProp]),"function"==typeof h?h=h.apply(l):"string"==typeof h&&(h=parseFloat(h),-1<l.options.offset.indexOf("%"))&&(h=Math.ceil(s.contextDimension*h/100)),a=s.contextScroll-s.contextOffset,l.triggerPoint=Math.floor(c+a-h),c=p<s.oldScroll,a=l.triggerPoint>=s.oldScroll,h=!c&&!a,!d&&(c&&a)?(l.queueTrigger(s.backward),n[l.group.id]=l.group):(!d&&h||d&&s.oldScroll>=l.triggerPoint)&&(l.queueTrigger(s.forward),n[l.group.id]=l.group)}}return u.requestAnimationFrame(function(){for(var t in n)n[t].flushTriggers()}),this},n.findOrCreateByElement=function(t){return n.findByElement(t)||new n(t)},n.refreshAll=function(){for(var t in o)o[t].refresh()},n.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){t&&t(),n.refreshAll()},u.requestAnimationFrame=function(t){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||e).call(window,t)},u.Context=n})(),(()=>{function r(t,e){return t.triggerPoint-e.triggerPoint}function s(t,e){return e.triggerPoint-t.triggerPoint}var e={vertical:{},horizontal:{}},i=window.VcWaypoint;function o(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),e[this.axis][this.name]=this}o.prototype.add=function(t){this.waypoints.push(t)},o.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},o.prototype.flushTriggers=function(){for(var t in this.triggerQueues){var e=this.triggerQueues[t];e.sort("up"===t||"left"===t?s:r);for(var i=0,o=e.length;i<o;i+=1){var n=e[i];!n.options.continuous&&i!==e.length-1||n.trigger([t])}}this.clearTriggerQueues()},o.prototype.next=function(t){this.waypoints.sort(r);t=i.Adapter.inArray(t,this.waypoints);return t===this.waypoints.length-1?null:this.waypoints[t+1]},o.prototype.previous=function(t){this.waypoints.sort(r);t=i.Adapter.inArray(t,this.waypoints);return t?this.waypoints[t-1]:null},o.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},o.prototype.remove=function(t){t=i.Adapter.inArray(t,this.waypoints);-1<t&&this.waypoints.splice(t,1)},o.prototype.first=function(){return this.waypoints[0]},o.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},o.findOrCreate=function(t){return e[t.axis][t.name]||new o(t)},i.Group=o})(),(()=>{var i=window.jQuery,t=window.VcWaypoint;function o(t){this.$element=i(t)}i.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,e){o.prototype[e]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,t)}}),i.each(["extend","inArray","isEmptyObject"],function(t,e){o[e]=i[e]}),t.adapters.push({name:"jquery",Adapter:o}),t.Adapter=o})(),(()=>{var n=window.VcWaypoint;function t(o){return function(){var e=[],i=arguments[0];return o.isFunction(arguments[0])&&((i=o.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var t=o.extend({},i,{element:this});"string"==typeof t.context&&(t.context=o(this).closest(t.context)[0]),e.push(new n(t))}),e}}window.jQuery&&(window.jQuery.fn.vcwaypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.vcwaypoint=t(window.Zepto))})();