jQuery(window).on("load fusion-element-render-fusion_post_card_image",(function(){jQuery(".awb-pc-image__swap-image").on("mouseover",(function(){const a=jQuery(this).closest(".awb-pc-image__swap-images"),t=jQuery(this).parent(),s=a.find(".awb-pc-image__thumb-image");void 0===t.data("src")&&(t.attr("data-src",s.attr("src")),t.attr("data-srcset",s.attr("srcset"))),void 0!==a.data("thumb")&&""!==a.attr("data-thumb")&&(void 0!==t.data("var-src")&&t.attr("data-var-src")===a.attr("data-thumb")||(t.attr("data-var-src",s.attr("src")),t.attr("data-var-srcset",s.attr("srcset")))),s.attr("src",jQuery(this).data("src")),s.attr("srcset",jQuery(this).data("srcset")),a.find(".awb-pc-image__swap-nav-item").removeClass("awb-pc-image__swap-nav-item--active"),a.find('.awb-pc-image__swap-nav-item[data-index="'+jQuery(this).data("index")+'"]').addClass("awb-pc-image__swap-nav-item--active")})),jQuery(".awb-pc-image__swap-grid").on("mouseleave",(function(){const a=jQuery(this).closest(".awb-pc-image__swap-images"),t=a.find(".awb-pc-image__thumb-image");void 0!==a.data("thumb")&&""!==a.attr("data-thumb")?(t.attr("src",jQuery(this).attr("data-var-src")),t.attr("srcset",jQuery(this).attr("data-var-srcset"))):(t.attr("src",jQuery(this).data("src")),t.attr("srcset",jQuery(this).data("srcset"))),a.find(".awb-pc-image__swap-nav-item").removeClass("awb-pc-image__swap-nav-item--active")})),jQuery(".awb-pc-image__next, .awb-pc-image__prev").on("click",(function(a){a.preventDefault();const t=jQuery(this).closest(".awb-pc-image__swap-images"),s=t.find(".awb-pc-image__thumb-image"),r=t.find(".awb-pc-image__swap-grid"),e=r.find(".awb-pc-image__swap-image"),i=r.find(".awb-pc-image__swap-image--active");let c,d,m;jQuery(this).hasClass("awb-pc-image__next")?(d=e.first(),m=e.last()):(d=e.last(),m=e.first()),void 0===r.data("src")&&(r.attr("data-src",s.attr("src")),r.attr("data-srcset",s.attr("srcset"))),void 0!==t.data("thumb")&&""!==t.attr("data-thumb")&&(void 0!==r.data("var-src")&&r.attr("data-var-src")===t.attr("data-thumb")||(r.attr("data-var-src",s.attr("src")),r.attr("data-var-srcset",s.attr("srcset")))),i.length?m.hasClass("awb-pc-image__swap-image--active")?(e.removeClass("awb-pc-image__swap-image--active"),void 0!==t.data("thumb")&&""!==t.attr("data-thumb")?(s.attr("src",r.attr("data-var-src")),s.attr("srcset",r.attr("data-var-srcset"))):(s.attr("src",r.data("src")),s.attr("srcset",r.data("srcset")))):(c=jQuery(this).hasClass("awb-pc-image__next")?i.next():i.prev(),e.removeClass("awb-pc-image__swap-image--active"),c.addClass("awb-pc-image__swap-image--active"),s.attr("src",c.data("src")),s.attr("srcset",c.data("srcset"))):(d.addClass("awb-pc-image__swap-image--active"),s.attr("src",d.data("src")),s.attr("srcset",d.data("srcset")))}))}));