jQuery.fn.fusionCalculatePortfolioEqualHeights=function(){var a=Math.round(1/(jQuery(this).children(":visible").first()[0].getBoundingClientRect().width/jQuery(this).parent().width())),b=jQuery(this).find(".fusion-portfolio-post:visible").not(".invisible-after-ajax").length;jQuery(this).find(".invisible-after-ajax").hide().removeClass("invisible-after-ajax"),1 img").attr("src",b).attr("width","").attr("height",""),jQuery(this).parents(".fusion-portfolio-post").css("width","auto"),jQuery(this).parents(".fusion-portfolio-post").css("height","auto"),jQuery(this).parents(".fusion-portfolio-one:not(.fusion-portfolio-one-text)").find(".fusion-portfolio-post").css("margin","0")}),jQuery(".fusion-portfolio").length&&jQuery(".fusion-portfolio-wrapper").isotope())}),jQuery(window).load(function(){jQuery(".sidebar").is(":visible")&&jQuery(".post-content .fusion-portfolio").each(function(){var a=jQuery(this).data("columns");jQuery(this).addClass("fusion-portfolio-"+a+"-sidebar")}),jQuery().isotope&&jQuery(".fusion-portfolio .fusion-portfolio-wrapper").length&&jQuery(".fusion-portfolio .fusion-portfolio-wrapper").each(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;jQuery(this).next(".fusion-load-more-button").fadeIn(),"fixed"===jQuery(this).data("picturesize")?jQuery(this).find(".fusion-placeholder-image").each(function(){jQuery(this).css({height:jQuery(this).parents(".fusion-portfolio-post").siblings().find("img").first().height(),width:jQuery(this).parents(".fusion-portfolio-post").siblings().find("img").first().width()})}):jQuery(this).find(".fusion-placeholder-image").each(function(){jQuery(this).css({width:jQuery(this).parents(".fusion-portfolio-post").siblings().first().find("img").width()})}),m="",a=jQuery(this).parents(".fusion-portfolio").find(".fusion-filters"),a.length&&(b=a.find(".fusion-filter"),c=a.find(".fusion-active"),d=c.children("a"),e=d.length?d.attr("data-filter").substr(1):"",f=jQuery(this).find(".fusion-portfolio-post"),g=[],k=!0,b&&b.each(function(){var b=jQuery(this),h=b.children("a").data("filter");f&&(e.length&&f.hide(),jQuery(".fusion-filters").show(),f.each(function(){var f,i=jQuery(this),j=i.find(".fusion-rollover-gallery").data("rel");i.hasClass(h.substr(1))&&b.hasClass("fusion-hidden")&&(b.removeClass("fusion-hidden"),!0===k&&0===a.find(".fusion-filter-all").length&&(a.find(".fusion-filter").removeClass("fusion-active"),b.addClass("fusion-active"),k=!1,c=a.find(".fusion-active"),d=c.children("a"),e=d.attr("data-filter").substr(1))),e.length&&i.hasClass(e)&&(i.show(),j&&(f=j.replace("gallery",e),i.find(".fusion-rollover-gallery").attr("data-rel",f),"individual"===avadaPortfolioVars.lightbox_behavior&&i.find(".fusion-portfolio-gallery-hidden a").attr("data-rel",f),-1===jQuery.inArray(f,g)&&g.push(f)))}))}),e.length&&(m="."+e,jQuery.each(g,function(a,b){window.$ilInstances.push(jQuery('[data-rel="'+b+'"], [rel="'+b+'"]').iLightBox(window.avadaLightBox.prepare_options(b)))}),window.avadaLightBox.refresh_lightbox(),"individual"!==avadaPortfolioVars.lightbox_behavior&&d.data("lightbox","created"))),jQuery('[data-spy="scroll"]').each(function(){jQuery(this).scrollspy("refresh")}),h=jQuery(this),i=h.attr("id"),i&&(h=jQuery("#"+i)),(jQuery(this).parent().hasClass("fusion-portfolio-masonry")||jQuery(this).parent().hasClass("fusion-portfolio-layout-masonry"))&&!jQuery(this).parent().hasClass("fusion-masonry-has-vertical")&&0
'+avadaPortfolioVars.infinite_blog_text+"
")},maxPage:c||void 0,errorCallback:function(){a.find(".fusion-portfolio-post").css("height",""),a.find(".fusion-portfolio-wrapper").isotope()}},function(b){var d;jQuery().isotope&&(d=a.find(".fusion-filters").find(".fusion-filter"),b=jQuery(b),b.hide(),imagesLoaded(b,function(){var e,f,g,h,i,j;e=jQuery(b).find(".fusion-placeholder-image"),e.parents(".fusion-portfolio-content-wrapper, .fusion-image-wrapper").animate({opacity:1}),f=jQuery(b).find(".fusion-video"),f.each(function(){jQuery(this).animate({opacity:1}),jQuery(this).parents(".fusion-portfolio-content-wrapper").animate({opacity:1})}),f.fitVids(),window.$portfolio_images_index=0,jQuery(b).imagesLoaded().progress(function(a,b){1<=jQuery(b.img).parents(".fusion-portfolio-content-wrapper").length?jQuery(b.img,e).parents(".fusion-portfolio-content-wrapper").delay(100*window.$portfolio_images_index).animate({opacity:1}):jQuery(b.img,e).parents(".fusion-image-wrapper").delay(100*window.$portfolio_images_index).animate({opacity:1}),window.$portfolio_images_index++}),d&&d.each(function(){var a,c,d,e=jQuery(this),f=e.children("a").data("filter");b&&b.each(function(){d=jQuery(this),d.hasClass(f.substr(1))&&e.hasClass("fusion-hidden")&&(Modernizr.mq("only screen and (max-width: "+avadaPortfolioVars.content_break_point+"px)")?e.fadeIn(400,function(){e.removeClass("fusion-hidden")}):(a=e.css("width"),c=e.css("margin-right"),e.css("width",0),e.css("margin-right",0),e.removeClass("fusion-hidden"),e.animate({width:a,"margin-right":c},400,function(){e.removeAttr("style")})))})}),a.find(".fusion-filters").length?(g=a.find(".fusion-filters").find(".fusion-filter.fusion-active a"),h=g.attr("data-filter").substr(1),h.length?(b.each(function(){var b=jQuery(this),c=b.find(".fusion-rollover-gallery").data("rel");b.hasClass(h)?(b.fadeIn(),c&&b.find(".fusion-rollover-gallery").attr("data-rel",c.replace("gallery",h))):a.hasClass("fusion-portfolio-equal-heights")&&b.addClass("invisible-after-ajax")}),"created"!==g.data("lightbox")&&(window.$ilInstances.push(jQuery('[data-rel^="iLightbox['+h+']"]').iLightBox(window.avadaLightBox.prepare_options("iLightbox["+h+"]"))),g.data("lightbox","created")),window.avadaLightBox.refresh_lightbox()):b.fadeIn()):b.fadeIn(),a.find(".fusion-portfolio-post").css("height",""),a.find(".fusion-portfolio-wrapper").isotope("appended",b),b.each(function(){jQuery(this).find(".full-video, .video-shortcode, .wooslider .slide-content").fitVids()}),jQuery('[data-spy="scroll"]').each(function(){jQuery(this).scrollspy("refresh")}),"individual"===avadaPortfolioVars.lightbox_behavior&&jQuery(b).find(".fusion-rollover-gallery").length&&(i=jQuery(b).find(".fusion-rollover-gallery"),i.each(function(){window.$ilInstances.push(jQuery('[data-rel^="'+jQuery(this).attr("data-rel")+'"]').iLightBox(window.avadaLightBox.prepare_options(jQuery(this).attr("data-rel"))))})),j=a.find(".current").html(),a.find(".current").remove(),c==j&&(a.find(".fusion-loading-container").hide(),a.find(".fusion-load-more-button").hide()),"undefined"!=typeof niceScrollReInit&&niceScrollReInit()}))}),"1"==c&&(a.find(".fusion-loading-container").hide(),a.find(".fusion-load-more-button").hide()),a.hasClass("fusion-portfolio-paging-load-more-button")&&(a.find(".fusion-portfolio-wrapper").infinitescroll("unbind"),a.find(".fusion-load-more-button").on("click",function(b){b.preventDefault(),a.find(".fusion-portfolio-wrapper").infinitescroll("retrieve")}))})});