(function($){"use strict";function get_cart(){var ajaxurl="";window.wc_add_to_cart_params!=undefined&&(ajaxurl=wc_add_to_cart_params.ajax_url),window.woocommerce_params!=undefined&&(ajaxurl=woocommerce_params.ajax_url),ajaxurl&&$.post({url:ajaxurl,dataType:"JSON",data:{action:"woomenucart_ajax"},success:function(data,textStatus,XMLHttpRequest){$(".uncode-cart-dropdown").html(data.cart),data!=""&&(SiteParameters.uncode_wc_popup_cart_qty?($(".uncode-cart .badge, .mobile-shopping-cart .badge").length?$(".uncode-cart .badge, .mobile-shopping-cart .badge").html(data.articles):$(".uncode-cart .cart-icon-container").append(''+data.articles+""),$(document.body).trigger("uncode_get_cart",[data.articles])):$(".uncode-cart .badge, .mobile-shopping-cart .badge").length?data.articles>0?($(".uncode-cart .badge, .mobile-shopping-cart .badge").html(data.articles),$(".uncode-cart .badge, .mobile-shopping-cart .badge").show()):$(".uncode-cart .badge, .mobile-shopping-cart .badge").hide():$(".uncode-cart .cart-icon-container").append(''+data.articles+""))}})}function remove_from_cart(){$(document).on("click",".uncode-cart-dropdown a.remove",function(e){var $remove=$(this),product_id=$remove.attr("data-product_id"),item_key=$remove.attr("data-item_key"),$li=$remove.parents(".cart-item-list").eq(0).addClass("removing-item").animate({opacity:.5},150);return $.post({dataType:"json",url:wc_add_to_cart_params.ajax_url,data:{action:"woomenucart_remove_ajax",item_key:item_key},success:function(html){$li.slideUp(200,function(){get_cart()})}}),!1})}function reset_product_image(event,variation){var $target=event.target,$row=$target.closest(".row-parent",$row),get_href=$("a.woocommerce-main-image",$row),image_variable=$("> img",get_href),getLightbox=typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced?UNCODE.lightboxArray[get_href.data("lbox")]:!1;SiteParameters.uncode_adaptive==1&&(image_variable.removeClass(["async-done","woocommerce-product-gallery__image-first__img"]).addClass("adaptive-async"),image_variable.wc_reset_variation_attr("src"),image_variable.wc_reset_variation_attr("data-path"),image_variable.wc_reset_variation_attr("data-guid"),UNCODE.adaptive()),getLightbox!=undefined&&getLightbox!==!1?getLightbox.refresh():SiteParameters.lbox_enhanced&&get_href.closest(".woocommerce-product-gallery").trigger("more-items-loaded")}function change_images(event,variation){if($(this).closest(".tmb-woocommerce").length>0)return;UNCODE.single_product_variation_already_changed=!0;if(variation.image_src!==""){var $target=event.target,$row=$target.closest(".row-parent",$row),get_href=$("a.woocommerce-main-image",$row),$col_bg=$(".uncol-featured-image .background-inner",$row),image_variable=$("> img",get_href),image_thumb=variation.image.thumb_src,gallery_thumb=variation.image.gallery_thumbnail_src,image_srcset=variation.image.thumb_srcset,getLightbox=typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced?UNCODE.lightboxArray[get_href.data("lbox")]:!1;get_href.data("options","thumbnail: '"+variation.image_src+"'"),SiteParameters.uncode_adaptive==1&&(image_variable.wc_set_variation_attr("src",variation.image_src),image_variable.wc_set_variation_attr("data-path",variation.uncode_image_path),image_variable.wc_set_variation_attr("data-guid",variation.uncode_image_guid),image_variable.removeClass(["async-done","woocommerce-product-gallery__image-first__img"]).addClass("adaptive-async"),UNCODE.adaptive()),getLightbox!=undefined&&getLightbox!==!1?getLightbox.refresh():SiteParameters.lbox_enhanced&&get_href.closest(".woocommerce-product-gallery").trigger("more-items-loaded"),$(window).trigger("focus");var $woocommerce_product_gallery_nav=$(".woocommerce-product-gallery-nav");if($woocommerce_product_gallery_nav.length){var $first_thumb=$woocommerce_product_gallery_nav.find(".woocommerce-product-gallery__wrapper-nav li.woocommerce-product-gallery__first-thumb img",$row);if(SiteParameters.uncode_adaptive==1){var data_crop=$first_thumb.attr("data-crop"),data_singlew=$first_thumb.attr("data-singlew"),data_singleh=$first_thumb.attr("data-singleh");$first_thumb.attr("src",gallery_thumb).attr("data-path",variation.uncode_image_path).attr("data-guid",variation.uncode_image_guid).attr("data-uniqueid",variation.data_uniqueid).attr("data-width",variation.data_width).attr("data-height",variation.data_height).attr("data-singlew",variation.data_singlew).attr("data-singleh",variation.data_singleh).attr("data-crop",variation.data_crop),$woocommerce_product_gallery_nav.hasClass("lateral-nav-wrapper")||($first_thumb.removeClass(["async-done","adaptive-fetching"]).addClass("adaptive-async"),UNCODE.adaptive())}else $first_thumb.attr("src",gallery_thumb),image_srcset&&$first_thumb.attr("srcset",image_srcset),$(window).trigger("woocommerce_variation_has_loaded")}if($col_bg.length){var objImg=new Image,bg_img_src;$col_bg.hasClass("async-done")?bg_img_src=variation.image_link:bg_img_src=variation.image_src,objImg.src=bg_img_src,objImg.onload=function(){$col_bg.animate({opacity:0},100,function(){$col_bg.css({"background-image":"url("+bg_img_src+")"}),$col_bg.animate({opacity:1},250)})}}}}function reset_data(event){if(UNCODE.single_product_variation_already_changed){var $col_bg=$(".uncol-featured-image .background-inner"),$first_thumb=$(".woocommerce-product-gallery__first-thumb img"),bg_img_src,bg_img_srcset,objImg=new Image;$col_bg.length?(bg_img_src=$col_bg.attr("data-o_src"),objImg=new Image,objImg.src=bg_img_src,objImg.onload=function(){$col_bg.animate({opacity:0},100,function(){$col_bg.css({"background-image":"url("+bg_img_src+")"}),$col_bg.animate({opacity:1},250)})}):$first_thumb.length&&(bg_img_src=$first_thumb.attr("data-o_src"),bg_img_srcset=$first_thumb.attr("data-o_srcset"),objImg=new Image,objImg.src=bg_img_src,objImg.onload=function(){$first_thumb.attr("src",bg_img_src).attr("srcset",bg_img_srcset),$(window).trigger("woocommerce_variation_has_loaded")})}}function check_variation_values(event){var $selects=$(event.currentTarget).find("select"),checkSelectValues=!1;$selects.each(function(){var $select=$(this);$select.val()!==""&&(checkSelectValues=!0)}),checkSelectValues?$(event.currentTarget).removeClass("hide-clear"):$(event.currentTarget).addClass("hide-clear"),setTimeout(function(){$(window).trigger("woocommerce_variation_has_loaded")},1250)}function reloadVariations(){remove_from_cart(),$("body").on("added_to_cart wc_fragments_refreshed removed_from_cart",get_cart),$("body").hasClass("uncode-default-product-gallery")||$(".variations_form").on("show_variation",change_images).on("reset_data",reset_data).on("check_variations",check_variation_values).on("reset_image",reset_product_image)}function handleRatings(){$("#rating").length&&setTimeout(function(){$(".comment-form-rating").each(function(){var $wrap=$(this),$stars=$("p.stars",$wrap).remove();$('select[name="rating"]',$wrap).hide().before('

12345

')})},10)}function redirect_to_custom_empty_cart(){UncodeWCParameters.empty_cart_url!==""&&window.location.replace(UncodeWCParameters.empty_cart_url)}function variation_price_font(){var $forms=$("form.variations_form");$forms.each(function(){var $form=$(this);$form.on("woocommerce_variation_has_changed wc_variation_form",function(){var $var_price=$(".woocommerce-variation-price .woocommerce-Price-amount"),$row=$form.closest(".vc_row"),$main_price=$(".heading-text .woocommerce-Price-amount",$row);if($main_price.length){var $price_wrap=$main_price.closest(".heading-text"),$price_nest=$("> *:first-child",$price_wrap),font_class=$price_nest.attr("class").split(" "),i;for(i=0;i=0||hash==="#reviews"||hash==="#tab-reviews")?($("a",$li).click(),scrollAction=!0):$click_trigger&&(url.indexOf("comment-page-")>0||url.indexOf("cpage=")>0)&&($("a",$li).click(),scrollAction=!0);if(!scrollAction)return!1;var body=$("html, body"),bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-($both_wrapper.length?$both_wrapper.offset().top:0),getOffset=UNCODE.get_scroll_offset();if(typeof $both_wrapper.offset()=="undefined")return;scrollTo=$both_wrapper.offset().top-27,scrollTo-=getOffset;var scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),scrollSpeed==0?body.scrollTop(delta>0?scrollTo-.1:scrollTo):body.animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutQuad")};scrollToReviewsInside(!1),$("a.woocommerce-review-link").on("click",function(e){e.preventDefault(),hash="#reviews",scrollToReviewsInside(!0)})}};$(document).ready(scrollToReviews);var qtyPlusMinus=function(){$(".qty-inset:not(.qty-inset-active)").each(function(){var $qtyInsets=$(this).addClass("qty-inset-active"),$input=$("input.qty",$qtyInsets),$minus=$(".qty-minus",$qtyInsets),$plus=$(".qty-plus",$qtyInsets),step=parseFloat($input.attr("step")),min=parseFloat($input.attr("min")),max=parseFloat($input.attr("max")),value=parseFloat($input.val());isNaN(step)&&(step=1),isNaN(min)&&(min=1),isNaN(value)&&(value=0,$input.val(value)),$minus.on("click",function(){UncodeWCParameters.activate_input_check_on_click&&(step=parseFloat($input.attr("step")),min=parseFloat($input.attr("min")),max=parseFloat($input.attr("max")),isNaN(step)&&(step=1),isNaN(min)&&(min=1)),value=parseFloat($input.val())-step,valuemax&&(value=max),$input.val(value).trigger("change")})})},resizeCartRow=function(){$("form.woocommerce-cart-form").length>0&&window.dispatchEvent(new CustomEvent("vc-resize"))};$(document.body).on("updated_cart_totals",qtyPlusMinus),$(document.body).on("updated_cart_totals",resizeCartRow),$(document).ready(qtyPlusMinus),$(document).on("vc-frontend:vc_button",qtyPlusMinus);var woocommerce_product_gallery=function(){$("body:not(.single-uncodeblock) .woocommerce-product-gallery").each(function(){if($("body").hasClass("uncode-default-product-gallery"))return;var $slider=$(this);UNCODE_WC.product_gallery($slider)})};UNCODE_WC.product_gallery=function($slider){var $parent=$slider.closest(".uncode-wrapper").length?$slider.closest(".uncode-wrapper"):$slider.closest(".uncont"),cols=parseFloat($slider.attr("data-columns")),dots=$parent.attr("data-dots")=="true",gutter=$parent.length&&typeof $parent.attr("data-gutter")!="undefined"?parseFloat($parent.attr("data-gutter")):18,$main=$(".woocommerce-product-gallery__wrapper.owl-carousel",$parent),$stack=$(".woocommerce-layout-images-stack-lateral .woocommerce-product-gallery__wrapper",$parent),mainL=$main.find(".woocommerce-product-gallery__image").length,$thumbs=$(".woocommerce-product-gallery__wrapper-nav:not(.lateral-nav)",$parent),$thumbs_nav=$(".woocommerce-product-gallery__wrapper-nav",$parent),thumbsL=$thumbs.find("li").length;$.fn.owlCarousel&&mainL>1&&$slider.hasClass("owl-carousel-wrapper")&&($main.owlCarousel({items:1,autoHeight:!0,rtl:$("body").hasClass("rtl")?!0:!1,responsiveRefreshRate:200,responsive:{0:{dots:$(".woocommerce-product-gallery__wrapper-nav.lateral-nav",$parent).length||dots===!0},960:{dots:dots}}}).on("changed.owl.carousel",function(event){if(event.namespace&&event.property.name==="position"){var target=event.relatedTarget.relative(event.property.value,!0),data=$thumbs.data("owl.carousel");$(".owl-item",$thumbs).eq(target).hasClass("active")||$thumbs.owlCarousel("to",target,300,!0)}}),$main.on("translate.owl.carousel",function(event){$(event.currentTarget).addClass("owl-translating")}),$main.on("translated.owl.carousel",function(event){$(event.currentTarget).removeClass("owl-translating")}),$thumbs.on("initialized.owl.carousel",function(event){$thumbs.closest(".woocommerce-product-gallery-nav-wrapper").css({opacity:1})}).owlCarousel({items:cols,margin:gutter,autoHeight:!0,nav:!0,rtl:$("body").hasClass("rtl")?!0:!1,mouseDrag:cols','
'],responsiveRefreshRate:100}),$(window).on("load uncode-quick-view-first-hover woocommerce_variation_has_loaded",function(){$main.trigger("refresh.owl.carousel"),$thumbs.trigger("refresh.owl.carousel");var product_div=$main.closest("div.woocommerce-product-gallery--with-variation-gallery");!product_div.length>0&&($(".owl-item",$main).eq(0).hasClass("active")||$main.owlCarousel("to",0,300,!0),$(".owl-item",$thumbs).eq(0).hasClass("active")||$thumbs.owlCarousel("to",0,300,!0))}));var scrollBody=function(index){$(".woocommerce-product-gallery__thumb",$thumbs_nav).removeClass("is-selected"),$(".woocommerce-product-gallery__thumb",$thumbs_nav).eq(index).addClass("is-selected");var top_gutter=parseInt($stack.closest(".row").css("padding-top")),getSection=$(".woocommerce-product-gallery__image",$stack).eq(index),scrollTo;if(getSection==undefined)return;var body=$("html, body"),bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-($(".woocommerce-product-gallery__image",$stack).eq(index).length?$(".woocommerce-product-gallery__image",$stack).eq(index).offset().top:0),getOffset=UNCODE.get_scroll_offset(index);if(typeof getSection.offset()=="undefined")return;scrollTo=getSection.offset().top;if(!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)){var shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:36;$(".menu-sticky .menu-container:not(.menu-hide)").length&&$(".menu-shrink").length&&(scrollTo+=UNCODE.menuHeight-($(".navbar-brand").data("minheight")+shrink)),$(".menu-sticky .menu-container:not(.menu-hide)").length&&!$(".menu-shrink").length&&$(".body").hasClass("vmenu")?index===0?scrollTo=0:scrollTo-=$(".menu-sticky .menu-container").outerHeight():scrollTo-=getOffset}scrollTo-=top_gutter;var scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),index!=0&&(UNCODE.scrolling=!0),scrollSpeed==0?(body.scrollTop(delta>0?scrollTo-.1:scrollTo),UNCODE.scrolling=!1):body.on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).stop(!0,!1).animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutCubic",function(){UNCODE.scrolling=!1})},changeThumbActive=function(section,index){var newSection=$(".woocommerce-product-gallery__thumb",$thumbs_nav).eq(index);newSection.length&&($(".woocommerce-product-gallery__thumb",$thumbs_nav).removeClass("is-selected"),newSection.addClass("is-selected"))};$(".woocommerce-product-gallery__image",$stack).each(function(index,val){new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(direction){changeThumbActive(this.element,index)}})}),$thumbs_nav.on("click",".woocommerce-product-gallery__thumb",function(e){e.preventDefault();var number=$(this).index();$main.length?(number=$(this).closest(".owl-item").index(),number<0&&(number=$(this).index()),$main.owlCarousel("to",number,300,!0)):$stack.length&&scrollBody(number)});var uncodeZoom=function(){if($.fn.zoom&&$("body").hasClass("wc-zoom-enabled")){var $zoomTrgt=$(".woocommerce-product-gallery__image",$slider);$(".thumbnails",$slider).length&&($zoomTrgt=$zoomTrgt.first()),$zoomTrgt.trigger("zoom.destroy"),$zoomTrgt.zoom();var checkForZoom=function(){if($parent.hasClass("no-zoom-mobile")&&UNCODE.wwidth<960)return $zoomTrgt.trigger("zoom.destroy").addClass("mouse-moving"),$(".zoom-overlay",$zoomTrgt).remove(),!1;$(".woocommerce-product-gallery__image").each(function(){var $wrap=$(this),$zoomImg=$(".zoomImg",$wrap);(UNCODE.isMobile||!$zoomImg.length)&&$wrap.addClass("mouse-moving")});var galleryWidth=$zoomTrgt.width(),zoom_options={touch:!0,callback:function(){$(".woocommerce-product-gallery__image").each(function(){var $wrap=$(this),$zoomImg=$(".zoomImg",$wrap),$overZoom=$(".zoom-overlay",$wrap),$imageIL=$("a[data-lbox]",$wrap),$carousel=$wrap.closest(".owl-carousel");$wrap.prepend($zoomImg);if(UNCODE.isMobile||!$zoomImg.length)$wrap.addClass("mouse-moving"),$zoomImg.css({visibility:"hidden"});var onlongtouch,timer,now,touchduration=500,startX=0,startY,newX,newY;$wrap.parent().on("mousemove.zoom",function(){$wrap.hasClass("mouse-moving")||(startX==0&&(startX=event.clientX,startY=event.clientY),newX=event.clientX,newY=event.clientY,Math.abs(newX-startX)>50&&Math.abs(newY-startY)>50&&$wrap.addClass("mouse-moving"))}),$overZoom.on("touchstart.zoom",function(e){now=(new Date).getTime()}).on("touchmove.zoom",function(e){setTimeout(function(){$zoomImg.css({visibility:"visible"})},100)}).on("touchend.zoom",function(e){var newTap=(new Date).getTime();newTap-now<75&&!$("body").hasClass("ilightbox-noscroll")&&$imageIL.trigger("itap.iL"),UNCODE.isMobile&&$zoomImg.css({visibility:"hidden"})})})}};"ontouchstart"in window&&(zoom_options.on="click"),$zoomTrgt.trigger("zoom.destroy"),$zoomTrgt.each(function(){var $thisTrgt=$(this),$img=$("img",$thisTrgt);$img.data("large_image_width")>galleryWidth?$thisTrgt.zoom(zoom_options):$thisTrgt.trigger("zoom.destroy")})};checkForZoom();var setCheckForZoom;$(window).on("resize",function(){clearTimeout(setCheckForZoom),setCheckForZoom=setTimeout(checkForZoom,500)})}};uncodeZoom(),window.addEventListener("load",uncodeZoom)},woocommerce_product_gallery(),$(window).on("unmodal-open",function(){$("#unmodal-content .woocommerce-product-gallery__image").removeClass("mouse-moving")}),$(document).on("unmodal-close",function(){$("#unmodal-content .woocommerce-product-gallery__image").removeClass("mouse-moving")}),$(document.body).on("wc_cart_emptied",redirect_to_custom_empty_cart),$(document).ready(function(){variation_price_font()});var cartShow,cartHover,sideCart_scrollTop=$("html, body").scrollTop(),minicart_notify=function(){var $body=$("body");if(!$body.hasClass("minicart-notification"))return!1;var $sidecart=$("#uncode_sidecart"),$miniCart=$(".menu-smart .uncode-cart-dropdown"),$smartMenu=$miniCart.closest(".menu-smart");$miniCart.on("hover",function(){clearTimeout(cartHover)});var show_added_to_cart=function(e){clearTimeout(cartShow),clearTimeout(cartHover),$sidecart.length&&!($body.hasClass("uncode-sidecart-mobile-disabled")&&UNCODE.wwidth<=UNCODE.mediaQuery)&&$sidecart.imagesLoaded().done(function(instance){setTimeout(function(){sideCart_scrollTop=$("html, body").scrollTop(),$body.addClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-open"),$("html, body").scrollTop(sideCart_scrollTop)},500)});var show_added_to_cart_timeout=function(){cartShow=setTimeout(function(){$miniCart.imagesLoaded().done(function(instance){$smartMenu.smartmenus("itemActivate",$(".uncode-cart > a")),cartHover=setTimeout(function(){$smartMenu.smartmenus("menuHideAll")},4e3)})},500)};UNCODE.wwidth>=960&&(e=="uncode-wc-added-to-cart"?show_added_to_cart_timeout():$(document.body).on("wc_fragments_loaded",function(){show_added_to_cart_timeout()}))};$("body").hasClass("uncode-wc-disable-added-to-cart-trigger")?$(document.body).on("added_to_cart",function(){setTimeout(function(){$(document.body).trigger("wc_fragment_refresh")},500)}):$(document.body).on("added_to_cart",show_added_to_cart),$(document).ready(function(){$("body").hasClass("uncode-wc-added-to-cart")&&show_added_to_cart("uncode-wc-added-to-cart")})};minicart_notify(),$(document.body).on("wc_cart_button_updated",function(e,$button){if($(document.body).hasClass("minicart-notification")||wc_add_to_cart_params==undefined)return!1;$button.addClass("added_and_noted").removeClass("ajax_add_to_cart").find(".added_to_cart").text(wc_add_to_cart_params.i18n_view_cart).on("click",function(e){return e.preventDefault(),window.location.href=wc_add_to_cart_params.cart_url,!1})});var init_sidecart=function(){var $body=$("body.uncode-sidecart-enabled");if(!$body.length)return!1;var $cart_icon=$(".mobile-shopping-cart, .uncode-cart.menu-item-link > a"),$sidecart=$("#uncode_sidecart"),$view_cart=$("a.wc-forward:not(.checkout)",$sidecart).removeClass("btn-sm"),$checkout=$("a.checkout",$sidecart).removeClass("btn-sm").addClass("btn-flat"),$overlay=$("#uncode_sidecart_overlay"),$close_cart=$(".close-mini-cart",$sidecart),sidecart_hover=!1;$cart_icon.off("click").on("click",function(e){$sidecart.length&&!($(this).closest(".overlay").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($body.hasClass("uncode-sidecart-mobile-disabled")&&UNCODE.wwidth<=UNCODE.mediaQuery)&&(e.preventDefault(),e.stopPropagation(),sideCart_scrollTop=$("html, body").scrollTop(),$body.addClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-open"),$("html, body").scrollTop(sideCart_scrollTop))}),$sidecart.on("mouseover",function(){sidecart_hover=!0}).on("mouseout",function(){sidecart_hover=!1}),$body.on("click",function(e){$body.hasClass("uncode-sidecart-open")&&!sidecart_hover&&($body.removeClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-closed"),$("html, body").scrollTop(sideCart_scrollTop))}),$close_cart.on("click",function(e){e.preventDefault(),$body.removeClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-closed"),$("html, body").scrollTop(sideCart_scrollTop)})};$(document).ready(function(){init_sidecart()}),$(document.body).on("wc_fragments_refreshed added_to_cart removed_from_cart",function(){init_sidecart(),requestTimeout(init_sidecart,1)});var sidecart_size=function(){var $body=$("body.uncode-sidecart-enabled"),$widget_cart=$(".widget_shopping_cart_content"),$mini_cart_item=$(".mini_cart_item",$widget_cart);$widget_cart.length&&$mini_cart_item.each(function(){var $this=$(this),$img_product=$(".attachment-woocommerce_thumbnail",$this),imgH=$img_product.height();$this.css({"min-height":imgH+6})});if($body.length){var $sidecart=$("#uncode_sidecart"),$cart_header=$(".woocommerce-mini-cart-header",$sidecart),headerH=$cart_header.outerHeight(),$cart_footer=$(".woocommerce-mini-cart-footer",$sidecart),footerH=$cart_footer.outerHeight(),$cart_body=$(".woocommerce-mini-cart-body",$sidecart);$cart_body.css({"padding-top":headerH,"padding-bottom":footerH})}};$(document).ready(function(){var setCTA;sidecart_size(),requestTimeout(function(){$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(sidecart_size,100)})},400)}),$(document.body).on("wc_fragments_refreshed added_to_cart removed_from_cart",function(){sidecart_size(),requestTimeout(sidecart_size,1)});var modal_quick_view_content=$(".quick-view-content"),last_viewed_product_id;$(document).off("click",".quick-view-button").on("click",".quick-view-button",function(){var _this=$(this),product_id=_this.data("post-id"),post_type=_this.data("post-type"),post_url=_this.attr("data-post-url"),single_variation_atts=_this.attr("data-single-variation");modal_quick_view_content.length>0&&modal_quick_view_content.html("");var data={action:"uncode_load_ajax_quick_view",post_id:product_id,post_type:post_type,post_url:post_url};if(single_variation_atts){var variation_atts_obj=JSON.parse(single_variation_atts);for(var att_key in variation_atts_obj)variation_atts_obj[att_key]&&(data["attribute_"+att_key]=variation_atts_obj[att_key])}return $.ajax({url:woocommerce_params.ajax_url,data:data,type:"post",error:function(data){SiteParameters.enable_debug==1&&console.log("AJAX error on quick view response")},success:function(response){if(response&&response.success===!1)SiteParameters.enable_debug==1&&(response.data.error?console.log(response.data.error):console.log("Unknown error on quick view response"));else{var html=response.data.html;modal_quick_view_content.length>0&&modal_quick_view_content.html(html),last_viewed_product_id=product_id,modal_quick_view_content.imagesLoaded().done(function(instance){$(document).trigger("uncode-unmodal-show-content"),$(document).trigger("uncode-quick-view-loaded"),window.dispatchEvent(new CustomEvent("uncode-quick-view-loaded")),setTimeout(function(){modal_quick_view_content.one("mousemove",function(){window.dispatchEvent(new CustomEvent("uncode-quick-view-first-hover"))})},10)})}}}),!1}),$(document).on("uncode-quick-view-loaded",function(){var form_variation=modal_quick_view_content.find(".variations_form");form_variation.each(function(){$(this).wc_variation_form()}),form_variation.trigger("check_variations"),form_variation.trigger("reset_image"),typeof $.fn.wc_product_gallery!="undefined"&&modal_quick_view_content.find(".woocommerce-product-gallery").each(function(){$(this).wc_product_gallery()}),$("#unmodal-content").on("change",".quantity .qty",function(){jQuery(this).closest("form.cart").find(".add_to_cart_button").attr("data-quantity",jQuery(this).val())}),woocommerce_product_gallery(),variation_price_font(),qtyPlusMinus(),UNCODE.preventDoubleTransition(),UNCODE.utils(),typeof UNCODE.share!="undefined"&&UNCODE.share(),typeof UNCODE.tooltip!="undefined"&&UNCODE.tooltip(),typeof UNCODE.counters!="undefined"&&UNCODE.counters(),typeof UNCODE.countdowns!="undefined"&&UNCODE.countdowns(),typeof UNCODE.tabs!="undefined"&&UNCODE.tabs(),typeof UNCODE.collapse!="undefined"&&UNCODE.collapse(),typeof UNCODE.okvideo!="undefined"&&UNCODE.okvideo(),typeof UNCODE.backgroundSelfVideos!="undefined"&&UNCODE.backgroundSelfVideos(),UNCODE.tapHover(),typeof UNCODE.isotopeLayout!="undefined"&&UNCODE.isotopeLayout(),typeof UNCODE.justifiedGallery!="undefined"&&UNCODE.justifiedGallery(),typeof UNCODE.cssGrid!="undefined"&&UNCODE.cssGrid(),typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&UNCODE.lightbox(),typeof UNCODE.lightgallery!="undefined"&&SiteParameters.lbox_enhanced&&UNCODE.lightgallery(),typeof UNCODE.carousel!="undefined"&&UNCODE.carousel($("body")),UNCODE.lettering(),UNCODE.animations(),UNCODE.stickyElements(),typeof UNCODE.twentytwenty!="undefined"&&UNCODE.twentytwenty(),UNCODE.disableHoverScroll(),typeof uncode_progress_bar!="undefined"&&uncode_progress_bar(),typeof UNCODE.filters!="undefined"&&UNCODE.filters(),typeof UNCODE.ajax_filters!="undefined"&&UNCODE.ajax_filters(),typeof UNCODE.widgets!="undefined"&&UNCODE.widgets(),$(document).trigger("yith_wcwl_init")}),SiteParameters.update_wc_fragments==1&&$(document).ready(function(){$(document.body).trigger("wc_fragment_refresh")}),$(document).ready(function(){SiteParameters.uncode_wc_popup_cart_qty&&$(document.body).on("wc_fragments_loaded",function(){$(".cart-icon-container .badge").removeClass("init-product-counter")}).on("uncode_get_cart",function(e,data){$(".cart-icon-container .badge").text()!==""||data>0?$(".cart-icon-container .badge").addClass("init-product-counter"):$(".cart-icon-container .badge").removeClass("init-product-counter")})})})(jQuery)