!function(d){woodmartThemeModule.productImages=function(){var e=d(".woocommerce-product-gallery"),a=d(".woocommerce-product-gallery__wrapper"),t=e.find(".thumbnails"),o=".woodmart-show-product-gallery",r=(t.addClass("thumbnails-ready"),e.hasClass("image-action-popup")&&(o+=", .woocommerce-product-gallery__image > a"),e.on("click",".woocommerce-product-gallery__image > a",function(e){e.preventDefault()}),e.on("click",o,function(e){e.preventDefault();var a=d(this),a=(a.attr("href"),i());woodmartThemeModule.callPhotoSwipe(r(e),a)}),t.on("click",".image-link",function(e){e.preventDefault()}),function(e){return(a.hasClass("owl-carousel")?a.find(".owl-item.active"):d(e.currentTarget).parent().parent()).index()}),i=function(){var n=[];return a.find("figure a img").each(function(){var e,a=d(this),t=a.attr("data-large_image"),o=a.attr("data-large_image_width"),r=a.attr("data-large_image_height"),i=a.data("caption");a.parents(".product-image-wrap.wd-with-video").length?(-1!==(e=a.parents(".wd-with-video")[0].outerHTML).indexOf("wd-inited")&&(e=e.replace("wd-inited","wd-loaded").replace("wd-video-playing","")),n.push({html:e,mainElement:a.parents(".wd-with-video")})):n.push({src:t,w:o,h:r,title:"yes"===woodmart_settings.product_images_captions&&i})}),n}},d(document).ready(function(){woodmartThemeModule.productImages()})}(jQuery);