!function(i){"use strict";i.fn.awbAnimatePostCards=function(){i.each(fusion.getObserverSegmentation(i(this)),function(n){var e=fusion.getAnimationIntersectionData(n),t=new IntersectionObserver(function(n,e){i.each(n,function(n,o){var s=i(o.target),a=0,r=s.attr("data-animationtype"),d=s.attr("data-animationduration"),u=parseInt(1e3*s.attr("data-animation-delay"),10);fusion.shouldObserverEntryAnimate(o,e)&&(s.find(".fusion-grid-column").each(function(){var n=i(this);setTimeout(function(){n.css("visibility","visible"),n.addClass(r),d&&(n.css("-moz-animation-duration",d+"s"),n.css("-webkit-animation-duration",d+"s"),n.css("-o-animation-duration",d+"s"),n.css("animation-duration",d+"s")),setTimeout(function(){n.removeClass(r)},1e3*d)},a),a+=u}),t.unobserve(o.target))})},e);i(this).each(function(){t.observe(this)})})}}(jQuery),jQuery(window).on("load fusion-element-render-fusion_post_cards",function(){jQuery("body").hasClass("fusion-builder-live-preview")||jQuery(".fusion-post-cards.fusion-delayed-animation").awbAnimatePostCards(),jQuery(".fusion-grid-container-infinite").each(function(i){var n,e,t,o=jQuery(this),s=jQuery(this).find(".post-card"),a="";n="",o.closest(".fusion-post-cards").length&&(n="."+o.parents(".fusion-post-cards").attr("class").replace(/\ /g,".")+" "),jQuery(o).infinitescroll({navSelector:n+".fusion-infinite-scroll-trigger",nextSelector:n+"a.pagination-next",itemSelector:n+".post-card",loading:{finishedMsg:fusionPostCardsVars.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">'+fusionPostCardsVars.infinite_text+"</div>")},maxPage:o.data("pages")?o.data("pages"):void 0,infid:"pc"+i,errorCallback:function(){o.find(".fusion-post-grid").css("height","")}},function(i){fusionInitPostFlexSlider(),jQuery(i).each(function(){jQuery(this).find(".full-video, .video-shortcode, .wooslider .slide-content").fitVids()}),t=(e=o).find(".current").html(),e.find(".current").remove(),e.data("pages")==t&&(e.parent().find(".fusion-loading-container").hide(),e.parent().find(".fusion-load-more-button").hide()),jQuery(i).find(".fusion-rollover-gallery").length&&("individual"!==fusionBlogVars.lightbox_behavior&&s.find(".fusion-rollover-gallery").length?(a=s.find(".fusion-rollover-gallery").first().data("rel"),s=o.find(".post"),void 0!==window.$ilInstances[a]&&(window.$ilInstances[a].destroy(),delete window.$ilInstances[a],window.avadaLightBox.activate_lightbox(s))):(window.avadaLightBox.activate_lightbox(jQuery(i)),s=o.find(".post")),window.avadaLightBox.refresh_lightbox()),setTimeout(function(){jQuery(window).trigger("resize",[!1])},500),jQuery.isFunction(jQuery.fn.initElementAnimations)&&jQuery(window).initElementAnimations()}),(jQuery(o).hasClass("fusion-grid-archive")&&"load_more_button"===fusionPostCardsVars.pagination_type||jQuery(o).hasClass("fusion-grid-container-load-more"))&&(jQuery(o).infinitescroll("unbind"),(jQuery(o).hasClass("fusion-grid-archive")?jQuery(o).parent().find(".fusion-load-more-button"):jQuery(o).parents(".fusion-grid-archive").find(".fusion-load-more-button")).on("click",function(i){i.preventDefault(),jQuery(o).infinitescroll("retrieve")})),e=o,1===parseInt(e.data("pages"),10)&&(e.parent().find(".fusion-loading-container").hide(),e.parent().find(".fusion-load-more-button").hide())})});