https://symaskinetorvet.dk/wp-content/cache/min/1/wp-content/theme…/js/woocommerce.js?ver=1790423229
1(function($){$('body').on('added_to_cart',function(){jQuery('.site-header-cart').addClass('active cart-active');jQuery('.site-header-cart').hover(function(){jQuery('.cart-active').removeClass('cart-active')});setTimeout(function(){jQuery('.cart-active').removeClass('active')},5000)});$('.stom_buy_now').on('click',function(){var productform=$(this).parent();productform.append('<input type="hidden" value="true" name="stom_buy_now" />')});$('.price_slider').on('slidestop',function(event){$('.widget_price_filter form').submit()});$('.woo-search').click(function(){if($(".woo-search-input").is(":visible")){$(".woo-search-input").slideToggle();$(".woo-search-input input.search-field").blur()}else{$(".woo-search-input").slideToggle();$(".woo-search-input input.search-field").focus()}});window.didWeChangeFirmakonto=!1;$(document).on('change','input[name="payment_method"]',function(){if(this.value=='yanco_wc_ean_payment_gateway'){if(!$('#is_company input').is(':checked')){window.didWeChangeFirmakonto=!0;$('#is_company input').prop('checked',!0).trigger('change')} 2if(!$('#billing_company_field abbr.required').length){var $required=$('#billing_email_field abbr.required').clone();$('#billing_company_field label').append($required)}}else{if(window.didWeChangeFirmakonto){window.didWeChangeFirmakonto=!1;$('#is_company input').prop('checked',!1).trigger('change')} 3if($('#billing_company_field abbr.required').length){$('#billing_company_field abbr.required').remove()}}});$(window).on('load',function(){$('input[name="payment_method"]:checked').trigger('change')});$(window).on('load',function(){if($('.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.disabled_item').length) 4$('.yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.disabled_item').attr('target','_blank')});$(document).on('keydown','.woocommerce.single-product .entry-summary form.cart .quantity input.qty',function(e){if(e.originalEvent.code=='Period') 5return!1});$(document).on('click','.product-add-to-cart-interface .popup-close',function(){$(this).parents('.product-add-to-cart-interface').fadeOut(500)});if($('#free-service-fee-interface').length){window.feePrice=$('#free-service-fee-interface .add-service-fee').attr('data-fee-price');$('#free-service-fee-interface .add-service-fee').removeAttr('data-fee-price');function stomHandleFreeServiceFeePopup(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();$("#free-service-fee-interface").fadeIn(500);return!1} 6if($('#forventet-paa-lager-overlay').length){$('body').on('click','.add_to_cart_soon',function(e){$("#forventet-paa-lager-overlay").fadeOut(500);stomHandleFreeServiceFeePopup(e)})}else{$('body').on('click','.single_add_to_cart_button',stomHandleFreeServiceFeePopup)} 7function stomServiceFeeHandler(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();if($('#forventet-paa-lager-overlay').length) 8$("body").off("click",".single_add_to_cart_button",window.stom_lager_popup_functionality);else $('body').off('click','.single_add_to_cart_button',stomHandleFreeServiceFeePopup);if(!$('.single-product form.cart input[name="stom_product_service_fee_available"]').length) 9$('.single-product form.cart').append('<input type="hidden" name="stom_product_service_fee_available" value="1">');if($(this).hasClass('add-service-fee')){if(!$('.single-product form.cart input[name="stom_add_service_fee"]').length) 10$('.single-product form.cart').append('<input type="hidden" name="stom_add_service_fee" value="'+window.feePrice+'">')} 11$('body').off('click','#free-service-fee-interface .add-service-fee, #free-service-fee-interface .skip-service-fee',stomServiceFeeHandler);$("#free-service-fee-interface").fadeOut(500);window.setTimeout(function(){$('.single-product .single_add_to_cart_button:visible').trigger('click')},200);window.setTimeout(function(){location.reload()},2000);window.setTimeout(function(){$('body').on('click','#free-service-fee-interface .add-service-fee, #free-service-fee-interface .skip-service-fee',stomServiceFeeHandler);if($('#forventet-paa-lager-overlay').length) 12$("body").on("click",".single_add_to_cart_button",window.stom_lager_popup_functionality);else $('body').off('click','.single_add_to_cart_button',stomHandleFreeServiceFeePopup)},400)} 13$('body').on('click','#free-service-fee-interface .add-service-fee, #free-service-fee-interface .skip-service-fee',stomServiceFeeHandler)} 14$(document).on('keydown','#price_calculator input.amount_needed',function(e){var $this=$(this),val=$this.val();
14if(e.originalEvent.code=='Period'){var $txt=$(this);var caretPos=$txt[0].selectionStart;var textAreaTxt=$txt.val();var txtToAdd=",";$txt.val(textAreaTxt.substring(0,caretPos)+txtToAdd+textAreaTxt.substring(caretPos));return!1}});$(document).on('change input keyup','#price_calculator input.amount_needed',function(e){var $this=$(this),val=$this.val();val=val.replace('.',',');$this.val(val)});$('.pr-more').on('click',function(e){e.preventDefault();e.stopImmediatePropagation();$('html, body').animate({scrollTop:$('#tab-description').offset().top-$('#masthead').outerHeight()-$('#wpadminbar').outerHeight()-10,},1000)});var sale_label_timer,sale_label_timer_counter=0;sale_label_timer=window.setInterval(function(){sale_label_timer_counter+=250/1000;$('span.onsale, span.aw-sale-badge').each(function(){var old_html=$(this).html();if(old_html.indexOf('<strong>')!==-1)return!0;var new_html=old_html.replace('Spar','<strong>Spar</strong>');$(this).html(new_html)});if(sale_label_timer_counter>8) 15window.clearInterval(sale_label_timer)},250);var auction_label_timer,auction_label_timer_counter=0;auction_label_timer=window.setInterval(function(){auction_label_timer_counter+=250/1000;if($('body').hasClass('single-product')&&$('#primary .product.product-type-auction').length){$('.woocommerce-notices-wrapper').addClass('no-popup');window.clearInterval(auction_label_timer)} 16if(auction_label_timer_counter>8) 17window.clearInterval(auction_label_timer)},250);if($('body').hasClass('single-product')&&$('.product.product-type-auction').length){window.setTimeout(function(){if(!window.location.reload(!0)){var currentURL=window.location.pathname+window.location.search+window.location.hash;window.location.replace(currentURL)}},15000)} 18if($('body').hasClass('single-product')){var $qty=$('.woocommerce.single-product .entry-summary form.cart .quantity input.qty');$('.custom-qty-wrap .minus').on('click',function(){if($qty.attr('min')==$qty.val())return!0;$qty.val(parseInt($qty.val())-1)});$('.custom-qty-wrap .plus').on('click',function(){if($qty.attr('max')==$qty.val())return!0;$qty.val(parseInt($qty.val())+1)})} 19function stomGetAnydayElement(hostSelector,innerSelector,fallbackSelector){var host=document.querySelector(hostSelector);if(host&&host.shadowRoot){var inShadow=host.shadowRoot.querySelector(innerSelector);if(inShadow) 20return inShadow} 21if(fallbackSelector) 22return document.querySelector(fallbackSelector);return null} 23function stomFormatPriceDk(value){if(typeof value==='undefined'||value===null) 24return'';var txt=String(value).replace(/<[^>]*>/g,'').replace(/\s+/g,'').replace(/kr\.?|dkk|\/md\.?/gi,'').replace(/[^0-9,.-]/g,'');if(!txt) 25return'';if(txt.indexOf(',')!==-1&&txt.indexOf('.')!==-1){if(txt.lastIndexOf(',')>txt.lastIndexOf('.')) 26txt=txt.replace(/\./g,'').replace(',','.');else txt=txt.replace(/,/g,'')}else if(txt.indexOf(',')!==-1){txt=txt.replace(/\./g,'').replace(',','.')}else if((txt.match(/\./g)||[]).length>1){txt=txt.replace(/\./g,'')} 27var num=parseFloat(txt);if(isNaN(num)) 28return'';return num.toLocaleString('da-DK',{minimumFractionDigits:2,maximumFractionDigits:2})} 29function stomGetViabillPriceFromIframe(){var iframe=document.querySelector('iframe.viabill');if(!iframe) 30return'';var srcdoc=iframe.getAttribute('srcdoc');if(srcdoc){try{var srcdocDom=(new DOMParser()).parseFromString(srcdoc,'text/html');var vbRootInSrcdoc=srcdocDom.querySelector('#vbpt');var vbPriceInSrcdoc=srcdocDom.querySelector('.vb-price');var vbCurrencyInSrcdoc=srcdocDom.querySelector('.vb-price-currency');if(vbRootInSrcdoc&&vbRootInSrcdoc.getAttribute('data-price')) 31return vbRootInSrcdoc.getAttribute('data-price')+(vbCurrencyInSrcdoc?(' '+vbCurrencyInSrcdoc.textContent):'');if(vbPriceInSrcdoc&&vbPriceInSrcdoc.textContent) 32return vbPriceInSrcdoc.textContent+(vbCurrencyInSrcdoc?(' '+vbCurrencyInSrcdoc.textContent):'')}catch(e){}} 33try{if(iframe.contentDocument){var vbRootInDocument=iframe.contentDocument.querySelector('#vbpt');var vbPriceInDocument=iframe.contentDocument.querySelector('.vb-price');var vbCurrencyInDocument=iframe.contentDocument.querySelector('.vb-price-currency');if(vbRootInDocument&&vbRootInDocument.getAttribute('data-price')) 34return vbRootInDocument.getAttribute('data-price')+(vbCurrencyInDocument?(' '+vbCurrencyInDocument.textContent):'');
34if(vbPriceInDocument&&vbPriceInDocument.textContent) 35return vbPriceInDocument.textContent+(vbCurrencyInDocument?(' '+vbCurrencyInDocument.textContent):'')}}catch(e){} 36return''} 37function stomHandleAnydayData(){var anydayHeaderEl=stomGetAnydayElement('anyday-price-widget','.anyday-header','anyday-price-widget .anyday-header');var anydayPriceEl=stomGetAnydayElement('anyday-dialog-box','.anyday-payment-option-selected .anyday-payment-option-price','.anyday-dialog-box .anyday-payment-option-selected .anyday-payment-option-price');var viabillIframeExists=!!document.querySelector('iframe.viabill');var anydayHeader=anydayHeaderEl?anydayHeaderEl.innerHTML:'';var anydayPrice=anydayPriceEl?anydayPriceEl.innerHTML:'';var viabillPrice=stomGetViabillPriceFromIframe();var formattedViabillPrice=stomFormatPriceDk(viabillPrice);if(!anydayPrice&&formattedViabillPrice) 38anydayPrice=formattedViabillPrice;var formattedAnydayPrice=stomFormatPriceDk(anydayPrice);var hasHeader=!!(anydayHeader&&$.trim(anydayHeader)!=='');var hasPrice=!!formattedAnydayPrice;var hasViabillPrice=!!formattedViabillPrice;if(hasHeader){anydayHeader=anydayHeader.replace(/ med/g,'');$('.del-betaling-op--subtitle').html('* '+anydayHeader)} 39if(hasPrice){$('.del-betaling-op--price').html(formattedAnydayPrice+' kr./md.')} 40return{hasHeader:hasHeader,hasPrice:hasPrice,hasViabillPrice:hasViabillPrice,viabillIframeExists:viabillIframeExists}}
41function stomToggleDelBetalingVisibility(){var hasAnyday=!!document.querySelector('anyday-price-widget');var hasViabill=!!document.querySelector('.viabill-pricetag, .ViabillPricetagHolder, iframe.viabill');if(!hasAnyday&&!hasViabill){$('.del-betaling-op--container').hide();return} 42var anydayState=stomHandleAnydayData();var shouldShow=anydayState.hasPrice||anydayState.hasViabillPrice;$('.del-betaling-op--container').toggle(shouldShow)} 43stomToggleDelBetalingVisibility();var anydayInitCounter=0;var anydayObserverStarted=!1;var anydayInitInterval=window.setInterval(function(){anydayInitCounter+=250;stomToggleDelBetalingVisibility();if($('anyday-price-widget').length||$('iframe.viabill').length){var anydayState=stomHandleAnydayData();var isAnydayDataReady=anydayState.hasHeader&&anydayState.viabillIframeExists&&anydayState.hasViabillPrice;if(!anydayObserverStarted){var targetNode=document.querySelector('anyday-dialog-box');var viabillIframeNode=document.querySelector('iframe.viabill');if(targetNode){var observerTarget=targetNode.shadowRoot?targetNode.shadowRoot:targetNode;var config={attributes:!1,childList:!0,subtree:!0};var callback=function(mutationsList,observer){stomHandleAnydayData()};var observer=new MutationObserver(callback);observer.observe(observerTarget,config);anydayObserverStarted=!0}else if(viabillIframeNode){var iframeConfig={attributes:!0,attributeFilter:['srcdoc']};var iframeCallback=function(mutationsList,observer){stomHandleAnydayData()};var iframeObserver=new MutationObserver(iframeCallback);iframeObserver.observe(viabillIframeNode,iframeConfig);anydayObserverStarted=!0}} 44if(isAnydayDataReady){$('anyday-price-widget, .ViabillPricetagHolder').hide();window.clearInterval(anydayInitInterval);return}} 45if(anydayInitCounter>=10000){window.clearInterval(anydayInitInterval)}},250);if($('#sparxpres_web_sale').length&&/*!$('body').hasClass('stom-admin') &&*/($('body').hasClass('single-product')||$('body').hasClass('woocommerce-cart'))){function stomHandleSparxpresDiv(){var init_value=$('#Sparxpres__dynamic-compl
45ianceText').text(),template='slider',timer;$('.price-per-month-wrap').show();if(template=='slider'){$('.price-per-month-wrap.slider-template .price-per-month .slider').get(0).appendChild($('#sparxpres_web_sale .Sparxpres__duration-container').get(0));const targetNode=document.getElementById('Sparxpres__dynamic-formattedMonthlyPayments');const config={attributes:!1,childList:!0,subtree:!0};const callback=function(mutationsList,observer){$('.price-per-month-wrap .price .value').text($('#Sparxpres__dynamic-formattedMonthlyPayments').text());if($('.compliance-text').length){$('.price-per-month-wrap .compliance-text span').html($('#Sparxpres__dynamic-complianceText').html()+' ');window.setTimeout(function(){$('.price-per-month-wrap .compliance-text span').html($('#Sparxpres__dynamic-complianceText').html()+' ')},25);window.setTimeout(function(){$('.price-per-month-wrap .compliance-text span').html($('#Sparxpres__dynamic-complianceText').html()+' ')},50);window.setTimeout(function(){$('.price-per-month-wrap .compliance-text span').html($('#Sparxpres__dynamic-compl
45ianceText').html()+' ')},100)}};const observer=new MutationObserver(callback);observer.observe(targetNode,config)}else{$('#Sparxpres__dropdown_period_selection').val($('#Sparxpres__dropdown_period_selection option[value=20]').attr('value'));$('#Sparxpres__dropdown_period_selection').trigger('change')} 46timer=window.setInterval(function(){if(init_value!=$('#Sparxpres__dynamic-complianceText').text()||$('#Sparxpres__dynamic-complianceText').text().indexOf('20 mdr.')>=0){$('.price-per-month-wrap .months .value').text($('#Sparxpres__dropdown_period_selection option[value=20]').attr('value'));$('.price-per-month-wrap .price .value').text($('#Sparxpres__dynamic-formattedMonthlyPayments').text());if($('.compliance-text').length){$('.price-per-month-wrap .compliance-text span').html($('#Sparxpres__dynamic-complianceText').html()+' ');$('#Sparxpres__dynamic-informationUrl').clone().appendTo($('.price-per-month-wrap .compliance-text'))} 47window.clearInterval(timer)}},100)} 48$(document).ready(function(){var moved=!1;function stomHandleSingleProductResize(){if(window.innerWidth<=850&&!moved){if($('.service-warranty-container').length) 49$('#primary .service-warranty-container').after($('.product-sub-header .p-r-l-wrap .st-price-right'));else $('#primary .product_meta').after($('.product-sub-header .p-r-l-wrap .st-price-right'));moved=!0}else if(window.innerWidth>850&&moved){$('.product-sub-header .p-r-l-wrap').append($('.summary .st-price-right'));moved=!1}} 50$(document).ready(stomHandleSingleProductResize);$(window).on('resize',stomHandleSingleProductResize)})} 51$(document).ready(function(){window.stomAddToCartTimers={};var stomAddToCartTimers=window.stomAddToCartTimers;$(document).on('change keyup paste','.mini-cart-prod-quantity .custom-qty-wrap input.qty',function(e){e.stopImmediatePropagation();e.stopPropagation();$(this).blur();var newQty=$(this).val(),$miniCartItem=$(this).closest('.woocommerce-mini-cart-item'),cartItemKey=$(this).closest('.woocommerce-mini-cart-item').find('.remove_from_cart_button').attr('data-cart_item_key');if(stomAddToCartTimers[cartItemKey]) 52window.clearTimeout(stomAddToCartTimers[cartItemKey]);stomAddToCartTimers[cartItemKey]=window.setTimeout(function(){delete stomAddToCartTimers[cartItemKey];$miniCartItem.block({message:null,overlayCSS:{background:'#000',opacity:0.6}});$.ajax({url:stom_ajax_obj.ajaxurl,data:{'action':'stom_mini_cart_qty_update','cart_item_key':cartItemKey,'qty':newQty},success:function(response){$('.widget_shopping_cart_content').html(response)},error:function(errorThrown){console.log(errorThrown);console.error(errorThrown)}})},150)})});$('body').on('click','#masthead .widget_shopping_cart .mini-cart-prod-quantity [type="button"]',function(){var $input=$(this).siblings('.quantity').find('input.qty'),step=$input.attr('step')?parseFloat($input.attr('step')):1,max=$input.attr('max')?$input.attr('max'):999999,min=$input.attr('min')?$input.attr('min'):0,difference=$(this).hasClass('plus')?step:parseFloat('-'+step),curVal=$input.val()?parseFloat($input.val()):0;if((curVal+difference)>max||(curVal+difference)<min) 53return!0;$input.val(curVal+difference);if(window.cartInputChangeTimer){window.clearTimeout(window.cartInputChangeTimer);window.cartInputChangeTimer=null} 54window.cartInputChangeTimer=window.setTimeout(function(){$input.trigger('change')},500)});$(document).ready(function(){if($('.single-product .flex-control-nav').length){var timer;function gallerySetTimer(){timer=window.setInterval(function(){var $parent=$('.single-product .flex-control-nav img.flex-active').parent();if($parent.is(':last-child')) 55$('.single-product .flex-control-nav li:first-child img').trigger('click');else $parent.next().children('img').trigger('click')},4000)} 56gallerySetTimer();function galleryPauseTimer(timer){window.clearInterval(timer);timer=null} 57$('\ 58 .single-product .woocommerce-product-gallery__trigger,\ 59 .single-product .flex-viewport,\ 60 .single-product .flex-control-nav,\ 61 .single-product .pswp.pswp--open\ 62 ').mouseenter(function(){galleryPauseTimer(timer)}).mouseleave(function(){gallerySetTimer()})}});$(document).ready(function(){if($('ol.flex-control-nav.flex-control-thumbs').length){$('ol.flex-control-nav.flex-control-thumbs li').each(function(){$(this).append('<span></span>')})} 63if(!1&&$('form.woocommerce-checkout #billing_email').length){var hasChecked=!1;$('form.woocommerce-checkout #billing_email').on('change',function(){if(hasChecked||$('form.woocommerce-checkout #billing_email').val()=='')return!0;var rex=new RegExp(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/);if(rex.test($(this).val())){if(!$('#customer_details .detail-lookup').length){$('#customer_details').css('position','relative').prepend('<div class="detail-lookup" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, .6);"><i class="fa fa-spinner fa-pulse fa-3x fa-fw" style="position: absolute; top: 50%; top: calc(50% - 21px); left: 50%; left: calc(50% - 27px);"></i><span class="sr-only">Loading...</span></div>')}else $('#customer_details .detail-lookup').show();$.ajax({url:"https://symaskinetorvet.dk/?stom_custom_ajax=customer_lookup",data:{customer:$(this).val(),},}).done(function(data){if(data!=''){data=JSON.parse(data);var form_billing_fields=['billing_first_name','billing_last_name','billing_address_1','billing_postcode','billing_city','billing_phone'];var form_shipping_fields=['shipping_first_name','shipping_last_name','shipping_address_1','shipping_postcode','shipping_city'];$.each(form_billing_fields,function(i,field){if(field&&typeof(data.billing[field])!=="undefined"&&data.billing[field]!=='null') 64$('#'+field).val(data.billing[field])});$.each(form_shipping_fields,function(i,field){if(field&&typeof(data.shipping[field])!=="undefined"&&data.shipping[field]!=='null') 65$('#'+field).val(data.shipping[field])});hasChecked=!0} 66$('#customer_details .detail-lookup').fadeOut(300)})}})}});$('body').on('added_to_cart',function(event,fragments,cart_hash,$button){var $product=$button.parents('.product.type-product'),$price=$product.find('.woocommerce-Price-amount.amount');if($price.length>1) 67$price=$price.last();var p_name=$product.find('.woocommerce-loop-product__title').text(),p_id=$button.attr('data-product_id'),p_price=parseFloat($price.text());if(typeof fbq!='undefined'){fbq('track','AddToCart',{content_type:'product',content_name:p_name,content_ids:[p_id],contents:{item_price:p_price,quantity:1,id:p_id,},currency:'DKK',})}});if(typeof wc_add_to_cart_params!='undefined'){$(document).on('submit','.mini-cart_coupon',function(e){e.preventDefault();var coupon=$('.mini-cart_coupon [name="coupon_code"]').val();var data={action:"apply_coupon_code",coupon_code:coupon};$('.widget_shopping_cart_content').block({message:null,overlayCSS:{background:'#000',opacity:0.6}});$.ajax({type:'POST',dataType:'html',url:wc_add_to_cart_params.ajax_url,data:data,success:function(response){if(response){$('.widget_shopping_cart_content').html(response)}},error:function(errorThrown){console.log(errorThrown);console.error(errorThrown)}})})} 68if(typeof wc_add_to_cart_params!='undefined'){$(document).on('click','.mini-cart-discount .woocommerce-remove-coupon',function(e){e.preventDefault();var coupon=$('.mini-cart-discount .woocommerce-remove-coupon').attr('data-coupon');var data={action:"remove_coupon_code",coupon_code:coupon};$('.widget_shopping_cart_content').block({message:null,overlayCSS:{background:'#000',opacity:0.6}});$.ajax({type:'POST',dataType:'html',url:wc_add_to_cart_params.ajax_url,data:data,success:function(response){if(response){$('.widget_shopping_cart_content').html(response)}},error:function(errorThrown){console.log(errorThrown);console.error(errorThrown)}})})}
69if($('body').hasClass('woocommerce-checkout')){$(document).on('click','.woocommerce-checkout .checkout-coupon .button.responsive',function(e){e.preventDefault();$('.woocommerce-error, .woocommerce-message').slideUp(150,function(){$(this).remove()});$("form.checkout_coupon input[name=coupon_code]").val($('.woocommerce-checkout .checkout-coupon-inner .input-text').val());$("form.checkout_coupon").submit();var tickRate=200,i=0;var checkError=setInterval(function(){i+=tickRate/1000;if($('.woocommerce .woocommerce-error').length){if($(window).width()<960) 70$('html, body').animate({scrollTop:0},'slow');return clearInterval(checkError)}else if($('.woocommerce .woocommerce-message').length&&$('.woocommerce-checkout-review-order-table tfoot .cart-discount').length){if($(window).width()<960) 71$('html, body').animate({scrollTop:$('.cart-discount').offset().top-$("html,body").offset().top+$("html,body").scrollTop()-200},'slow');$('.woocommerce-checkout-review-order-table tfoot .cart-discount').addClass('coupon-add-succes');setTimeout(function(){$('.woocommerce-checkout-review-order-table tfoot .cart-discount').removeClass('coupon-add-succes')},2000);return clearInterval(checkError)}else if(i>=5){return clearInterval(checkError)}},tickRate)})}}(jQuery));jQuery(window).load(function(){(function($){var onSucces=window.setInterval(function(){if($('.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message').length&&window.innerWidth<=767){$('html, body').stop();$('html, body').animate({scrollTop:$('#customer_details').offset().top},'slow');return window.clearInterval(onSucces)}},150);$('.woocommerce-checkout a.button.woo-checkout-next-step').on('click',function(e){e.preventDefault();if($(this).parents('#customer_details').length) 72$('html, body').animate({scrollTop:$('#order_review').offset().top},'slow');else if($(this).parents('#order_review').length) 73$('html, body').animate({scrollTop:$('#stom-checkout-payment').offset().top},'slow')});window.stomCalcProductHeights=function(){$("ul.products").imagesLoaded(function(){var stomprods=[];var hli=0;var himg=0;var prodBaseLine=0;$("ul.products li.product:not(.render-handled)").each(function(){if(prodBaseLine===0){prodBaseLine=$(this).offset().top} 74var imgHeight=$('img.attachment-woocommerce_thumbnail',this).height();if(imgHeight>himg){himg=imgHeight} 75var elementHeight=$(this).outerHeight()-imgHeight;if(elementHeight>hli){hli=elementHeight} 76stomprods.push($(this));if($(this).is(':last-child')||$(this).next().offset().top!==prodBaseLine){$(stomprods).each(function(){$(this).addClass('render-handled');$(this).css('min-height',hli+himg);$(this).find(".stom-wc-img-wrap").css('height',himg)});hli=0;himg=0;prodBaseLine=0;stomprods=[]}})})} 77window.stomCalcProductHeights();if($('.woocommerce-page.single #primary .woocommerce-message').length){var $message=$('.woocommerce-page.single #primary .woocommerce-message'),fadeSpeed=500,timer=null;function addedToCartHandler(e){e.stopPropagation();if(e.target!=this)return;e.preventDefault();if(timer!=null)window.clearTimeout(timer);$message.fadeOut(fadeSpeed);$('body').css('overflow-y','')} 78$('#primary .stom-continue-shopping').on('click',addedToCartHandler);$('#primary .woocommerce-message .fa').on('click',addedToCartHandler);$('#primary .custom-woocommerce-message-wrapper').on('click',addedToCartHandler)} 79if(typeof window.CartPops!='undefined'){window.CartPops.drawer.on('show',function(drawer){window.setTimeout(function(){$('[data-id="hr-recom-k5b8e5720e0518115b92c2482"]').attr('id','hr-recom-k5b8e5720e0518115b92c2482').removeAttr('data-id')},500)})}})(jQuery)});(function($){$('.cat-parent').click(function(event){event.stopPropagation();var elem=$(this)+'>ul';$('>ul',this).slideToggle();$(this).toggleClass('cat-parent-open')});$('.cat-parent a').click(function(event){event.stopPropagation()});if($('body').hasClass('single-product')){$('#primary form.cart').on('submit',function(){var $addToCart=$('#primary form.cart button[type=submit]');$addToCart.html('<i class="fa fa-circle-o-notch fa-spin"></i>');$addToCart.css('cursor','default')})} 80function getScrollbarWidth(){var outer=document.createElement("div");outer.style.visibility="hidden";outer.style.width="100px";outer.style.msOverflowStyle="scrollbar";document.body.appendChild(outer);var widthNoScroll=outer.offsetWidth;outer.style.overflow="scroll";var inner=document.createElement("div");inner.style.width="100%";outer.appendChild(inner);var widthWithScroll=inner.offsetWidth;outer.parentNode.removeChild(outer);return widthNoScroll-widthWithScroll} 81function showOffCanvasCart(e){var $target=$(e.target);if($target.parents('.widget_shopping_cart_content').length)return;e.preventDefault();e.stopPropagation();var $body=$('body'),$miniCart=$('#masthead .woocommerce.widget_shopping_cart'),$overlay=$('#masthead .stom-off-canvas-overlay');if($target.is('.stom-off-canvas-overlay, .off-canvas-close')){$miniCart.removeClass('off-canvas');setTimeout(function(){$body.removeClass('off-canvas');$body.css('padding-right','');$miniCart.css('display','')},300);return} 82$body.addClass('off-canvas');$body.css('padding-right',getScrollbarWidth());$miniCart.fadeIn(10);setTimeout(function(){$miniCart.addClass('off-canvas')},10)} 83$('body').on('added_to_cart',showOffCanvasCart);$('body:not(.woocommerce-cart) #masthead .site-header-cart').on('click',showOffCanvasCart);$('body:not(.woocommerce-cart) #masthead .mobile-header-wrapper .top-row .woo-custom-cart').on('click',function(e){if($(e.target).hasClass('woo-custom-cart')){e.preventDefault();showOffCanvasCart(e)}});var modal=document.getElementById("stil-spørgsmål-modal-content");
83if(modal){var btn=document.getElementById("stil-spørgsmål-btn");var span=document.getElementsByClassName("close")[0];btn.onclick=function(){modal.style.display="block"} 84span.onclick=function(){modal.style.display="none"} 85window.onclick=function(event){if(event.target==modal){modal.style.display="none"}}} 86$(document).on('click','.del-betaling-op--action',function(e){e.preventDefault();$(this).closest('.del-betaling-op--inner').find('.del-betaling-op--payment-popup').toggleClass('active')});$(document).on('click','.del-betaling-op--payment-option',function(){var paymentType=$(this).attr('data-payment');if(paymentType==='anyday'){var anydayWidget=document.querySelector('anyday-price-widget');if(anydayWidget&&anydayWidget.shadowRoot){var clickableElement=anydayWidget.shadowRoot.querySelector('.anyday-clickable');if(clickableElement){clickableElement.click()}}}else if(paymentType==='viabill'){var viabillIframe=document.querySelector('iframe.viabill');if(viabillIframe&&viabillIframe.contentDocument){var vbptElement=viabillIframe.contentDocument.getElementById('vbpt');if(vbptElement){vbptElement.click()}}}})})(jQuery);function on_ajax_filter_updated(){var $=jQuery,field='filters',url=window.location.href;if(url.indexOf('?'+field+'=')!=-1) 87$('#products ul.products').addClass('stop-infinite');else if(url.indexOf('&'+field+'=')!=-1) 88$('#products ul.products').addClass('stop-infinite');else $('#products ul.products').removeClass('stop-infinite');return}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.