1/*--------------------------------------------------------------------------------- 2 Site: 3 COPYRIGHT (c) ASKÃ S INTERNET- & REKLAMBYRÃ AB 1997-2023. ALL RIGHTS RESERVED. 4---------------------------------------------------------------------------------*/ 5var breakpoint='';jQuery.noConflict();jQuery(document).ready(function($){breakpoint=window.getComputedStyle(document.querySelector('body'),'::after').getPropertyValue('content').replace(/\"/g,'');click_n_toggle();set_filter_tabindex();misc_funcs();setTimeout(function(){priceHistoryInit();},300);ArtGrupp_Pris();Kassan_Pris();Produkt_Pris();jQuery(".Infogad_HTML_Wrapper").each(function(){const wrapper=jQuery(this);const text=wrapper.text().trim();const article=wrapper.closest('article');if(text.length===0){article.find('.readMore').hide();}});jQuery(".Egen_Infogad_HTML").each(function(){const element=jQuery(this);const lineHeight=parseFloat(element.css('line-height'));const maxHeightFor3Lines=lineHeight*3;const child=element.children(':first');const childMargin=child.length?(parseFloat(child.css('margin-top'))||0)+ 6(parseFloat(child.css('margin-bottom'))||0):0;const actualHeight=element.prop('scrollHeight');const article=element.closest('article');if(actualHeight-childMargin>maxHeightFor3Lines){element.addClass("clamp-3");}else{element.removeClass('clamp-3');article.find('.readMoreLink, .readMoreLink__arrow').hide();}});jQuery(document).on("click",'.readMoreLink,.readMoreLink__arrow',function(){jQuery('.readMoreLink').addClass('hide-xs');jQuery('.readMoreLink__arrow').addClass('hide-xs');jQuery('.readLessLink').removeClass('hide-xs');jQuery('.readLessLink__arrow').removeClass('hide-xs');jQuery('.Egen_Infogad_HTML').removeClass('clamp-3');});jQuery(document).on("click",'.readLessLink,.readLessLink__arrow',function(){jQuery('.readLessLink').addClass('hide-xs');jQuery('.readLessLink__arrow').addClass('hide-xs');jQuery('.readMoreLink').removeClass('hide-xs');jQuery('.readMoreLink__arrow').removeClass('hide-xs');jQuery('.Egen_Infogad_HTML').addClass('clamp-3');});});var cart_icon_toggle=false;var removeCart=false;var click_n_toggle=function(){jQuery('.search-icon').addToggle({popup:'.sokrutanWrap',onlyMobile:true,bodyclass:'search-modal-open',overlay:'#header-dimmer'});jQuery('body').on('click','#LSS_Result .close',function(){jQuery(this).parent().hide();return false;});if(jQuery("#cross-selling-module-trigger").length){jQuery("#cross-selling-module-trigger").addToggle({popup:'#cross-selling-module',bodyclass:'cross-selling-modal-open'});jQuery(document).on('click',"#cross-selling-module .Close, #cross-selling-module .fortsatt-handla",function(){document.querySelector('#custom_cross_selling_popup').innerHTML='';});} 7jQuery('.js-LoginPopup, .login-btn').addToggle({popup:'.inloggningsruta',bodyclass:'login-modal-open-right'});jQuery('.mypage__menu__btn').addToggle({popup:'.mypage__menu',bodyclass:'modal-open-left'});jQuery('.Varukorg').addToggle({popup:'#AIRvarukorg-Wrap',bodyclass:'checkout-modal-open-right',overlay:'',funcOnOpen:'cartOpen',funcOnClose:'cartClose'});jQuery('.bloggTrigger').addToggle({popup:'.blog-archive',bodyclass:'blogg-modal-open-right'});jQuery('.filter-showmore').addToggle({popup:'.filter.canvas-left-module',bodyclass:'modal-open-left',ariaExpanded:'.filter-showmore',onlyMobile:true});if(jQuery('.ToggleGradeinputs-btn').length){jQuery('.ToggleGradeinputs-btn').addToggle({popup:'.ToggleGradeinputs',bodyclass:'grades-modal-open-right',addObserver:false});let active_url=window.location.href;if(active_url.endsWith("#reviewupdated=true")){jQuery('.review-list').attr('open',true);jQuery('.ToggleGradeinputs-btn').click();jQuery('#review-status-message .status_message-positive').removeClass('hide');active_url=active_url.replace('#reviewupdated=true','');window.history.replaceState({},document.title,active_url);}} 8jQuery('.freightModalTrigger').addToggle({popup:'.freightModal',bodyclass:'modal-open-right'});jQuery('.onlyInShopTrigger').addToggle({popup:'.onlyInShopModal',bodyclass:'modal-open-right'});jQuery('.mobilenav-icon').addToggle({popup:'.menu-modal',bodyclass:'menu-modal-open-left-xs',onlyMobile:true,overlay:'#header-dimmer'});jQuery('.JS-leftmenu__btn').addToggle({popup:'.ArtgrpLeftmenu_leftcolumn .canvas-left-module-sm',bodyclass:'modal-open-left-xs',onlyMobile:true});jQuery('.read-more').on('click',function(){jQuery(this).toggleClass('active');var el=jQuery(this).attr('data-more-text');jQuery(el).toggleClass('active');});jQuery('.scrollink').on('click',function(){var el=jQuery(this).attr('data-goto');var scrollTo=jQuery(el).offset().top;jQuery('html, body').animate({scrollTop:scrollTo},300);});jQuery('ul.tabs:not(#product-page--tabs) li.tab').on('click',function(){if(!jQuery(this).closest('li').hasClass('active')){jQuery('li').not(this).removeClass('active');} 9jQuery(this).closest('li').toggleClass('active');jQuery(this).next().closest('li').toggleClass('active');});jQuery('.select-ul-li').on('click',function(e){e.stopPropagation();if(!jQuery(this).hasClass('open')){jQuery('.select-ul-li').not(this).removeClass('open');} 10if(!jQuery(this).has(e.target).length||jQuery(this).is('.ValjSortordning')){jQuery(this).toggleClass('open');}});jQuery('body').on('click',function(e){var subject=jQuery('.select-ul-li.open');if(e.target.id!=subject.attr('id')&&!subject.has(e.target).length){subject.removeClass('open');subject.children().removeClass('open');}});jQuery('select[name="Presentkort"], .Snabbkassa_Medskick_Tabell select').wrap("<div class='select-wrapper'></div>");};function set_filter_tabindex(){let filter_modal=document.querySelector('.filter');if(filter_modal){if(filter_modal.classList.contains('canvas-left-module-sm')&&breakpoint!='desktop'){var focusableElements=filter_modal.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled]), input[type="password"]:not([disabled])');
10focusableElements.forEach((element)=>{element.setAttribute('tabindex','-1');});}}};function misc_funcs(){jQuery('.Kontaktform').attr('action','/shop');} 11function isInViewport(element){if(element){var rect=element.getBoundingClientRect();return(rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth));}else{return;}} 12(function($){var popups=[];var active=-1;var defaultOptions={event:'click',activeClass:'active',overlay:'#dimmer',closeClass:'',close:'.Close',bodyclass:'modal-open',tabTrapping:true,addObserver:true,ariaExpanded:'',onlyMobile:false,funcOnOpen:'',funcOnClose:''};$.fn.addToggle=function(opts){var toggle=this;opts=$.extend(true,this,defaultOptions,opts);opts.toggle=toggle;var index=popups.length;popups.push(opts);toggle.on(opts.event,function(e){e.preventDefault();handleAction(index,e.currentTarget);});if(opts.close){$(opts.popup) 13.find(opts.close) 14.on(opts.event,function(e){e.preventDefault();handleAction(index);});} 15if(index==0){$(opts.overlay).on('click',function(e){e.preventDefault();removePopup(true);});} 16if(opts.onlyMobile==true&&breakpoint=='desktop'){removeModalAttr(index);}};function handleAction(index,parameter=false){removePopup(false);if(active==index){active=-1;}else{addPopup(index,parameter);active=index;}} 17jQuery(document).on('click','.HTML_infogad_top, .close-header, #dimmer, .BWrap .Close.close-header, .FilterExtra .Close.close-header, .Close, .js-removePopupOnClick, .fortsatt-handla',function(){removePopup(true);});jQuery(document.body).on('keyup',function(e){if(e.key==='Escape'){removePopup(true);}});function addPopup(index,parameter=false){$(popups[index].popup).addClass(popups[index].activeClass);$(popups[index].overlay).addClass(popups[index].activeClass);$(popups[index].toggle).addClass(popups[index].closeClass);var current_scroll_position=window.pageYOffset;cart_icon_toggle=true;jQuery("body").attr("style","--scrollposition: "+current_scroll_position+"px;");jQuery("body").attr("data-scrollposition",current_scroll_position);$('body').addClass(popups[index].bodyclass);$('html').addClass(popups[index].bodyclass);if(popups[index].tabTrapping){addTabTrapping(document.querySelector(popups[index].popup),popups[index].addObserver);} 18if(parameter){parameter.dataset.lastclicked='true';parameter.classList.add('lastclicked');} 19if(popups[index].funcOnOpen!=''&&typeof(window[popups[index].funcOnOpen]==='function')){window[popups[index].funcOnOpen]();}} 20function removePopup(removeActive){if(active!=-1){$(popups[active].popup).removeClass(popups[active].activeClass);$(popups[active].overlay).removeClass(popups[active].activeClass);$(popups[active].toggle).removeClass(popups[active].closeClass);$('html').removeClass(popups[active].bodyclass);$('body').removeClass(popups[active].bodyclass);cart_icon_toggle=false;var prev_scroll_position=jQuery("body").attr("data-scrollposition");if(prev_scroll_position&&prev_scroll_position>0){window.scroll(0,prev_scroll_position);} 21jQuery("body").removeAttr("style");jQuery("body").removeAttr("data-scrollposition");if(popups[active].ariaExpanded){var ariaExpandedFalse=document.querySelector(popups[active].ariaExpanded);ariaExpandedFalse.setAttribute('aria-expanded','false');} 22removeTabTrapping(document.querySelector(popups[active].popup));const lastClickedElement=document.querySelector('[data-lastclicked=true]');if(lastClickedElement){lastClickedElement.focus();lastClickedElement.removeAttribute('data-lastclicked');} 23if(popups[active].funcOnClose!=''&&typeof(window[popups[active].funcOnClose]==='function')){window[popups[active].funcOnClose]();}} 24if(removeActive){active=-1;}} 25function removeModalAttr(index){var labelledbyAttr=$(popups[index].popup).attr('aria-labelledby');if(labelledbyAttr){$(popups[index].popup).attr('data-labelledby',labelledbyAttr);$(popups[index].popup).removeAttr('aria-labelledby');}} 26function addModalAttr(index){var labelledbyAttr=$(popups[index].popup).attr('aria-labelledby');if(labelledbyAttr){$(popups[index].popup).attr('data-labelledby',labelledbyAttr);$(popups[index].popup).removeAttr('aria-labelledby');}}
27function reinitMobileModals(index){if(breakpoint=='desktop'){removeModalAttr(index);}else{addModalAttr(index);}}})(jQuery);document.addEventListener('click',function(event){if(event.target.matches('.aria-expanded_toggle[aria-expanded]')){var expanded=event.target.getAttribute('aria-expanded');if(expanded==='false'){event.target.setAttribute('aria-expanded','true');addTabTrapping(event.target.parentNode.querySelector('.aria-expanded_toggle-dd'));}else{event.target.setAttribute('aria-expanded','false');removeTabTrapping(event.target.parentNode.querySelector('.aria-expanded_toggle-dd'));}}});var AEcloseBtns=document.querySelectorAll('.aria-expanded-close .btn-auto');AEcloseBtns.forEach((btn)=>{if(btn){btn.addEventListener('click',handleClick);btn.addEventListener('keydown',handleKeyPress);function handleClick(event){event.preventDefault();this.parentNode.parentNode.parentNode.querySelector('.aria-expanded_toggle').click();this.parentNode.parentNode.parentNode.querySelector('.aria-expanded_toggle').focus();} 28function handleKeyPress(event){if(event.key==='Enter'){event.preventDefault();this.click();}}}});document.addEventListener('click',function(event){var ariaExpandedEls=document.querySelectorAll('[aria-expanded="true"]');for(var i=0;i<ariaExpandedEls.length;i++){var ariaExpandedEl=ariaExpandedEls[i];if(!ariaExpandedEl.contains(event.target)){var nextSiblingEl=ariaExpandedEl.nextElementSibling;if(nextSiblingEl&&nextSiblingEl.contains(event.target)){continue;} 29ariaExpandedEl.setAttribute('aria-expanded','false');}}});document.addEventListener('keydown',function(event){if(event.key==='Escape'){var ariaExpandedEls=document.querySelectorAll('[aria-expanded="true"]');for(var i=0;i<ariaExpandedEls.length;i++){ariaExpandedEls[i].setAttribute('aria-expanded','false');}}});const header=document.querySelector('header');let lastScrollPos=window.pageYOffset;let scrollEventCount=0;const scrollEventLimit=5;const toggleHeaderClass=()=>{scrollEventCount++;if(scrollEventCount>=scrollEventLimit){const currentScrollPos=window.pageYOffset;const limitBeforeToggle=header.clientHeight;if(currentScrollPos>limitBeforeToggle){if(currentScrollPos>lastScrollPos){header.classList.add('scrolled');}else{header.classList.remove('scrolled');}}else if(header.classList.contains('scrolled')){header.classList.remove('scrolled');} 30lastScrollPos=currentScrollPos;scrollEventCount=0;}else if(window.pageYOffset==0){header.classList.remove('scrolled');}};window.addEventListener('scroll',toggleHeaderClass);const stellaHeader=document.getElementById('stella-header');if(stellaHeader){const searchBtn=stellaHeader.querySelector('.search-icon');const searchModal=document.querySelector('.sokrutan');const mobileMenuBtn=stellaHeader.querySelector('.mobilenav-icon');const seachModalWrap=document.querySelector('.sokrutanWrap');mobileMenuBtn.addEventListener('click',function(){const mainMenuHeader=document.querySelector('.main-menu .canvas-header');if(seachModalWrap.classList.contains('canvas-left-module')){seachModalWrap.classList.remove('canvas-left-module');} 31mainMenuHeader.insertAdjacentElement('afterend',searchModal);});searchBtn.addEventListener('click',function(){const dimmer=document.getElementById('dimmer');if(!seachModalWrap.classList.contains('canvas-left-module')){seachModalWrap.classList.add('canvas-left-module');} 32dimmer.parentNode.insertBefore(searchModal,dimmer.nextSibling);});} 33const priceHistoryInit=()=>{const priceHistoryTriggers=document.querySelectorAll('.price_info_trigger');priceHistoryTriggers.forEach((trigger)=>{trigger.addEventListener('click',(e)=>{e.preventDefault();e.stopPropagation();const clickedBtn=e.target;const priceHistoryModal=document.querySelector('.price_info_area');const dimmer=document.querySelector('#dimmer');const checkoutView=document.querySelector('.Kassan');const priceHistoryModalClose=document.querySelector('.price_info_area .Close');const priceHistoryGrandParent=e.target.parentElement.parentElement;const priceHistoryPrice=document.querySelector('.price_history_content--price');addTabTrapping(document.querySelector('.price_info_area'));dimmer.classList.add('active');priceHistoryModal.classList.add('active');if(!checkoutView){const lowestPrice=priceHistoryGrandParent.querySelector('.lowest_price');const nestedLowestPrice=priceHistoryGrandParent.querySelector('.price-history-lowest-price');if(nestedLowestPrice){priceHistoryPrice.textContent=nestedLowestPrice.textContent;}else{priceHistoryPrice.textContent=lowestPrice.textContent;}}else{const lowestPrice=priceHistoryGrandParent.querySelector('.lowest_price');priceHistoryPrice.textContent=lowestPrice.textContent;} 34priceHistoryModalClose.addEventListener('click',()=>{closePriceHistoryModal();clickedBtn.focus();});dimmer.addEventListener('click',()=>{closePriceHistoryModal();clickedBtn.focus();});document.addEventListener('keydown',(e)=>{if(e.key==='Escape'||e.key===27){closePriceHistoryModal();clickedBtn.focus();}});});});};const closePriceHistoryModal=()=>{const priceHistoryModal=document.querySelector('.price_info_area');const dimmer=document.querySelector('#dimmer');const priceHistoryPrice=document.querySelector('.price_history_content--price');dimmer.classList.remove('active');priceHistoryModal.classList.remove('active');priceHistoryPrice.textContent='';};jQuery(".wlprod.wishlist-button[data-href]").on("click",function(e){var url=jQuery(this).attr("data-href");window.location=url;});var Produkt_Pris=function(){jQuery('#PrisFalt span').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});};var Kassan_Pris=function(){jQuery('.pris_kassan, .js_separate_this').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});};var ArtGrupp_Pris=function(){jQuery('.PT_Pris span').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});};var AIRvarukorg_Load_After=function(){jQuery('#AIRvarukorg-Wrap .Sum').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});jQuery('#AIRvarukorg-Wrap .Price').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});setTimeout(function(){jQuery('#InfoAttbetala').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});jQuery('#InfoAttbetalaMoms').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});jQuery('.sum-products span').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});},900);};var BeraknaAttBetala_Efter=function(){setTimeout(function(){jQuery('#InfoAttbetala').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});jQuery('#InfoAttbetalaMoms').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});jQuery('.sum-products span').each(function(){var separated=separate_thousands(jQuery(this).html());jQuery(this).html(separated);});},900);};var separate_thousands=function(in_text,separator){in_text+='';if(typeof separator==='undefined'){separator=' ';} 35var rgx=/(\d{2})(\d{3})/;var amount_length=parseInt(in_text.match(/\d+/));if(amount_length<10000){rgx=/(\d{1})(\d{3})/;} 36if(amount_length>999999){rgx=/(\d{1})(\d{3})(\d{3})/;while(rgx.test(in_text)){in_text=in_text.replace(rgx,'$1'+separator+'$2'+separator+'$3');} 37return in_text;} 38if(amount_length>99999){rgx=/(\d{3})(\d{3})/;} 39while(rgx.test(in_text)){in_text=in_text.replace(rgx,'$1'+separator+'$2');} 40return in_text;};var counter=function(){var showing_now=parseInt(filter_defaults['Limits'])+parseInt(filter_defaults['Current_Offset']);if(parseInt(filter_defaults['Limits'])>parseInt(filter_defaults['This_Count'])){showing_now=parseInt(filter_defaults['This_Count']);} 41var total=parseInt(filter_defaults['This_Count']);if(showing_now>total){showing_now=total;} 42if(showing_now==total&&jQuery(".do_more").length==0){var btn='<div class="do_more disabled"><span id="more_of_it" class="start">'+filter_defaults.More_Text+'</span></div>';jQuery(btn).insertAfter(".filter_loader");} 43jQuery(".flexbox.wrap>div>#ajax_start_stop").each(function(){jQuery(this).text("1-"+showing_now);});jQuery(".flexbox.wrap>div>#ajax_total").each(function(){jQuery(this).text(total);});};jQuery(document).ready(function($){if(jQuery(".FilterWrapper").length){counter();}});
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.