!function(e){"use strict";e(window).on("load",function(){if(e().isotope&&e(".ct-gallery").length>0){var i=e(".ct-gallery"),t={filter:"*",itemSelector:".ct-gallery-item",masonry:{}};i.imagesLoaded().progress(function(a,l){if(l.isLoaded){var s=e(l.img).closest(".hidden");s.removeClass("hidden"),i.addClass("is-loaded"),i.each(function(){e(this).isotope(t)}),i.isotope("layout")}}).always(function(t){e().infinitescroll&&i.infinitescroll({loading:{finished:void 0,finishedMsg:"<div class='gallerymessage'>No more images</div>",msg:null,msgText:"<div class='gallerymessage'>Loading</div>",selector:null,speed:"fast",start:void 0},navSelector:".wp-pagenavi",nextSelector:".nextpostslink",itemSelector:".ct-gallery-item",extraScrollPx:0,prefill:!0},function(t){i.imagesLoaded(function(){e(t).removeClass("hidden"),i.isotope("appended",e(t))})})}),e(".ct-gallery-filters li").on("click",function(){var t=e(this);e(".ct-gallery-filters .active").removeClass("active"),t.addClass("active");var a=t.attr("data-filter");return i.isotope({filter:a,animationOptions:{duration:750,easing:"linear",queue:!1}}),!1})}})}(jQuery);