var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
/**
 * frontend.js
 *
 * @author Your Inspiration Themes
 * @package YITH WooCommerce Quick View
 * @version 1.0.0
 */
jQuery(document).ready(function(o){"use strict";if("undefined"!=typeof yith_qv){var c=o(document).find("#yith-quick-view-modal"),i=c.find(".yith-quick-view-overlay"),a=c.find("#yith-quick-view-content"),n=c.find("#yith-quick-view-close"),d=c.find(".yith-wcqv-wrapper"),r=d.width(),u=d.height(),t=function(){var i=o(window).width(),t=o(window).height(),n=r<i-60?r:i-60,e=u<t-120?u:t-120;d.css({left:i/2-n/2,top:t/2-e/2,width:n+"px",height:e+"px"})};o.fn.yith_quick_view=function(){o(document).off("click",".yith-wcqv-button").on("click",".yith-wcqv-button",function(i){i.preventDefault();var t=o(this),n=t.data("product_id"),e=!1;void 0!==yith_qv.loader&&(e=!0,t.block({message:null,overlayCSS:{background:"#fff url("+yith_qv.loader+") no-repeat center",opacity:.5,cursor:"none"}}),c.hasClass("loading")||c.addClass("loading"),o(document).trigger("qv_loading")),l(t,n,e)})};var l=function(n,i,e){o.ajax({url:yith_qv.ajaxurl,data:{action:"yith_load_product_quick_view",product_id:i,lang:yith_qv.lang},dataType:"html",type:"POST",success:function(i){a.html(i);var t=a.find(".variations_form");t.each(function(){o(this).wc_variation_form(),void 0!==o.fn.yith_wccl&&o(this).yith_wccl()}),t.trigger("check_variations"),t.trigger("reset_image"),void 0!==o.fn.wc_product_gallery&&a.find(".woocommerce-product-gallery").each(function(){o(this).wc_product_gallery()}),c.hasClass("open")||(c.removeClass("loading").addClass("open"),e&&n.unblock()),o(document).trigger("qv_loader_stop")}})};!function(){i.on("click",function(i){t()}),o(document).keyup(function(i){27===i.keyCode&&t()}),n.on("click",function(i){i.preventDefault(),t()});var t=function(){c.removeClass("open").removeClass("loading"),setTimeout(function(){a.html("")},1e3)}}(),t(),o(window).on("resize",t),o.fn.yith_quick_view(),o(document).on("yith_infs_adding_elem yith-wcan-ajax-filtered",function(){o.fn.yith_quick_view()})}});
}