0){if($this.hasClass('request-running')){kapee.isPostLoading=!0}else{kapee.isPostLoading=!1}
if(!$this.hasClass('kapee-loadmore-disabled')){if(!kapee.isPostLoading){kapee.isPostLoading=!0;$this.trigger('click')}}}})}
var scrollHandler=function(){requestAnimationFrame(animationFrame)};$(window).scroll(scrollHandler)};kapee.productLiveSearch=function(){$('.trending-search-results').hide();var serviceUrl=kapee_options.ajax_url+'?action=kapee_ajax_search';$('.site-header .kapee-ajax-search').each(function(){var append=$(this).find('.search-results-wrapper'),container=$(this),search_categories=$(this).find('.categories-filter'),product_cat='';if(search_categories.length&&search_categories.val()!==''){serviceUrl+='&product_cat='+search_categories.val()}
$(this).find('.search-field').keyup(function(){var search_text=$(this).val();if(search_text.length<3){$('.trending-search-results').show()}else{$('.trending-search-results').hide()}});$(this).find('.search-field').focus(function(){var search_text=$(this).val();if(search_text.length<3){$('.trending-search-results').show()}else{$('.trending-search-results').hide()}});$(this).find('.search-field').focusout(function(){});$(this).find('.search-field').devbridgeAutocomplete({minChars:3,appendTo:append,triggerSelectOnValidInput:!1,serviceUrl:serviceUrl,onSearchStart:function(){container.find('.search-submit').removeClass('kapee-spinner');container.find('.search-submit').addClass('kapee-spinner');$('.trending-search-results').hide()},onSelect:function(suggestion){if(suggestion.id!=-1){window.location.href=suggestion.url}},onSearchComplete:function(){container.find('.search-submit').removeClass('kapee-spinner')},beforeRender:function(container){$(container).removeAttr('style')},formatResult:function(suggestion,currentValue){var pattern='('+$.Autocomplete.utils.escapeRegExChars(currentValue)+')';var html='';if(suggestion.img)html+='
';html+=''+suggestion.value.replace(new RegExp(pattern,'gi'),'$1<\/strong>')+'
';if(suggestion.price)html+=''+suggestion.price+'';if(suggestion.rating)html+=''+suggestion.rating+'';return html}});if(search_categories.length){var searchForm=$(this).find('.search-field').devbridgeAutocomplete();search_categories.on('change',function(e){if(search_categories.val()!=''){searchForm.setOptions({serviceUrl:serviceUrl+'&product_cat='+search_categories.val()})}else{searchForm.setOptions({serviceUrl:serviceUrl})}
searchForm.hide();searchForm.onValueChange()})}});$(document).mouseup(function(e){var container=$(".kapee-ajax-search");if(!container.is(e.target)&&container.has(e.target).length===0){$(".trending-search-results").hide()}})};kapee.swapLoginSignupFrom=function(){var userSignup=$('.new-signup');var userSignin=$('.user-signin');userSignup.on('click',function(e){e.preventDefault();$('.customer-login').removeClass('active')
$('.customer-signup').addClass('active')});userSignin.on('click',function(e){e.preventDefault();$('.customer-signup').removeClass('active');$('.customer-login').addClass('active')})}
kapee.userLoginSignupPopup=function(){if(!kapee_options.login_register_popup||$('body').hasClass('woocommerce-account'))return!1;$('.customer-signinup').magnificPopup({type:'inline',preloader:!1,removalDelay:500,items:{src:'#kapee-signin-up-popup',},callbacks:{open:function(){var closeSidebar=$('.kapee-mask-overaly');var mobileSidebar=$('#mobile-menu-wrapper');closeSidebar.removeClass('opened');mobileSidebar.removeClass('opened');$('.kapee-signin-up-popup').addClass('animated fadeInLeft')},beforeClose:function(){var popupWrap=$('.kapee-signin-up-popup');popupWrap.removeClass('fadeInLeft').addClass('fadeOutRight')},close:function(){$('.kapee-signin-up-popup').removeClass('animated fadeOutRight');$('.kapee-signin-up-popup').find('.signin-up-error-message').remove()}}});$(document).on('click','#kapee-signin-up-popup .woocommerce-login-button .button',function(e){var $this=$(this);var $loginform=$this.closest('form');$this.addClass('loading')});$(document).on('click','#kapee-signin-up-popup .woocommerce-form-register .woocommerce-Button.button',function(e){var $this=$(this),$regform=$this.closest('form');$this.addClass('loading')})};kapee.miniCartWidget=function(){if(!kapee_options.header_minicart_popup){return!1}
var headerCart=$('.header-cart');var miniCartSidebar=$('.minicart-slide-wrapper');var closeSidebar=$('.kapee-mask-overaly');var mobileSidebar=$('#mobile-menu-wrapper');headerCart.on('click',function(e){if($('body').hasClass('woocommerce-cart')||$('body').hasClass('woocommerce-checkout')){return};e.preventDefault();kapee.imagelazyload();if(!miniCartSidebar.hasClass('opened')){miniCartSidebar.addClass('opened');closeSidebar.addClass('opened')}
setTimeout(function(){kapee.imagelazyload()},200)});kapee.$body.on('click','.kapee-mask-overaly, .close-sidebar',function(e){e.preventDefault();miniCartSidebar.removeClass('opened');closeSidebar.removeClass('opened');mobileSidebar.removeClass('opened')});kapee.$doc.keyup(function(e){if(e.keyCode===27){miniCartSidebar.removeClass('opened');closeSidebar.removeClass('opened')}})};kapee.addToWishlist=function(){kapee.$body.on("click",".add_to_wishlist",function(){var tooltip_hide=('.yith-wcwl-add-to-wishlist a');$(tooltip_hide).tooltip('hide');$(this).addClass("loading")})}
kapee.wishlistCount=function(){var kapee_ajax_wishlist_count=function(){$.ajax({type:'POST',url:yith_wcwl_l10n.ajax_url,data:{action:'kapee_ajax_wishlist_count',nonce:kapee_options.nonce,},beforeSend:function(){},complete:function(){},success:function(data){$('span.header-wishlist-count').html(data);kapee.tooltip()}})};$('body').on('added_to_wishlist removed_from_wishlist',kapee_ajax_wishlist_count)};kapee.addToCompare=function(){var button=$("a.compare");kapee.$body.on("click","a.compare",function(){$(this).addClass("loading")});kapee.$body.on("yith_woocompare_open_popup",function(){button.removeClass("loading");kapee.$body.addClass("compare-opened")});kapee.$body.on('click','#cboxClose, #cboxOverlay',function(){kapee.$body.removeClass("compare-opened")})}
kapee.removeToCompare=function(){kapee.$body.on("click",".compare-list tr.remove a",function(){$(this).addClass('loading')})}
kapee.addToCart=function(){$('body').on('added_to_cart',function(event,fragments,cart_hash){if($('.header-cart').length>0){if(kapee_options.product_open_cart_mini=='1'){$('.header-cart').trigger('click')}}});$(document.body).on('updated_cart_totals',function(){setTimeout(function(){kapee.imagelazyload()},200)})};kapee.addToCartAjax=function(){if(!kapee_options.product_add_to_cart_ajax){return}
$('.single_add_to_cart_button').addClass('single_add_to_cart_ajax_button');kapee.$body.find('form.cart').on('click','.single_add_to_cart_button',function(e){var $productWrapper=$(this).parents('.single-product-page');if($productWrapper.hasClass('product-type-external'))return;var $form=$(this).closest('form.cart'),$singleBtn=$(this),product_id=$form.find('input[name=add-to-cart]').val()||$singleBtn.val();if($singleBtn.hasClass('disabled')){return}
if($singleBtn.hasClass('quick-buy-proceed')){return}
if($form.length>0){e.preventDefault()}else{return}
var data={action:'kapee_ajax_add_to_cart','add-to-cart':product_id,nonce:kapee_options.nonce,};$form.serializeArray().forEach(function(element){data[element.name]=element.value});if($singleBtn.hasClass('loading')){return}
$singleBtn.addClass('loading');$(document.body).trigger('adding_to_cart',[$singleBtn,data]);$.ajax({type:'post',url:kapee_options.ajax_url,data:data,beforeSend:function(response){$singleBtn.removeClass('added').removeClass('not-added')},success:function(response){if(response.error&response.product_url){window.location=response.product_url;return}else{if(typeof wc_add_to_cart_params!=='undefined'){if(wc_add_to_cart_params.cart_redirect_after_add==='yes'){window.location=wc_add_to_cart_params.cart_url;return}}
if(response.notices.indexOf('error')>0){$('.woocommerce-notices-wrapper').empty().append(response.notices);$singleBtn.addClass('not-added').removeClass('loading')}else{if(kapee_options.product_open_cart_mini=='1'){$('.header-cart').trigger('click')}
$singleBtn.addClass('added').removeClass('loading');$(document.body).trigger('added_to_cart',[response.fragments,response.cart_hash,$singleBtn])}}},})})};kapee.productQuickView=function(){kapee.$doc.on("click",".quickview-btn",function(e){e.preventDefault();var $btn=$(this),pid;if($btn.hasClass('loading'))return;$btn.addClass('loading');var pid=$btn.attr('data-id');$.ajax({url:kapee_options.ajax_url,data:{action:'kapee_product_quick_view',pid:pid,nonce:kapee_options.nonce,},timeout:10000,success:function(response){$.magnificPopup.open({alignTop:!0,removalDelay:500,overflowY:'scroll',items:{src:''+response+'
',type:'inline'},callbacks:{open:function(){},beforeClose:function(){var quickViewWrap=$('.kapee-quick-view');quickViewWrap.addClass('fadeOutRight')},},});kapee.productGallerySlickSlider();setTimeout(function(){var form_variation=$('.product-quick-view').find('.variations_form');if(form_variation.length>0){form_variation.trigger('check_variations');form_variation.trigger('reset_image');form_variation.wc_variation_form();form_variation.find('select').change();kapee.singlePageSwatch()}
var quickViewWrap=$('.kapee-quick-view');var imgHeight=quickViewWrap.find('.images').outerHeight()+30;var minHeight=450;if(imgHeight div').css({'height':imgHeight});$(".kapee-scroll").nanoScroller({paneClass:'kapee-scroll-pane',sliderClass:'kapee-scroll-slider',contentClass:'kapee-scroll-content',preventPageScrolling:!1})},1000);$btn.removeClass('loading');kapee.addToCartAjax();kapee.productQuickShop();kapee.tooltip();kapee.imagelazyload()},error:function(error){console.log(error);$btn.removeClass('loading')},})})}
kapee.productShowFilter=function(){$('.product-show .show-number').on('change',function(){var url=$(this).val();if(kapee.$body.hasClass('kapee-catalog-ajax-filter')){$(document.body).trigger('kapee_shop_filter_ajax',url,$(this))}else{if(url){window.location=url}
return!1}})}
kapee.priceSlider=function(){if(typeof woocommerce_price_slider_params==='undefined'){return!1}
if(!$('#main-content').find('.widget_price_filter').length){return!1}
$('input#min_price, input#max_price').hide();$('.price_slider, .price_label').show();var min_price=$('.price_slider_amount #min_price').data('min'),max_price=$('.price_slider_amount #max_price').data('max'),current_min_price=parseInt(min_price,10),current_max_price=parseInt(max_price,10);if($('.price_slider_amount #min_price').val()!=''){current_min_price=parseInt($('.price_slider_amount #min_price').val(),10)}
if($('.price_slider_amount #max_price').val()!=''){current_max_price=parseInt($('.price_slider_amount #max_price').val(),10)}
$(document.body).on('price_slider_create price_slider_slide',function(event,min,max){if(woocommerce_price_slider_params.currency_pos==='left'){$('.price_slider_amount span.from').html(woocommerce_price_slider_params.currency_symbol+min);$('.price_slider_amount span.to').html(woocommerce_price_slider_params.currency_symbol+max)}else if(woocommerce_price_slider_params.currency_pos==='left_space'){$('.price_slider_amount span.from').html(woocommerce_price_slider_params.currency_symbol+' '+min);$('.price_slider_amount span.to').html(woocommerce_price_slider_params.currency_symbol+' '+max)}else if(woocommerce_price_slider_params.currency_pos==='right'){$('.price_slider_amount span.from').html(min+woocommerce_price_slider_params.currency_symbol);$('.price_slider_amount span.to').html(max+woocommerce_price_slider_params.currency_symbol)}else if(woocommerce_price_slider_params.currency_pos==='right_space'){$('.price_slider_amount span.from').html(min+' '+woocommerce_price_slider_params.currency_symbol);$('.price_slider_amount span.to').html(max+' '+woocommerce_price_slider_params.currency_symbol)}
$(document.body).trigger('price_slider_updated',[min,max])});if(typeof $.fn.slider!=='undefined'){$('.price_slider').slider({range:!0,animate:!0,min:min_price,max:max_price,values:[current_min_price,current_max_price],create:function(){$('.price_slider_amount #min_price').val(current_min_price);$('.price_slider_amount #max_price').val(current_max_price);$(document.body).trigger('price_slider_create',[current_min_price,current_max_price])},slide:function(event,ui){$('input#min_price').val(ui.values[0]);$('input#max_price').val(ui.values[1]);$(document.body).trigger('price_slider_slide',[ui.values[0],ui.values[1]])},change:function(event,ui){$(document.body).trigger('price_slider_change',[ui.values[0],ui.values[1]])}})}};kapee.productShowHideFilters=function(){$('.archive.woocommerce').on('click','.kapee-product-filter-btn',function(e){var $this=$(this),filter_content=$('#kapee-filter-widgets');$this.toggleClass("active");filter_content.toggleClass('active');filter_content.slideToggle('slow')})}
kapee.productFilterAjax=function(){if(!kapee.$body.hasClass('kapee-catalog-ajax-filter')){return}
$(document.body).on('price_slider_change',function(event,ui){var form=$('.price_slider').closest('form').get(0),$form=$(form),url=$form.attr('action')+'?'+$form.serialize();$(document.body).trigger('kapee_shop_filter_ajax',url,$(this))});kapee.$body.on('click','.widget_product_categories ul a, .widget_rating_filter ul a, .widget_layered_nav_filters ul a, .widget_product_tag_cloud a',function(e){e.preventDefault();var url=$(this).attr('href');$(document.body).trigger('kapee_shop_filter_ajax',url,$(this))});kapee.$body.on('click','.products-view a',function(e){e.preventDefault();var $this=$(this),url=$this.attr('href');$this.siblings().removeClass("active");$this.addClass('active');$(document.body).trigger('kapee_shop_filter_ajax',url,$this)});$('.archive.woocommerce').on('change','.product-show .show-number',function(e){e.stopPropagation();var $this=$(this);var url=$this.val();$(document.body).trigger('kapee_shop_filter_ajax',url,$this)});$(document).on('click','.kapee-pagination .page-numbers:not(.current)',function(e){e.preventDefault();var $this=$(this);var url=$this.attr('href');$(document.body).trigger('kapee_shop_filter_ajax',url,$this)});$('.archive.woocommerce').find('.woocommerce-ordering').off('change');$('.archive.woocommerce').on('change','.woocommerce-ordering',function(e){var $this=$(this);var $select=$(e.currentTarget).find('.orderby');var url=window.location.href.replace(/&orderby(=[^&]*)?|^orderby(=[^&]*)?&?/g,'').replace(/\?orderby(=[^&]*)?|^orderby(=[^&]*)?&?/g,'?').replace(/\?$/g,'');if(url.indexOf('?')!==-1){url=url+('&orderby='+$select.val())}else{url=url+('?orderby='+$select.val())}
$(document.body).trigger('kapee_shop_filter_ajax',url,$this)});$('.archive.woocommerce').on('click','.kapee_widget_product_sorting li',function(e){e.preventDefault();var $this=$(this);var element=$this.find('a');var url=$this.find('a').attr('href');$this.siblings().removeClass("chosen");if($this.hasClass('chosen')){$this.removeClass('chosen')}else{$this.addClass('chosen')};$(document.body).trigger('kapee_shop_filter_ajax',url,element)});$('.archive.woocommerce').on('click','.widget_layered_nav_filters a, .kapee-clear-filters-wrapp a',function(e){e.preventDefault();var $this=$(this);var url=$this.attr('href');$(document.body).trigger('kapee_shop_filter_ajax',url,$this)});$('.archive.woocommerce').on('click','.widget_layered_nav li,.widget_rating_filter li,.widget_layered_nav_filters li',function(e){e.preventDefault();var $this=$(this);var element=$this.find('a');var url=$this.find('a').attr('href');if($this.hasClass('chosen')){$this.removeClass('chosen')}else{$this.addClass('chosen')};$(document.body).trigger('kapee_shop_filter_ajax',url,element)});$(document.body).on('kapee_shop_filter_ajax',function(e,url,element){var $page_title=$('#page-title'),$product_container=$('#main-content .products-wrap'),$main_content=$('#main-content');$('#kapee-filter-widgets').slideUp(200);if($product_container.length>0){var position=$('.products').offset().top-200;$('html, body').stop().animate({scrollTop:position},1200)}
if('?'==url.slice(-1)){url=url.slice(0,-1)}
url=url.replace(/%2C/g,',');history.pushState(null,null,url);$(document.body).trigger('kapee_ajax_filter_before_send_request',[url,element]);if(kapee.ajaxXHR){kapee.ajaxXHR.abort()}
kapee.ajaxXHR=$.get(url,function(res){$main_content.replaceWith($(res).find('#main-content'));$page_title.replaceWith($(res).find('#page-title').clone());$(document.body).trigger('kapee_ajax_filter_request_end',[res,url])},'html')});$(document.body).on('kapee_ajax_filter_before_send_request',function(){var $product_container=$('#main-content .products-wrap');$product_container.addClass('products_overlay');$product_container.append('');$('#secondary').removeClass('opened');$('.kapee-mask-overaly').removeClass('opened')});$(document.body).on('kapee_ajax_filter_request_end',function(){kapee.priceSlider();kapee.kapeeOwlCarousel();kapee.initAjaxLoad();kapee.tooltip();kapee.imagelazyload();kapee.widgetToggle();kapee.widgetMenuToggle();kapee.widgetMaxLimitItem();kapee.canvasSidebar();kapee.stickySidebar();kapee.swatchInLoop();kapee.productQuickView();$('.kapee-mask-overaly').removeClass('opened')})}
kapee.productHover=function(){$('.product-style-4 .product').mouseenter(function(){var product_elemnt=$(this);var product_info_elemnt=product_elemnt.find('.product-info');var variations_elemnt=product_elemnt.find('.product-variations');var variations_height=variations_elemnt.height();if(variations_height&&variations_height>0){product_info_elemnt.css('transform','translate3d(0px, -'+variations_height+'px, 0px)')}}).mouseleave(function(){var product_elemnt=$(this);var product_info_elemnt=product_elemnt.find('.product-info');if(product_info_elemnt){product_info_elemnt.css('transform','translate3d(0px, 0px, 0px)')}})};kapee.productSwatch=function(){this.singlePageSwatch();this.swatchInLoop()}
kapee.singlePageSwatch=function(){var self=this,variationForm=kapee.$doc.find('form.kapee-swatches-wrap.variations_form'),$term=variationForm.find('.swatch-term'),$activeTerm=variationForm.find('.swatch-term:not(.swatch-disabled)');self.$swatchForm=variationForm;$term.each(function(){var $this=$(this),term=$this.attr('data-term'),attr=$this.parent().attr('data-attribute'),$selectbox=self.$swatchForm.find('select#'+attr),val=$selectbox.val();if(val!=''&&term==val){$(this).addClass('swatch-selected')}});$activeTerm.unbind('click').on('click',function(){var $this=$(this),term=$this.attr('data-term'),attr=$this.parent().attr('data-attribute'),$selectbox=self.$swatchForm.find('select#'+attr);if($this.hasClass('swatch-disabled')){return!1}
$selectbox.val(term).trigger('change');$this.closest('.kapee-swatches').find('.swatch-selected').removeClass('swatch-selected');$this.addClass('swatch-selected')});self.$swatchForm.on('woocommerce_update_variation_values',function(){self.$swatchForm.find('select').each(function(){var $this=$(this);var $swatch=$this.parent().parent().find('.kapee-swatches');$swatch.find('.swatch-term').removeClass('swatch-enabled').addClass('swatch-disabled');$this.find('option.enabled').each(function(){var val=$(this).val();$swatch.find('.swatch-term[data-term="'+val+'"]').removeClass('swatch-disabled').addClass('swatch-enabled')})})});self.$swatchForm.on('reset_data',function(){$term.each(function(){var $this=$(this),term=$this.attr('data-term'),attr=$this.parent().attr('data-attribute'),$selectbox=self.$swatchForm.find('select#'+attr),val=$selectbox.val();if(val!=''&&term==val){$(this).addClass('swatch-selected')}else{$(this).removeClass('swatch-selected')}})})}
kapee.swatchInLoop=function(){var self=this,swatchesInLoop=kapee.$doc.find('div.kapee-swatches-wrap');self.$swatches=swatchesInLoop;self.$swatches.each(function(){var $swatches=$(this),$term=$swatches.find('.swatch-term:not(.swatch-disabled)'),$resetBtn=$swatches.find('.reset_variations--loop'),$product=$swatches.closest('.product'),variationData=$.parseJSON($swatches.attr('data-product_variations'));if($swatches.find('.kapee-swatches').length==0){$swatches.addClass('swatch-empty')}
$term.unbind('click').on('click',function(){var $this=$(this);if($this.hasClass('swatch-disabled')){return!1}
var term=$this.attr('data-term');$product.find('.swatch-term').removeClass('swatch-disabled swatch-enabled');$this.parent().find('.swatch-term.swatch-selected').removeClass('swatch-selected');if($this.hasClass('swatch-selected')){$this.parent().removeClass('swatch-activated');$product.removeClass('swatch-product-swatched');if(!$product.find('.swatch-selected').length){$resetBtn.trigger('click')}}else{$this.parent().addClass('swatch-activated');$this.addClass('swatch-selected');$product.addClass('swatch-product-swatched')}
var attributes=self.getChosenAttributes($swatches),currentAttributes=attributes.data;if(attributes.count===attributes.chosenCount){self.updateAttributes($swatches,variationData);var matching_variations=self.findMatchingVariations(variationData,currentAttributes),variation=matching_variations.shift();if(variation){self.foundVariation($swatches,variation)}else{$resetBtn.trigger('click')}}else{self.updateAttributes($swatches,variationData)}});$resetBtn.unbind('click').on('click',function(){$product.removeClass('swatch-product-swatched');$swatches.removeAttr('data-variation_id');$swatches.find('.swatch-swatch').removeClass('swatch-activated');$swatches.find('.swatch-term').removeClass('swatch-enabled swatch-disabled swatch-selected');self.variationsImageUpdate(!1,$product);$(this).hide();return!1})})};kapee.getChosenAttributes=function($swatches){var data={},count=0,chosen=0,$swatch=$swatches.find('.kapee-swatches');$swatch.each(function(){var attribute_name='attribute_'+$(this).attr('data-attribute'),value=$(this).find('.swatch-term.swatch-selected').attr('data-term')||'';if(value.length>0){chosen++}
count++;data[attribute_name]=value});return{'count':count,'chosenCount':chosen,'data':data,}}
kapee.updateAttributes=function($swatches,variationData){var self=this,attributes=self.getChosenAttributes($swatches),currentAttributes=attributes.data,available_options_count=0,$swatch=$swatches.find('.kapee-swatches');$swatch.each(function(idx,el){var current_attr_sw=$(el),current_attr_name='attribute_'+current_attr_sw.attr('data-attribute'),selected_attr_val=current_attr_sw.find('.swatch-term.swatch-selected').attr('data-term'),selected_attr_val_valid=!0,checkAttributes=$.extend(!0,{},currentAttributes);checkAttributes[current_attr_name]='';var variations=self.findMatchingVariations(variationData,checkAttributes);for(var num in variations){if(typeof variations[num]!=='undefined'){var variationAttributes=variations[num].attributes;for(var attr_name in variationAttributes){if(variationAttributes.hasOwnProperty(attr_name)){var attr_val=variationAttributes[attr_name],variation_active='';if(attr_name===current_attr_name){if(variations[num].variation_is_active){variation_active='enabled'}
if(attr_val){current_attr_sw.find('.swatch-term[data-term="'+attr_val+'"]').addClass('swatch-'+variation_active)}else{current_attr_sw.find('.swatch-term').addClass('swatch-'+variation_active)}}}}}}
available_options_count=current_attr_sw.find('.swatch-term.swatch-enabled').length;if(selected_attr_val&&(available_options_count===0||current_attr_sw.find('.swatch-term.swatch-enabled[data-term="'+self.addSlashes(selected_attr_val)+'"]').length===0)){selected_attr_val_valid=!1}
current_attr_sw.find('.swatch-term:not(.swatch-enabled)').addClass('swatch-disabled');if(selected_attr_val){if(!selected_attr_val_valid){current_attr_sw.find('.swatch-term.swatch-selected').removeClass('swatch-selected')}}else{current_attr_sw.find('.swatch-term.swatch-selected').removeClass('swatch-selected')}})}
kapee.addSlashes=function(string){string=string.replace(/'/g,'\\\'');string=string.replace(/"/g,'\\\"');return string}
kapee.findMatchingVariations=function(variationData,settings){var matching=[];for(var i=0;i1){self.setVariationAttr($product_img,'src',variation.image_src[0]);self.setVariationAttr($product_img,'srcset',variation.image_srcset);self.setVariationAttr($product_img,'sizes',variation.image_sizes)}else{self.resetVariationAttr($product_img,'src');self.resetVariationAttr($product_img,'srcset');self.resetVariationAttr($product_img,'sizes')}}
kapee.initAjaxLoad=function(){var button=$('.kapee-ajax-load');button.each(function(i,val){var _option=$(this).data();if(_option!==undefined){var page=_option.total_page,container=_option.container,container_element=_option.container_element,layout=_option.layout,load_more_label=_option.load_more_label,loading_finished_msg=_option.loading_finished_msg,loading_msg=kapee_options.js_translate_text.loading_txt,isLoading=!1,anchor=$(val).find('a'),next=$(anchor).attr('href'),i=2;if(layout=='load-more-button'){$(val).on('click','a',function(e){e.preventDefault();anchor=$(val).find('a');next=$(anchor).attr('href');$(anchor).html(' '+loading_msg+'');getData()})}else if(layout=='infinity-scroll'){var animationFrame=function(){anchor=$(val).find('a');next=$(anchor).attr('href');var bottomOffset=$('.'+container).offset().top+$('.'+container).height()-$(window).scrollTop();if(bottomOffset0&&!isLoading){if(!next)
return;isLoading=!0;if(page>=i){$(anchor).html(' '+loading_msg+'');getData()}}}
var scrollHandler=function(){requestAnimationFrame(animationFrame)};$(window).scroll(scrollHandler)}
var getData=function(){$.get(next+'',function(data){var content=$('.'+container,data).wrapInner('').html(),newElement=$('.'+container,data).find('.'+container_element);next=$(anchor,data).attr('href');if($('.masonry-grid').length>0){$('.'+container).append(newElement).isotope('appended',newElement);$('.'+container).imagesLoaded().progress(function(){$('.'+container).isotope('layout')})}else{$('.'+container).append(newElement)}
$(anchor).text(load_more_label);if(page>i){if(kapee_options.permalink=='plain'){var link=next.replace(/paged=+[0-9]+/gi,'paged='+(i+1))}else{var link=next.replace(/page\/+[0-9]+\//gi,'page/'+(i+1)+'/')}
$(anchor).attr('href',link)}else{$(anchor).text(loading_finished_msg);$(anchor).attr('href','javascript:void(0);').addClass('disabled')}
isLoading=!1;i++;kapee.initMagnaficPopup();kapee.priceSlider();kapee.kapeeOwlCarousel();kapee.tooltip();kapee.imagelazyload();kapee.widgetToggle();kapee.widgetMenuToggle();kapee.widgetMaxLimitItem();kapee.canvasSidebar();kapee.stickySidebar();kapee.swatchInLoop();kapee.productQuickView()})}}})}
kapee.loadmoreProducts=function(){var load_more_products_button=$('.kapee-products-load-more');$('.kapee-products-load-more .kapee-load-more').on('click',function(){var load_more_btn=$(this);var page=parseInt(load_more_btn.attr('data-page'));var attr=load_more_btn.attr('data-attribute');var post_wrap=load_more_btn.closest('.kapee-element').find('.products-wrap');var wrap_id=load_more_btn.closest('.kapee-element').attr('id');var data={action:'kapee_loadmore_product',nonce:kapee_options.nonce,attr:attr,page:page,};if(load_more_btn.hasClass('loading')){return!1}
kapee.loadAjaxPost(load_more_btn,data,post_wrap,wrap_id)});var animationFrame=function(){$('.kapee-products-load-more a.infinity-scroll').each(function(i,val){var load_more_btn=$(this);var page=parseInt(load_more_btn.attr('data-page'));var attr=load_more_btn.attr('data-attribute');var post_wrap=load_more_btn.closest('.kapee-element').find('.products-wrap');var wrap_id=load_more_btn.closest('.kapee-element').attr('id');var bottomOffset=post_wrap.offset().top+post_wrap.height()-$(window).scrollTop();if(bottomOffset0){var page=parseInt(load_more_btn.attr('data-page'));if(!load_more_btn.hasClass('kapee-loadmore-disabled')){if(!kapee.isPostLoading){kapee.isPostLoading=!0;load_more_btn.trigger('click')}}}})}
var scrollHandler=function(){requestAnimationFrame(animationFrame)};$(window).scroll(scrollHandler)}
kapee.loadAjaxPost=function(btn,data,element_wrap,parantElement){var load_more_label=btn.data('load_more_label');var loading_finished_msg=btn.data('loading_finished_msg');var label_txt='';btn.addClass('process');if(btn.hasClass('kapee-loadmore-disabled')){return}
btn.html(' '+kapee_options.js_translate_text.loading_txt+'');$.ajax({url:kapee_options.ajax_url,data:data,dataType:'json',method:'POST',success:function(response){var items=$(''+response.html+'');if($.trim(response.success)=='ok'){if($('.masonry-grid').length>0){setTimeout(function(){element_wrap.imagesLoaded().masonry().append(items).masonry('appended',items).masonry('layout')},500)}else{element_wrap.append(items)}
if($.trim(response.show_bt)=='0'){$('#'+parantElement+' .kapee-load-more').addClass('disabled kapee-loadmore-disabled').html(loading_finished_msg)}else{$('#'+parantElement+' .kapee-load-more').attr('data-page',data.page+1);btn.html(load_more_label)}}},error:function(data){console.log('ajax error')},complete:function(){kapee.isPostLoading=!1;kapee.imagelazyload();kapee.initMagnaficPopup();kapee.swatchInLoop();kapee.tooltip();kapee.productQuickView();btn.removeClass('process')},})}
kapee.tooltip=function(){var tooltip_left=('.whishlist-button a,.yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a,.product-style-2:not(.list-view) .product-buttons .cart-button,.product-style-2:not(.list-view) .product-buttons .compare-button a,.product-style-2:not(.list-view) .product-buttons .quickview-button a');$(tooltip_left).tooltip({animation:!1,container:'body',trigger:'hover',placement:!kapee.isCheckRTL()?'left':'right',title:function(){return $(this).text()}});$('.products:not(.list-view):not(.product-style-1.grid-columns-4):not(.product-style-1.grid-columns-3):not(.product-style-1.grid-columns-6):not(.product-style-3.grid-columns-4):not(.product-style-3.grid-columns-3):not(.product-style-3.grid-columns-6):not(.product-style-4.grid-columns-4):not(.product-style-4.grid-columns-3):not(.product-style-4.grid-columns-6):not(.product-style-5.grid-columns-4):not(.product-style-5.grid-columns-3):not(.product-style-5.grid-columns-6) .product-buttons .cart-button,.has-sidebar .products:not(.list-view):not(.product-style-1.grid-columns-4):not(.product-style-1.grid-columns-6):not(.product-style-3.grid-columns-4):not(.product-style-3.grid-columns-6):not(.product-style-4.grid-columns-4):not(.product-style-4.grid-columns-6):not(.product-style-5.grid-columns-4):not(.product-style-5.grid-columns-6) .product-buttons .cart-button,.product-buttons .compare-button a,.product-buttons .quickview-button a,.kapee-tooltip').tooltip({animation:!1,container:'body',trigger:'hover',title:function(){if($(this).find('.added_to_cart').length>0)return $(this).find('.add_to_cart_button').text();return $(this).text()}})}
kapee.productImageZoom=function(){if(!kapee_options.product_image_zoom){return}
if($('.product-gallery-image .woocommerce-product-gallery__image').length>0){var img=$('.product-gallery-image .woocommerce-product-gallery__image');img.zoom({touch:!1})}};kapee.productGallerySlickSlider=function(){$('.kapee-slick-slider').not('.slick-initialized').slick();$('.product-gallery-image.kapee-slick-slider').on('afterChange',function(event,slick,currentSlide,nextSlide){$('.slick-slide').removeClass('flex-active-slide');$('.slick-current').addClass('flex-active-slide')});$(document).on('found_variation','.variations_form',function(es,variation){if(variation&&variation.image&&variation.image.src&&variation.image.src.length>1){$('.kapee-slick-slider').slick('slickGoTo',0)}}).on('reset_image',function(){$('.kapee-slick-slider').slick('slickGoTo',0)})};kapee.productSaleCountdown=function(){$('.product-countdown').each(function(){var $this=$(this),template='',data=$this.data(),until=new Date(data.year,data.month-1||0,data.day||1,data.hours||0,data.minutes||0,data.seconds||0);if(data.countdown_style=='countdown-box'){template='{dnn}'+kapee_options.js_translate_text.days_text+'{hnn}'+kapee_options.js_translate_text.hours_text+'{mnn}'+kapee_options.js_translate_text.mins_text+'{snn}'+kapee_options.js_translate_text.secs_text+''}else{template='{dnn}'+kapee_options.js_translate_text.sdays_text+':{hnn}'+kapee_options.js_translate_text.shours_text+':{mnn}'+kapee_options.js_translate_text.smins_text+':{snn}'+kapee_options.js_translate_text.ssecs_text}
$this.countdown({until:until,format:'DHMS',layout:template,isRTL:!1})})};kapee.productReviewLink=function(){$('.woocommerce-product-rating .rating-counts').on('click',function(e){$('.woocommerce-review-link').trigger('click');var tabpanel='#tab-title-reviews';$('html,body').animate({scrollTop:$(tabpanel).offset().top-100},750)})};kapee.productPriceSummary=function(){$(document).on('click','.kapee-mobile-device .exclamation-mark.open',function(){var _this=$(this);_this.removeClass('open');_this.find('.kapee-arrow').addClass('active')});$(document).on('click','.kapee-mobile-device .product-price-summary .kapee-close',function(){$('.product-price-summary .kapee-arrow').removeClass('active');$('.product-price-summary').addClass('open')})};kapee.getProductSizeChart=function(){$('.kapee-ajax-size-chart').on('click',function(e){e.preventDefault();var id=$(this).data('id');var data={action:'kapee_ajax_get_size_chart','id':id,nonce:kapee_options.nonce,};var chart_btn=$(this);if(chart_btn.hasClass('loading')){return!1}
chart_btn.addClass('loading');$.ajax({type:'post',url:kapee_options.ajax_url,data:data,beforeSend:function(response){},complete:function(response){chart_btn.removeClass('loading')},success:function(response){$(this).magnificPopup({removalDelay:500,items:{src:response,type:'inline'},callbacks:{open:function(){var popupWrap=$('.kapee-product-sizechart');popupWrap.addClass('animated fadeInLeft')},beforeClose:function(){var popupWrap=$('.kapee-product-sizechart');popupWrap.removeClass('fadeInLeft').addClass('fadeOutRight')},close:function(){var popupWrap=$('.kapee-product-sizechart');popupWrap.removeClass('animated fadeOutRight')}},}).magnificPopup('open')},})})}
kapee.getProductTermsConditions=function(){var cache=[];$('.kapee-ajax-block').on('click',function(e){e.preventDefault();$(document).find('.product-term-detail').removeClass('active');var html="
";var process=!1;var $this=$(this);var content=$(this).closest('.product-term-wrap').find('.product-term-detail');var id=$(this).data('id');if(id==''){return!1}
if(cache['term_condition_'+id]){$(".product-term-detail").not(content).removeClass('active');if(content.length){content.addClass('active')}else{$(this).after(html);$this.closest('.product-term-wrap').find('.product-term-detail').addClass('active').html(cache['term_condition_'+id])}
return}
var data={action:'kapee_ajax_get_product_terms_conditions','id':id,nonce:kapee_options.nonce,};$(this).after(html);$.ajax({type:'post',url:kapee_options.ajax_url,data:data,beforeSend:function(response){},complete:function(response){content.removeClass('loading')},success:function(response){$this.closest('.product-term-wrap').find('.product-term-detail').addClass('active').html(response);cache['term_condition_'+id]=response},})});$(document).mouseup(function(e){var container=$(".product-term-wrap");if(!container.is(e.target)&&container.has(e.target).length===0){$(".product-term-detail").removeClass('active')}});$(document).on('click','.product-term-wrap .kapee-close',function(){$(".product-term-detail").removeClass('active')})}
kapee.productQuantityPlusMinus=function(){$(document).on('click','.quantity .plus, .quantity .minus',function(){var $qty=$(this).closest('.quantity').find('.qty'),currentVal=parseFloat($qty.val()),max=parseFloat($qty.attr('max')),min=parseFloat($qty.attr('min')),step=$qty.attr('step');if(!currentVal||currentVal===''||currentVal==='NaN')currentVal=0;if(max===''||max==='NaN')max='';if(min===''||min==='NaN')min=0;if(step==='any'||step===''||step===undefined||parseFloat(step)==='NaN')step='1';if($(this).is('.plus')){if(max&&(max==currentVal||currentVal>max)){$qty.val(max)}else{$qty.val(currentVal+parseFloat(step))}}else{if(min&&(min==currentVal||currentVal0){$qty.val(currentVal-parseFloat(step))}}
$qty.trigger('change')})};kapee.productQuickShop=function(){$('body').on('click','.kapee_quick_buy_button',function(){if(kapee_options.product_add_to_cart_ajax){$('.single_add_to_cart_button').addClass('quick-buy-proceed')}
var $this=$(this);var product_id=$(this).attr('data-product-id');var product_type=$(this).attr('data-product-type');var selected=$('form.cart input#kapee_quick_buy_product_'+product_id);var productform=selected.parent();var submit_btn=productform.find('[type="submit"]');var is_disabled=submit_btn.is(':disabled');if(is_disabled){$('html, body').animate({scrollTop:submit_btn.offset().top-200},900)}else{if(!$this.hasClass('disable')){productform.append('')}
productform.find('.single_add_to_cart_button').trigger('click')}});$('form.cart').change(function(){var is_submit_disabled=$(this).find('[type="submit"]').is(':disabled');if(is_submit_disabled){$('.kapee_quick_buy_button').attr('disabled','disable')}else{$('.kapee_quick_buy_button').removeAttr('disabled')}})}
kapee.productBoughtTogetherInit=function(){var self=this;$('body').on('click','.kapee-bought-together-products .product-checkbox input[type=checkbox]',function(){if($(this).is(":checked")){$(this).closest('.product-wrapper').removeClass('kapee-disable-product')}else{$(this).closest('.product-wrapper').addClass('kapee-disable-product')}
self.productBoughtTogetherChangeEvent()});self.productBoughtTogetherCheckAllItems();self.productBoughtTogetherAddToCart()}
kapee.productBoughtTogetherChangeEvent=function(){var self=this;$('.add-items-to-cart').addClass('loading');var total_price=self.product_bought_together_get_total_price();var addon_total_price=self.product_addons_get_total_price();var total_addon=self.product_bought_together_product_count();if(total_addon){$('.add-items-to-cart').removeAttr("disabled")}else{$('.add-items-to-cart').attr("disabled",!0)}
$('.addons-item .addon-count').html(total_addon);$('.addons-item span.items-price').html(self.kapee_woo_formated_price(addon_total_price));$('.items-total span.total-price').html(self.kapee_woo_formated_price(total_price));$('.add-items-to-cart').removeClass('loading')}
kapee.kapee_woo_formated_price=function(number){var self=this;return self.kapee_formated_price(number,kapee_options.price_thousand_separator,kapee_options.price_decimal_separator,kapee_options.price_decimals,kapee_options.currency_symbol,kapee_options.price_format)}
kapee.kapee_formated_price=function(number,thousand_sep,decimal_sep,tofixed,symbol,woo_price_format){var before_text='';var after_text='';number=number||0;tofixed=!isNaN(tofixed=Math.abs(tofixed))?tofixed:2;symbol=symbol!==undefined?symbol:"$";thousand_sep=thousand_sep||",";decimal_sep=decimal_sep||".";var negative=number<0?"-":"",i=parseInt(number=Math.abs(+number||0).toFixed(tofixed),10)+"",j=(j=i.length)>3?j%3:0;symbol=''+symbol+'';switch(woo_price_format){case '%1$s%2$s':before_text+=symbol;break;case '%1$s %2$s':before_text+=symbol+' ';break;case '%2$s%1$s':after_text+=symbol;break;case '%2$s %1$s':after_text+=' '+symbol;break;default:before_text+=symbol}
var woo_price_return=before_text+negative+(j?i.substr(0,j)+thousand_sep:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+thousand_sep)+(tofixed?decimal_sep+Math.abs(number-i).toFixed(tofixed).slice(2):"")+after_text;woo_price_return=''+woo_price_return+'';return woo_price_return}
kapee.productBoughtTogetherCheckAllItems=function(){var self=this;$('body').on('click','.check-all-items',function(){$('.kapee-together-product:checkbox').not(this).prop('checked',this.checked);if($(this).is(":checked")){$('.kapee-together-product:checkbox').prop('checked',!0)}else{$('.kapee-together-product:checkbox').prop("checked",!1)}
self.productBoughtTogetherChangeEvent()})}
kapee.productBoughtTogetherAddToCart=function(){var self=this;$('body').on('click','.add-items-to-cart:not(.loading)',function(e){e.preventDefault();var self_this=$(this);self_this.addClass('loading');var all_product_ids=self.product_bought_together_get_checked_product_ids();var msg='';if(all_product_ids.length===0){msg=kapee_options.bought_together_error}else{setTimeout(function(){for(var i=0;i0)||($('.woocommerce-tabs.tabs-layout').length>0)){var $accordion=$('.tab-content-wrap');var hash=window.location.hash;var url=window.location.href;if(hash.toLowerCase().indexOf('comment-')>=0||hash==='#reviews'||hash==='#tab-reviews'){$accordion.find('.title-reviews').addClass('open')}else if(url.indexOf('comment-page-')>0||url.indexOf('cpage=')>0){$accordion.find('.title-reviews').addClass('open')}else if(hash==='#tab-additional_information'){$accordion.find('.title-additional_information').addClass('open')}else{$accordion.find('.accordion-title').first().addClass('open')}
$accordion.on('click','.accordion-title',function(e){e.preventDefault();$(this).parent().siblings().find('.woocommerce-Tabs-panel').slideUp('fast');$(".accordion-title").not($(this)).removeClass("open");$(this).toggleClass("open").next().slideToggle('fast')});$(document).on('click','a.woocommerce-review-link',function(e){$accordion.find('.accordion-title').removeClass("open");$accordion.find('.title-reviews').addClass("open")})}}
kapee.wooProductTabsToggle=function(){if($('.woocommerce-tabs.toggle-layout').length>0){var $accordion=$('.tab-content-wrap');$accordion.find('.accordion-title').addClass('open');$accordion.find('.woocommerce-Tabs-panel').css("display","block");$accordion.on('click','.accordion-title',function(e){e.preventDefault();var accordion=$(this);var accordionContent=accordion.next('.woocommerce-Tabs-panel');accordion.toggleClass("open");accordionContent.slideToggle(250)});$(document).on('click','a.woocommerce-review-link',function(e){e.stopPropagation()})}}
kapee.wooCheckoutStep=function(){var btn_next=$('.checkout-next-step'),wooStepWrap=$('#checkout-wrapper .panel.panel-default'),mutistepCheckout=$('#multi-step-checkout');if(mutistepCheckout.length>0){var formscrollTo=mutistepCheckout.offset().top-30}
btn_next.on('click',function(){var currentPanel=$(this).closest("div.panel.panel-default"),this_btn=$(this),currentstep=currentPanel.data('step'),steptitle=currentPanel.data('steptitle'),nextPanel_id=this_btn.data("next"),nextPanel=$("#"+nextPanel_id),billing=$('#customer_billing_details'),shipping=$('#customer_shipping_details'),selector=null,valid=!1,$offset=30,posted_data={};this_btn.addClass('loading');$('form.woocommerce-checkout .woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout').remove();if(steptitle=='billing'||steptitle=='shipping'){if(steptitle=='billing'){selector=billing}
if(steptitle=='shipping'){selector=shipping}
$(selector).find('.validate-required input').each(function(){posted_data[$(this).attr('name')]=$(this).val()});$(selector).find('.validate-required select').each(function(){posted_data[$(this).attr('name')]=$(this).val()});$(selector).find('.input-checkbox').each(function(){if($(this).is(':checked')){posted_data[$(this).attr('name')]=$(this).val()}});var data={action:'kapee_validate_checkout',type:steptitle,posted_data:posted_data,nonce:kapee_options.nonce,};$.ajax({type:'POST',url:kapee_options.ajax_url,data:data,async:!1,success:function(response){valid=response.valid;if(!response.valid){currentPanel.find('.panel-body').prepend(response.html);$('html, body').animate({scrollTop:$('form.woocommerce-checkout').offset().top-$offset},'slow')}
this_btn.removeClass('loading')},complete:function(){}})}else{valid=!0}
if(valid){}else{return!1}
if($(nextPanel).hasClass('hidden')){currentPanel.removeClass('active');currentPanel.addClass('completed');currentPanel.find('.panel-collapse').slideUp('slow').removeClass('show');this_btn.removeClass('loading');$(nextPanel).removeClass('hidden');$(nextPanel).addClass('active');$(nextPanel).find('.panel-collapse').slideDown('slow').addClass('show');$('html, body').animate({scrollTop:formscrollTo},'slow')}
return!1});$('.edit-action').on('click',function(){var currentPanel=$(this).closest("div.panel.panel-default"),this_btn=$(this),currentstep=currentPanel.data('step');currentPanel.removeClass('completed').addClass('active');currentPanel.find('.panel-collapse').slideDown('slow').addClass('show');kapee_deactivate_steps(currentstep)});function kapee_deactivate_steps(currentstep){var panels=mutistepCheckout.find('.panel');panels.each(function(index){var current_panel=$(this),step=current_panel.data('step');if(currentstep p.price"),$price_summer_inner_discount=$(document).find(".woocommerce div.summary-inner .product-price-discount"),$price_summer_inner_price_summary=$(document).find(".woocommerce div.summary-inner .product-price-summary");if($price_summer_inner_price.length){price_html=$price_summer_inner_price.html()}
if($price_summer_inner_discount.length){discount_html=$price_summer_inner_discount.html()}
if($price_summer_inner_price_summary.length){price_summary_html=$price_summer_inner_price_summary.html()}
$(document).find(".variations_form").on("reset_data",function(){$(document).find(".woocommerce div.summary-inner > p.price").html(price_html);$(document).find(".woocommerce div.summary-inner .product-price-discount").html(discount_html);$(document).find(".woocommerce div.summary-inner .product-price-summary").html(price_summary_html);if($(document).find(".woocommerce .kapee-quick-buy").length){$(document).find(".kapee_quick_buy_button").addClass('disabled')}})}
kapee.variationChangeevent=function(){$(document).find(".variations_form").on("woocommerce_variation_select_change",function(){if($(document).find(".woocommerce .kapee-quick-buy").length){$(document).find(".kapee_quick_buy_button").removeClass('disabled')}
$(document).find(".single_variation_wrap").on("show_variation",function(event,variation){var sell_price=variation.display_price,regular_price=variation.display_regular_price,formate_sell_price,formate_regular_price,total=0,discount_per=0,discount=regular_price-sell_price,formate_discount,price_html=variation.price_html,test_var=1;formate_sell_price=kapee.kapee_formated_price(sell_price,kapee_options.price_thousand_separator,kapee_options.price_decimal_separator,kapee_options.price_decimals,kapee_options.currency_symbol,kapee_options.price_format);formate_regular_price=kapee.kapee_formated_price(regular_price,kapee_options.price_thousand_separator,kapee_options.price_decimal_separator,kapee_options.price_decimals,kapee_options.currency_symbol,kapee_options.price_format);formate_discount=kapee.kapee_formated_price(discount,kapee_options.price_thousand_separator,kapee_options.price_decimal_separator,kapee_options.price_decimals,kapee_options.currency_symbol,kapee_options.price_format);if(sell_price!=regular_price){$(document).find('.woocommerce div.summary-inner .product-price-discount').show();$(document).find('.product-price-summary .discount').show();$(document).find('.product-price-summary .overall-discount').show();discount_per=Math.round(((regular_price-sell_price)/regular_price)*100);$(document).find('.woocommerce div.summary-inner > p.price').html(''+formate_sell_price+' '+formate_regular_price+'');$(document).find('.woocommerce div.summary-inner .product-price-discount .on-sale span').html(discount_per);$(document).find('.product-price-summary .regular-price > span').html(formate_regular_price);$(document).find('.product-price-summary .selling-price span').html(formate_sell_price);$(document).find('.product-price-summary .discount span').html(discount_per+'%');$(document).find('.product-price-summary .total-discount span').html(formate_sell_price);$(document).find('.product-price-summary .overall-discount .amount-discount').html(formate_discount);$(document).find('.product-price-summary .overall-discount .percentage-discount').html('('+discount_per+'%)')}else{$(document).find('.woocommerce div.summary-inner > p.price').html(formate_regular_price);$(document).find('.product-price-summary .regular-price > span').html(formate_regular_price);$(document).find('.product-price-summary .selling-price span').html(formate_regular_price);$(document).find('.product-price-summary .total-discount span').html(formate_regular_price);$(document).find('.woocommerce div.summary-inner .product-price-discount').hide();$(document).find('.product-price-summary .discount').hide();$(document).find('.product-price-summary .overall-discount').hide()}})})}
kapee.wcfm_vendor=function(){if($('#_kp_product_ids').length<=0){return!1}
if(typeof $wcfm_product_select_args==='undefined'){return!1}
$('#_kp_product_ids').select2($wcfm_product_select_args)};kapee.kapeeEqualTabsHeight=function(){setTimeout(function(){$('.products-tab-content').each(function(){var $this=$(this);if($this.find('.tab-content').length){$this.find('.tab-content').css({'height':'auto'});var elem_height=0;$this.find('.tab-content').each(function(){var this_elem_h=$(this).height();if(elem_height0)return;var $layoutMode='masonry';if($('.kapee-image-gallery.image-gallery-masonry-grid').length){$('.kapee-image-gallery.image-gallery-masonry-grid').each(function(){var image_gallery_container=$(this);image_gallery_container.imagesLoaded(function(){image_gallery_container.isotope({itemSelector:'.kapee-gallery',isOriginLeft:!$('body').hasClass('rtl'),layoutMode:$layoutMode})})})}};kapee.BackgroundParallax=function(){if($(window).width()<=1024){return}
$('.kapee-parallax-background').each(function(){var $this=$(this);if($this.hasClass('wpb_column')){$this.find('> .vc_column-inner').parallax("50%",0.3)}else{$this.parallax("50%",0.3)}})};$(document).ready(function(){kapee.kapeePreLoader();kapee.init()});$(window).on('load resize',function(){var product_summery_sticky=$(".single-product-page .summary-inner");var product_images_sticky=$(".single-product-page .product-images .images-inner");var product_summery_sticky_height=product_summery_sticky.height();var product_images_sticky_height=product_images_sticky.height();if($(window).width()>769){var offset=15;if($('#header .header-sticky')[0]){offset=$('#header .header-sticky').height()+30}
if(kapee_options.sticky_image_wrapper){if(product_summery_sticky_height>product_images_sticky_height){product_images_sticky.stick_in_parent({offset_top:offset})}}
if(kapee_options.sticky_summary_wrapper){if(product_summery_sticky_height