/* Minification failed. Returning unminified contents. (39,41-44): run-time error JS1009: Expected '}': ... (39,40): run-time error JS1004: Expected ';' (39,54-55): run-time error JS1006: Expected ')': ; (60,14-15): run-time error JS1009: Expected '}': ) (29,20): run-time error JS1004: Expected ';' (60,14-15): run-time error JS1195: Expected expression: ) (62,15-16): run-time error JS1006: Expected ')': : (62,15): run-time error JS1004: Expected ';' (62,15-16): run-time error JS1195: Expected expression: : (62,26-27): run-time error JS1010: Expected identifier: ( (92,10-11): run-time error JS1195: Expected expression: , (95,34-35): run-time error JS1010: Expected identifier: ( (146,10-11): run-time error JS1195: Expected expression: , (147,33-34): run-time error JS1010: Expected identifier: ( (157,10-11): run-time error JS1195: Expected expression: , (158,36-37): run-time error JS1010: Expected identifier: ( (214,10-11): run-time error JS1195: Expected expression: , (215,29-30): run-time error JS1010: Expected identifier: ( (218,10-11): run-time error JS1195: Expected expression: , (219,30-31): run-time error JS1010: Expected identifier: ( (223,10-11): run-time error JS1195: Expected expression: , (224,25-26): run-time error JS1010: Expected identifier: ( (231,5-6): run-time error JS1002: Syntax error: } (244,1-2): run-time error JS1002: Syntax error: } (244,2-3): run-time error JS1195: Expected expression: ) */ /*! modernizr 3.1.0 (Custom Build) | MIT * * http://modernizr.com/download/?-cssvhunit-cssvwunit !*/ !function (e, n, t) { function s(e) { var n = u.className, t = Modernizr._config.classPrefix || ""; if (p && (n = n.baseVal), Modernizr._config.enableJSClass) { var s = new RegExp("(^|\\s)" + t + "no-js(\\s|$)"); n = n.replace(s, "$1" + t + "js$2") } Modernizr._config.enableClasses && (n += " " + t + e.join(" " + t), p ? u.className.baseVal = n : u.className = n) } function o(e, n) { return typeof e === n } function a() { var e, n, t, s, a, i, r; for (var l in f) if (f.hasOwnProperty(l)) { if (e = [], n = f[l], n.name && (e.push(n.name.toLowerCase()), n.options && n.options.aliases && n.options.aliases.length)) for (t = 0; t < n.options.aliases.length; t++) e.push(n.options.aliases[t].toLowerCase()); for (s = o(n.fn, "function") ? n.fn() : n.fn, a = 0; a < e.length; a++) i = e[a], r = i.split("."), 1 === r.length ? Modernizr[r[0]] = s : (!Modernizr[r[0]] || Modernizr[r[0]] instanceof Boolean || (Modernizr[r[0]] = new Boolean(Modernizr[r[0]])), Modernizr[r[0]][r[1]] = s), d.push((s ? "" : "no-") + r.join("-")) } } function i() { return "function" != typeof n.createElement ? n.createElement(arguments[0]) : p ? n.createElementNS.call(n, "http://www.w3.org/2000/svg", arguments[0]) : n.createElement.apply(n, arguments) } function r() { var e = n.body; return e || (e = i(p ? "svg" : "body"), e.fake = !0), e } function l(e, t, s, o) { var a, l, d, f, c = "modernizr", p = i("div"), h = r(); if (parseInt(s, 10)) for (; s--;) d = i("div"), d.id = o ? o[s] : c + (s + 1), p.appendChild(d); return a = i("style"), a.type = "text/css", a.id = "s" + c, (h.fake ? h : p).appendChild(a), h.appendChild(p), a.styleSheet ? a.styleSheet.cssText = e : a.appendChild(n.createTextNode(e)), p.id = c, h.fake && (h.style.background = "", h.style.overflow = "hidden", f = u.style.overflow, u.style.overflow = "hidden", u.appendChild(h)), l = t(p, e), h.fake ? (h.parentNode.removeChild(h), u.style.overflow = f, u.offsetHeight) : p.parentNode.removeChild(p), !!l } var d = [], f = [], c = { _version: "3.1.0", _config: { classPrefix: "", enableClasses: !0, enableJSClass: !0, usePrefixes: !0 }, _q: [], on: function (e, n) { var t = this; setTimeout(function () { n(t[e]) }, 0) }, addTest: function (e, n, t) { f.push({ name: e, fn: n, options: t }) }, addAsyncTest: function (e) { f.push({ name: null, fn: e }) } }, Modernizr = function () { }; Modernizr.prototype = c, Modernizr = new Modernizr; var u = n.documentElement, p = "svg" === u.nodeName.toLowerCase(), h = c.testStyles = l; h("#modernizr { height: 50vh; }", function (n) { var t = parseInt(e.innerHeight / 2, 10), s = parseInt((e.getComputedStyle ? getComputedStyle(n, null) : n.currentStyle).height, 10); Modernizr.addTest("cssvhunit", s == t) }), h("#modernizr { width: 50vw; }", function (n) { var t = parseInt(e.innerWidth / 2, 10), s = parseInt((e.getComputedStyle ? getComputedStyle(n, null) : n.currentStyle).width, 10); Modernizr.addTest("cssvwunit", s == t) }), a(), s(d), delete c.addTest, delete c.addAsyncTest; for (var m = 0; m < Modernizr._q.length; m++) Modernizr._q[m](); e.Modernizr = Modernizr }(window, document);; (function ($) { function calculateId(input) { var id = 0; for (let i = 0; i < input.length; i++) { id += input.charCodeAt(i); } return id; } // DEFAULT - inställningar för tooltip var settings = { cursor: 'default', splitTitle: '|', width: 275, height: 'auto', maxHeight: 400, zIndex: 10, applyShadow: true, shadowClass: 'shadow', fadeSpeed: 300, tipDistance: 10, // hur många pixlars vänster eller högermarginal det skall vara mellan tooltipen och elementet showCloseButton: false }; var $tooltip, $tooltipInner, $tooltipTitle, $tooltipContent, $tooltipCloseButton; var methods = { init: function (options) { if (options) { $.extend(settings, options); } return this.each(function () { var $this = $(this); var id = calculateId(this.className); $this.data('id', id); var tooltipSettings = { ...settings }; methods._setup(id, tooltipSettings); if ($tooltipCloseButton) { $tooltipCloseButton.on("click", function () { $(this).parent().hide(); }); } $this.on('mouseover', function () { methods._parseAndApply(this); methods._positionTooltip(this); methods._setTimer(); }).on('mouseout', function () { var id = $this.data('id'); $tooltip = $(".tooltip-" + id); methods._stopTimer(); if (!$tooltip.data('settings').showCloseButton) { methods._hideAndReset(this); } }); }); }, _setup: function (id, tooltipSettings) { // Säkerställ att bara ett tooltip-element finns (vi återanvänder samma, byter ut content bara) if (!$(".tooltip-" + id).length) { $tooltip = $("
") .css({ position: 'absolute', display: 'none', zIndex: tooltipSettings.zIndex, width: tooltipSettings.width + 'px', height: tooltipSettings.height }); if (tooltipSettings.applyShadow) { $tooltip.addClass(settings.shadowClass || 'shadow') } $tooltipInner = $(""); $tooltipTitle = $(""); $tooltipContent = $(""); if (tooltipSettings.showCloseButton) { $tooltipCloseButton = $(""); $tooltipContent.css({ maxHeight: tooltipSettings.maxHeight + 'px' }); } $tooltipInner.append($tooltipTitle).append($tooltipContent); $tooltip.append($tooltipCloseButton).append($tooltipInner).appendTo('body'); $tooltip.data('settings', tooltipSettings) } }, // Plocka ur data från titeln och stoppa in i tooltip _parseAndApply: function (target) { $this = $(target); var id = $this.data('id'); $tooltip = $(".tooltip-" + id); settings = $tooltip.data('settings'); $tooltipTitle = $tooltip.find("#tooltip-title"); $tooltipContent = $tooltip.find("#tooltip-content"); $tooltipCloseButton = $tooltip.find(".tooltip-close"); $tooltipContent.scrollTop(0); if ($tooltipCloseButton.length && !$this.attr('data-title')) $this.attr('data-title', $this.attr('title')); // Säkerställ att title + content är tomma innan vi fortsätter $tooltipTitle.empty(); $tooltipContent.empty(); if (settings.cursor) { $this.css({ cursor: settings.cursor }); } var tipTitle; if ($this.attr('data-target')) { tipTitle = $($this.attr('data-target')).html(); } else if ($this.attr('data-title')) { tipTitle = $this.attr('data-title'); } else { tipTitle = $this.attr('title'); } if (tipTitle == undefined) { tipTitle = ''; } var tipParts = tipTitle.split(settings.splitTitle); tipTitle = tipParts.length > 1 ? tipParts.shift() : ''; $tooltipTitle.html(tipTitle); if (tipTitle == "") $tooltipTitle.hide(); else $tooltipTitle.show(); // spara undan texten som står i titlen i cachen för $tooltipTitle $tooltipTitle.data('title', $this.attr('title')); // vi tömmer elementets title så att inte standard title-popup också visas $this.attr('title', ''); $tooltipContent.html(tipParts.shift()); }, _hideAndReset: function (target) { $this = $(target); var id = $this.data('id'); $tooltip = $(".tooltip-" + id); $tooltipTitle = $tooltip.find("#tooltip-title"); $tooltip.hide(); // återställ till standard inställningarna och stoppar tillbaka titeln på elementet igen $this.css({ cursor: 'auto' }).attr('title', $tooltipTitle.data('title')); }, _positionTooltip: function (target) { $this = $(target); var id = $this.data('id'); $tooltip = $(".tooltip-" + id); settings = $tooltip.data('settings'); thisTop = $this.offset().top; thisLeft = $this.offset().left; thisScroll = $(window).scrollTop(); thisWidth = $this.outerWidth(false); thisHeight = $this.outerHeight(false); windowWidth = $(window).width(); windowHeight = $(window).height(); height = $tooltip.outerHeight(false); width = $tooltip.outerWidth(false); posX = 0; posY = 0; visaUppat = false; // Kolla så att inte tooltipen hamnar utan för fönstrets bredd if (thisLeft + width + thisWidth + settings.tipDistance > windowWidth) { posX = thisLeft - width - settings.tipDistance; } else { posX = thisLeft + thisWidth + settings.tipDistance; } // Om tooltipen hamnar utanför till vänster, sätt den till 5 pixlar in if (posX < 0) { posX = 5; // Kolla om vi ska positionera den ovanför eller under if (thisTop - thisScroll + thisHeight + height > windowHeight) posY = thisTop - height; else posY = thisTop + thisHeight + settings.tipDistance; } else { //Kontrollera om tooltipen inte ryms nedåt på skärmen men uppåt på skärmen if (thisTop - thisScroll + thisHeight + height > windowHeight && thisTop - thisScroll - thisHeight - height > 0) visaUppat = true; //Kontrollera om tooltipen inte ryms nedåt på hela dokumentet men uppåt på dokumentet else if (thisTop + height + thisHeight > $(document).height() && thisTop - height - thisHeight >= 0) visaUppat = true; if (visaUppat) { posY = thisTop - height + settings.tipDistance; } else { posY = thisTop; } } $tooltip.css({ left: posX + 'px', top: posY + 'px' }); }, _setTimer: function () { // anropa _show() efter 300 milisekunder för att visa tooltipen $this.showTipTimer = setInterval(methods._show, 300); }, _stopTimer: function () { // vi stoppar timern så att den inte anropar _show() igen när ytterligare 300 milisekunder har passerat if ($this != undefined) clearInterval($this.showTipTimer); }, _show: function () { methods._stopTimer(); var id = $this.data('id'); $tooltip = $(".tooltip-" + id); settings = $tooltip.data('settings'); $tooltip.fadeIn(settings.fadeSpeed); } }; $.fn.tooltip = function (method) { if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { $.error('Method ' + method + ' does not exist on jQuery.tooltip'); } }; })(jQuery);; $(document).ready(function () { var str = location.href.toLowerCase(); $("#left-nav li a").each(function () { if (str.indexOf(this.href.toLowerCase()) > -1) { $("li.leftNavSelectedItem").removeClass("leftNavSelectedItem"); $(this).parent().addClass("leftNavSelectedItem"); } }); $("li.leftNavSelectedItem").parents().each(function () { if ($(this).is("li")) { $(this).addClass("leftNavSelectedParent"); } }); $('.nav li').ready(function () { $(this).addClass('active'); }); $("#nojsSubmit, .nojsSubmit").hide(); $("#Specialsokning").on("change", function () { $(this).parents('form').trigger("submit"); }); $("#Amnesomrade").on("change", function () { $(this).parents('form').trigger("submit"); }); $(".sokhjalpIkon").tooltip(); $(".note").tooltip({ showCloseButton: true }); }); ; $(document).ready(function () { setInterval(function () { // Uppdatera kundvagnen då och då ifall den förändras utifrån var raderStr = getCookie('laneorder'); if (raderStr) { setKundvagn(raderStr.split(',').length); } else { setKundvagn(0); } }, 2000); }); function setKundvagn(antalRader) { if (antalRader > 0) { $('#laneordrar').removeClass('hidden'); $('.kundvagn-mobil').removeClass("hidden"); $('.kundvagn-mobil').css("display", "inline"); } else { $('#laneordrar').addClass('hidden'); $('.kundvagn-mobil').addClass("hidden"); $('.kundvagn-mobil').css("display", ""); } $('#laneorder-antal').text(antalRader); $('#laneorder-antal-mobil').text(antalRader); } function setCookie(cookie_name, value) { var exdate = new Date(); exdate.setDate(exdate.getDate() + (365 * 25)); document.cookie = cookie_name + "=" + escape(value) + "; expires=" + exdate.toUTCString(); } function getCookie(cookie_name) { if (document.cookie.length > 0) { cookie_start = document.cookie.indexOf(cookie_name + "="); if (cookie_start != -1) { cookie_start = cookie_start + cookie_name.length + 1; cookie_end = document.cookie.indexOf(";", cookie_start); if (cookie_end == -1) { cookie_end = document.cookie.length; } return decodeURIComponent(document.cookie.substring(cookie_start, cookie_end)); } } return ""; } ; $(function () { $(".download-link").on('click', function () { var numberOfHits = $('#number-of-hits').val(); if (numberOfHits > 1000) { $('.download-warning').slideDown().delay(3000).slideUp(); } }) });;