sw.theme.options.siteHeader.fixedHeader.breakPoint=0;sw.theme.options.siteHeader.fixedHeader.enabled=!1;sw.theme.options.slideshow.not='.slideshow-as-list';sw.theme.options.siteHeader.fixedHeader.pageScrolledDownPos=28 $('.swipe .products-gallery').flickity({cellAlign:'left',cellSelector:'.gallery-item',lazyLoad:!0,adaptiveHeight:!0,wrapAround:!0,pageDots:!0,cellAlign:'left',groupCells:2});$('.swipe .products-gallery .gallery-item').setAllToMaxHeight();if($("html").attr("id")=="checkout-page"){}else{(function($){$.fn.visible=function(partial){var $t=$(this),$w=$(window),viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===!0?_bottom:_top,compareBottom=partial===!0?_top:_bottom;return((compareBottom<=viewBottom)&&(compareTop>=viewTop))}})(jQuery);$(window).scroll(function(event){$(".animate-design").each(function(i,el){var el=$(el);if(el.visible(!0)){el.addClass("animate-in")}else{el.removeClass("animate-in")}})})} $.fn.readMore=function(){var maxHeight=125;var $readMoreBtn=$('
');var $readMoreLink=$('');var $readMoreSpan=$('');var readMoreText='Visa mer';var readLessText='Visa mindre';var $text=$(this);var origHeight=$text.outerHeight();if(origHeight>maxHeight){$text.css('overflow','hidden').height(maxHeight);$readMoreLink.append($readMoreSpan.text(readMoreText));$readMoreBtn.append($readMoreLink);$text.after($readMoreBtn.append($readMoreBtn))};$(document).on('click','.read-more-btn',function(e){e.preventDefault();if(!$('.read-more-btn').hasClass('open')){$text.css('overflow','').animate({height:origHeight+'px'},500,function(){$text.height('100%');$text.css('overflow','auto')});$('.read-more-btn').addClass('open').find('a span').text(readLessText)}else if($('.read-more-btn').hasClass('open')){$text.css('overflow','hidden').animate({height:maxHeight+'px'},500,function(){$('.read-more-btn').removeClass('open').find('a span').text(readMoreText)});var y=$(window).scrollTop();$("html, body").animate({scrollTop:y-origHeight},500)}});return this} $('#product-list-page .category-description').readMore();if($("html").attr("id")=="product-page"){var swProductDescription={tabs:function(){swProductDescription.splitContent();swProductDescription.tabMenu()},splitContent:function(){var $content=$('.long.description');var $headings=$content.find('h3');if($headings.length>0){$content.prepend('
')} $headings.each(function(index){var isFirstElement=index===0;$(this).nextUntil('h3').wrapAll('
');$content.find('.tabs').append(''+$(this).text()+'');$(this).remove()});$content.find('.tabs').find('a:eq(0)').trigger('click')},tabMenu:function(){$(".tabs a").click(function(event){event.preventDefault();$(this).addClass("current");$(this).siblings().removeClass("current");var tab=$(this).attr("href");$(".tab-content").not(tab).css("display","none");$(tab).fadeIn()})},};$(function(){swProductDescription.tabs()})}