function fusionInitGallery(e){var n;e.data("isotope")||e.parents('.fusion-builder-live-element[data-type="fusion_gallery"]').length||(n=e.find(".fusion-gallery-column"),e.css("min-height","500px"),n.hide(),e.hasClass("fusion-gallery-layout-masonry")&&!e.hasClass("fusion-masonry-has-vertical")&&0<e.find(".fusion-grid-column:not(.fusion-grid-sizer)").not(".fusion-element-landscape").length&&e.addClass("fusion-masonry-has-vertical"),imagesLoaded(n,function(){e.css("min-height",""),n.fadeIn(),e.isotope({layoutMode:"packery",itemSelector:".fusion-gallery-column",isOriginLeft:!jQuery("body.rtl").length,resizable:!0,initLayout:!1}),e.on("layoutComplete",function(e){var n=jQuery(e.target);n.parents(".fusion-blog-layout-grid").length&&!n.parents(".fusion-blog-layout-grid").hasClass("fusion-blog-equal-heights")&&setTimeout(function(){n.parents(".fusion-blog-layout-grid").isotope()},50),n.parents(".fusion-portfolio-wrapper").length&&setTimeout(function(){n.parents(".fusion-portfolio-wrapper").isotope()},50)}),e.isotope(),window.dispatchEvent(new Event("fusion-resize-horizontal",{bubbles:!0,cancelable:!0})),jQuery('[data-spy="scroll"]').each(function(){jQuery(this).scrollspy("refresh")})}))}jQuery(window).on("load",function(){jQuery(".fusion-gallery-layout-grid, .fusion-gallery-layout-masonry").each(function(){fusionInitGallery(jQuery(this))})}),jQuery(window).on("fusion-dynamic-content-render",function(e,n){var o=jQuery(n).find(".fusion-gallery");0<o.length&&o.each(function(){jQuery(this).removeData(),fusionInitGallery(jQuery(this))})}),jQuery(document).on("fusion-element-render-fusion_tab fusion-element-render-fusion_tabs fusion-element-render-fusion_toggle fusion-element-render-fusion_tagline_box fusion-element-render-fusion_text",function(e,n){jQuery('div[data-cid="'+n+'"]').find(".fusion-gallery").each(function(){jQuery(this).removeData(),fusionInitGallery(jQuery(this))})});