jQuery(function($){var nbt_ajax_cart_load={block:function($el){$el.block({message:null,overlayCSS:{background:'#fff',opacity:0.6}});},unblock:function($el){$el.unblock();}}
var nbt_ajax_cart={init:function(){$(document).on('click','.add_to_cart_button',this.add_to_cart);$(document).on('click','.nbt-ac-icon',this.show_cart_content);$(document).on('click','.mini_cart_item .remove',this.remove_to_cart);$(document).on('click','.single_add_to_cart_button:not(.disabled)',this.add_to_cart_single);$(".cart_list").mCustomScrollbar({theme:"dark"});this.load_cal();$(document).mouseup(function(e)
{if($(".nbt-mini-cart").length){var container=$(".nbt-mini-cart");var icon=$(".nbt-ac-icon");if(!container.is(e.target)&&container.has(e.target).length===0&&!icon.is(e.target)&&icon.has(e.target).length===0)
{container.hide();container.removeClass('open');}
if(icon.is(e.target)){}}});},show_cart_content:function(){var $el=$(this).next();if($el.hasClass('open')){$el.hide();$el.removeClass('open');}else{$el.show();$el.addClass('open');}},load_cal:function(){if($(".nbt-mini-cart").length){var $width=$(window).width()-300;var position=$('.nbt-ajax-cart').offset();if($width<position.left){$(".nbt-mini-cart").addClass('nbt-ajaxcart-right');$(".nbt-mini-cart").css({right:0});}else{$(".nbt-mini-cart").addClass('nbt-ajaxcart-left');$(".nbt-mini-cart").css({left:0});}}},add_to_cart:function(){var $li=$(this).closest('li');nbt_ajax_cart_load.block($li);if(!$(this).hasClass('product_type_variable')){$('.nbt-cart-list-wrap ul').remove();$.ajax({url:wc_add_to_cart_params.ajax_url,data:{action:'nbt_add_to_cart',product_id:$(this).attr('data-product_id')},type:'POST',datatype:'json',success:function(response){nbt_ajax_cart_load.unblock($li);var rs=JSON.parse(response);if(rs.complete!=undefined){$('.nbt-ac-count').text(rs.count);$('.nbt-mini-cart-wrap').html(rs.html);$(".cart_list").mCustomScrollbar({theme:"dark"});if(rs.url_checkout!=undefined){$('.nbt-mini-cart-wrap .wc-forward').attr('href',rs.url_checkout);}
if(rs.error!=undefined){alert(rs.title);}else{$.growl.notice({message:rs.title,duration:'1500'});}}else{window.location.href=rs.url;}},error:function(){alert('There was an error when processing data, please try again !');nbt_ajax_cart_load.unblock($li);}});return false;}},remove_to_cart:function(){var $this=$(this).closest('li');nbt_ajax_cart_load.block($('.nbt-mini-cart'));$.ajax({url:wc_add_to_cart_params.ajax_url,data:{action:'nbt_remove_to_cart',product_id:$(this).attr('data-product_id'),variation_id:$(this).attr('data-variation_id')},type:'POST',datatype:'json',success:function(response){var rs=JSON.parse(response);if(rs.complete!=undefined){$this.remove();if(!rs.count){$('.nbt-mini-cart-wrap').html(rs.html);}
$('.nbt-ac-count').text(rs.count);$('.nbt-mini-cart-wrap .total').html(rs.subtotal);}
nbt_ajax_cart_load.unblock($('.nbt-mini-cart'));},error:function(){alert('There was an error when processing data, please try again !');nbt_ajax_cart_load.unblock();}});return false;},add_to_cart_single:function(){var $this=$(this);nbt_ajax_cart_load.block($this);$('.nbt-cart-list-wrap ul').remove();if($('body').hasClass('single-product')){product_id=$('[name="add-to-cart"]').val();variation_id=$('[name="variation_id"]').val()}else{product_id=$this.val();variation_id='';}
$.ajax({url:wc_add_to_cart_params.ajax_url,data:{action:'nbt_add_to_cart_single',product_id:product_id,variation_id:variation_id,quantity:$('[name="quantity"]').val()},type:'POST',datatype:'json',success:function(response){var rs=JSON.parse(response);if(rs.complete!=undefined){$('.nbt-ac-count').text(rs.count);$('.nbt-mini-cart-wrap').html(rs.html);$('.nbt-mini-cart-wrap .total').html(rs.subtotal);$(".cart_list").mCustomScrollbar({theme:"dark"});if(rs.error!=undefined){alert(rs.title);}else{if(rs.url_checkout!=undefined){window.location.href=rs.url_checkout;}else{nbt_ajax_cart.notification(rs);}}
if(rs.url_checkout!=undefined){$('.nbt-mini-cart-wrap .wc-forward').attr('href',rs.url_checkout);}}
nbt_ajax_cart_load.unblock($this);},error:function(){alert('There was an error when processing data, please try again !');nbt_ajax_cart_load.unblock($this);}});return false;},notification:function(rs){$('.ajaxcart-notification').remove();$('body').append('<div id="growls" class="ajaxcart-notification default" style="top: '+rs.top+'px;"><div class="growl growl-notice growl-medium"><div class="growl-message"><div class="growl-close">×</div>'+rs.title+'</div></div>');$('.ajaxcart-notification').hide().show('slow').delay(2000).hide('slow');}}
nbt_ajax_cart.init();});
jQuery(function($){var nbt_ajax_search_load={block:function($el){$el.block({message:null,overlayCSS:{background:'#fff',opacity:0.6}});},unblock:function($el){$el.unblock();}}
var nbt_ajax_search={init:function(){$(document).on('click','.nbt-icon-search',this.open_ajax_search);$(window).load(function(){var typingTimer;var doneTypingInterval=1000;var $input=$('.nbt-input-search');$input.on('keyup',function(){$('.nbt-icon-loading').show();$('.nbt-search-results').hide();clearTimeout(typingTimer);typingTimer=setTimeout(doneTyping,doneTypingInterval);});$input.on('keydown',function(){clearTimeout(typingTimer);});function doneTyping(){nbt_ajax_search.search_now(typingTimer);}});$(document).mouseup(function(e)
{if($(".nbt-icon-plugins.open").length){var container=$(".nbt-icon-plugins");var icon=$(".nbt-icon-search");if(!container.is(e.target)&&container.has(e.target).length===0&&!icon.is(e.target)&&icon.has(e.target).length===0)
{$('.nbt-search-wrapper').hide();container.removeClass('open');}
if(icon.is(e.target)){}}});},search_now:function(typingTimer){$('.nbt-icon-loading').show();$('.nbt-search-results').html('');$.ajax({url:wc_add_to_cart_params.ajax_url,data:{action:'nbt_search_now',search:$('.nbt-input-search').val()},type:'POST',datatype:'json',success:function(response){$('.nbt-icon-plugins').addClass('open');var rs=JSON.parse(response);if(rs.complete!=undefined){$('.nbt-search-results').append(rs.result);$(".nbt-rs-lists").mCustomScrollbar({theme:"dark"});}else{}
$('.nbt-search-results').show();$('.nbt-icon-loading').hide();clearTimeout(typingTimer);},error:function(){clearTimeout(typingTimer);alert('There was an error when processing data, please try again !');$('.nbt-icon-loading').hide();}});},open_ajax_search:function(){$('.nbt-search-results').html('');$('.nbt-input-search').val('');var $wrapper=$(this).closest('.nbt-icon-plugins').find('.nbt-search-wrapper');if($(this).hasClass('open')){$wrapper.hide();$(this).removeClass('open');}else{$wrapper.show();$(this).addClass('open');}
return false;},add_to_cart:function(){nbt_ajax_cart_load.block($('body'));$.ajax({url:wc_add_to_cart_params.ajax_url,data:{action:'nbt_add_to_cart',product_id:$(this).attr('data-product_id')},type:'POST',datatype:'json',success:function(response){var rs=JSON.parse(response);if(rs.complete!=undefined){$.growl.notice({message:rs.msg,duration:'2500'});$('.cart_list').scrollbar();}else{window.location.href=rs.url;}
nbt_ajax_cart_load.unblock($('body'));},error:function(){alert('There was an error when processing data, please try again !');nbt_ajax_cart_load.unblock($('body'));}});return false;},}
nbt_ajax_search.init();});
jQuery(function($){var nbtcs_load={block:function($el){$('.nbt-page-loading').remove();$el.append('<div class="nbt-page-loading"><span class="nbt-loading-svg"></span></div>');},unblock:function($el){$('.nbt-page-loading').remove();}}
var nbtcs_main={init:function(){$(document).on('click','.nbtcs-w-wrapper .selected',this.show_language);$(document).on('click','.nbtcs-select a',this.set_language);$(document).mouseup(function(e)
{if($(".nbtcs-w-wrapper").length){var container=$(".nbtcs-select");var icon=$(".nbtcs-w-wrapper .selected");if(!container.is(e.target)&&container.has(e.target).length===0&&!icon.is(e.target)&&icon.has(e.target).length===0)
{container.hide();container.removeClass('open');}
if(icon.is(e.target)){}}});},show_language:function(){if($(this).hasClass('active')){$('.nbtcs-select').hide();$(this).removeClass('active');}else{$('.nbtcs-select').show();$(this).addClass('active');}},set_language:function(){nbtcs_load.block($('body'));if(typeof nbt_solutions!=='undefined'&&nbt_solutions.ajax_url!=undefined){ajax_url=nbt_solutions.ajax_url;}else{ajax_url=nbtcs.ajax_url;}
$.ajax({url:ajax_url,data:{action:'nbtmcs_save_select',currency:$(this).attr('data-value'),href:$(this).attr('href'),},type:'POST',datatype:'json',success:function(response){var rs=JSON.parse(response);if(rs.complete!=undefined){location.reload();}
$('.nbtcs-select').hide();},error:function(){alert('There was an error when processing data, please try again !');nbtcs_load.unblock($('body'));}});return false;}}
nbtcs_main.init();});
var x=false;jQuery(function($){var nbtcs_frontend={init:function(){$('.variations_form').addClass('swatches-support');$('.variations_form').on('click','.swatch',this.select_attributes);$('.variations_form').on('click','.reset_variations',this.reset_attributes);$(document).ajaxComplete(this.ajax_quick_view);$(document).ajaxStop(function(){x=false;});},ajax_quick_view:function(event,request,settings){if(!x&&settings.data&&settings.data.includes("action=yith_load_product_quick_view")){nbtcs_frontend.init();x=true;}},select_attributes:function(){var selected=[];var $el=$(this),$select=$el.closest('.value').find('select'),attribute_name=$select.data('attribute_name')||$select.attr('name'),value=$el.data('value');$select.trigger('focusin');if(!$select.find('option[value="'+value+'"]').length){$el.siblings('.swatch').removeClass('selected');$select.val('').change();$('.variations_form').trigger('tawcvs_no_matching_variations',[$el]);return;}
clicked=attribute_name;if(selected.indexOf(attribute_name)===-1){selected.push(attribute_name);}
if($el.hasClass('swatch-radio')){$select.val(value);}else{if($el.hasClass('selected')){$select.val('');$el.removeClass('selected');delete selected[selected.indexOf(attribute_name)];}else{$el.addClass('selected').siblings('.selected').removeClass('selected');$select.val(value);}}
$select.change();},select_attributes_radio:function(){var $el=$(this);alert(2);},reset_attributes:function(){$(this).closest('.variations_form').find('.swatch.selected').removeClass('selected');$(this).closest('.variations_form').find('[type="radio"]').prop('checked',false);selected=[];}}
nbtcs_frontend.init();});
jQuery(document).ready(function($){var x=false;var nbtou_load={block:function($el){$el.block({message:null,overlayCSS:{background:'#fff',opacity:0.6}});},unblock:function($el){$el.unblock();}}
var nbtou_js={init:function(){$(document).on('dragover','.nbt-upload-zone',this.dragover_files);$(document).on('dragleave','.nbt-upload-zone',this.dragleave_files);$(document).on('drop','.nbt-upload-zone',this.drop_files);$(document).on('click','.nbt-oupload-target',this.click_files);$(document).on('change','.nbt-upload-input',this.change_files);$(document).on('click','.nbt-icon-cancel',this.remove_files);$(document).on('click','.toggle-order-upload',this.toggle_order_upload);},toggle_order_upload:function(){if($(this).hasClass('active')){$(this).next().slideUp();$(this).removeClass('active');}else{$(this).next().slideDown();$(this).addClass('active');}},dragover_files:function(e){e.preventDefault();e.stopPropagation();$(this).addClass('dragover');},dragleave_files:function(e){e.preventDefault();e.stopPropagation();$(this).removeClass('dragover');},drop_files:function(e){e.preventDefault();e.stopPropagation();$(this).removeClass('dragover');nbtou_js.triggerCallback(e);},triggerCallback:function(e){var $product_id=$('[name="add-to-cart"]').val();var files;if(e.originalEvent.dataTransfer){files=e.originalEvent.dataTransfer.files;}else if(e.target){files=e.target.files;}
if(typeof nbt_solutions!=='undefined'&&nbt_solutions.customer_id!=undefined){customer_id=nbt_solutions.customer_id;}else{customer_id=nbtou.customer_id;}
var $html='';for(var i=0;i<files.length;i++){$html+='<div id="'+md5(customer_id+files[i].size)+'" class="nbt-file"><div class="nbt-file-left">';if(files[i].type.indexOf('image/')===0){$html+='<img width="50" src="'+URL.createObjectURL(files[i])+'" />';}
$html+='</div><div class="nbt-file-right">';$html+='<div class="name">'+files[i].name+' <i class="nbt-icon-cancel"></i></div><div class="size"> '+nbtou_js.calcSize(files[i].size)+'</div><div class="nbt-ou-msg" style="display: none;"></div></div>';$html+='</div>';}
$('.nbt-oupload-body').append($html);var data=new FormData();data.append("action","nbt_order_upload");data.append("product_id",$product_id);$.each(files,function(key,value){data.append("nbt_files[]",value);});if(typeof nbt_solutions!=='undefined'&&nbt_solutions.ajax_url!=undefined){ajax_url=nbt_solutions.ajax_url;}else{ajax_url=nbtou.ajax_url;}
nbtou_load.block($('#nbt-order-upload'));$.ajax({url:ajax_url,type:'POST',data:data,cache:false,dataType:'json',processData:false,contentType:false,xhr:function(){var xhr=new window.XMLHttpRequest();var started_at=new Date();console.log(xhr);xhr.upload.addEventListener("progress",function(evt){console.log(evt);if(evt.lengthComputable){var loaded=evt.loaded;var total=evt.total;var seconds_elapsed=(new Date().getTime()-started_at.getTime())/1000;var bytes_per_second=seconds_elapsed?loaded/seconds_elapsed:0;var Kbytes_per_second=bytes_per_second/1000;var remaining_bytes=total-loaded;var seconds_remaining=seconds_elapsed?remaining_bytes/bytes_per_second:'calculating';jQuery('.timeRemaining').html('');jQuery('.timeRemaining').append(Math.round(seconds_remaining));$('.progress').show();$('.progress').find('.progress-bar').css('width',Math.round((evt.loaded/evt.total)*100)+"%");}},false);return xhr;},success:function(data,textStatus,jqXHR){nbtou_load.unblock($('#nbt-order-upload'));$.each(data.response,function(index,value){if(value=="SUCCESS"){$('#'+index).addClass('success');}else{$('#'+index+' .nbt-ou-msg').show();$('#'+index).addClass('error');$('#'+index+' .nbt-ou-msg').html(value);}});}});},click_files:function(){$('.nbt-upload-input').val('');$('.nbt-upload-input').trigger('click');},change_files:function(e){nbtou_js.triggerCallback(e);},calcSize:function(nBytes){if(nBytes==0){return{size:'',label:''}}
for(var aMultiples=["Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],nMultiple=0,nApprox=nBytes/1024;nApprox>1000;nApprox/=1000,nMultiple++){}
return nApprox.toFixed(2)+' '+aMultiples[nMultiple];},remove_files:function(){nbtou_load.block($('#nbt-order-upload'));var $id=$(this).closest('.nbt-file').attr('id');if(typeof nbt_solutions!=='undefined'&&nbt_solutions.ajax_url!=undefined){ajax_url=nbt_solutions.ajax_url;}else{ajax_url=nbtou.ajax_url;}
$.ajax({url:ajax_url,data:{action:'nbt_ou_remove',product_id:$('[name="add-to-cart"]').val(),file:$id},type:'POST',datatype:'json',success:function(response){nbtou_load.unblock($('#nbt-order-upload'));var rs=JSON.parse(response);if(rs.complete!=undefined){$('#'+rs.file_id).remove();}},error:function(){alert('There was an error when processing data, please try again !');nbtou_load.unblock($('#nbt-order-upload'));}});return false;}}
nbtou_js.init();});
jQuery(document).ready(function($){var x=false;var nbtou_load={block:function($el){$el.block({message:null,overlayCSS:{background:'#fff',opacity:0.6}});},unblock:function($el){$el.unblock();}}
var nbtfaq_js={init:function(){$(document).on('click','.nbt-faq-title',this.faq_triggle);},faq_triggle:function(e){e.preventDefault();if($(this).hasClass('active')){$(this).removeClass('active');$(this).closest('li').find('.nbt-faq-content').slideUp();}else{$(this).addClass('active');$(this).closest('li').find('.nbt-faq-content').slideDown();}}}
nbtfaq_js.init();});
jQuery(document).ready(function($){var x=false;var nbtpdf_js={init:function(){$(document).on('click','.btn-pdf-preview',this.save_id);},save_id:function(){if($(this).hasClass('active')){$(this).next().slideUp();$(this).removeClass('active');}else{$(this).next().slideDown();$(this).addClass('active');}}}
nbtpdf_js.init();});
jQuery(function($){var $el=$('.variations_form');var pm_load={block:function(){$el.block({message:null,overlayCSS:{background:'#fff',opacity:0.6}});},unblock:function(){$el.unblock();}}
var pm_frontend={init:function(){$(document).on('click','.pure-table .price',this.selected_price);$(document).on('change','table.un-variations tr:visible select',this.change_attr);Tippy('.tippy',{animation:'scale',duration:200,arrow:true,position:'bottom'});},load_var:function(){},change_attr:function(){var $this=$(this).val();pm_load.block();var $total=$('table.un-variations tr:visible select').length;var optionVal={};var count=0;$('table.un-variations tr:visible select').each(function(index){if($(this).val()){var $id=$(this).closest('select').attr('id');var $val=$(this).val();optionVal[$id]=$val;count+=1;}});if($this&&$total==count){pm_load.block();$.ajax({url:wc_add_to_cart_params.ajax_url,data:{action:'pm_load_matrix',security:$('[name="security"]').val(),product_id:$('[name="add-to-cart"]').val(),attr:optionVal},type:'POST',datatype:'json',success:function(response){var rs=JSON.parse(response);if(rs.complete!=undefined){$('.price_attr').remove();$('.table-responsive, [name="price_attr"], [name="security"]').remove();$('table.un-variations').after(rs.return);Tippy('.tippy',{animation:'scale',duration:200,arrow:true,position:'bottom'});}
pm_load.unblock();},error:function(){alert('There was an error when processing data, please try again !');}});}else{$('.table-responsive').remove();pm_load.unblock();}},selected_price:function(){if($('.pure-table td.price').not($(this)).hasClass('selected')){$('.pure-table td.price.selected').removeAttr('style');}
$('.pure-table .price').removeClass('selected');$(this).addClass('selected');var $attr=$(this).attr('data-attr');$.each(JSON.parse($attr),function(key,pm){$('#'+pm.name).val(pm.value);});$('table.variations tr:not(:visible) select').trigger('change');if($('body').hasClass('has-pm-scroll')){$('html,body').animate({scrollTop:$(".woocommerce-variation-add-to-cart").offset().top-100},'slow');}}}
if($(".pure-table").length>0){pm_frontend.init();pm_frontend.load_var();}});;(function($){$(document).ready(function(){"use strict";var items=$('.nbcs-list-items'),item=$('.nbcs-list-items li'),first_item=$('.nbcs-list-items li:first-child'),checkbox=items.find('input'),total_price_wrap=$('.nbcs-price-box'),total_price_class=total_price_wrap.find('.nbcs-display-total-price'),total_price_html=total_price_class.find('.amount');Number.prototype.format=function(n,x){var re='(\\d)(?=(\\d{'+(x||3)+'})+'+(n>0?'\\.':'$')+')';return this.toFixed(Math.max(0,~~n)).replace(new RegExp(re,'g'),'$1,');};var get_total=function(total){var html='';if(nb_fbt.currency_pos==='left'){html=nb_fbt.currency_symbol+total.format(2);}
else if(nb_fbt.currency_pos==='left_space'){html=nb_fbt.currency_symbol+' '+total.format(2);}
else if(nb_fbt.currency_pos==='right'){html=total.format(2)+nb_fbt.currency_symbol;}
else if(nb_fbt.currency_pos==='right_space'){html=total.format(2)+' '+nb_fbt.currency_symbol;}
return html;};checkbox.on('change',function(){var t=$(this),id=t.attr('id'),total_price_attr=total_price_class.attr('data-total-price'),product_price=t.attr('data-price'),to_show=[],checked=items.find('input:checked'),thumb=$('.nbcs-list-images li.nbcs-thumb[data-rel="'+id+'"]'),plus_icon=$('li.nbcs-plus-icon'),total=0;t.parents('li').toggleClass('unchecked');checked.each(function(i){to_show[i]=this.id;total+=parseFloat($(this).attr('data-price'));});total_price_class.attr('data-total-price',total);thumb.fadeToggle();if(to_show.length==0||to_show.length==1){plus_icon.fadeOut();}
else if(to_show.length==item.length){plus_icon.fadeIn();}
else if(id=='offeringID_0'){if(to_show[0]!=id){$('li.nbcs-plus-icon[data-rel="'+to_show[0]+'"]').fadeOut();}
else
{thumb.next(plus_icon).fadeIn();}}
else if(to_show[0]==id||to_show[0]==thumb.next(plus_icon).data('rel')){thumb.next(plus_icon).fadeToggle();}
else{thumb.prev(plus_icon).fadeToggle();}
total_price_html.html(get_total(total));var combox_checked=checked.length;if(combox_checked==0){total_price_wrap.hide();}
else{total_price_wrap.show();}
if(combox_checked<=3){total_price_wrap.removeClass('clear-price-box');}
else{total_price_wrap.addClass('clear-price-box');}});var variations_form=$('form.variations_form');if(variations_form.length==1)
{$(document).on('change','table.variations select',function(){var target=document.body;var config={childList:true,subtree:true,attributes:true,characterData:true};observer.observe(target,config);setTimeout(function(){observer.disconnect();},1000);});var variations_data=JSON.parse($('form.variations_form').attr('data-product_variations'));var observer=new MutationObserver(function(mutationRecords,observer){mutationRecords.forEach(function(mutation){var first_id=$('.variations tr:first-child select').attr('id');if(mutation.attributeName=='current-image'){var select_id=mutation.target[0].id,image_id=$('.variations_form').attr('current-image');if(select_id==first_id&&image_id){var new_variation_data={};$.each(variations_data,function(i){$.each(variations_data[i],function(key,val){if(key=='image_id'&&val==image_id){new_variation_data[i]=variations_data[i];}});});var new_thumb='',new_srcset='',new_price=0,new_price_html='',new_variation_id=0;$.each(new_variation_data,function(k){new_thumb=new_variation_data[k].image.thumb_src;new_srcset=new_variation_data[k].image.srcset;new_price=new_variation_data[k].display_price;new_price_html=new_variation_data[k].price_html;new_variation_id=new_variation_data[k].variation_id;});if(new_thumb!=''&&new_srcset!=''){$('.nbcs-list-images li:first-child a img').attr('src',new_thumb).attr('srcset',new_srcset);}
var total_price=total_price_class.attr('data-total-price'),first_combo_box=first_item.find('input[name="cb-item[]"]'),first_input=first_item.find('input[name="offeringID[]"]'),first_product_price=first_combo_box.attr('data-price'),first_product_price_html=first_item.find('.amount'),new_total_price=parseFloat(total_price)-parseFloat(first_product_price)+parseFloat(new_price);if(!first_item.hasClass('unchecked')){total_price_html.html(get_total(new_total_price));total_price_class.attr('data-total-price',new_total_price);}
first_combo_box.attr('data-price',new_price).val(new_variation_id);first_product_price_html.html(new_price_html);first_input.val(new_variation_id).removeClass().addClass('offeringID-'+new_variation_id);}}});});}})}(jQuery));