String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")};function format(a){for(i=1;i<arguments.length;i++)a=a.replace("{"+(i-1)+"}",arguments[i]);return a}function getBasePath(){try{var a=window.location.toString().split("/");return"http://"+a[2]}catch(b){return"http://www.storm.no"}}function getWeatherPagePath(){return getBasePath()+"/"+localizeWeatherRoute()+"/"}function getSearchPagePath(){return getBasePath()+"/"+localizeSearchRoute()+"/"}function setEnterButton(a,b){a.keypress(function(a){if(a.which&&a.which==13||a.keyCode&&a.keyCode==13){b.click();return false}})}var forecastDayboxLineStyle="#E3E3E3 1px solid",forecastDayboxHoverLineStyle="#FFFFFF 1px solid",forecastDayboxBackground="#FFFFFF",forecastDayboxHoverBackground="#DAE9FF";function pageLoad(){try{var a=Sys.WebForms.PageRequestManager.getInstance();!a.get_isInAsyncPostBack()&&initializeFrontPage()}catch(b){}}function initializeFrontPage(){$("div.frontpageForecastDayDetailBox").hover(function(){$(this).hoverFrontpageDaybox(forecastDayboxHoverLineStyle,forecastDayboxHoverBackground)},function(){$(this).hoverFrontpageDaybox(forecastDayboxLineStyle,forecastDayboxBackground)});$(".frontpageForecastDayDetail").click(function(){var a=$(this).find("a").attr("href");top.window.location.href=a});$(".mapButtons li").click(function(){$(".sel").removeClass("sel");$(this).addClass("sel");if($(this).attr("id")=="google"){$(".radarlink").eq(0).hide();$(".mapView-radar").eq(0).hide();$(".mapView-google").eq(0).show();$(".radarView-text").eq(0).hide();$(".mapView-text").eq(0).show()}if($(this).attr("id")=="radar"){$(".radarlink").eq(0).show();$(".mapView-google").eq(0).hide();$(".mapView-radar").eq(0).show();$(".radarView-text").eq(0).show();$(".mapView-text").eq(0).hide()}})}$.fn.hoverFrontpageDaybox=function(a,b){this.css({"font-style":"normal",background:b}).find("div:not(.frontpageWindSymbolDetail, .frontpageTimestep)").css("border-bottom",a)}
