function initiate_geolocation(n){navigator.geolocation.getCurrentPosition(n,handle_errors)}function handle_errors(n){switch(n.code){case n.PERMISSION_DENIED:alert("Din nettleser ble nektet å bruke stedstjenester. Du kan redigere tilgangen til stedstjenester på mobilens innstillinger.");break;case n.POSITION_UNAVAILABLE:alert("Google klarte ikke se din posisjon.");break;case n.TIMEOUT:alert("Uthenting av posisjon feilet. Prøv igjen.");break;default:alert("Ukjent feil.")}}function showLocation(n){var t=n.coords.latitude,i=n.coords.longitude;window.location.href="http://maps.google.com/maps?f=d&source=s_d&saddr="+t+","+i+"&daddr=CORA+SANDELSGATE+4,+9008+Tromsø&hl=en&dirflg=walk"}function errorHandler(n){n.code==1?alert("Error: Access is denied!"):n.code==2&&alert("Error: Position is unavailable!")}function findDirections(){if(navigator.geolocation)navigator.geolocation.getCurrentPosition(showLocation,errorHandler,{timeout:3e3});else alert("Sorry, browser does not support geolocation!")}function scrollToTop(){$("html, body").animate({scrollTop:0},1e3,"easeOutCirc",function(){setTimeout(function(){scrolling=!1},50)})}function scrollToItem(n,t){var i=$("#"+n);return $("html, body").animate({scrollTop:i.offset().top},1e3,"easeOutCirc",function(){setTimeout(function(){scrolling=!1},50)}),t&&isMobile()&&$(".topMenuContent ul").slideToggle(),null}function isMobile(){return!!window.navigator.userAgent.match(/(iphone|android)/gi)}var userLat,userLong,iOS,scrolling,minHeight;if($(".locationTab").click(function(){$("#mobileContact").animate({left:600},"slow",function(){})},function(){$("#mobileContact").animate({left:100},"slow",function(){})}),$(".locationTabClose").click(function(){$("#mobileContact").animate({left:600},"slow",function(){})}),iOS=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,iOS&&($("#scene").parallax(),$("#scene2").parallax()),$(function(){var n=$("#maximage").length;n==1?$("#maximage").maximage({cycleOptions:{cssTransitions:!1,cssBackgroundSize:!1,fx:"fade",speed:800,timeout:8e3,prev:"#arrow_left",next:"#arrow_right",backgroundSize:function(n){var t=200,i=200;$.Window.data("w")/$.Window.data("h")<n.data("ar")?n.height((($.Window.data("w")-i)/n.data("ar")).toFixed(0)).width($.Window.data("w")-i):n.height($.Window.data("h")-t).width((($.Window.data("h")-t)*n.data("ar")).toFixed(0))},pagerAnchorBuilder:function(){return'<li><a href="#"><\/a><\/li>'}},onFirstImageLoaded:function(){$("#maximage").fadeIn("fast")}}):$("#maximagemob").maximage()}),scrolling=!1,minHeight=$(window).height(),$(".contactSection ").css("min-height",minHeight),$(".guestSection ").css("min-height",minHeight),$("#arrowUp").click(function(){$("html,body").animate({scrollTop:0},300)}),window.parent)try{window.parent.SetPreviewFrameHeight($(document).height())}catch(e){}$("body").fadeIn();$("#middle.frontPage.desktop").height($(window).height());$(window).resize(function(){$("#middle.frontPage.desktop").height($(window).height())})