jQuery(function(){jQuery(document).on("click",".wcml_currency_switcher a",wcml_switch_currency_handler)});var wcml_switch_currency_handler=function(event){event.preventDefault();if(jQuery(this).is(":disabled")||jQuery(this).parent().hasClass("wcml-cs-active-currency")||jQuery(this).hasClass("wcml-cs-active-currency")){return false}else{jQuery(this).off(event)}wcml_load_currency(jQuery(this).attr("rel"))};function wcml_load_currency(currency,force_switch){var ajax_loader=jQuery('');jQuery(".wcml_currency_switcher").append(ajax_loader);if(typeof force_switch==="undefined")force_switch=0;jQuery.ajax({type:"post",url:woocommerce_params.ajax_url,dataType:"json",data:{action:"wcml_switch_currency",currency:currency,force_switch:force_switch,params:window.location.search.substr(1)},success:function(response){if(typeof response.error!=="undefined"){alert(response.error)}else if(typeof response.data.prevent_switching!=="undefined"){jQuery("body").append(response.data.prevent_switching)}else{var target_location=window.location.href;if(-1!==target_location.indexOf("#")||wcml_mc_settings.cache_enabled){var url_dehash=target_location.split("#");var hash=url_dehash.length>1?"#"+url_dehash[1]:"";target_location=url_dehash[0].replace(/&wcmlc(\=[^&]*)?(?=&|$)|wcmlc(\=[^&]*)?(&|$)/,"").replace(/\?$/,"");var url_glue=target_location.indexOf("?")!=-1?"&":"?";target_location+=url_glue+"wcmlc="+currency+hash}wcml_reset_cart_fragments();target_location=wcml_maybe_adjust_widget_price(target_location,response.data);window.location=target_location}}})}function wcml_maybe_adjust_widget_price(target_location,response){if(typeof response.min_price!=="undefined"){target_location=target_location.replace(/(min_price=)(\d+)/,"$1"+response.min_price)}if(typeof response.max_price!=="undefined"){target_location=target_location.replace(/(max_price=)(\d+)/,"$1"+response.max_price)}return target_location}; jQuery(document).ready(function($){ resizeAllGridItems(); jQuery(window).on("resize", function (){ resizeAllGridItems(); }); jQuery("form#commentform").attr("enctype", "multipart/form-data").attr("encoding", "multipart/form-data"); jQuery("#commentform").on("submit", function(event){ if(ajax_object.ivole_recaptcha==='1'){ var recaptcha=jQuery("#g-recaptcha-response").val(); if(recaptcha===""){ event.preventDefault(); alert("Please confirm that you are not a robot"); }} var cr_ajax_comment=jQuery("#cr-ajax-reviews-review-form form#commentform textarea#comment"); if(cr_ajax_comment.length > 0){ if(ajax_object.ivole_allow_empty_comment==='0'&&cr_ajax_comment.val().trim().length===0){ event.preventDefault(); alert(ajax_object.ivole_allow_empty_comment_alert); }} }); jQuery("ol.commentlist").on("click", ".ivole-comment-a", function(t){ if(ajax_object.ivole_disable_lightbox==='0'){ t.preventDefault(); var o=jQuery(".pswp")[0]; var pics=jQuery(this).parent().parent().find("img"); var this_pic=jQuery(this).find("img"); var inx=0; if(pics.length > 0&&this_pic.length > 0){ var a=[]; for (i=0; i < pics.length; i++){ a.push({ src: pics[i].src, w: pics[i].naturalWidth, h: pics[i].naturalHeight, title: pics[i].alt }); if(this_pic[0].src==pics[i].src){ inx=i; }} var r={ index: inx }; new PhotoSwipe(o, PhotoSwipeUI_Default, a, r).init(); }} }); initVoteClick("ol.commentlist", ".ivole-a-button"); initVoteClick(".cr-ajax-reviews-cus-images-modal", ".ivole-a-button"); jQuery(".ivole-video-a, .iv-comment-video-icon").on("click", function(t){ if(! jQuery("#iv-comment-videos-id").hasClass("iv-comment-videos-modal")){ var tt=t.target.closest("[id^='iv-comment-video-id-']"); var iid="#" + tt.id; jQuery("#iv-comment-videos-id").addClass("iv-comment-videos-modal"); jQuery(iid).addClass("iv-comment-video-modal"); jQuery(iid).find("video").prop("controls", true); jQuery(iid).find(".iv-comment-video-icon").hide(); jQuery(iid).find("video").get(0).play(); jQuery(iid).css({ "top": "50%", "margin-top": function(){ return -$(this).outerHeight() / 2 }}); return false; }}); jQuery("#iv-comment-videos-id").on("click", function(t){ if(jQuery("#iv-comment-videos-id").hasClass("iv-comment-videos-modal")){ jQuery("#iv-comment-videos-id").removeClass("iv-comment-videos-modal"); var vids=jQuery("#iv-comment-videos-id").find("[id^='iv-comment-video-id-']"); var i=0; var iid=""; for(i=0; i < vids.length; i++){ iid="#" + vids[i].id; if(jQuery(iid).hasClass("iv-comment-video-modal")){ jQuery(iid).removeClass("iv-comment-video-modal"); jQuery(iid).find("video").get(0).pause(); jQuery(iid).find("video").prop("controls", false); jQuery(iid).find(".iv-comment-video-icon").show(); jQuery(iid).removeAttr("style"); }} return false; }}); jQuery("#cr-show-more-reviews-id").on("click", function(t){ t.preventDefault(); var cr_product_id=jQuery(".commentlist.cr-ajax-reviews-list").attr("data-product"); var cr_nonce=jQuery(this).attr("data-nonce"); var cr_page=jQuery(this).attr("data-page"); var cr_sort=jQuery("#cr-ajax-reviews-sort").children("option:selected").val(); var cr_rating=jQuery("div.ivole-summaryBox.cr-summaryBox-ajax tr.ivole-histogramRow.ivole-histogramRow-s a.ivole-histogram-a").attr("data-rating"); var cr_search=jQuery(".cr-ajax-search input").val(); var cr_tags=[]; jQuery(".cr-review-tags-filter .cr-tags-filter.cr-tag-selected").each(function(){ cr_tags.push(jQuery(this).attr("data-crtagid")); }); if(!cr_rating){ cr_rating=0; } var cr_data={ "action": "cr_show_more_reviews", "productID": cr_product_id, "page": cr_page, "sort": cr_sort, "rating": cr_rating, "search": cr_search, "tags": cr_tags, "security": cr_nonce }; jQuery(".cr-search-no-reviews").hide(); jQuery("#cr-show-more-reviews-id").hide(); jQuery("#cr-show-more-review-spinner").show(); jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").addClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-sort").addClass("cr-sort-updating"); jQuery("div.cr-review-tags-filter").addClass("cr-review-tags-filter-disabled"); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ jQuery("#cr-show-more-review-spinner").hide(); jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").removeClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-sort").removeClass("cr-sort-updating"); jQuery("div.cr-review-tags-filter").removeClass("cr-review-tags-filter-disabled"); if(response.page > 0){ jQuery(".commentlist.cr-ajax-reviews-list").append(response.html); jQuery("#cr-show-more-reviews-id").attr("data-page",response.page); if(!response.last_page){ jQuery("#cr-show-more-reviews-id").show(); }} if(response.html==null&&response.page===1){ jQuery(".cr-search-no-reviews").show(); }}, "json"); }); jQuery("#cr-ajax-reviews-sort").on("change", function(t){ t.preventDefault(); var cr_product_id=jQuery(".commentlist.cr-ajax-reviews-list").attr("data-product"); var cr_nonce=jQuery(this).attr("data-nonce"); var cr_sort=jQuery(this).children("option:selected").val(); var cr_rating=jQuery("div.ivole-summaryBox.cr-summaryBox-ajax tr.ivole-histogramRow.ivole-histogramRow-s a.ivole-histogram-a").attr("data-rating"); if(!cr_rating){ cr_rating=0; } var cr_data={ "action": "cr_sort_reviews", "productID": cr_product_id, "sort": cr_sort, "rating": cr_rating, "security": cr_nonce }; jQuery(".cr-search-no-reviews").hide(); jQuery('.cr-ajax-search input').val("").trigger("change"); jQuery("#cr-show-more-reviews-id").hide(); jQuery(".commentlist.cr-ajax-reviews-list").hide(); jQuery("#cr-show-more-review-spinner").show(); jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").addClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-sort").addClass("cr-sort-updating"); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ jQuery("#cr-show-more-review-spinner").hide(); jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").removeClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-sort").removeClass("cr-sort-updating"); if(response.page>0){ jQuery(".commentlist.cr-ajax-reviews-list").empty(); jQuery(".commentlist.cr-ajax-reviews-list").append(response.html); jQuery(".commentlist.cr-ajax-reviews-list").show(); jQuery("#cr-show-more-reviews-id").attr("data-page",response.page); if(!response.last_page){ jQuery("#cr-show-more-reviews-id").show(); }} }, "json"); }); jQuery(".cr-reviews-ajax-comments .cr-summaryBox-wrap").on("click", "a.ivole-histogram-a, .ivole-seeAllReviews", function(t){ t.preventDefault(); var cr_product_id=jQuery(".commentlist.cr-ajax-reviews-list").attr("data-product"); var cr_nonce=jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").attr("data-nonce"); var cr_rating=jQuery(this).attr("data-rating"); var cr_sort=jQuery("#cr-ajax-reviews-sort").children("option:selected").val(); var cr_data={ "action": "cr_filter_reviews", "productID": cr_product_id, "rating": cr_rating, "sort": cr_sort, "security": cr_nonce }; jQuery("div.ivole-summaryBox.cr-summaryBox-ajax tr.ivole-histogramRow.ivole-histogramRow-s").removeClass("ivole-histogramRow-s"); if(cr_rating > 0){ jQuery(this).closest("tr.ivole-histogramRow").addClass("ivole-histogramRow-s"); } jQuery(".cr-search-no-reviews").hide(); jQuery('.cr-ajax-search input').val("").trigger("change"); jQuery("#cr-show-more-reviews-id").hide(); jQuery(".commentlist.cr-ajax-reviews-list").hide(); jQuery("#cr-show-more-review-spinner").show(); jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").addClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-sort").addClass("cr-sort-updating"); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ jQuery("#cr-show-more-review-spinner").hide(); jQuery("div.ivole-summaryBox.cr-summaryBox-ajax").removeClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-sort").removeClass("cr-sort-updating"); if(response.page>0){ jQuery("div#cr-ajax-reviews-fil-sta").remove(); jQuery(".cr-reviews-ajax-comments div.cr-summaryBox-wrap").append(response.filter_note); jQuery(".commentlist.cr-ajax-reviews-list").empty(); jQuery(".commentlist.cr-ajax-reviews-list").append(response.html); jQuery(".commentlist.cr-ajax-reviews-list").show(); jQuery("#cr-show-more-reviews-id").attr("data-page",response.page); if(!response.last_page){ jQuery("#cr-show-more-reviews-id").show(); }} }, "json"); }); jQuery('.cr-ajax-search input').on("keyup", function(e){ if(e.keyCode==13){ jQuery(".cr-ajax-search button").trigger("click"); } if(jQuery(this).val()!="") jQuery(".cr-ajax-search .cr-clear-input").css("display", "inline-block"); }).on("change", function(){ if(jQuery(this).val()==="") jQuery(".cr-ajax-search .cr-clear-input").hide(); }); jQuery(".cr-ajax-search .cr-clear-input").on("click", function (){ jQuery(this).prev("input").val(""); jQuery(".cr-ajax-search .cr-clear-input").hide(); jQuery(".cr-ajax-search button").trigger("click"); }); jQuery(".cr-ajax-search button").on("click", function (e){ e.preventDefault(); jQuery("#cr-show-more-reviews-id").attr("data-page", 0); jQuery(".cr-reviews-ajax-comments .cr-ajax-reviews-list").empty(); jQuery("#cr-show-more-reviews-id").trigger("click"); }); jQuery("button.cr-ajax-reviews-add-review").on("click", function(t){ t.preventDefault(); jQuery("#comments.cr-reviews-ajax-comments").hide(); jQuery("#cr-ajax-reviews-review-form").show(); }); jQuery("a#cr-ajax-reviews-cancel").on("click", function(t){ t.preventDefault(); jQuery("#cr-ajax-reviews-review-form").hide(); jQuery("#comments.cr-reviews-ajax-comments").show(); }); jQuery(".cr-review-tags-filter span.cr-tags-filter").on("click", function (e){ e.preventDefault(); jQuery("#cr-show-more-reviews-id").attr("data-page", 0); jQuery(".cr-reviews-ajax-comments .cr-ajax-reviews-list").empty(); if(jQuery(this).hasClass("cr-tag-selected")){ jQuery(this).removeClass("cr-tag-selected"); }else{ jQuery(this).addClass("cr-tag-selected"); } jQuery("#cr-show-more-reviews-id").trigger("click"); }); jQuery("div.iv-comment-image-top img").on("click", function(t){ t.preventDefault(); var slide_no=jQuery(this).data("slide"); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal-cont").addClass("cr-mask-active"); jQuery("body").addClass("cr-noscroll"); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal div.cr-ajax-reviews-cus-images-slider-main").slick('setPosition'); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal div.cr-ajax-reviews-cus-images-slider-nav").slick('setPosition'); if(typeof slide_no!=='undefined'){ jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal div.cr-ajax-reviews-cus-images-slider-main").slick('slickGoTo',slide_no,true); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal div.cr-ajax-reviews-cus-images-slider-nav").slick('slickGoTo',slide_no,true); }}); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal-cont, #reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal button.cr-ajax-reviews-cus-images-close").on("click", function(t){ t.preventDefault(); jQuery("#reviews.cr-reviews-ajax-reviews .cr-mask-active div.cr-ajax-reviews-cus-images-modal div.cr-ajax-reviews-cus-images-slider-main").slick('slickGoTo',0,true); jQuery("#reviews.cr-reviews-ajax-reviews .cr-mask-active div.cr-ajax-reviews-cus-images-modal div.cr-ajax-reviews-cus-images-slider-nav").slick('slickGoTo',0,true); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal-cont").removeClass("cr-mask-active"); jQuery("body").removeClass("cr-noscroll"); }); jQuery("#reviews.cr-reviews-ajax-reviews div.cr-ajax-reviews-cus-images-modal").on("click", function(t){ t.stopPropagation(); }); $(".single_variation_wrap").on("show_variation", function(event, variation){ if(jQuery(".cr_gtin").length){ jQuery(".cr_gtin_val").text(variation._cr_gtin); } if(jQuery(".cr_mpn").length){ jQuery(".cr_mpn_val").text(variation._cr_mpn); } if(jQuery(".cr_brand").length){ jQuery(".cr_brand_val").text(variation._cr_brand); }}); jQuery(document).on('reset_data', function (){ var $cr_gtin=jQuery(".cr_gtin"), $cr_mpn=jQuery(".cr_mpn"), $cr_brand=jQuery(".cr_brand"); if($cr_gtin.length){ jQuery(".cr_gtin_val").text($cr_gtin.data("o_content")); } if($cr_mpn.length){ jQuery(".cr_mpn_val").text($cr_mpn.data("o_content")); } if($cr_brand.length){ jQuery(".cr_brand_val").text($cr_brand.data("o_content")); }}); jQuery('#cr-show-more-all-reviews').on("click", function (e){ e.preventDefault(); var $this=jQuery(this), $spinner=$this.next("#cr-show-more-review-spinner"), attributes=jQuery(this).parents(".cr-all-reviews-shortcode").data("attributes"), cr_rating=jQuery("div.ivole-summaryBox.cr-all-reviews-ajax tr.ivole-histogramRow.ivole-histogramRow-s a.cr-histogram-a").attr("data-rating"); var cr_data={ "action": "cr_show_more_all_reviews", "attributes": attributes, "rating": cr_rating, "page": $this.data("page") }; $this.hide(); $spinner.show(); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ $spinner.hide(); if(response.html!==""){ $this.parents(".cr-all-reviews-shortcode").find(".commentlist").append(response.html); if(!response.last_page){ jQuery("#cr-show-more-all-reviews").show(); } jQuery("#cr-show-more-all-reviews").data("page",response.page); }else{ $this.hide(); }}).fail(function(response){ $spinner.hide(); $this.show(); $this.parent().append('
'+response.responseText+'
'); }); }); jQuery("#cr_all_reviews_shortcode .cr-summaryBox-wrap").on("click", "a.cr-histogram-a, .ivole-seeAllReviews", function(t){ t.preventDefault(); var cr_rating=jQuery(this).data("rating"); var attributes=jQuery(this).parents(".cr-all-reviews-shortcode").data("attributes"); var cr_data={ "action": "cr_show_more_all_reviews", "attributes": attributes, "page": 0, "rating": cr_rating }; jQuery("div.ivole-summaryBox.cr-all-reviews-ajax tr.ivole-histogramRow.ivole-histogramRow-s").removeClass("ivole-histogramRow-s"); if(cr_rating > 0){ jQuery(this).closest("tr.ivole-histogramRow").addClass("ivole-histogramRow-s"); } jQuery("#cr-show-more-all-reviews").hide(); jQuery("#cr_all_reviews_shortcode .commentlist").hide(); jQuery("#cr-show-more-review-spinner").show(); jQuery("div.ivole-summaryBox.cr-all-reviews-ajax").addClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-fil-sta a.ivole-seeAllReviews").addClass("cr-seeAll-updating"); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ jQuery("#cr-show-more-review-spinner").hide(); jQuery("div.ivole-summaryBox.cr-all-reviews-ajax").removeClass("cr-summaryBar-updating"); jQuery("#cr-ajax-reviews-fil-sta a.ivole-seeAllReviews").removeClass("cr-seeAll-updating"); if(response.html!==""){ jQuery("div#cr-ajax-reviews-fil-sta").remove(); jQuery("#cr_all_reviews_shortcode .cr-summaryBox-wrap").append(response.filter_note); jQuery("#cr_all_reviews_shortcode .commentlist").empty(); jQuery("#cr_all_reviews_shortcode .commentlist").append(response.html); jQuery("#cr_all_reviews_shortcode .commentlist").show(); jQuery("#cr-show-more-all-reviews").data("page",response.page); if(!response.last_page){ jQuery("#cr-show-more-all-reviews").show(); }} }, "json"); }); jQuery("#cr-show-more-reviews-grid").on("click", function (e){ e.preventDefault(); var $this=jQuery(this), $spinner=$this.next(".ivole-show-more-spinner"), attributes=$this.parents(".ivole-reviews-grid").data("attributes"); attributes.offset=$this.parents(".ivole-reviews-grid").find(".ivole-review-card.cr-card-product").length; attributes.shop_offset=$this.parents(".ivole-reviews-grid").find(".ivole-review-card.cr-card-shop").length; var grid_data={ 'action': "ivole_show_more_grid_reviews", 'attributes': attributes }; $this.hide(); $spinner.show(); jQuery.post(ajax_object.ajax_url, grid_data, function(response){ $spinner.hide(); $reviews=jQuery(response.html).find(".ivole-reviews-grid-inner"); if($reviews.length){ $this.parents(".ivole-reviews-grid").find(".ivole-reviews-grid-inner").append($reviews.html()); $this.show(); resizeAllGridItems(); }else{ $this.hide(); }}).fail(function(response){ $spinner.hide(); $this.show(); $this.parent().append('
'+response.responseText+'
'); }); }); jQuery('#cr_floatingtrustbadge_front').on("click", function(){ if(!jQuery(this).hasClass('cr-floatingbadge-big')){ jQuery(this).find('img.cr_floatingtrustbadge_small').hide(); jQuery(this).find('a.cr_floatingtrustbadge_big').css('display', 'block'); jQuery(this).find('div.cr-floatingbadge-close').css('display', 'block'); jQuery(this).addClass('cr-floatingbadge-big'); var crcolors=jQuery(this).data('crcolors'); if(typeof crcolors!=='undefined'){ jQuery(this).css('border-color', crcolors['big']['border']); jQuery(this).find('div.cr-floatingbadge-background-top').css('background-color', crcolors['big']['top']); jQuery(this).find('div.cr-floatingbadge-background-middle').css('background-color', crcolors['big']['middle']); jQuery(this).find('div.cr-floatingbadge-background-bottom').css('background-color', crcolors['big']['bottom']); jQuery(this).find('div.cr-floatingbadge-background-bottom').css('border-color', crcolors['big']['border']); }} }); jQuery('#cr_floatingtrustbadge_front .cr-floatingbadge-close').on("click", function(event){ if(jQuery('#cr_floatingtrustbadge_front').hasClass('cr-floatingbadge-big')){ jQuery(this).closest('#cr_floatingtrustbadge_front').find('a.cr_floatingtrustbadge_big').hide(); jQuery(this).closest('#cr_floatingtrustbadge_front').find('img.cr_floatingtrustbadge_small').css('display', 'block'); jQuery(this).closest('#cr_floatingtrustbadge_front').removeClass('cr-floatingbadge-big'); var crcolors=jQuery(this).closest('#cr_floatingtrustbadge_front').data('crcolors'); if(typeof crcolors!=='undefined'){ jQuery(this).closest('#cr_floatingtrustbadge_front').css('border-color', crcolors['small']['border']); jQuery(this).closest('#cr_floatingtrustbadge_front').find('div.cr-floatingbadge-background-top').css('background-color', crcolors['small']['top']); jQuery(this).closest('#cr_floatingtrustbadge_front').find('div.cr-floatingbadge-background-middle').css('background-color', crcolors['small']['middle']); jQuery(this).closest('#cr_floatingtrustbadge_front').find('div.cr-floatingbadge-background-bottom').css('background-color', crcolors['small']['bottom']); jQuery(this).closest('#cr_floatingtrustbadge_front').find('div.cr-floatingbadge-background-bottom').css('border-color', crcolors['small']['border']); }}else{ jQuery('#cr_floatingtrustbadge_front').hide(); document.cookie='cr_hide_trustbadge=true; path=/; max-age='+60*60*24+';'; } event.stopPropagation(); }); jQuery('.cr-slider-read-more a').on("click", function (e){ e.preventDefault(); let parent=jQuery(this).parents(".review-text"); parent.find(".cr-slider-read-more").hide(); parent.find(".cr-slider-details").css("display", "inline"); }); jQuery('.cr-slider-read-less a').on("click", function (e){ e.preventDefault(); let parent=jQuery(this).parents(".review-text"); parent.find(".cr-slider-details").hide(); parent.find(".cr-slider-read-more").css("display", "inline"); }); jQuery('#cr_qna.cr-qna-block .cr-qna-search-block button.cr-qna-ask-button').on("click", function (e){ e.preventDefault(); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form').addClass("cr-q-modal"); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-qna-new-a-form').removeClass("cr-q-modal"); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay').addClass("cr-q-modal"); jQuery("body").addClass("cr-noscroll"); }); jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-block-inner").on("click", ".cr-qna-ans-button", function (e){ e.preventDefault(); let parent=jQuery(this).parents(".cr-qna-list-q-cont"); let question=parent.find("span.cr-qna-list-question").text(); if(question.length){ jQuery("#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-qna-new-a-form .cr-qna-new-q-form-input .cr-qna-new-q-form-text").text(question); } let question_id=jQuery(this).attr("data-question"); if(question_id.length){ jQuery("#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b").attr("data-question", question_id); } jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form').removeClass("cr-q-modal"); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-qna-new-a-form').addClass("cr-q-modal"); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay').addClass("cr-q-modal"); jQuery("body").addClass("cr-noscroll"); }); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay').on("click", function (e){ e.preventDefault(); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-ok').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-error').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-input').css('display', 'block'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form').removeClass('cr-q-modal'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay').removeClass('cr-q-modal'); jQuery("body").removeClass("cr-noscroll"); }); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-close').on("click", function (e){ e.preventDefault(); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-ok').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-error').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-input').css('display', 'block'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form').removeClass('cr-q-modal'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay').removeClass('cr-q-modal'); jQuery("body").removeClass("cr-noscroll"); }); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form').on("click", function (e){ e.stopPropagation(); }); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-q, #cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-name, #cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-email').on("input", function (e){ jQuery(this).addClass('cr-qna-new-q-form-notinit'); crValidateQna(); }); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b').on("click", function (e){ if(crValidateQnaHelper()){ var cr_cptcha=jQuery(this).attr("data-crcptcha"); if(cr_cptcha&&cr_cptcha.length > 0){ grecaptcha.ready(function(){ grecaptcha.execute(cr_cptcha, {action: 'submit'}).then(function(token){ crNewQna(token) }); }); }else{ crNewQna(''); }} }); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-ok .cr-qna-new-q-form-s-b').on("click", function (e){ e.preventDefault(); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-ok').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-error').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-input').css('display', 'block'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form').removeClass('cr-q-modal'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay').removeClass('cr-q-modal'); jQuery("body").removeClass("cr-noscroll"); }); jQuery("#cr_qna.cr-qna-block .cr-qna-list-block").on("click", ".cr-qna-list-q-cont .cr-qna-list-q-b .cr-qna-list-q-b-r .cr-qna-q-voting img", function (e){ e.preventDefault(); var cr_upvote=0; var cr_question_id=0; cr_question_id=jQuery(this).parents(".cr-qna-q-voting").attr("data-vquestion");; cr_upvote=jQuery(this).attr("data-upvote"); var cr_data={ "action": "cr_vote_question", "questionID": cr_question_id, "upvote": cr_upvote }; jQuery(this).parents(".cr-qna-q-voting").addClass("cr-q-vote-loading"); jQuery(this).parents(".cr-qna-list-q-b-r").find(".cr-qna-q-voting-spinner").addClass("cr-q-vote-loading"); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-q-cont .cr-qna-list-q-b .cr-qna-list-q-b-r .cr-qna-q-voting-spinner-" + response.qid).removeClass("cr-q-vote-loading"); jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-q-cont .cr-qna-list-q-b .cr-qna-list-q-b-r .cr-qna-q-voting-" + response.qid).removeClass("cr-q-vote-loading"); if(0===response.code){ jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-q-cont .cr-qna-list-q-b .cr-qna-list-q-b-r .cr-qna-q-voting-" + response.qid + " .cr-qna-q-voting-upvote").text("(" + response.upvotes + ")"); jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-q-cont .cr-qna-list-q-b .cr-qna-list-q-b-r .cr-qna-q-voting-" + response.qid + " .cr-qna-q-voting-downvote").text("(" + response.downvotes + ")"); }}, "json"); }); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").on("click", function(t){ t.preventDefault(); var cr_product_id=jQuery(this).attr("data-product"); var cr_nonce=jQuery(this).attr("data-nonce"); var cr_page=jQuery(this).attr("data-page"); var cr_search=jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search input").val(); var cr_data={ "action": "cr_show_more_qna", "productID": cr_product_id, "page": cr_page, "search": cr_search, "security": cr_nonce }; jQuery("#cr_qna.cr-qna-block .cr-search-no-qna").hide(); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").hide(); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-spinner").show(); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ jQuery("#cr_qna.cr-qna-block #cr-show-more-q-spinner").hide(); if(response.page >=0){ jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-block-inner").append(response.html); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").attr("data-page",response.page); if(!response.last_page){ jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").show(); }} if(response.html===""&&response.page===0){ jQuery("#cr_qna.cr-qna-block .cr-search-no-qna").show(); }}, "json"); }); jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search input").on("keyup", cr_keyup_delay(function(e){ var code=(e.keyCode||e.which); if(code==37||code==38||code==39||code==40){ return; } jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").attr("data-page", -1); jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-block-inner").empty(); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").trigger("click"); }, 500)); jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search input").on("keyup", function(e){ if(jQuery(this).val()!==""){ jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search .cr-clear-input").css("display", "inline-block"); }else{ if(jQuery(this).val()==="") jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search .cr-clear-input").hide(); }}).on("change", function(){ if(jQuery(this).val()==="") jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search .cr-clear-input").hide(); }); jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search .cr-clear-input").on("click", function (){ jQuery(this).prev("input").val(""); jQuery("#cr_qna.cr-qna-block .cr-ajax-qna-search .cr-clear-input").hide(); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").attr("data-page", -1); jQuery("#cr_qna.cr-qna-block .cr-qna-list-block .cr-qna-list-block-inner").empty(); jQuery("#cr_qna.cr-qna-block #cr-show-more-q-id").trigger("click"); }); jQuery("body").on("click", "a.cr-qna-link", function (){ jQuery('.cr_qna_tab a').click(); return true; }); }); function resizeAllGridItems(){ jQuery('.ivole-reviews-grid-inner > .ivole-review-card').each(function(){ let $parent=jQuery(this).parent(); let parent_width=$parent.width(); let classes=["ivole-reviews-grid-inner"]; if(parent_width < 680){ classes.push("cr-grid-columns-2"); }else classes=classes.filter(val=> val!=="cr-grid-columns-2"); if(parent_width < 480){ classes.push("cr-single-column"); }else classes=classes.filter(val=> val!=="cr-single-column"); $parent.removeClass(); $parent[0].className=classes.join(" "); let rowHeight=parseInt($parent.css('grid-auto-rows')); if(isNaN(rowHeight)) rowHeight=0; let rowGap=parseInt($parent.css('grid-row-gap')); let rowSpan=Math.ceil(( jQuery(this).find('.ivole-review-card-content').height() + parseInt(jQuery(this).css("borderTopWidth")) + parseInt(jQuery(this).css("borderBottomWidth")) + parseInt(jQuery(this).css("paddingTop")) + parseInt(jQuery(this).css("paddingBottom")) + rowGap ) /(rowHeight + rowGap) ); jQuery(this).css('gridRowEnd', 'span ' + rowSpan); }); } function initVoteClick(sel1, sel2){ jQuery(sel1).on("click", sel2, function(e){ e.preventDefault(); let reviewIDhtml=jQuery(this).data("vote"); let $parent=jQuery(this).parents(".ivole-voting-cont"); if(reviewIDhtml!=null){ let reviewID=reviewIDhtml; let data={ "action": "ivole_vote_review", "reviewID": reviewID, "upvote": jQuery(this).data("upvote"), "security": ajax_object.ajax_nonce }; $parent.find(".ivole-declarative").hide(); $parent.find(".ivole-reviewvoting-" + reviewID).text(ajax_object.text_processing); jQuery.post(ajax_object.ajax_url, data, function(response){ if(response.code===0){ $parent.find(".ivole-reviewvoting-" + reviewID).text(ajax_object.text_thankyou); }else if(response.code===1){ $parent.find(".ivole-reviewvoting-" + reviewID).text(ajax_object.text_thankyou); }else if(response.code===2){ $parent.find(".ivole-reviewvoting-" + reviewID).text(ajax_object.text_thankyou); }else if(response.code===3){ $parent.find(".ivole-reviewvoting-" + reviewID).text(ajax_object.text_error1); }else{ $parent.find(".ivole-reviewvoting-" + reviewID).text(ajax_object.text_error2); }}, "json"); }}); } function crValidateQnaHelper(){ var ret=true; if(jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-q').val().trim().length <=0){ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-q').addClass('cr-qna-new-q-form-invalid'); ret=false; }else{ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-q').removeClass('cr-qna-new-q-form-invalid'); } if(jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-name').val().trim().length <=0){ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-name').addClass('cr-qna-new-q-form-invalid'); ret=false; }else{ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-name').removeClass('cr-qna-new-q-form-invalid'); } if(!crValidateEmail(jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-email').val().trim())){ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-email').addClass('cr-qna-new-q-form-invalid'); ret=false; }else{ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-email').removeClass('cr-qna-new-q-form-invalid'); } return ret; } function crValidateQna(){ if(crValidateQnaHelper()){ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-s button.cr-qna-new-q-form-s-b').addClass('cr-q-active'); }else{ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-s button.cr-qna-new-q-form-s-b').removeClass('cr-q-active'); }} function crValidateEmail(email){ var re=/\S+@\S+\.\S+/; return re.test(email); } function crNewQna(token){ var cr_nonce=jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b').attr("data-nonce"); var cr_product_id=jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b').attr("data-product"); var cr_text=jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-q').val().trim(); var cr_name=jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-name').val().trim(); var cr_email=jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-email').val().trim(); var cr_question_id=jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b').attr("data-question"); var cr_data={ "action": "cr_new_qna", "productID": cr_product_id, "questionID": cr_question_id, "text": cr_text, "name": cr_name, "email": cr_email, "security": cr_nonce, "cptcha": token }; jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-p').css('display', 'inline-block'); jQuery.post(ajax_object.ajax_url, cr_data, function(response){ if(0===response.code){ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-error').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-ok').css('display', 'block'); }else{ if(response.description&&response.description.length > 0){ jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-error p.cr-qna-new-q-form-text').append(' ' + response.description); } jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-ok').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input').css('display', 'none'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-error').css('display', 'block'); } jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-q').val(''); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-name').val(''); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-email').val(''); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-q, #cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-name, #cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form .cr-qna-new-q-form-email').removeClass('cr-qna-new-q-form-notinit'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-b').css('display', 'inline-block'); jQuery('#cr_qna.cr-qna-block .cr-qna-new-q-overlay .cr-qna-new-q-form.cr-q-modal .cr-qna-new-q-form-input .cr-qna-new-q-form-s-p').css('display', 'none'); }, "json"); } function cr_keyup_delay(fn, ms){ let timer=0; return function(...args){ clearTimeout(timer); timer=setTimeout(fn.bind(this, ...args), ms||0); };}; !function(){"use strict";function e(b){b.fn._fadeIn=b.fn.fadeIn;var p=b.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),y=(document.documentMode,b.isFunction(document.createElement("div").style.setExpression));b.blockUI=function(e){o(window,e)},b.unblockUI=function(e){v(window,e)},b.growlUI=function(e,t,o,n){var i=b('
');e&&i.append("

"+e+"

"),t&&i.append("

"+t+"

"),o===undefined&&(o=3e3);var s=function(e){e=e||{},b.blockUI({message:i,fadeIn:"undefined"!=typeof e.fadeIn?e.fadeIn:700,fadeOut:"undefined"!=typeof e.fadeOut?e.fadeOut:1e3,timeout:"undefined"!=typeof e.timeout?e.timeout:o,centerY:!1,showOverlay:!1,onUnblock:n,css:b.blockUI.defaults.growlCSS})};s();i.css("opacity");i.mouseover(function(){s({fadeIn:0,timeout:3e4});var e=b(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){b(".blockMsg").fadeOut(1e3)})},b.fn.block=function(e){if(this[0]===window)return b.blockUI(e),this;var t=b.extend({},b.blockUI.defaults,e||{});return this.each(function(){var e=b(this);t.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==b.css(this,"position")&&(this.style.position="relative",b(this).data("blockUI.static",!0)),this.style.zoom=1,o(this,e)})},b.fn.unblock=function(e){return this[0]===window?(b.unblockUI(e),this):this.each(function(){v(this,e)})},b.blockUI.version=2.7,b.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var m=null,g=[];function o(e,o){var t,n,i,s,l,d,a,c,r,u=e==window,f=o&&o.message!==undefined?o.message:undefined;(o=b.extend({},b.blockUI.defaults,o||{})).ignoreIfBlocked&&b(e).data("blockUI.isBlocked")||(o.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,o.overlayCSS||{}),i=b.extend({},b.blockUI.defaults.css,o.css||{}),o.onOverlayClick&&(o.overlayCSS.cursor="pointer"),s=b.extend({},b.blockUI.defaults.themedCSS,o.themedCSS||{}),f=f===undefined?o.message:f,u&&m&&v(window,{fadeOut:0}),f&&"string"!=typeof f&&(f.parentNode||f.jquery)&&(t=f.jquery?f[0]:f,a={},b(e).data("blockUI.history",a),a.el=t,a.parent=t.parentNode,a.display=t.style.display,a.position=t.style.position,a.parent&&a.parent.removeChild(t)),b(e).data("blockUI.onUnblock",o.onUnblock),r=o.baseZ,a=h||o.forceIframe?b(''):b(''),t=o.theme?b(''):b(''),o.theme&&u?(c='"):o.theme?(c='"):c=u?'':'',r=b(c),f&&(o.theme?(r.css(s),r.addClass("ui-widget-content")):r.css(i)),o.theme||t.css(o.overlayCSS),t.css("position",u?"fixed":"absolute"),(h||o.forceIframe)&&a.css("opacity",0),c=[a,t,r],n=b(u?"body":e),b.each(c,function(){this.appendTo(n)}),o.theme&&o.draggable&&b.fn.draggable&&r.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),s=y&&(!b.support.boxModel||0 .blockUI"):s.find(">.blockUI"),t.cursorReset&&(1'+wc_add_to_cart_params.i18n_view_cart+""),d(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateFragments=function(t,a){a&&(d.each(a,function(t){d(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),d.each(a,function(t,a){d(t).replaceWith(a),d(t).stop(!0).css("opacity","1").unblock()}),d(document.body).trigger("wc_fragments_loaded"))},new t}); !function(e){var n,o,t=!1;"function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),t||(n=window.Cookies,(o=window.Cookies=e()).noConflict=function(){return window.Cookies=n,o})}(function(){function m(){for(var e=0,n={};e'),t(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),t(".password-input").append(''),t(".show-password-input").on("click",function(){t(this).toggleClass("display-password"),t(this).hasClass("display-password")?t(this).siblings(['input[type="password"]']).prop("type","text"):t(this).siblings('input[type="text"]').prop("type","password")})}); jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(w){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=+m+864e5,m=(new Date).getTime();if(d":">",'"':""","'":"'","`":"`"},f=v.invert(m),b=function(t){function r(n){return t[n]}var n="(?:"+v.keys(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}};v.escape=b(m),v.unescape=b(f),v.result=function(n,t,r){t=null==n?void 0:n[t];return v.isFunction(t=void 0===t?r:t)?t.call(n):t};var N=0;v.uniqueId=function(n){var t=++N+"";return n?n+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};function B(n){return"\\"+R[n]}var T=/(.)^/,R={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g;v.template=function(i,n,t){n=v.defaults({},n=!n&&t?t:n,v.templateSettings);var t=RegExp([(n.escape||T).source,(n.interpolate||T).source,(n.evaluate||T).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(t,function(n,t,r,e,u){return a+=i.slice(o,u).replace(q,B),o=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+(a=!n.variable?"with(obj||{}){\n"+a+"}\n":a)+"return __p;\n";try{var r=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}t=function(n){return r.call(this,n,v)},n=n.variable||"obj";return t.source="function("+n+"){\n"+a+"}",t},v.chain=function(n){n=v(n);return n._chain=!0,n};function K(n,t){return n._chain?v(t).chain():t}v.mixin=function(r){v.each(v.functions(r),function(n){var t=v[n]=r[n];v.prototype[n]=function(){var n=[this._wrapped];return i.apply(n,arguments),K(this,t.apply(v,n))}})},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];v.prototype[t]=function(){var n=this._wrapped;return r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],K(this,n)}}),v.each(["concat","join","slice"],function(n){var t=e[n];v.prototype[n]=function(){return K(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return v})}.call(this); window.wp=window.wp||{},function(i){var e="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(t){var n,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||_.template(i("#tmpl-"+t).html(),s))(e)}}),wp.ajax={settings:e.ajax||{},post:function(e,t){return wp.ajax.send({data:_.isObject(e)?e:_.extend(t||{},{action:e})})},send:function(e,n){var t;return _.isObject(e)?n=e:(n=n||{}).data=_.extend(n.data||{},{action:e}),n=_.defaults(n||{},{type:"POST",url:wp.ajax.settings.url,context:this}),(e=(t=i.Deferred(function(t){n.success&&t.done(n.success),n.error&&t.fail(n.error),delete n.success,delete n.error,t.jqXHR=i.ajax(n).done(function(e){"1"!==e&&1!==e||(e={success:!0}),_.isObject(e)&&!_.isUndefined(e.success)?t[e.success?"resolveWith":"rejectWith"](this,[e.data]):t.rejectWith(this,[e])}).fail(function(){t.rejectWith(this,arguments)})})).promise()).abort=function(){return t.jqXHR.abort(),this},e}}}(jQuery); !function(y,c,i,n){var t=function(t){var a=this;a.$form=t,a.$attributeFields=t.find(".variations select"),a.$singleVariation=t.find(".single_variation"),a.$singleVariationWrap=t.find(".single_variation_wrap"),a.$resetVariations=t.find(".reset_variations"),a.$product=t.closest(".product"),a.variationData=t.data("product_variations"),a.useAjax=!1===a.variationData,a.xhr=!1,a.loading=!0,a.$singleVariationWrap.show(),a.$form.off(".wc-variation-form"),a.getChosenAttributes=a.getChosenAttributes.bind(a),a.findMatchingVariations=a.findMatchingVariations.bind(a),a.isMatch=a.isMatch.bind(a),a.toggleResetLink=a.toggleResetLink.bind(a),t.on("click.wc-variation-form",".reset_variations",{variationForm:a},a.onReset),t.on("reload_product_variations",{variationForm:a},a.onReload),t.on("hide_variation",{variationForm:a},a.onHide),t.on("show_variation",{variationForm:a},a.onShow),t.on("click",".single_add_to_cart_button",{variationForm:a},a.onAddToCart),t.on("reset_data",{variationForm:a},a.onResetDisplayedVariation),t.on("reset_image",{variationForm:a},a.onResetImage),t.on("change.wc-variation-form",".variations select",{variationForm:a},a.onChange),t.on("found_variation.wc-variation-form",{variationForm:a},a.onFoundVariation),t.on("check_variations.wc-variation-form",{variationForm:a},a.onFindVariation),t.on("update_variation_values.wc-variation-form",{variationForm:a},a.onUpdateAttributes),setTimeout(function(){t.trigger("check_variations"),t.trigger("wc_variation_form",a),a.loading=!1},100)};t.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").trigger("change"),t.data.variationForm.$form.trigger("reset_data")},t.prototype.onReload=function(t){t=t.data.variationForm;t.variationData=t.$form.data("product_variations"),t.useAjax=!1===t.variationData,t.$form.trigger("check_variations")},t.prototype.onHide=function(t){t.preventDefault(),t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},t.prototype.onShow=function(t,a,i){t.preventDefault(),i?(t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")),wp.mediaelement&&t.data.variationForm.$form.find(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!y(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(wp.mediaelement.settings)},t.prototype.onAddToCart=function(t){y(this).is(".disabled")&&(t.preventDefault(),y(this).is(".wc-variation-is-unavailable")?c.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):y(this).is(".wc-variation-selection-needed")&&c.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},t.prototype.onResetDisplayedVariation=function(t){t=t.data.variationForm;t.$product.find(".product_meta").find(".sku").wc_reset_content(),t.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value").wc_reset_content(),t.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value").wc_reset_content(),t.$form.trigger("reset_image"),t.$singleVariation.slideUp(200).trigger("hide_variation")},t.prototype.onResetImage=function(t){t.data.variationForm.$form.wc_variations_image_update(!1)},t.prototype.onFindVariation=function(t,a){var i=t.data.variationForm,e=void 0!==a?a:i.getChosenAttributes(),a=e.data;e.count&&e.count===e.chosenCount?i.useAjax?(i.xhr&&i.xhr.abort(),i.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.product_id=parseInt(i.$form.data("product_id"),10),a.custom_data=i.$form.data("custom_data"),i.xhr=y.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:a,success:function(t){t?i.$form.trigger("found_variation",[t]):(i.$form.trigger("reset_data"),e.chosenCount=0,i.loading||(i.$form.find(".single_variation").after('

'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"

"),i.$form.find(".wc-no-matching-variations").slideDown(200)))},complete:function(){i.$form.unblock()}})):(i.$form.trigger("update_variation_values"),(a=i.findMatchingVariations(i.variationData,a).shift())?i.$form.trigger("found_variation",[a]):(i.$form.trigger("reset_data"),e.chosenCount=0,i.loading||(i.$form.find(".single_variation").after('

'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"

"),i.$form.find(".wc-no-matching-variations").slideDown(200)))):(i.$form.trigger("update_variation_values"),i.$form.trigger("reset_data")),i.toggleResetLink(0parseFloat(a.max_qty)?a.max_qty:t)"),s=i.val()||"",c=!0;i.data("attribute_html")||((_=i.clone()).find("option").prop("disabled attached",!1).prop("selected",!1),i.data("attribute_options",_.find("option"+o).get()),i.data("attribute_html",_.html())),n.html(i.data("attribute_html"));var _=y.extend(!0,{},$);_[e]="";var d,m=b.findMatchingVariations(b.variationData,_);for(d in m)if("undefined"!=typeof m[d]){var l,v=m[d].attributes;for(l in v)if(v.hasOwnProperty(l)){var g=v[l],u="";if(l===e)if(m[d].variation_is_active&&(u="enabled"),g){g=y("
").html(g).text();var f=n.find("option");if(f.length)for(var h=0,p=f.length;ht.width||i.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"})):t.style.backgroundSize=e["object-fit"].replace("none","auto").replace("fill","100% 100%"),f(i.img,(function(e){p(t,e.naturalWidth,e.naturalHeight)}))}function g(t,e){var i=!d&&!t;if(e=e||{},t=t||"img",a&&!e.skipTest||!l)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var o=0;o=0,i=new Image,n="object-fit"in i.style&&!e,o="object-position"in i.style&&!e,r=/(object-fit|object-position)\s*:\s*([-\w\s%]+)/g;function s(t){for(var e=getComputedStyle(t).fontFamily,i=null,n={};null!==(i=r.exec(e));)n[i[1]]=i[2];return n["object-position"]?function(t){~t["object-position"].indexOf("left")?t["object-position-x"]="left":~t["object-position"].indexOf("right")?t["object-position-x"]="right":t["object-position-x"]="center";~t["object-position"].indexOf("top")?t["object-position-y"]="top":~t["object-position"].indexOf("bottom")?t["object-position-y"]="bottom":t["object-position-y"]="center";return t}(n):n}function a(t,e){if("fill"!==e["object-fit"]){var i=t.style,n=window.getComputedStyle(t),o=document.createElement("object-fit");o.appendChild(t.parentNode.replaceChild(o,t));var r={height:"100%",width:"100%",boxSizing:"content-box",display:"inline-block",overflow:"hidden"};for(var s in"backgroundColor backgroundImage borderColor borderStyle borderWidth bottom fontSize lineHeight left opacity margin position right top visibility".replace(/\w+/g,(function(t){r[t]=n[t]})),r)o.style[s]=r[s];i.border=i.margin=i.padding=0,i.display="block",i.opacity=1,t.addEventListener("loadedmetadata",a),window.addEventListener("optimizedResize",a),t.readyState>=1&&(t.removeEventListener("loadedmetadata",a),a())}function a(){var n=t.videoWidth/t.videoHeight,r=o.clientWidth,s=o.clientHeight,a=r/s,l=0,c=0;i.marginLeft=i.marginTop=0,(n1?a.options.decimal+e[1]:"",a.options.useGrouping){for(o="",r=0,s=i.length;ra.endVal,a.frameVal=a.startVal,a.initialized=!0,0):(a.error="[CountUp] startVal ("+e+") or endVal ("+i+") is not a number",1)):(a.error="[CountUp] target is null or undefined",1)))},a.printValue=function(t){var e=a.options.formattingFn(t);"INPUT"===a.d.tagName?this.d.value=e:"text"===a.d.tagName||"tspan"===a.d.tagName?this.d.textContent=e:this.d.innerHTML=e},a.count=function(t){a.startTime||(a.startTime=t),a.timestamp=t;var e=t-a.startTime;a.remaining=a.duration-e,a.options.useEasing?a.countDown?a.frameVal=a.startVal-a.options.easingFn(e,0,a.startVal-a.endVal,a.duration):a.frameVal=a.options.easingFn(e,a.startVal,a.endVal-a.startVal,a.duration):a.countDown?a.frameVal=a.startVal-(a.startVal-a.endVal)*(e/a.duration):a.frameVal=a.startVal+(a.endVal-a.startVal)*(e/a.duration),a.countDown?a.frameVal=a.frameVala.endVal?a.endVal:a.frameVal,a.frameVal=Math.round(a.frameVal*a.dec)/a.dec,a.printValue(a.frameVal),ea.endVal,a.rAF=requestAnimationFrame(a.count))}},a.initialize()&&a.printValue(a.startVal)}})?n.call(e,i,e,t):n)||(t.exports=o)},function(t,e){t.exports=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}},,,,,,,,,,,,,,,,,,,function(t,e,i){t.exports=i(27)},function(t,e,i){"use strict";i.r(e),function(t){var e=i(3),n=i.n(e);i(28),i(29),i(30),i(31),i(32),i(33),i(34),i(35),i(36),i(37),i(39),i(40),i(41),i(42),i(43),i(44),i(45),i(46),i(47),i(48),i(49),i(50),i(51),i(52),i(53),i(54),i(55),i(56),i(57),i(58),i(59),i(70),i(60),i(61),i(62);jQuery((function(){return t.Flatsome.attach(document)})),t.cookie=n.a}.call(this,i(0))},function(t,e,i){var n,o,r,s,a,l,c,u,h,d,p,f,m,g,v,y,b,w,x,C,k,S,E,T,_,j,I,P,A; !function(n,o){P=[i(1)],void 0===(A=function(t){return function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,o=void 0===n?function(){}:function(t){n.error(t)};function r(n,r,a){function l(t,e,i){var r,s="$()."+n+'("'+e+'")';return t.each((function(t,l){var c=a.data(l,n);if(c){var u=c[e];if(u&&"_"!=e.charAt(0)){var h=u.apply(c,i);r=void 0===r?h:r}else o(s+" is not a valid method")}else o(n+" not initialized. Cannot call methods, i.e. "+s)})),void 0!==r?r:t}function c(t,e){t.each((function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))}))}(a=a||e||t.jQuery)&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){var e=i.call(arguments,1);return l(this,t,e)}return c(this,t),this},s(a))}function s(t){!t||t&&t.bridget||(t.bridget=r)}return s(e||t.jQuery),r}(n,t)}.apply(e,P))||(t.exports=A)}(window),"undefined"!=typeof window&&window,r={id:"ev-emitter/ev-emitter",exports:{},loaded:!1},n="function"==typeof(o=function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o