jQuery(window).on("load",function(){jQuery(".fusion-recent-posts-infinite .fusion-columns").each(function(){var n,e=jQuery(this),o=e.parent(),i="."+o.attr("class").replace(/\ /g,".")+" ",t=jQuery(this).find(".fusion-column");jQuery(e).infinitescroll({navSelector:i+".fusion-infinite-scroll-trigger",nextSelector:i+"a.pagination-next",itemSelector:i+"div.pagination .current, "+i+"article.post",loading:{finishedMsg:fusionRecentPostsVars.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">'+fusionRecentPostsVars.infinite_loading_text+"</div>")},maxPage:o.data("pages")?o.data("pages"):void 0,errorCallback:function(){}},function(i){jQuery(i).hide(),imagesLoaded(i,function(){jQuery(i).fadeIn()}),fusionInitPostFlexSlider(),jQuery(i).each(function(){jQuery(this).find(".full-video, .video-shortcode, .wooslider .slide-content").fitVids()}),n=o.find(".current").html(),o.find(".current").remove(),o.data("pages")==n&&(o.find(".fusion-loading-container").hide(),o.find(".fusion-load-more-button").hide()),"individual"!==fusionRecentPostsVars.lightbox_behavior&&t.find(".fusion-post-slideshow").length||(window.avadaLightBox.activate_lightbox(jQuery(i)),t=e.find(".post")),window.avadaLightBox.refresh_lightbox(),setTimeout(function(){jQuery(window).trigger("resize",[!1])},500),jQuery.isFunction(jQuery.fn.initWaypoint)&&jQuery(window).initWaypoint(),"undefined"!=typeof niceScrollReInit&&niceScrollReInit()}),jQuery(o).hasClass("fusion-recent-posts-load-more")&&(jQuery(e).infinitescroll("unbind"),jQuery(o).find(".fusion-load-more-button").on("click",function(i){i.preventDefault(),jQuery(e).infinitescroll("retrieve")})),1===parseInt(o.data("pages"),10)&&(o.find(".fusion-loading-container").hide(),o.find(".fusion-load-more-button").hide())})});