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(){var e=jQuery(this),n="."+e.attr("class").replace(/\ /g,".").replace(/.fusion\-events\-[a-zA-Z]+\-sidebar/g,"").replace(".fusion-masonry-has-vertical","")+" ",i=e.find(".fusion-events-wrapper").data("pages"),o={layoutMode:"packery",itemSelector:".fusion-events-post",isOriginLeft:!jQuery("body.rtl").length};e.find(".fusion-events-wrapper").isotope(o),e.children(".fusion-events-wrapper").infinitescroll({navSelector:n+".fusion-infinite-scroll-trigger",nextSelector:n+".pagination-next",itemSelector:n+"div.pagination .current, "+n+" .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:i||void 0,errorCallback:function(){e.find(".fusion-events-post").css("height",""),e.find(".fusion-events-wrapper").isotope(o)}},function(n){jQuery().isotope&&((n=jQuery(n)).hide(),imagesLoaded(n,function(){var o,t,s;(o=jQuery(n).find(".fusion-placeholder-image")).parents(".fusion-events-content-wrapper, .fusion-image-wrapper").animate({opacity:1}),(t=jQuery(n).find(".fusion-video")).each(function(){jQuery(this).animate({opacity:1}),jQuery(this).parents(".fusion-events-content-wrapper").animate({opacity:1})}),t.fitVids(),window.$events_images_index=0,jQuery(n).imagesLoaded().progress(function(e,n){1<=jQuery(n.img).parents(".fusion-events-content-wrapper").length?jQuery(n.img,o).parents(".fusion-events-content-wrapper").delay(100*window.$events_images_index).animate({opacity:1}):jQuery(n.img,o).parents(".fusion-image-wrapper").delay(100*window.$events_images_index).animate({opacity:1}),window.$events_images_index++}),n.fadeIn(),e.find(".fusion-events-post").css("height",""),e.find(".fusion-events-wrapper").isotope("appended",n),n.each(function(){jQuery(this).find(".full-video, .video-shortcode, .wooslider .slide-content").fitVids()}),jQuery('[data-spy="scroll"]').each(function(){jQuery(this).scrollspy("refresh")}),"individual"===fusionEventsVars.lightbox_behavior&&jQuery(n).find(".fusion-rollover-gallery").length&&jQuery(n).find(".fusion-rollover-gallery").each(function(){window.$ilInstances.push(jQuery('[data-rel^="'+jQuery(this).attr("data-rel")+'"]').iLightBox(window.avadaLightBox.prepare_options(jQuery(this).attr("data-rel"))))}),s=e.find(".current").html(),e.find(".current").remove(),i==s&&(e.find(".fusion-loading-container").hide(),e.find(".fusion-load-more-button").hide()),"undefined"!=typeof niceScrollReInit&&niceScrollReInit(),window.dispatchEvent(new Event("fusion-resize-horizontal",{bubbles:!0,cancelable:!0})),setTimeout(function(){e.find(".fusion-events-wrapper").isotope()},250)}))}),e.hasClass("fusion-events-pagination-load-more-button")&&(e.find(".fusion-events-wrapper").infinitescroll("unbind"),e.find(".fusion-load-more-button").on("click",function(n){n.preventDefault(),e.find(".fusion-events-wrapper").infinitescroll("retrieve")}))})});