{"version":3,"sources":["globals.js","header.js","expand-list.js","progress.js","alerts.js","jquery-video.js","modernizr-custom.js","bootstrap-slider.js","scroll-top-btn.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvCA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"script.js","sourcesContent":["var eika = {\r\n bootstrap : {\r\n }\r\n};\r\n","(function($) {\r\n\r\n $(document).ready(function() {\r\n var $document = $(document);\r\n var $body = $(document.body);\r\n var $HeaderDropDowns = $('.container-header-nav .dropdown-menu, .mega-nav');\r\n var $dropdownButtons = $('header .js-dropdown-button');\r\n var $subMenuBtn = $('.nav-menu .sub-menu-btn');\r\n var $menuBackItems = $('.nav-menu li > .mobile-menu-back');\r\n var mobileBreakpoint = 751;\r\n\r\n $dropdownButtons.on('click', dropDownButtonClick);\r\n $subMenuBtn.on('click', onMenuItemClick);\r\n $menuBackItems.on('click', onBackItemClick);\r\n\r\n function setMenuToZero() {\r\n $HeaderDropDowns.removeClass('submenu-open');\r\n $HeaderDropDowns.find('.menu-open').removeClass('menu-open');\r\n };\r\n\r\n function dropDownButtonClick(e) {\r\n e.preventDefault();\r\n\r\n var $this = $(this);\r\n var $dropDown = $('#' + $this.attr('aria-controls'));\r\n var isOpen = $dropDown.hasClass('open');\r\n\r\n if (isOpen) { \r\n closeDropdownMenu($dropDown);\r\n $dropDown.off('click.closeafternav');\r\n }\r\n else {\r\n openDropdownMenu($this, $dropDown); \r\n $dropDown.one('click.closeafternav', 'a', function(e){\r\n closeDropdownMenu($dropDown);\r\n });\r\n }\r\n };\r\n\r\n function closeDropdownMenu($dropDown) {\r\n $dropDown.removeClass(\"open\").attr(\"aria-hidden\", true)\r\n setMenuToZero()\r\n $body.off(\"click.header-dropdown-menu-listener\");\r\n $('[aria-controls=' + $dropDown.attr('id') + ']')\r\n .removeClass('is-open')\r\n .removeAttr('aria-expanded');\r\n\r\n $document.off(\"keydown.escapeKeyPressed\");\r\n };\r\n\r\n function openDropdownMenu($button, $dropDown) {\r\n //Be certain all dropdowns are closed, before opening a new dropdown\r\n closeDropdownMenu($HeaderDropDowns);\r\n \r\n $button\r\n .addClass('is-open')\r\n .attr('aria-expanded', 'true')\r\n .blur();\r\n\r\n $dropDown\r\n .addClass(\"open\")\r\n .attr(\"aria-hidden\", false);\r\n \r\n $dropDown \r\n .find('a[aria-hidden!=\"true\"]').first()\r\n .focus();\r\n\r\n\r\n $body.on(\"click.header-dropdown-menu-listener\", {'button': $button, 'dropDown': $dropDown}, reactOnClicksOutsideDropdownMenu);\r\n addListenerForEscapeKey(closeDropdownMenu, $dropDown);\r\n };\r\n\r\n function onMenuItemClick(e) {\r\n var isMobile = document.documentElement.offsetWidth <= mobileBreakpoint; \r\n if (!isMobile) {\r\n return;\r\n }\r\n\r\n var button = $(e.currentTarget).parents('ul > li');\r\n $HeaderDropDowns.addClass('submenu-open');\r\n button.addClass('menu-open');\r\n button.children('.mobile-menu-back').focus();\r\n $(e.target).attr('aria-expanded', 'true');\r\n };\r\n\r\n function onBackItemClick(e) {\r\n var isMobile = document.documentElement.offsetWidth <= mobileBreakpoint;\r\n if (!isMobile) {\r\n return;\r\n }\r\n\r\n var button = $(e.currentTarget).parent();\r\n $HeaderDropDowns.removeClass('submenu-open');\r\n button\r\n .removeClass('menu-open')\r\n .children('.sub-menu-btn')\r\n .removeAttr('aria-expanded')\r\n .focus(); \r\n };\r\n\r\n function reactOnClicksOutsideDropdownMenu(ev) {\r\n var $button = ev.data.button;\r\n var $dropDown = ev.data.dropDown;\r\n\r\n if (targetOriginatesFromOutsideOfElement($button, ev.target)\r\n && targetOriginatesFromOutsideOfElement($dropDown, ev.target)) {\r\n closeDropdownMenu($dropDown);\r\n }\r\n };\r\n\r\n function targetOriginatesFromOutsideOfElement(element, target) {\r\n return !$(element).is(target) && !$(element).find(target).length;\r\n };\r\n\r\n function addListenerForEscapeKey(func, $dropDown) {\r\n $document.on(\"keydown.escapeKeyPressed\", function(e) {\r\n if (e.keyCode == 27) { // escape key maps to keycode `27`\r\n func($dropDown);\r\n }\r\n });\r\n };\r\n\r\n });\r\n\r\n})(jQuery);\r\n","(function($) {\r\n $(document).ready(function() {\r\n var openClass = 'expanded',\r\n expandAllButtonText = {\r\n 'closed' : 'Vis alle',\r\n 'open' : 'Lukk alle'\r\n },\r\n itemButtonQuery = '.list-group-item-heading[role=button]',\r\n expandAllButtonQuery = '.expand-all',\r\n itemQuery = '.list-group-item-heading',\r\n itemBody = '.list-group-item-body',\r\n defaultOpenItems = document.querySelectorAll('.js-default-open');\r\n\r\n // Kaller fn dersom event er av typen click eller keyCode 13\r\n function isClickOrEnterPressFilter(fn) {\r\n return function(event) {\r\n if (event.type === 'click' || event.keyCode === 13) {\r\n fn(event);\r\n }\r\n }\r\n }\r\n\r\n $('body')\r\n .on('click keypress', '.js-expandable ' + itemQuery, isClickOrEnterPressFilter(toggleExpandableItem))\r\n .on('click', '.js-expandable ' + expandAllButtonQuery, toggleAllExpandable);\r\n\r\n function toggleExpandableItem(event) {\r\n var item = event.currentTarget;\r\n\r\n if($(item).parent().hasClass('expanded')) {\r\n closeItem(item);\r\n } else {\r\n openItem(item);\r\n }\r\n }\r\n\r\n function toggleAllExpandable(event) {\r\n var expandableCard = event.target.parentElement.parentElement;\r\n var items = $(expandableCard).find(itemButtonQuery);\r\n\r\n function performActionOnItems(func) {\r\n Array.prototype.forEach.call(items, function(item) {\r\n func(item);\r\n });\r\n }\r\n\r\n if(event.target.innerHTML == expandAllButtonText.closed) {\r\n performActionOnItems(openItem);\r\n } else {\r\n performActionOnItems(closeItem);\r\n }\r\n updateExpandAllButton(expandableCard);\r\n }\r\n\r\n\r\n function updateExpandAllButton(expandableCard) {\r\n\r\n function allItemsAreOpen(items) {\r\n var allAreOpen = true;\r\n Array.prototype.forEach.call(items, function(item) {\r\n if(!item.classList.contains(openClass)) {\r\n allAreOpen = false;\r\n }\r\n });\r\n return allAreOpen;\r\n }\r\n\r\n var items = $(expandableCard).find('.list-group-item.can-expand');\r\n var expandAllButton = $(expandableCard).find(expandAllButtonQuery);\r\n\r\n expandAllButton.html(allItemsAreOpen(items) ? expandAllButtonText.open : expandAllButtonText.closed);\r\n }\r\n\r\n function closeItem(item) {\r\n var parent = item.parentElement;\r\n var bodyEl = parent.querySelector(itemBody);\r\n\r\n parent.classList.remove(openClass);\r\n bodyEl.style.height = 0;\r\n changeAttibute(item, 'aria-expanded', false);\r\n changeAttibute(bodyEl, 'aria-hidden', true);\r\n\r\n }\r\n\r\n function openItem(item) {\r\n var parent = item.parentElement;\r\n if(!parent.classList.contains(openClass)) {\r\n var bodyEl = parent.querySelector(itemBody);\r\n\r\n var height = getRealHeight(bodyEl);\r\n parent.classList.add(openClass);\r\n bodyEl.style.height = height + 'px';\r\n bodyEl.style.visibility = 'visible';\r\n\r\n changeAttibute(item, 'aria-expanded', true);\r\n changeAttibute(bodyEl, 'aria-hidden', false);\r\n }\r\n\r\n }\r\n\r\n function getRealHeight(item) {\r\n item.style.visibility = 'hidden';\r\n item.style.height = 'auto';\r\n\r\n var realHeight = item.offsetHeight;\r\n\r\n item.style.height = '0';\r\n item.style.visibility = '';\r\n\r\n item.offsetHeight; // Trigger redraw before changing\r\n return realHeight;\r\n }\r\n\r\n function changeAttibute(item, attribute, value) {\r\n var attr = item.attributes.getNamedItem(attribute);\r\n if (attr) {\r\n attr.value = value;\r\n item.attributes.setNamedItem(attr);\r\n }\r\n }\r\n\r\n if(defaultOpenItems.length){\r\n for(var i=0; i < defaultOpenItems.length; i++){\r\n openItem(defaultOpenItems[i].querySelector(itemQuery));\r\n }\r\n }\r\n\r\n });\r\n})(jQuery);\r\n","/**\r\n * Created by ekst_aegg on 27.06.2016\r\n */\r\n(function() {\r\n 'use strict';\r\n\r\n var openClass = 'open',\r\n doneClass = 'done',\r\n availableClass = 'available',\r\n itemQuery = '.card-list-process-item',\r\n itemHeading = '.card-list-process-heading',\r\n itemBody = '.card-list-process-body';\r\n\r\n /* START Helper functions */\r\n var clickFilter = function(fn) {\r\n // Kaller fn dersom event er av typen click eller keyCode 13\r\n return function(e) {\r\n if (e.type === 'click' || e.keyCode == 13) {\r\n fn(e);\r\n }\r\n };\r\n };\r\n var forEach = function (object) {\r\n return function(cb) {\r\n Object.keys(object).forEach(function(key) {\r\n cb(key, object[key]);\r\n });\r\n };\r\n };\r\n var createItemWrapper = function(el) {\r\n return {\r\n el: el,\r\n done: false\r\n };\r\n };\r\n /* END Helper functions */\r\n\r\n //Lighter, patent pending \r\n var Lighter = function(item) {\r\n if (!(this instanceof Lighter)) {\r\n return new Lighter(item);\r\n }\r\n\r\n if (typeof item === 'string') {\r\n this.item = document.querySelector(item);\r\n } else {\r\n this.item = item;\r\n }\r\n return this;\r\n };\r\n Lighter.prototype = {\r\n hasClass: function(klass) {\r\n if (this.item.classList) {\r\n return this.item.classList.contains(klass);\r\n } else {\r\n return this.item.className.split(' ').indexOf(klass) > -1;\r\n }\r\n },\r\n getEl: function() {\r\n return this.item;\r\n },\r\n child: function(selector) {\r\n if (!selector) {\r\n return this;\r\n }\r\n return Lighter(this.item.querySelector(selector));\r\n },\r\n parent: function() {\r\n return Lighter(this.item.parentElement);\r\n },\r\n addClass: function(klass) {\r\n if (this.item.classList) {\r\n this.item.classList.add(klass);\r\n } else if (!this.hasClass(klass)) {\r\n this.item.className += ' ' + klass;\r\n }\r\n return this;\r\n },\r\n removeClass: function(klass) {\r\n if (this.item.classList) {\r\n this.item.classList.remove(klass);\r\n } else if (this.hasClass(klass)) {\r\n var items = this.item.className.split(' ');\r\n items.splice(items.indexOf(klass), 1);\r\n this.item.className = items.join(' ');\r\n }\r\n return this;\r\n },\r\n getRealHeight: function() {\r\n this.css({\r\n visibility: 'hidden',\r\n height: 'auto'\r\n });\r\n\r\n var realHeight = this.item.offsetHeight;\r\n\r\n this.css({\r\n visibility: '',\r\n height: '0'\r\n });\r\n // Trigger redraw before changing\r\n this.item.offsetHeight; // jshint ignore:line\r\n return realHeight;\r\n },\r\n attr: function(key, value) {\r\n if(value === undefined){\r\n this.item.getAttribute(key);\r\n }\r\n else {\r\n this.item.setAttribute(key, value);\r\n }\r\n return this;\r\n },\r\n css: function(prop, value) {\r\n if (typeof prop === 'object') {\r\n forEach(prop)(this.css.bind(this));\r\n } else if (value) {\r\n this.item.style[prop] = value;\r\n } else {\r\n return this.item.style[prop];\r\n }\r\n return this;\r\n }\r\n };\r\n\r\n var Progress = function(el) {\r\n this.el = el;\r\n var items = el.querySelectorAll(itemQuery);\r\n this.items = Array.prototype.map.call(items, function(it) {\r\n return createItemWrapper(it);\r\n });\r\n };\r\n Progress.prototype = {\r\n open: function(index) {\r\n if (this.currentOpenIndex !== index) {\r\n\r\n this.close();\r\n\r\n this.currentOpenIndex = index;\r\n\r\n var item = this.items[this.currentOpenIndex];\r\n if (!item) {\r\n return;\r\n }\r\n var el = Lighter(item.el);\r\n var body = el.child(itemBody);\r\n var header = el.child(itemHeading);\r\n\r\n var height = body.getRealHeight();\r\n var bodyEl = body.getEl();\r\n\r\n //Shame we have to do this.. \r\n var transitionEnd = function() {\r\n body.css('height', 'auto');\r\n bodyEl.removeEventListener('transitionend', transitionEnd, false);\r\n };\r\n\r\n if ('transition' in bodyEl.style) {\r\n bodyEl.addEventListener('transitionend', transitionEnd, false);\r\n } else {\r\n setTimeout(transitionEnd, 500);\r\n }\r\n\r\n body.css({\r\n height: height + 'px',\r\n visibility: 'visible'\r\n });\r\n\r\n body.attr('aria-hidden', false);\r\n header.attr('aria-expanded', true);\r\n el.removeClass(availableClass).addClass(openClass);\r\n }\r\n },\r\n close: function() {\r\n if (this.currentOpenIndex === undefined || this.currentOpenIndex === -1) {\r\n return;\r\n }\r\n\r\n var item = this.items[this.currentOpenIndex];\r\n var itemEl = Lighter(item.el);\r\n var body = itemEl.child(itemBody);\r\n var header = itemEl.child(itemHeading);\r\n\r\n var bodyEl = body.getEl();\r\n\r\n var realHeight = bodyEl.offsetHeight;\r\n\r\n body.css('height', realHeight + 'px');\r\n\r\n //Force Redraw..\r\n bodyEl.offsetHeight; // jshint ignore:line\r\n\r\n var onTransitionEnd = function(){\r\n body.attr('aria-hidden', true);\r\n header.attr('aria-expanded', false);\r\n itemEl.removeClass(openClass);\r\n\r\n //Add classes as needed\r\n if(item.done){\r\n itemEl.addClass(doneClass);\r\n }\r\n if(item.available){\r\n itemEl.addClass(availableClass);\r\n }\r\n\r\n bodyEl.removeEventListener('transitionend', onTransitionEnd, false);\r\n bodyEl.removeEventListener('webkitTransitionEnd', onTransitionEnd, false);\r\n };\r\n\r\n if('transition' in bodyEl.style){\r\n bodyEl.addEventListener('transitionend', onTransitionEnd, false);\r\n bodyEl.addEventListener('webkitTransitionEnd', onTransitionEnd, false);\r\n } else {\r\n setTimeout(onTransitionEnd, 500);\r\n }\r\n\r\n body.css({\r\n height: '0px',\r\n visibility: 'hidden'\r\n });\r\n\r\n itemEl.removeClass(openClass);\r\n\r\n this.currentOpenIndex = '';\r\n },\r\n resetAvailable: function() {\r\n var current = this.currentOpenIndex,\r\n i = current + 1,\r\n l = this.items.length;\r\n\r\n for (; i < l; i++) {\r\n this.items[i].done = false;\r\n this.items[i].available = false;\r\n Lighter(this.items[i].el).removeClass(doneClass).removeClass(availableClass);\r\n }\r\n },\r\n resetDone: function() {\r\n var current = this.currentOpenIndex,\r\n i = 0,\r\n l = current;\r\n\r\n for (; i < l; i++) {\r\n this.items[i].done = true;\r\n this.items[i].available = false;\r\n Lighter(this.items[i].el).addClass(doneClass);\r\n }\r\n },\r\n makeAvailable: function(index) {\r\n var current = index || this.currentOpenIndex,\r\n i = 0,\r\n l = current;\r\n\r\n for (; i < l; i++) {\r\n this.items[i].done = true;\r\n this.items[i].available = true;\r\n Lighter(this.items[i].el).addClass(doneClass).addClass(availableClass);\r\n }\r\n },\r\n goTo: function(next, validator) {\r\n if (!(this.currentOpenIndex === undefined || this.currentOpenIndex === -1)) {\r\n var item = this.items[this.currentOpenIndex],\r\n currentEl = Lighter(item.el);\r\n if (typeof validator === 'function') {\r\n if (!validator(item.el, this.currentOpenIndex, next)) {\r\n return false;\r\n }\r\n item.done = true;\r\n }\r\n else if(validator === true){\r\n item.done = true;\r\n }\r\n item.available = true;\r\n }\r\n\r\n this.open(next);\r\n },\r\n isAvailable: function(itemIndex) {\r\n var item = this.items[itemIndex];\r\n return item && item.available;\r\n },\r\n bind: function(validation) {\r\n //Validation is called with currentEl, currentIndex, futureIndex\r\n var _this = this,\r\n validator = validation,\r\n l = this.items.length,\r\n i = 0;\r\n\r\n this.eventListener = function(e) {\r\n var curr = Lighter(e.target);\r\n var parent = curr.parent();\r\n if (curr.hasClass('progress-next') || parent.hasClass('progress-next')) {\r\n _this.goTo(_this.currentOpenIndex + 1, validator);\r\n }\r\n if (curr.hasClass('list-group-item-heading') || parent.hasClass('list-group-item-heading')) {\r\n var selectable = parent.hasClass('can-expand') ? parent : parent.parent();\r\n if (selectable.hasClass('can-expand') && (selectable.hasClass(doneClass) || selectable.hasClass(availableClass))) {\r\n var nextIndex,\r\n i = 0,\r\n l = _this.items.length;\r\n for (; i < l; i++) {\r\n if (_this.items[i].el === selectable.getEl()) {\r\n nextIndex = i;\r\n break;\r\n }\r\n }\r\n _this.goTo(nextIndex);\r\n }\r\n }\r\n };\r\n\r\n this.el.addEventListener('keypress', clickFilter(this.eventListener), false);\r\n this.el.addEventListener('click', this.eventListener, false);\r\n },\r\n unbind: function() {\r\n this.el.removeEventListener('keypress', clickFilter(this.eventListener), false);\r\n this.el.removeEventListener('click', this.eventListener, false);\r\n }\r\n };\r\n\r\n\r\n window.eikamodules = window.eikamodules || {};\r\n\r\n window.eikamodules.Progress = Progress;\r\n\r\n})();","(function($) {\r\n $(document).ready(function() {\r\n $(\".alert-close\").on(\"click\", function(ev) {\r\n $(ev.target).parents(\".card\").addClass(\"closed\");\r\n });\r\n });\r\n})(jQuery);\r\n","(function ($) {\r\n $(function() {\r\n\r\n var $allVideos = $(\"iframe[src*='vimeo.com'], iframe[src*='youtube.com'], object, embed\");\r\n\r\n\r\n \t$allVideos.each(function() {\r\n var url = $(this).attr(\"src\");\r\n if(/youtube/.exec(url)) {\r\n var char = url.indexOf(\"?\") != -1 ? \"&\" : \"?\";\r\n $(this).attr(\"src\",url+char+\"wmode=transparent\");\r\n }\r\n\r\n \t $(this)\r\n \t // jQuery .data does not work on object/embed elements\r\n \t .attr('data-aspectRatio', $(this).height() / $(this).width())\r\n \t .removeAttr('height')\r\n \t .removeAttr('width');\r\n\r\n \t});\r\n\r\n \t$(window).resize(function() {\r\n\r\n \t var newWidth;\r\n \t $allVideos.each(function() {\r\n\r\n newWidth = $(this).parent().width();\r\n\r\n \t var $el = $(this);\r\n \t $el\r\n \t .width(newWidth)\r\n \t .height(newWidth * $el.attr('data-aspectRatio'));\r\n\r\n \t });\r\n\r\n \t}).resize();\r\n\r\n });\r\n})(jQuery);\r\n","/* Modernizr 2.6.2 (Custom Build) | MIT & BSD\r\n * Build: http://modernizr.com/download/#-touch-shiv-teststyles-prefixes-load\r\n */\r\n;window.Modernizr=function(a,b,c){function v(a){i.cssText=a}function w(a,b){return v(l.join(a+\";\")+(b||\"\"))}function x(a,b){return typeof a===b}function y(a,b){return!!~(\"\"+a).indexOf(b)}function z(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:x(f,\"function\")?f.bind(d||b):f}return!1}var d=\"2.6.2\",e={},f=b.documentElement,g=\"modernizr\",h=b.createElement(g),i=h.style,j,k={}.toString,l=\" -webkit- -moz- -o- -ms- \".split(\" \"),m={},n={},o={},p=[],q=p.slice,r,s=function(a,c,d,e){var h,i,j,k,l=b.createElement(\"div\"),m=b.body,n=m||b.createElement(\"body\");if(parseInt(d,10))while(d--)j=b.createElement(\"div\"),j.id=e?e[d]:g+(d+1),l.appendChild(j);return h=[\"\",'\"].join(\"\"),l.id=g,(m?l:n).innerHTML+=h,n.appendChild(l),m||(n.style.background=\"\",n.style.overflow=\"hidden\",k=f.style.overflow,f.style.overflow=\"hidden\",f.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),f.style.overflow=k),!!i},t={}.hasOwnProperty,u;!x(t,\"undefined\")&&!x(t.call,\"undefined\")?u=function(a,b){return t.call(a,b)}:u=function(a,b){return b in a&&x(a.constructor.prototype[b],\"undefined\")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!=\"function\")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e}),m.touch=function(){var c;return\"ontouchstart\"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:s([\"@media (\",l.join(\"touch-enabled),(\"),g,\")\",\"{#modernizr{top:9px;position:absolute}}\"].join(\"\"),function(a){c=a.offsetTop===9}),c};for(var A in m)u(m,A)&&(r=A.toLowerCase(),e[r]=m[A](),p.push((e[r]?\"\":\"no-\")+r));return e.addTest=function(a,b){if(typeof a==\"object\")for(var d in a)u(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b==\"function\"?b():b,typeof enableClasses!=\"undefined\"&&enableClasses&&(f.className+=\" \"+(b?\"\":\"no-\")+a),e[a]=b}return e},v(\"\"),h=j=null,function(a,b){function k(a,b){var c=a.createElement(\"p\"),d=a.getElementsByTagName(\"head\")[0]||a.documentElement;return c.innerHTML=\"x\",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a==\"string\"?a.split(\" \"):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e\",f=\"hidden\"in a,j=a.childNodes.length==1||function(){b.createElement(\"a\");var a=b.createDocumentFragment();return typeof a.cloneNode==\"undefined\"||typeof a.createDocumentFragment==\"undefined\"||typeof a.createElement==\"undefined\"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||\"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video\",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:\"default\",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=l,e.testStyles=s,e}(this,this.document),function(a,b,c){function d(a){return\"[object Function]\"==o.call(a)}function e(a){return\"string\"==typeof a}function f(){}function g(a){return!a||\"loaded\"==a||\"complete\"==a||\"uninitialized\"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){(\"c\"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){\"img\"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),\"object\"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height=\"0\",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),\"img\"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||\"j\",e(a)?i(\"c\"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName(\"script\")[0],o={}.toString,p=[],q=0,r=\"MozAppearance\"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&\"[object Opera]\"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?\"object\":l?\"script\":\"img\",v=l?\"script\":u,w=Array.isArray||function(a){return\"[object Array]\"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split(\"!\"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f 11/4/2013\r\n\r\nAs of 31/10/2017 - Library no longer working in:\r\n# Chrome Version 60.0.3112.90 (Official Build) (32-bit) \r\n# FireFox Version 56.0 (64-bit)\r\n\r\nLibrary relies on Modernizr returning browser touch suport. \r\nThe forementioned browsers are returning true for touch on non-touch devices.\r\n\r\nAs per Modernizr documentation, we have bound both touch and mouse events together.\r\n\r\nAndrew: ekst_anb@eika.no\r\nLinda: ekst_lps@eika.no\r\n\r\n* ========================================================= */\r\n\r\n\r\n/* =========================================================\r\n * bootstrap-slider.js v2.0.0\r\n * http://www.eyecon.ro/bootstrap-slider\r\n * =========================================================\r\n * Copyright 2012 Stefan Petre\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ========================================================= */\r\n\r\n!function( $ ) {\r\n\r\n\tvar Slider = function(element, options) {\r\n\t\tthis.element = $(element);\r\n\t\tthis.picker = $(''+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
')\r\n\t\t\t\t\t\t\t.insertBefore(this.element)\r\n\t\t\t\t\t\t\t.append(this.element);\r\n\t\tthis.id = this.element.data('slider-id')||options.id;\r\n\t\tif (this.id) {\r\n\t\t\tthis.picker[0].id = this.id;\r\n\t\t}\r\n\r\n\t\tif (typeof Modernizr !== 'undefined' && Modernizr.touch) {\r\n\t\t\tthis.touchCapable = true;\r\n\t\t}\r\n\r\n\t\tvar tooltip = this.element.data('slider-tooltip')||options.tooltip;\r\n\r\n\t\tthis.tooltip = this.picker.find('.tooltip');\r\n\t\tthis.tooltipInner = this.tooltip.find('div.tooltip-inner');\r\n\r\n\t\tthis.orientation = this.element.data('slider-orientation')||options.orientation;\r\n\t\tswitch(this.orientation) {\r\n\t\t\tcase 'vertical':\r\n\t\t\t\tthis.picker.addClass('slider-vertical');\r\n\t\t\t\tthis.stylePos = 'top';\r\n\t\t\t\tthis.mousePos = 'pageY';\r\n\t\t\t\tthis.sizePos = 'offsetHeight';\r\n\t\t\t\tthis.tooltip.addClass('right')[0].style.left = '100%';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthis.picker\r\n\t\t\t\t\t.addClass('slider-horizontal')\r\n\t\t\t\t\t.css('width', this.element.outerWidth());\r\n\t\t\t\tthis.orientation = 'horizontal';\r\n\t\t\t\tthis.stylePos = 'left';\r\n\t\t\t\tthis.mousePos = 'pageX';\r\n\t\t\t\tthis.sizePos = 'offsetWidth';\r\n\t\t\t\tthis.tooltip.addClass('top')[0].style.top = -this.tooltip.outerHeight() - 14 + 'px';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.min = this.element.data('slider-min')||options.min;\r\n\t\tthis.max = this.element.data('slider-max')||options.max;\r\n\t\tthis.step = this.element.data('slider-step')||options.step;\r\n\t\tthis.value = this.element.data('slider-value')||options.value;\r\n\t\tif (this.value[1]) {\r\n\t\t\tthis.range = true;\r\n\t\t}\r\n\r\n\t\tthis.selection = this.element.data('slider-selection')||options.selection;\r\n\t\tthis.selectionEl = this.picker.find('.slider-selection');\r\n\t\tif (this.selection === 'none') {\r\n\t\t\tthis.selectionEl.addClass('hide');\r\n\t\t}\r\n\t\tthis.selectionElStyle = this.selectionEl[0].style;\r\n\r\n\r\n\t\tthis.handle1 = this.picker.find('.slider-handle:first');\r\n\t\tthis.handle1Stype = this.handle1[0].style;\r\n\t\tthis.handle2 = this.picker.find('.slider-handle:last');\r\n\t\tthis.handle2Stype = this.handle2[0].style;\r\n\r\n\t\tvar handle = this.element.data('slider-handle')||options.handle;\r\n\t\tswitch(handle) {\r\n\t\t\tcase 'round':\r\n\t\t\t\tthis.handle1.addClass('round');\r\n\t\t\t\tthis.handle2.addClass('round');\r\n\t\t\t\tbreak\r\n\t\t\tcase 'triangle':\r\n\t\t\t\tthis.handle1.addClass('triangle');\r\n\t\t\t\tthis.handle2.addClass('triangle');\r\n\t\t\t\tbreak\r\n\t\t}\r\n\r\n\t\tif (this.range) {\r\n\t\t\tthis.value[0] = Math.max(this.min, Math.min(this.max, this.value[0]));\r\n\t\t\tthis.value[1] = Math.max(this.min, Math.min(this.max, this.value[1]));\r\n\t\t} else {\r\n\t\t\tthis.value = [ Math.max(this.min, Math.min(this.max, this.value))];\r\n\t\t\tthis.handle2.addClass('hide');\r\n\t\t\tif (this.selection == 'after') {\r\n\t\t\t\tthis.value[1] = this.max;\r\n\t\t\t} else {\r\n\t\t\t\tthis.value[1] = this.min;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.diff = this.max - this.min;\r\n\t\tthis.percentage = [\r\n\t\t\t(this.value[0]-this.min)*100/this.diff,\r\n\t\t\t(this.value[1]-this.min)*100/this.diff,\r\n\t\t\tthis.step*100/this.diff\r\n\t\t];\r\n\r\n\t\tthis.offset = this.picker.offset();\r\n\t\tthis.size = this.picker[0][this.sizePos];\r\n\r\n\t\tthis.formater = options.formater;\r\n\r\n\t\tthis.layout();\r\n\r\n\t\tthis.picker.on({\r\n\t\t\ttouchstart: $.proxy(this.mousedown, this),\r\n\t\t\tmousedown: $.proxy(this.mousedown, this)\r\n\t\t});\r\n\r\n\t\tif (tooltip === 'show') {\r\n\t\t\tthis.picker.on({\r\n\t\t\t\tmouseenter: $.proxy(this.showTooltip, this),\r\n\t\t\t\tmouseleave: $.proxy(this.hideTooltip, this)\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.tooltip.addClass('hide');\r\n\t\t}\r\n\t};\r\n\r\n\tSlider.prototype = {\r\n\t\tconstructor: Slider,\r\n\r\n\t\tover: false,\r\n\t\tinDrag: false,\r\n\r\n\t\tshowTooltip: function(){\r\n\t\t\tthis.tooltip.addClass('in');\r\n\t\t\t//var left = Math.round(this.percent*this.width);\r\n\t\t\t//this.tooltip.css('left', left - this.tooltip.outerWidth()/2);\r\n\t\t\tthis.over = true;\r\n\t\t},\r\n\r\n\t\thideTooltip: function(){\r\n\t\t\tif (this.inDrag === false) {\r\n\t\t\t\tthis.tooltip.removeClass('in');\r\n\t\t\t}\r\n\t\t\tthis.over = false;\r\n\t\t},\r\n\r\n\t\tlayout: function(){\r\n\t\t\tthis.handle1Stype[this.stylePos] = this.percentage[0]+'%';\r\n\t\t\tthis.handle2Stype[this.stylePos] = this.percentage[1]+'%';\r\n\t\t\tif (this.orientation == 'vertical') {\r\n\t\t\t\tthis.selectionElStyle.top = Math.min(this.percentage[0], this.percentage[1]) +'%';\r\n\t\t\t\tthis.selectionElStyle.height = Math.abs(this.percentage[0] - this.percentage[1]) +'%';\r\n\t\t\t} else {\r\n\t\t\t\tthis.selectionElStyle.left = Math.min(this.percentage[0], this.percentage[1]) +'%';\r\n\t\t\t\tthis.selectionElStyle.width = Math.abs(this.percentage[0] - this.percentage[1]) +'%';\r\n\t\t\t}\r\n\t\t\tif (this.range) {\r\n\t\t\t\tthis.tooltipInner.text(\r\n\t\t\t\t\tthis.formater(this.value[0]) +\r\n\t\t\t\t\t' : ' +\r\n\t\t\t\t\tthis.formater(this.value[1])\r\n\t\t\t\t);\r\n\t\t\t\tthis.tooltip[0].style[this.stylePos] = this.size * (this.percentage[0] + (this.percentage[1] - this.percentage[0])/2)/100 - (this.orientation === 'vertical' ? this.tooltip.outerHeight()/2 : this.tooltip.outerWidth()/2) +'px';\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltipInner.text(\r\n\t\t\t\t\tthis.formater(this.value[0])\r\n\t\t\t\t);\r\n\t\t\t\tthis.tooltip[0].style[this.stylePos] = this.size * this.percentage[0]/100 - (this.orientation === 'vertical' ? this.tooltip.outerHeight()/2 : this.tooltip.outerWidth()/2) +'px';\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tmousedown: function(ev) {\r\n\r\n\t\t\t// Touch: Get the original event:\r\n\t\t\tif (this.touchCapable && ev.type === 'touchstart') {\r\n\t\t\t\tev = ev.originalEvent;\r\n\t\t\t}\r\n\r\n\t\t\tthis.offset = this.picker.offset();\r\n\t\t\tthis.size = this.picker[0][this.sizePos];\r\n\r\n\t\t\tvar percentage = this.getPercentage(ev);\r\n\r\n\t\t\tif (this.range) {\r\n\t\t\t\tvar diff1 = Math.abs(this.percentage[0] - percentage);\r\n\t\t\t\tvar diff2 = Math.abs(this.percentage[1] - percentage);\r\n\t\t\t\tthis.dragged = (diff1 < diff2) ? 0 : 1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.dragged = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis.percentage[this.dragged] = percentage;\r\n\t\t\tthis.layout();\r\n\r\n\t\t\t$(document).on({\r\n\t\t\t\ttouchmove: $.proxy(this.mousemove, this),\r\n\t\t\t\ttouchend: $.proxy(this.mouseup, this),\r\n\t\t\t\tmousemove: $.proxy(this.mousemove, this),\r\n\t\t\t\tmouseup: $.proxy(this.mouseup, this)\r\n\t\t\t});\r\n\r\n\t\t\tthis.inDrag = true;\r\n\t\t\tvar val = this.calculateValue();\r\n\t\t\tthis.element.trigger({\r\n\t\t\t\t\ttype: 'slideStart',\r\n\t\t\t\t\tvalue: val\r\n\t\t\t\t}).trigger({\r\n\t\t\t\t\ttype: 'slide',\r\n\t\t\t\t\tvalue: val\r\n\t\t\t\t});\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tmousemove: function(ev) {\r\n\r\n\t\t\t// Touch: Get the original event:\r\n\t\t\tif (this.touchCapable && ev.type === 'touchmove') {\r\n\t\t\t\tev = ev.originalEvent;\r\n\t\t\t}\r\n\r\n\t\t\tvar percentage = this.getPercentage(ev);\r\n\t\t\tif (this.range) {\r\n\t\t\t\tif (this.dragged === 0 && this.percentage[1] < percentage) {\r\n\t\t\t\t\tthis.percentage[0] = this.percentage[1];\r\n\t\t\t\t\tthis.dragged = 1;\r\n\t\t\t\t} else if (this.dragged === 1 && this.percentage[0] > percentage) {\r\n\t\t\t\t\tthis.percentage[1] = this.percentage[0];\r\n\t\t\t\t\tthis.dragged = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.percentage[this.dragged] = percentage;\r\n\t\t\tthis.layout();\r\n\t\t\tvar val = this.calculateValue();\r\n\t\t\tthis.element\r\n\t\t\t\t.trigger({\r\n\t\t\t\t\ttype: 'slide',\r\n\t\t\t\t\tvalue: val\r\n\t\t\t\t})\r\n\t\t\t\t.data('value', val)\r\n\t\t\t\t.prop('value', val);\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tmouseup: function(ev) {\r\n\t\t\t$(document).off({\r\n\t\t\t\ttouchmove: this.mousemove,\r\n\t\t\t\ttouchend: this.mouseup,\r\n\t\t\t\tmousemove: this.mousemove,\r\n\t\t\t\tmouseup: this.mouseup\r\n\t\t\t});\r\n\r\n\t\t\tthis.inDrag = false;\r\n\t\t\tif (this.over == false) {\r\n\t\t\t\tthis.hideTooltip();\r\n\t\t\t}\r\n\t\t\tthis.element;\r\n\t\t\tvar val = this.calculateValue();\r\n\t\t\tthis.element\r\n\t\t\t\t.trigger({\r\n\t\t\t\t\ttype: 'slideStop',\r\n\t\t\t\t\tvalue: val\r\n\t\t\t\t})\r\n\t\t\t\t.data('value', val)\r\n\t\t\t\t.prop('value', val);\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tcalculateValue: function() {\r\n\t\t\tvar val;\r\n\t\t\tif (this.range) {\r\n\t\t\t\tval = [\r\n\t\t\t\t\t(this.min + Math.round((this.diff * this.percentage[0]/100)/this.step)*this.step),\r\n\t\t\t\t\t(this.min + Math.round((this.diff * this.percentage[1]/100)/this.step)*this.step)\r\n\t\t\t\t];\r\n\t\t\t\tthis.value = val;\r\n\t\t\t} else {\r\n\t\t\t\tval = (this.min + Math.round((this.diff * this.percentage[0]/100)/this.step)*this.step);\r\n\t\t\t\tthis.value = [val, this.value[1]];\r\n\t\t\t}\r\n\t\t\treturn val;\r\n\t\t},\r\n\r\n\t\tgetPercentage: function(ev) {\r\n\t\t\tif (this.touchCapable && typeof ev.touches !== 'undefined') {\r\n\t\t\t\tev = ev.touches[0];\r\n\t\t\t}\r\n\t\t\tvar percentage = (ev[this.mousePos] - this.offset[this.stylePos])*100/this.size;\r\n\t\t\tpercentage = Math.round(percentage/this.percentage[2])*this.percentage[2];\r\n\t\t\treturn Math.max(0, Math.min(100, percentage));\r\n\t\t},\r\n\r\n\t\tgetValue: function() {\r\n\t\t\tif (this.range) {\r\n\t\t\t\treturn this.value;\r\n\t\t\t}\r\n\t\t\treturn this.value[0];\r\n\t\t},\r\n\r\n\t\tsetValue: function(val) {\r\n\t\t\tthis.value = val;\r\n\r\n\t\t\tif (this.range) {\r\n\t\t\t\tthis.value[0] = Math.max(this.min, Math.min(this.max, this.value[0]));\r\n\t\t\t\tthis.value[1] = Math.max(this.min, Math.min(this.max, this.value[1]));\r\n\t\t\t} else {\r\n\t\t\t\tthis.value = [ Math.max(this.min, Math.min(this.max, this.value))];\r\n\t\t\t\tthis.handle2.addClass('hide');\r\n\t\t\t\tif (this.selection == 'after') {\r\n\t\t\t\t\tthis.value[1] = this.max;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.value[1] = this.min;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.diff = this.max - this.min;\r\n\t\t\tthis.percentage = [\r\n\t\t\t\t(this.value[0]-this.min)*100/this.diff,\r\n\t\t\t\t(this.value[1]-this.min)*100/this.diff,\r\n\t\t\t\tthis.step*100/this.diff\r\n\t\t\t];\r\n\t\t\tthis.layout();\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.slider = function ( option, val ) {\r\n\t\treturn this.each(function () {\r\n\t\t\tvar $this = $(this),\r\n\t\t\t\tdata = $this.data('slider'),\r\n\t\t\t\toptions = typeof option === 'object' && option;\r\n\t\t\tif (!data) {\r\n\t\t\t\t$this.data('slider', (data = new Slider(this, $.extend({}, $.fn.slider.defaults,options))));\r\n\t\t\t}\r\n\t\t\tif (typeof option == 'string') {\r\n\t\t\t\tdata[option](val);\r\n\t\t\t}\r\n\t\t})\r\n\t};\r\n\r\n\t$.fn.slider.defaults = {\r\n\t\tmin: 0,\r\n\t\tmax: 10,\r\n\t\tstep: 1,\r\n\t\torientation: 'horizontal',\r\n\t\tvalue: 5,\r\n\t\tselection: 'before',\r\n\t\ttooltip: 'show',\r\n\t\thandle: 'round',\r\n\t\tformater: function(value) {\r\n\t\t\treturn value;\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.slider.Constructor = Slider;\r\n\r\n}( window.jQuery );\r\n","(function($) {\r\n $(document).ready(function() {\r\n var $window = $(window);\r\n var $htmlBody = $('html, body');\r\n var $bttn = $('.to-the-top');\r\n var $top = $(\"#top\");\r\n var scrollPos = 0;\r\n\r\n var showHideBtn = function(){\r\n var currentScrollPos = $window.scrollTop();\r\n var shouldShowBtn = currentScrollPos <= scrollPos && currentScrollPos > $window.height() * .6;\r\n \r\n shouldShowBtn ? $bttn.addClass('show') : $bttn.removeClass('show');\r\n scrollPos = currentScrollPos;\r\n };\r\n\r\n $bttn.on('click', function(e){\r\n e.preventDefault();\r\n $htmlBody.animate({ scrollTop: 0 }, 'fast', function(){\r\n $top.focus(); \r\n });\r\n });\r\n\r\n $bttn.on('focus', 'a', showHideBtn)\r\n $window.on('scroll', showHideBtn);\r\n });\r\n})(jQuery);\r\n"]}