1){setTimeout(function(){deleteString($target,callback)},settings.delay);return true}callback()}function loopTyping($target,index){$target.attr("placeholder","");typeString($target,index,0,function(){setTimeout(function(){deleteString($target,function(){loopTyping($target,(index+1)%settings.text.length)})},settings.pause)})}return this.each(function(){loopTyping($(this),0)})}}(jQuery));var responsivelyLazy="undefined"!==typeof responsivelyLazy?responsivelyLazy:function(){var r=!1,t=!1,l=null,p=null,m="undefined"!==typeof IntersectionObserver,q=!1,u=[],v=function(a){if(null===l)return!1;var b=a.getBoundingClientRect();a=b.top;var c=b.left,d=b.width,b=b.height;return ab[1])return 1;if(a[1]===b[1]){if(-1!==b[0].indexOf(".webp",b[0].length-5))return 1;if(-1!==a[0].indexOf(".webp",a[0].length-5))return-1}return 0});c=d}else c=[];else c=[];k=a.offsetWidth*("undefined"!==typeof window.devicePixelRatio?window.devicePixelRatio:1);d=null;h=c.length;for(f=0;f=k){d=e;break}null===d&&(d=[b.getAttribute("src"),999999]);"undefined"===typeof a.responsivelyLazyLastSetOption&&(a.responsivelyLazyLastSetOption=["",0]);a.responsivelyLazyLastSetOption[1]0&&productGrid.length>0){if(orders){var shippedOrderMsnry=new Masonry(orders,{itemSelector:'.product-item',percentPosition:true,stagger:30,visibleStyle:{transform:'translateY(0)',opacity:1},hiddenStyle:{transform:'translateY(100px)',opacity:0},});productGrid.infiniteScroll({path:'#next-page',append:'.product-item',history:'replace',outlayer:shippedOrderMsnry,scrollThreshold:100,});}else{var categoryProductsMsnry=new Masonry(categoryProducts,{itemSelector:'.product-item',percentPosition:true,stagger:30,visibleStyle:{transform:'translateY(0)',opacity:1},hiddenStyle:{transform:'translateY(100px)',opacity:0},});productGrid.infiniteScroll({path:'#next-page',append:'.product-item',history:'replace',outlayer:categoryProductsMsnry,scrollThreshold:100,});}productGrid.on('request.infiniteScroll',function(event,path){$('#ajaxloading').css('display','block');});productGrid.on('append.infiniteScroll',function(event,response,path){responsivelyLazy.run();$('#ajaxloading').css('display','none');$(".pager").html($(response).find('.pager').html());});}$('#pdp_size_and_fit').on('change','.sizeListClass',function(evt){var si=evt.target.selectedIndex;sizeSelectCount=document.querySelectorAll('select.sizeListClass').length;for(var i=1;i<=sizeSelectCount;i++){document.getElementById('sizeList_'+i).selectedIndex=si;}});$('#nav>li').hover(function(){if($(this).hasClass('has-children')){var pcMenuHeight=$(this).find('ul').outerHeight();var pcNavMenuHeight=$(this).parent().outerHeight();if(pcMenuHeight>pcNavMenuHeight){$(this).parent().css('min-height',pcMenuHeight+'px');}else{$(this).find('ul').css('min-height',pcNavMenuHeight+'px');}}},function(){$(this).parent().removeAttr('style');});$('#product_addtocart_form').submit(function(event){if($('#product-options-wrapper').length>0){var selected;$('#product-options-wrapper input:radio').each(function(){selected=$(this).attr('name');return false;});if(!$('input:radio[name="'+selected+'"]:checked').val()){$('#product-options-wrapper').addClass('error-msg');return false;}if($('#product-options-wrapper').hasClass('error-msg')){$('#product-options-wrapper').removeClass('error-msg');}}var loading='';var addtoCart=$('#btn-addtocart');var addToCartText=$('#btn-addtocart .text');var ogText=addToCartText.html();event.preventDefault();addtoCart.attr('disabled',true);addToCartText.html(loading);var formSerialize=$(this).serialize();$.ajax({type:'get',url:baseUrl+'xbasic/ajaxcart/add',data:formSerialize,dataType:'json',success:function(results){if(results.status=='ERROR'){alert(results.message);addToCartText.html(ogText);}else{addtoCart.addClass('clicked');$('#header-min-cart').html(results.minicart);$('#header-min-cart-sum').html(results.numbers);addtoCart.attr('disabled',false);setTimeout(function(){var modalCart=new bootstrap.Modal(document.getElementById('modal-cart'),{keyboard:false,backdrop:'static',});modalCart.show();addtoCart.removeClass('clicked');addToCartText.html(ogText);},2000);}}});});$('#checkout').submit(function(event){var isSubmit=false;$('#checkout').addClass('loading');$('#btn-checkout').attr('disabled','disabled');if(isSubmit===false){isSubmit=true;return true;}else{return false;}});$('.radio[name=shipping_method]').each(function(){$(this).change(function(){var shipping_method=$(this).val();var reloadingDiv=$('#opc-review');$(reloadingDiv).addClass('loading');$.ajax({type:'post',url:baseUrl+'checkout/onepage/saveShippingMethod',data:{shipping_method:shipping_method},dataType:'json',success:function(results){$('#checkout-review').html(results.update_review.html);$(reloadingDiv).removeClass('loading');}});});});$('.radio[name=payment_method]').each(function(){$(this).change(function(){var payment_method=$(this).val();var reloadingDiv=$('#opc-review');$(reloadingDiv).addClass('loading');$.ajax({type:'post',url:baseUrl+'checkout/onepage/savePaymentMethod',data:{payment_method:payment_method},dataType:'json',success:function(results){$('#checkout-review').html(results.update_review.html);$(reloadingDiv).removeClass('loading');}});});});$("#country_id").change(function(){var countryId=$("#country_id").val();$.ajax({url:baseUrl+"checkout/onepage/regions",data:{country_id:countryId},type:"POST",dataType:'json',success:function(results){var regions=results;var regionId=$("#region_id");regionId.empty();if(regions.length>0){regionId.css('display','block');$('#region_id_2').css('display','none');for(var i=0;i").val(region.region_id).text(region.region_label).appendTo(regionId);}}else{regionId.css('display','none');$('#region_id_2').css('display','block');}regionId.parent().addClass('floated');}});});$('#checkout input[type=text]').each(function(){$(this).blur(function(){var formSerialize=$('#checkout').serialize();var name=$(this).attr('name');var value=$(this).val();if(name&&value){setTimeout(function(){$.ajax({type:'post',url:baseUrl+'checkout/onepage/updateQuote',data:formSerialize,dataType:'json',});},1000)}});});$('#checkout select').each(function(){$(this).change(function(){var formSerialize=$('#checkout').serialize();var name=$(this).attr('name');var value=$(this).val();if(name&&value){setTimeout(function(){$.ajax({type:'post',url:baseUrl+'checkout/onepage/updateQuote',data:formSerialize,dataType:'json',});},1000)}});});$('.play-icon').click(function(e){var playIcon=$(this);playIcon.next().css('opacity','1');var thisVideo=playIcon.next().find('video');var vSrc=thisVideo.attr('data-src');thisVideo.attr('src',vSrc);thisVideo.attr('autoplay','autoplay');playIcon.hide();});$('#count-down').countdownsync({dayTag:"",hourTag:"00",minTag:"00",secTag:"00",dayClass:".dd",hourClass:".hh",minClass:".mm",secClass:".ss",isDefault:false,showTemp:1},function(){location.reload();});var related=$('#related .owl-carousel');var homeBanner=$('#home-banner .owl-carousel');var homeNew1=$('#home-new-1 .owl-carousel');var homeNew2=$('#home-new-2 .owl-carousel');if(mainImages.length>0&&thumbnailImages.length>0){if($('.home-slider').length>0){var slidesPerPage=3;}else{var slidesPerPage=4;}mainImages.owlCarousel({items:1,slideSpeed:2000,loop:true,margin:0,nav:false,dots:true,responsiveRefreshRate:200,});mainImages.on('drag.owl.carousel',dragOwlCarousel(mainImages));mainImages.on('changed.owl.carousel',changedOwlCarousel(mainImages));mainImages.on('changed.owl.carousel',syncPosition);$('.home-slider .controller-next').click(function(){mainImages.trigger('next.owl.carousel');});$('.home-slider .controller-prev').click(function(){mainImages.trigger('prev.owl.carousel');});thumbnailImages.on('initialized.owl.carousel',function(){thumbnailImages.find(".owl-item").eq(0).addClass("current");});thumbnailImages.owlCarousel({items:slidesPerPage,margin:7,nav:false,dots:false,touchDrag:false,mouseDrag:false,pullDrag:false,freeDrag:false,smartSpeed:200,slideSpeed:500,slideBy:1,responsiveRefreshRate:100,});thumbnailImages.on('changed.owl.carousel',syncPosition2);changedOwlCarousel(thumbnailImages);resizedowlcarousel(thumbnailImages);$('.thumbnailImages .carousel-control-next').click(function(){thumbnailImages.trigger('next.owl.carousel');});$('.thumbnailImages .carousel-control-prev').click(function(){thumbnailImages.trigger('prev.owl.carousel');});function syncPosition(el){var count=el.item.count-1;var current=Math.round(el.item.index-(el.item.count/2)-.5);if(current<0){current=count;}if(current>count){current=0;}thumbnailImages.find(".owl-item").removeClass("current").eq(current).addClass("current");var onscreen=thumbnailImages.find('.owl-item.active').length-1;var start=thumbnailImages.find('.owl-item.active').first().index();var end=thumbnailImages.find('.owl-item.active').last().index();if(current>end){thumbnailImages.data('owl.carousel').to(current,100,true);}if(current0){homeBanner.owlCarousel({loop:true,autoplay:true,autoplayTimeout:3000,autoplayHoverPause:true,margin:0,nav:false,dots:true,lazyLoad:true,responsive:{0:{items:1}},});homeBanner.on('changed.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){if($(this).hasClass('active')){$(this).children().css('display','block');$(this).next().children().css('display','block');$(this).prev().children().css('display','block');}});responsivelyLazy.run();});$('#home-banner .controller-next').click(function(){homeBanner.trigger('next.owl.carousel');});$('#home-banner .controller-prev').click(function(){homeBanner.trigger('prev.owl.carousel',[300]);});}if(homeNew1.length>0){homeNew1.owlCarousel({loop:true,margin:12,nav:false,dots:false,responsive:{0:{items:2},992:{items:5}},});homeNew1.on('changed.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){$(this).children().css('display','block');});responsivelyLazy.run();});$('#home-new-1 .controller-next').click(function(){homeNew1.trigger('next.owl.carousel');});$('#home-new-1 .controller-prev').click(function(){homeNew1.trigger('prev.owl.carousel');});}if(homeNew2.length>0){homeNew2.owlCarousel({loop:true,margin:12,nav:false,dots:false,responsive:{0:{items:2},992:{items:5}},});homeNew2.on('changed.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){$(this).children().css('display','block');});responsivelyLazy.run();});$('#home-new-2 .controller-next').click(function(){homeNew2.trigger('next.owl.carousel');});$('#home-new-2 .controller-prev').click(function(){homeNew2.trigger('prev.owl.carousel');});}if(related.length>0){related.owlCarousel({loop:true,margin:12,nav:false,dots:false,responsive:{0:{items:2},600:{items:3},1000:{items:4}},});related.on('changed.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){$(this).children().css('display','block');});responsivelyLazy.run();});$('#related .controller-next').click(function(){related.trigger('next.owl.carousel');});$('#related .controller-prev').click(function(){related.trigger('prev.owl.carousel');});}$('#reviewsCheck').click(function(){var sel=document.querySelector('#reviews-tab');bootstrap.Tab.getOrCreateInstance(sel).show();$('html,body').animate({scrollTop:$('#reviews-tab').offset().top-stickyHeaderHeight},100);});$('#sizechart').click(function(){var sel=document.querySelector('#sizechart-tab');bootstrap.Tab.getOrCreateInstance(sel).show();$('html,body').animate({scrollTop:$('#sizechart-tab').offset().top-stickyHeaderHeight},100);});$('.description img').each(function(){var imgSrc=$(this).attr('data-srcset');if(imgSrc){$(this).attr('srcset',imgSrc);}else{$(this).attr('srcset',$(this).attr('src'));}});$('#slinky').slinky();hyperform(window);responsivelyLazy.run();backTopButton();const product__options_wrapper=$('#product-options-wrapper');if(product__options_wrapper.length>0){const product__custom_option=$('.product-custom-option');const product__price=$('.price-box');const product_id=$('#product__id').val();product__custom_option.on('change',function(){let product__options_price=0;product__custom_option.each(function(){if($(this).is(':checked')){product__options_price+=parseFloat($(this).attr('price'));}});$.ajax({type:'post',url:baseUrl+'xbasic/ajaxcart/formatProductPrice',data:{product_id:product_id,option_price:product__options_price},dataType:'json',success:function(results){product__price.find('#product-price-'+results.product_id).text(results.price);}});});}});$(document).off('click','.table_qty_inc').on('click','.table_qty_inc',function(){if($(this).parent().children(".qty").is(':enabled')){$(this).parent().children(".qty").val((+$(this).parent().children(".qty").val()+1)||0);}});$(document).off('click','.table_qty_dec').on('click','.table_qty_dec',function(){if($(this).parent().children(".qty").is(':enabled')){$(this).parent().children(".qty").val(($(this).parent().children(".qty").val()-1>0)?($(this).parent().children(".qty").val()-1):1);}});$(document).off('click','#opc-review .table_qty').on('click','#opc-review .table_qty',function(){var reloadingDiv=$('#opc-review');reloadingDiv.addClass('loading');var formSerialize=$('#checkout').serialize();$.ajax({type:'post',url:baseUrl+'checkout/onepage/updateItemQty',data:formSerialize,dataType:'json',success:function(results){$('#checkout-review').html(results.update_review.html);reloadingDiv.removeClass('loading');}});});function readyOwlCarousel(selectElement){initializedOwlCarousel(selectElement);selectElement.owlCarousel({loop:true,margin:6,nav:false,center:true,dots:false,responsive:{0:{items:2},992:{items:4},},});dragOwlCarousel(selectElement);}function initializedOwlCarousel(select){select.on('initialized.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){if($(this).hasClass('active')){$(this).prev().find('.owl-carousel-item').css('display','block');}});responsivelyLazy.run();});}function resizedowlcarousel(select){select.on('resized.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){$(this).find('.owl-carousel-item').css('display','block');});responsivelyLazy.run();});}function dragOwlCarousel(select){select.on('drag.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){$(this).find('.owl-carousel-item').css('display','block');});responsivelyLazy.run();});}function changedOwlCarousel(select){select.on('translate.owl.carousel',function(event){var children=$(event.target).find('.owl-stage').children();children.each(function(){$(this).find('.owl-carousel-item').css('display','block');});responsivelyLazy.run();});}function backTopButton(){var $backTop=$('#scrollToTopBtn');if($backTop.length){$(window).scroll(function(){if($(this).scrollTop()>200){$backTop.addClass('showBTT');}else{$backTop.removeClass('showBTT');}});$backTop.click(function(){$('body,html').animate({scrollTop:0},500);return false;});}}const product_grid=$('#category-products');const _stickyHeaderHeight=$('#header').outerHeight(true);const product__reviews=document.getElementById('product__reviews-trigger');if(product__reviews){const product__reviews_accordion_body=$('#product__reviews-accordion-body');const product__id=$('input[name=product]').val();product__reviews.addEventListener('show.bs.tab',event=>{if(!product__reviews_accordion_body.html()){const ajax__loading='';product__reviews_accordion_body.html(ajax__loading);$.ajax({type:'post',url:store_url+'xreview/ajax/list',data:{id:product__id},dataType:'json',success:function(results){product__reviews_accordion_body.html(results);responsivelyLazy.run();const product__reviews_wrapper=$('#product__reviews-wrapper');product__reviews_wrapper.masonry({itemSelector:'.product__review-wrapper'});}});}responsivelyLazy.run();$('html,body').animate({scrollTop:$('#product-nav').offset().top-_stickyHeaderHeight},100);});}$(document).on('click','.product__rating-button',function(e){e.preventDefault();$('#product__reviews-trigger').trigger('click');});$(document).on('click','.product__review-content-show-more',function(e){e.preventDefault();$(this).next().css('display','inline-block');$(this).css('display','none');if(product_grid.length){product_grid.masonry({itemSelector:'.product-grid__item'});}else{const product__reviews_wrapper=$('#product__reviews-wrapper');product__reviews_wrapper.masonry({itemSelector:'.product__review-wrapper'});}});$(document).on('click','.product__review-like',function(){const ajax_load_span='';const product__review_id=$(this).attr('data-review-id');const product__review_like=$('#product__review-like-'+product__review_id);product__review_like.html(ajax_load_span);$.ajax({type:'post',url:store_url+'xreview/ajax/like',data:{id:product__review_id},dataType:'json',success:function(results){product__review_like.text(results.like);}});});$(document).on('click','.product__review-dislike',function(){const ajax_load_span='';const product__review_id=$(this).attr('data-review-id');const product__review_like=$('#product__review-dislike-'+product__review_id);product__review_like.html(ajax_load_span);$.ajax({type:'post',url:store_url+'xreview/ajax/dislike',data:{id:product__review_id},dataType:'json',success:function(results){product__review_like.text(results.dislike);}});});const body__review_ajax_modal_content=$('.body__review-ajax-modal-content');$(document).on('click','#product__review-write',function(){$('.product__rating-summary').addClass('ajax');const body__review_ajax_modal=new bootstrap.Modal('#body__review-ajax-modal');const product__id=$('input[name="product"]').val();$.ajax({type:'post',url:store_url+'xreview/ajax/form',data:{productId:product__id},dataType:'json',success:function(results){body__review_ajax_modal_content.html(results);body__review_ajax_modal.show();$('.product__rating-summary').removeClass('ajax');}});});const review__images=[];$(document).on('change','.review__form-input-files',function(e){const review__images_wrapper=$('#review__form-uploaded-images');const maxLength=$(this).attr('data-max-files');const files=e.target.files;const filesArr=Array.prototype.slice.call(files);let iterator=0;filesArr.forEach(function(f,index){if(!f.type.match('image.*')){return;}if(review__images.length>maxLength){return false}else{let len=0;for(let i=0;imaxLength){return false;}else{review__images.push(f);const reader=new FileReader();reader.onload=function(e){const html="";review__images_wrapper.append(html);iterator++;}reader.readAsDataURL(f);}}});});$(document).on('click',".review__form-uploaded-image-delete",function(e){const file=$(this).parent().data("file");for(let i=0;i'+results.message+'