!function(t){"use strict";t(document).on("click",".quick_view",function(){var a;void 0!==(a=t(this).data("id"))&&jQuery.ajax({type:"POST",url:ultimate_store_kit_ajax_config.ajaxurl,data:{action:"ultimate_store_kit_wc_product_quick_view_content",product_id:a},success:function(a){setTimeout(function(){t("#quick-view-id").html(a)},1e3)}})}),t(document).on("click",".thumbnails a",function(a){var o=t(this).attr("data-href");t(".usk-modal-image-wrapper .images > a").attr("href",o),t(".usk-modal-image-wrapper .images > a > img").attr({src:o,srcset:o})}),t(document).on("click",".usk-modal-page .usk-modal-product .images a",function(a){a.preventDefault();var o=t(this).attr("data-href"),i=t(this).find("img").attr("srcset");t(".woocommerce-main-image").closest("a").attr("href",o),t(".woocommerce-main-image").find("img").attr({src:o,srcset:i}),t("a.zoom").prettyPhoto({hook:"data-rel",social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1}),t("a[data-rel^='prettyPhoto']").prettyPhoto({hook:"data-rel",social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1})}),t(".elementor-widget-usk-florence-grid").on("click",".usk-pagination a",function(a){a.preventDefault();const o=t(this).prop("href");t.ajax({url:o,success:function(a){var i=t(a).find(".elementor-widget-usk-florence-grid");t(".elementor-widget-usk-florence-grid").html(i),window.history.pushState&&window.history.pushState({},"",o)}})}),t(".ajax_add_to_wishlist:not(.usk-active)").attr("href","javascript:void(0);"),t(".ajax_add_to_wishlist").on("click",function(a){var o=t(this),i=o.data("product_id"),e=o.data("redirect_url"),c=o.data("aria_label");t.ajax({url:ultimate_store_kit_ajax_config.ajaxurl,data:{action:"usk_add_to_wishlist",product_id:i,nonce:ultimate_store_kit_ajax_config.nonce},type:"POST",dataType:"JSON",success:function(a){"added"===a.action&&(o.addClass("usk-active").attr("aria-label",c),t(".usk-wishlist-button").find(".usk-wishlist-count").html(a.count),o.attr({href:e}))},error:function(t){console.log(t)}})}),t(".ajax_remove_from_wishlist").on("click",function(a){a.preventDefault();var o=t(this),i=o.data("product_id");t.ajax({url:ultimate_store_kit_ajax_config.ajaxurl,data:{action:"usk_remove_wishlist",product_id:i,nonce:ultimate_store_kit_ajax_config.nonce},type:"POST",dataType:"JSON",success:function(a){"removed"==a.action&&(o.closest("tr").remove(),t(".usk-wishlist-button").find(".usk-wishlist-count").html(a.count))},error:function(t){console.log(t)}})}),t(".ajax_add_to_compare:not(.usk-active)").attr("href","javascript:void(0);"),t(".ajax_add_to_compare").on("click",function(a){var o=t(this),i=o.data("product_id"),e=o.data("redirect_url"),c=o.data("aria_label");t.ajax({url:ultimate_store_kit_ajax_config.ajaxurl,data:{action:"usk_add_to_compare_products",product_id:i,nonce:ultimate_store_kit_ajax_config.nonce},type:"POST",dataType:"JSON",success:function(a){"added"===a.action&&(o.addClass("usk-active").attr("aria-label",c),t(".usk-compare-button").find(".usk-compare-count").html(a.count),o.attr({href:e}))},error:function(t){console.log(t)}})}),t(".ajax_add_to_cart").on("click",function(a){a.preventDefault(),t(this).attr("aria-label","Added to cart")}),t(document).ready(function(){var a='<div class="usk-bouncing-loader"><div></div><div></div><div></div></div>',o=t(".product-quick-view").data("modal-width"),i=t(".product-quick-view").data("modal-height"),e=t(".product-quick-view").data("animation"),c=t(".product-quick-view").data("close-btn"),r=t(".product-quick-view").data("btn-style"),n=t(".product-quick-view").data("btn-text"),d=t(".product-quick-view").data("modal-bg"),u=t(".product-quick-view").data("modal-overlay");t(".product-quick-view").SlickModals({popup_reopenClass:"quick_view",popup_animation:e,overlay_animation:e,popup_closeButtonEnable:c,popup_closeButtonStyle:r,popup_closeButtonText:n,popup_closeButtonPlace:"inside",popup_css:{width:o?o+"px":"800px",height:i?i+"px":"450px",background:d||"#fff","overflow-y":"auto","animation-duration":"0.7s"},overlay_css:{background:u},mobile_breakpoint:"768px",mobile_position:"center",mobile_css:{width:"300px",padding:"30px",margin:"20px"},callback_afterClose:function(){t("#quick-view-id").html(a)},callback_beforeOpen:function(){t("#quick-view-id").html(a)}})}),jQuery(".usk-page-cart div.woocommerce").on("change",".qty",function(){var t=jQuery(this).closest(".woocommerce-cart-form").find("[name='update_cart']");t.prop("disabled",!1),t.trigger("click")})}(jQuery,window.elementorFrontend);