jquery(window).load(function(){jquery(".fusion-recent-posts-infinite .fusion-columns").each(function(){var i,n=jquery(this),s=n.parent(),e="."+s.attr("class").replace(/\ /g,".")+" ",t=jquery(this).find(".fusion-column");jquery(n).infinitescroll({navselector:e+".fusion-infinite-scroll-trigger",nextselector:e+"a.pagination-next",itemselector:e+"div.pagination .current, "+e+"article.post",loading:{finishedmsg:fusionrecentpostsvars.infinite_finished_msg,msg:jquery('
'+fusionrecentpostsvars.infinite_loading_text+"
")},maxpage:s.data("pages")?s.data("pages"):void 0,errorcallback:function(){}},function(e){jquery(e).hide(),imagesloaded(e,function(){jquery(e).fadein()}),jquery(n).find(".flexslider").flexslider({slideshow:boolean(number(fusionrecentpostsvars.slideshow_autoplay)),slideshowspeed:fusionrecentpostsvars.slideshow_speed,video:!0,smoothheight:!1,pauseonhover:!1,usecss:!1,prevtext:"",nexttext:"",start:function(e){e.removeclass("fusion-flexslider-loading"),void 0!==e.slides&&0!==e.slides.eq(e.currentslide).find("iframe").length?(number(fusionrecentpostsvars.pagination_video_slide)?jquery(e).find(".flex-control-nav").css("bottom","-20px"):jquery(e).find(".flex-control-nav").hide(),number(fusionrecentpostsvars.status_yt)&&!0===window.yt_vid_exists&&window.ytready(function(){new yt.player(e.slides.eq(e.currentslide).find("iframe").attr("id"),{events:{onstatechange:onplayerstatechange(e.slides.eq(e.currentslide).find("iframe").attr("id"),e)}})})):number(fusionrecentpostsvars.pagination_video_slide)?jquery(e).find(".flex-control-nav").css("bottom","0px"):jquery(e).find(".flex-control-nav").show(),jquery.waypoints("viewportheight"),jquery.waypoints("refresh")},before:function(e){0!==e.slides.eq(e.currentslide).find("iframe").length&&(number(fusionrecentpostsvars.status_vimeo)&&-1!==e.slides.eq(e.currentslide).find("iframe")[0].src.indexof("vimeo")&&new vimeo.player(e.slides.eq(e.currentslide).find("iframe")[0]).pause(),number(fusionrecentpostsvars.status_yt)&&!0===window.yt_vid_exists&&window.ytready(function(){new yt.player(e.slides.eq(e.currentslide).find("iframe").attr("id"),{events:{onstatechange:onplayerstatechange(e.slides.eq(e.currentslide).find("iframe").attr("id"),e)}})}))},after:function(e){0!==e.slides.eq(e.currentslide).find("iframe").length?(number(fusionrecentpostsvars.pagination_video_slide)?jquery(e).find(".flex-control-nav").css("bottom","-20px"):jquery(e).find(".flex-control-nav").hide(),number(fusionrecentpostsvars.status_yt)&&!0===window.yt_vid_exists&&window.ytready(function(){new yt.player(e.slides.eq(e.currentslide).find("iframe").attr("id"),{events:{onstatechange:onplayerstatechange(e.slides.eq(e.currentslide).find("iframe").attr("id"),e)}})})):number(fusionrecentpostsvars.pagination_video_slide)?jquery(e).find(".flex-control-nav").css("bottom","0px"):jquery(e).find(".flex-control-nav").show(),jquery('[data-spy="scroll"]').each(function(){jquery(this).scrollspy("refresh")})}}),jquery(e).each(function(){jquery(this).find(".full-video, .video-shortcode, .wooslider .slide-content").fitvids()}),i=s.find(".current").html(),s.find(".current").remove(),s.data("pages")==i&&(s.find(".fusion-loading-container").hide(),s.find(".fusion-load-more-button").hide()),"individual"!==fusionrecentpostsvars.lightbox_behavior&&t.find(".fusion-post-slideshow").length||(window.avadalightbox.activate_lightbox(jquery(e)),t=n.find(".post")),window.avadalightbox.refresh_lightbox(),jquery(window).trigger("resize",[!1]),settimeout(function(){jquery(window).trigger("resize",[!1])},500),jquery.isfunction(jquery.fn.initwaypoint)&&jquery(window).initwaypoint(),"undefined"!=typeof nicescrollreinit&&nicescrollreinit()}),jquery(s).hasclass("fusion-recent-posts-load-more")&&(jquery(n).infinitescroll("unbind"),jquery(s).find(".fusion-load-more-button").on("click",function(e){e.preventdefault(),jquery(n).infinitescroll("retrieve")})),1===parseint(s.data("pages"),10)&&(s.find(".fusion-loading-container").hide(),s.find(".fusion-load-more-button").hide())})});