jQuery(window).on("load",function(){"function"==typeof jQuery.fn.equalHeights&&jQuery(window).on("fusion-resize-horizontal",function(){jQuery(".fusion-events-shortcode").each(function(){jQuery(this).find(".fusion-events-meta").equalHeights()})})}),jQuery(window).on("load fusion-element-render-fusion_events",function(e,n){var i=void 0!==n?'div[data-cid="'+n+'"] .fusion-events-shortcode':".fusion-events-shortcode";"function"==typeof jQuery.fn.equalHeights&&jQuery(i).each(function(){jQuery(this).find(".fusion-events-meta").equalHeights()}),jQuery(i+".fusion-events-pagination-infinite, "+i+".fusion-events-pagination-load-more-button").each(function(e){var n=jQuery(this),i="."+n.attr("class").replace(/\ /g,".").replace(/.fusion\-events\-[a-zA-Z]+\-sidebar/g,"").replace(".fusion-masonry-has-vertical","")+" ",s=n.find(".fusion-events-wrapper").data("pages"),o={layoutMode:"packery",itemSelector:".fusion-events-post",isOriginLeft:!jQuery("body.rtl").length};n.find(".fusion-events-wrapper").isotope(o),n.children(".fusion-events-wrapper").infinitescroll({navSelector:i+".fusion-infinite-scroll-trigger",nextSelector:i+".pagination-next",itemSelector:i+"div.pagination .current, "+i+" .fusion-events-post",loading:{finishedMsg:fusionEventsVars.infinite_finished_msg,msg:jQuery('<div class="fusion-loading-container fusion-clearfix"><div class="fusion-loading-spinner"><div class="fusion-spinner-1"></div><div class="fusion-spinner-2"></div><div class="fusion-spinner-3"></div></div><div class="fusion-loading-msg">'+fusionEventsVars.infinite_blog_text+"</div>")},maxPage:s||void 0,infid:"e"+e,errorCallback:function(){n.find(".fusion-events-post").css("height",""),n.find(".fusion-events-wrapper").isotope(o)}},function(e){jQuery().isotope&&((e=jQuery(e)).hide(),imagesLoaded(e,function(){var i,o,t;(i=jQuery(e).find(".fusion-placeholder-image")).parents(".fusion-events-content-wrapper, .fusion-image-wrapper").animate({opacity:1}),(o=jQuery(e).find(".fusion-video")).each(function(){jQuery(this).animate({opacity:1}),jQuery(this).parents(".fusion-events-content-wrapper").animate({opacity:1})}),o.fitVids(),window.$events_images_index=0,jQuery(e).imagesLoaded().progress(function(e,n){1<=jQuery(n.img).parents(".fusion-events-content-wrapper").length?jQuery(n.img,i).parents(".fusion-events-content-wrapper").delay(100*window.$events_images_index).animate({opacity:1}):jQuery(n.img,i).parents(".fusion-image-wrapper").delay(100*window.$events_images_index).animate({opacity:1}),window.$events_images_index++}),e.fadeIn(),n.find(".fusion-events-post").css("height",""),n.find(".fusion-events-wrapper").isotope("appended",e),e.each(function(){jQuery(this).find(".full-video, .video-shortcode, .wooslider .slide-content").fitVids()}),jQuery('[data-spy="scroll"]').each(function(){jQuery(this).scrollspy("refresh")}),t=n.find(".current").html(),n.find(".current").remove(),s==t&&(n.find(".fusion-loading-container").hide(),n.find(".fusion-load-more-button").hide()),window.dispatchEvent(new Event("fusion-resize-horizontal",{bubbles:!0,cancelable:!0})),setTimeout(function(){n.find(".fusion-events-wrapper").isotope()},250)}))}),n.hasClass("fusion-events-pagination-load-more-button")&&(n.find(".fusion-events-wrapper").infinitescroll("unbind"),n.find(".fusion-load-more-button").on("click",function(e){e.preventDefault(),n.find(".fusion-events-wrapper").infinitescroll("retrieve")}))})});