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")}))})});