';html+='
'+json[i]['name']+'';if(json[i]['price']){html+='
'+json[i]['price']+'
';}
html+='
';}}}else{html=''+$(".mini-cart").data("text_added")+'
');setTimeout(function(){$('.funio-product-added').remove();},3000);});}
function _click_add_to_cart(){$(".cart-remove").on("click",function(){if($(".funio-topcart.popup").hasClass("active")){$(".funio-topcart.popup").removeClass("active");}
if(_body.hasClass("not-scroll")){_body.removeClass("not-scroll");}});$(".cart-icon").on("click",function(){if(!_body.hasClass("not-scroll")&&$(".funio-topcart").hasClass("popup")){_body.addClass("not-scroll");}});$(".remove-cart-shadow").on("click",function(){if($(".funio-topcart.popup").hasClass("active")){$(".funio-topcart.popup").removeClass("active");}
if(_body.hasClass("not-scroll")){_body.removeClass("not-scroll");}});}
function _click_atribute_image(){$(".image-attribute",".product-attribute").on("click",function(){if(!$(this).hasClass("active")){$(".image-attribute",".product-attribute").removeClass("active");$(this).addClass("active");var $parent=$(this).closest(".products-entry");var $thumb=$(".product-thumb-hover",$parent);var $image=$(this).data("image");$("img",$thumb).last().attr("src",$image);}});}
function _active_form_login(){$(".active-login").on("click",function(){if($('.form-login-register').hasClass('active')){$('.form-login-register').removeClass('active');}else{$('.form-login-register').addClass('active');}});}
function _click_quickview_button(){$('.quickview-button').on("click",function(e){e.preventDefault();var product_id=$(this).data('product_id');$(".quickview-"+product_id).addClass("loading");$.ajax({url:funio_ajax.ajaxurl,data:{"action":"funio_quickviewproduct",'product_id':product_id},success:function(results){$('.bwp-quick-view').empty().html(results).addClass("active");$(".quickview-"+product_id).removeClass("loading");$("#quickview-slick-carousel .slick-carousel").each(function(){_load_slick_carousel($(this));});if(typeof jQuery.fn.tawcvs_variation_swatches_form!='undefined'){$('.variations_form').wc_variation_form();$('.variations_form').tawcvs_variation_swatches_form();}else{var form_variation=$(".bwp-quick-view").find('.variations_form');var form_variation_select=$(".bwp-quick-view").find('.variations_form .variations select');form_variation.wc_variation_form();form_variation_select.change();}
if($(".product-countdown",".bwp-quick-view").length>0)
_countdown_quickview($(".product-countdown",".bwp-quick-view"));_close_quickview();},error:function(errorThrown){console.log(errorThrown);},});});}
function _close_quickview(){$('.quickview-close').on("click",function(e){e.preventDefault();$('.bwp-quick-view').empty().removeClass("active");});}
function _countdown_quickview($element){var $this=$element;var $id=$(this).data("id");var $current_time=new Date().getTime();var $sttime=$(this).data('sttime');var $countdown_time=$this.data('cdtime');var $day=$this.data('day')?$this.data('day'):"D";var $hour=$this.data('hour')?$this.data('hour'):"H";var $min=$this.data('min')?$this.data('min'):"M";var $sec=$this.data('sec')?$this.data('sec'):"S";var $austDay=new Date();$austDay=new Date($countdown_time*1000);if($sttime>$current_time){$this.remove();return;}
if($countdown_time.length>0&&$current_time>$countdown_time){$this.remove();return;}
if($countdown_time.length<=0){$this.remove();return;}
$this.countdown($austDay,function(event){$(this).html(event.strftime('
%D'+$day+'%H'+$hour+'%M'+$min+'%S'+$sec+''));}).on('finish.countdown',function(event){$this.remove();$id=$this.data('id');$target=this;$this.hide('slow',function(){$(this).remove();});$price=$this.data('price');$('#'+$id+' .item-price > span').hide('slow',function(){$('#'+$id+' .item-price > span').remove();});$('#'+$id+' .item-price').append('
'+$price+'');});}
function _drag_slider($element){var $wrap=$element.parent();if(_window.width()>=1200){var $width=Math.ceil($element.width()/($element.data("columns")));}else if(_window.width()<1200&&_window.width()>=998){var $width=Math.ceil($element.width()/($element.data("columns1")));}else if(_window.width()<998&&_window.width()>=768){var $width=Math.ceil($element.width()/($element.data("columns2")));}else{var $width=Math.ceil($element.width()/($element.data("columns3")));}
$element.find('.item-product').css("width",$width);var options={horizontal:1,itemNav:'basic',smart:1,activateOn:'click',mouseDragging:1,touchDragging:1,releaseSwing:1,startAt:0,scrollBar:$wrap.find('.scrollbar'),scrollBy:1,pagesBar:$wrap.find('.pages'),activatePageOn:'click',speed:300,elasticBounds:1,dragHandle:1,dynamicHandle:1,clickBar:1,prevPage:$wrap.find('.prev'),nextPage:$wrap.find('.next'),disabledClass:'disabled'};$element.sly(options);}
class Elementor_Js_Davici{static getInstance(){if(!Elementor_Js_Davici.instance){Elementor_Js_Davici.instance=new Elementor_Js_Davici();}
return Elementor_Js_Davici.instance;}
constructor(){$(window).on('elementor/frontend/init',()=>{this.init();});}
init(){elementorFrontend.hooks.addAction('frontend/element_ready/bwp_product_categories.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_product_list.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);let scrollElement=$scope.find('.scroll-list');_drag_slider($(".list-product",scrollElement));});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_filter_homepage.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);let scrollElement=$scope.find('.scroll-list');_drag_slider($(".list-product",scrollElement));});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_testimonial.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_brand.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_recent_post.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_countdown_product.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_ourteam.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_slider.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_portfolio.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_lookbook.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_instagram.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_client.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');_load_slick_carousel(slickElement);});elementorFrontend.hooks.addAction('frontend/element_ready/bwp_image.default',($scope)=>{let slickElement=$scope.find('.slick-carousel');slickElement.each(function(){_load_slick_carousel($(this));});});}}
Elementor_Js_Davici.getInstance();})(jQuery);