function setHoverAction(){$("#locationlist .scrollable div").on("mousemove",function(n){n.pageX+n.pageY!=mouseEvent&&(mouseEvent=n.pageX+n.pageY,showMap(this))});$("#locationlist .scrollable div").on("click",function(){doNavigate()})}function showMap(n){var t=parseFloat($(n).find(".lat").text()),r=parseFloat($(n).find(".lon").text()),u=$(n).find(".postcode").length>0,i;if(isNaN(t)||t==0){$("#map").hide("fast");return}$("#locationlist .scrollable > div").removeClass("active");$(n).addClass("active");recordIndex=$("#locationlist .scrollable .active").index()+1;i=mapurl.replace(/{lat}/g,t.toString()).replace(/{lon}/g,r.toString());u&&(i=detailmapurl.replace(/{lat}/g,t.toString()).replace(/{lon}/g,r.toString()));$("#map img").attr("src",i);$("#map").show("fast")}function doNavigate(){var n=$("#locationlist .scrollable .active"),t=n.find(".locationid").text(),i=new Forecast,r,u;$("#forecast-hp").length>0?(Cookies.set(USERLOCATION_COOKIE,t,{expires:999,path:"/"}),i.BindForecastHomePage("#forecast-hp"),i.BindForecastTextHomepage("#location-forecast-hp")):(r=n.find(".name").text().replace(/[^a-z0-9]/gi,"-").toLowerCase(),u=targetUrl.replace(/{locationid}/g,t).replace(/{name}/,r),window.document.location.href=u);$("#setlocation").modal("hide")}function processKeyInput(n){switch(n.which){case 40:$("#locationlist .scrollable > div").removeClass("active");recordIndex++;recordIndex>$("#locationlist .scrollable > div").length&&(recordIndex=$("#locationlist .scrollable > div").length);$("#locationlist .scrollable > div:nth-child("+recordIndex+")").addClass("active");break;case 38:$("#locationlist .scrollable > div").removeClass("active");recordIndex--;recordIndex<1&&(recordIndex=1);$("#locationlist .scrollable > div:nth-child("+recordIndex+")").addClass("active");break;case 13:doNavigate()}try{$("#locationlist .scrollable .active").position().top<25&&$("#locationlist .scrollable").scrollTop((recordIndex-10)*20)}catch(n){}recordIndex<0&&(recordIndex=0);recordIndex<11&&$("#locationlist .scrollable").scrollTop(1);recordIndex%10==0&&$("#locationlist .scrollable").scrollTop((recordIndex-1)*20);showMap($("#locationlist .scrollable .active"))}function findLocations(n){(n={term:n.term},activeRequest!=n.term)&&(activeRequest=n.term,$("#locationlist").html(""),$("#resultset").show(),$.ajax({url:"/api/locationapi/locationsall",type:"GET",cache:!0,data:n,dataType:"json",success:function(n){var t="",i;if(n&&n.length!=0)if(recordIndex=0,typeof n[0].Postcode=="string"){t="<div class='head'><span id='zipcode' class='postcode'>zipcode<\/span><span id='street' class='straat'>street<span><span id='place' class='plaats'>place<\/span><\/div>";var u="",f="",e="",r="";for(t+="<div class='scrollable'>",i=0;i<n.length;i++)u!=n[i].Plaats&&(u=n[i].Plaats,f=u),e!=n[i].Straatnaam&&(e=n[i].Straatnaam,r=e),r!=""&&(t+="<div class='record'>",t+="<span class='postcode'><a href='#'>"+n[i].Postcode+"<\/a><\/span>",t+="<span class='straat'>"+r+"<\/span>",t+="<span class='plaats'>"+f+"<\/span>",t+="<span class='hidden gps lat'>"+Math.round(n[i].Latitude*100)/100+"<\/span>",t+="<span class='hidden gps lon'>"+Math.round(n[i].Longitude*100)/100+"<\/span>",t+="<\/div>"),r="",f="";t+="<\/div>"}else{for(t="<div class='head'><span id='place'  class='name'>place<\/span><span id='country'class='country'>country<\/span><span class='gps'>Lat<\/span><span class='gps'>Lon<\/span><span class='gps'>Alt (m)<\/span><\/div>",t+="<div class='scrollable'>",i=0;i<n.length;i++)t+="<div class='record'>",t+="<span class='name'><a href='#'>"+n[i].AsciiName+"<\/a><\/span>",t+="<span class='country'>"+n[i].CountryCode+"<\/span>",t+="<span class='gps lat'>"+Math.round(n[i].Latitude*100)/100+"<\/span>",t+="<span class='gps lon'>"+Math.round(n[i].Longitude*100)/100+"<\/span>",t+="<span class='hidden locationid'>"+n[i].LocationId+"<\/span>",n[i].ElevationModel>0&&(t+="<span class='gps alt'>"+Math.round(n[i].ElevationModel)+"<\/span>"),t+="<\/div>";t+="<\/div>"}else t="<div id='nolocations' class='nolocations'>There are no locations found. Please try another search<\/div>";$("#locationlist").html(t);$("#locationlist .scrollable > div:nth-child(1)").addClass("active");showMap($("#locationlist .scrollable > div:nth-child(1)"));setHoverAction()}}))}function addLocationToFavorite(){}var settingVue,UserSettings,UserConfiguration,Vue,Globalize,culture,Localize,mouseEvent,activeRequest;(function(n){var t=!1,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0);typeof exports=="object"&&(module.exports=n(),t=!0);t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})})(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(i){function r(t,u,f){var o,h,l,e,s;if(typeof document!="undefined"){if(arguments.length>1){f=n({path:"/"},r.defaults,f);typeof f.expires=="number"&&(h=new Date,h.setMilliseconds(h.getMilliseconds()+f.expires*864e5),f.expires=h);try{o=JSON.stringify(u);/^[\{\[]/.test(o)&&(u=o)}catch(y){}return u=i.write?i.write(u,t):encodeURIComponent(String(u)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),document.cookie=[t,"=",u,f.expires?"; expires="+f.expires.toUTCString():"",f.path?"; path="+f.path:"",f.domain?"; domain="+f.domain:"",f.secure?"; secure":""].join("")}t||(o={});for(var a=document.cookie?document.cookie.split("; "):[],v=/(%[0-9A-Z]{2})+/g,c=0;c<a.length;c++){l=a[c].split("=");e=l.slice(1).join("=");e.charAt(0)==='"'&&(e=e.slice(1,-1));try{if(s=l[0].replace(v,decodeURIComponent),e=i.read?i.read(e,s):i(e,s)||e.replace(v,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(y){}if(t===s){o=e;break}t||(o[s]=e)}catch(y){}}return o}}return r.set=r,r.get=function(n){return r.call(r,n)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,i){r(t,"",n(i,{expires:-1}))},r.withConverter=t,r}return t(function(){})});UserSettings=function(){function n(){this._dialogId="#settings"}return n.prototype.bindSettings=function(){settingVue==null&&(settingVue=new Vue({el:"#settings",data:{configuration:null},created:function(){this.fetchData()},methods:{fetchData:function(){this._data.configuration=n.LoadSettings()}},filters:VueFilter}),this.bindSettingsUpdate())},n.prototype.bindSettingsUpdate=function(){$(".list-item-settings",this._dialogId).on("click",function(n){$(n.target).hasClass("tempunit")&&(settingVue.configuration.TempUnit=$(n.target).attr("data-value"));$(n.target).hasClass("windunit")&&(settingVue.configuration.WindUnit=$(n.target).attr("data-value"));$(n.target).hasClass("pressureunit")&&(settingVue.configuration.PressureUnit=$(n.target).attr("data-value"));localStorage.setItem("config",JSON.stringify(settingVue.configuration))})},n.LoadSettings=function(){if(typeof Storage!="undefined"){if(localStorage.getItem("config")===null){var n=new UserConfiguration;localStorage.setItem("config",JSON.stringify(n))}return JSON.parse(localStorage.getItem("config"))}return new UserConfiguration},n}();UserConfiguration=function(){function n(){this.TempUnit="f";this.WindUnit="mph";this.PressureUnit="mb";this.CenterLatLon=[39.2,-99.7];this.Zoom=5}return n.Current=function(){if(typeof Storage!="undefined"){var t=JSON.parse(localStorage.getItem("config"));return t==null&&(t=new n),t.TempUnit==null&&(t.TempUnit=(new n).TempUnit),t.WindUnit==null&&(t.WindUnit=(new n).WindUnit),t.PressureUnit==null&&(t.PressureUnit=(new n).PressureUnit),t.CenterLatLon==null&&(t.CenterLatLon=(new n).CenterLatLon),t.Zoom==null&&(t.Zoom=(new n).Zoom),location.href.indexOf("region")>-1&&(t.Zoom=6),location.href.indexOf("region=NW")>-1&&(t.CenterLatLon=[45.73491,-111.205131]),location.href.indexOf("region=WNC")>-1&&(t.CenterLatLon=[43.649134,-99.411827]),location.href.indexOf("region=ENC")>-1&&(t.CenterLatLon=[41.860532,-88.338303]),location.href.indexOf("region=NE")>-1&&(t.CenterLatLon=[40.485285,-75.326912]),location.href.indexOf("region=CN")>-1&&(t.CenterLatLon=[35.897062,-91.881831]),location.href.indexOf("region=WE")>-1&&(t.CenterLatLon=[39.085675,-117.279262]),location.href.indexOf("region=SW")>-1&&(t.CenterLatLon=[36.348875,-109.334008]),location.href.indexOf("region=SO")>-1&&(t.CenterLatLon=[32.67747,-92.446884]),location.href.indexOf("region=SE")>-1&&(t.CenterLatLon=[30.651261,-82.895969]),t}return new n},n.Save=function(n){localStorage.setItem("config",JSON.stringify(n))},n}();$(document).ready(function(){var n=new UserSettings;n.bindSettings()});Vue.config.debug=!0;var Cookies,vue1,vue2,vueForecastHourly,VueFilter,locationId,utcOffset=0,SunCalc,Forecast=function(){function n(){this._apiurl="/api/forecastapi/";this.USERLOCATION_COOKIE="wpv2location"}return n.prototype.BindForecastHomePage=function(n){var f=this,t="",r=$(n).attr("data-culture"),u=this.readCookie(this.USERLOCATION_COOKIE),i;u!=null?t="GetForecastById?id="+u+"&culture="+r+"&type=d":(i=$(n).attr("data-location").split("|"),t="GetForecastByLatLon?lat="+i[0]+"&lon="+i[1]+"&culture="+r+"&type=d");vue2==null?vue2=new Vue({el:n,data:{forecast:null},created:function(){this.fetchData()},methods:{fetchData:function(){$.ajax({url:f._apiurl+t,dataType:"json",success:function(n){vue2._data.forecast=n.ForecastLong;setTimeout(function(){var n=$("#hp-fav-location");n.length==0?$("a:contains('{your location}')").html(""):($("a:contains('{your location}')").attr("href",n.attr("href")),$("a:contains('{your location}')").text(n.text()))},500)}})}},filters:VueFilter}):$.ajax({url:this._apiurl+t,dataType:"json",success:function(n){vue2._data.forecast=n.ForecastLong;setTimeout(function(){var n=$("#hp-fav-location");$("a:contains('{your location}')").attr("href",n.attr("href"));$("a:contains('{your location}')").text(n.text())},500)}})},n.prototype.BindForecastTextHomepage=function(n){var e=this,r=this.readCookie(this.USERLOCATION_COOKIE),t="",u=UserConfiguration.Current().TempUnit,f,i;r!=null?t="GetUserLocationForecastTextShortById?tempUnit="+u+"&id="+r:(f="38.9|-77",i=f.split("|"),t="GetUserLocationForecastTextShort?tempUnit="+u+"&lat="+i[0]+"&lon="+i[1]);vue1==null?vue1=new Vue({el:n,data:{text:{Title:"",ShortDescription:""}},created:function(){this.fetchData()},methods:{fetchData:function(){$.ajax({url:e._apiurl+t,dataType:"json",success:function(n){vue1._data.text=n}})}},filters:VueFilter}):$.ajax({url:this._apiurl+t,dataType:"json",success:function(n){vue1._data.text=n}})},n.prototype.BindForecastForecastPage=function(n){var t=this,i="",r=$(n).attr("data-culture");locationId!=null&&(i="GetForecastById?id="+locationId+"&culture="+r+"&type=d");vue2==null?vue2=new Vue({el:n,data:{forecast:null},created:function(){this.fetchData()},methods:{fetchData:function(){$.ajax({url:t._apiurl+i,dataType:"json",success:function(i){vue2._data.forecast=i.ForecastLong;$(n).css("visibility","visible");var r=i.ForecastLong[0].lat+","+i.ForecastLong[0].lon;t.getTimeAtLocation(r);t.setStaticMapLocation(r)}})}},filters:VueFilter}):$.ajax({url:this._apiurl+i,dataType:"json",success:function(n){vue2._data.forecast=n.ForecastLong}})},n.prototype.BindForecastForecastPageHourly=function(n){var t=this,i="",r=$(n).attr("data-culture");locationId!=null&&(i="GetForecastById?id="+locationId+"&culture="+r+"&type=h");vueForecastHourly==null?vueForecastHourly=new Vue({el:n,data:{forecast:null,userconfiguration:UserConfiguration.Current()},created:function(){this.fetchData()},methods:{fetchData:function(){$.ajax({url:t._apiurl+i,dataType:"json",success:function(i){vueForecastHourly._data.forecast=i.ForecastHourly;t.updateWeatherIcons();$(n).css("visibility","visible")}})}},mounted:function(){setTimeout(function(){return t.updateWeatherIcons()},500)},filters:VueFilter}):$.ajax({url:this._apiurl+i,dataType:"json",success:function(n){vueForecastHourly._data.forecast=n.ForecastLong}})},n.prototype.updateWeatherIcons=function(){var t=$(".weathericon"),n;for(console.log("icons: "+t.length),n=0;n<t.length;n++){var i=$(t[n]),f=new Date(i.attr("data-timestamp")).getTime()+utcOffset*1e3,e=new Date(this._sunTimes.sunrise.getTime()+utcOffset*1e3),o=new Date(this._sunTimes.sunset.getTime()+utcOffset*1e3),u=new Date(f),r=i.attr("data-icon");(u.getHours()<e.getHours()||u.getHours()>o.getHours())&&(r+=r);i.attr("src","/images/icons/"+r+".png")}},n.prototype.getTimeAtLocation=function(n){var t=this,i=(new Date).getTime()/1e3,r="/api/locationapi/gettimezone?timestamp="+i+"&latlon="+n;$.ajax({url:r,dataType:"json",success:function(i){utcOffset=i.rawOffset;utcOffset+=i.dstOffset;utcOffset-=-(new Date).getTimezoneOffset()*60;t.BindForecastForecastPageHourly("#forecasthourly");t.setSunriseSunset(n);setInterval(function(){var n=(new Date).getTime()+utcOffset*1e3;$("#localtime").text(t.formatTime(new Date(n))+" ("+i.timeZoneName+")")},1e3)}})},n.prototype.setSunriseSunset=function(n){var u=n.split(",")[0],f=n.split(",")[1];this._sunTimes=SunCalc.getTimes(new Date,u,f);var t=new Date(this._sunTimes.sunrise.getTime()+utcOffset*1e3),i=new Date(this._sunTimes.sunset.getTime()+utcOffset*1e3),r=new Date(i.getTime()-t.getTime());$("#sunrise").text(Globalize.dateFormatter({time:"short"})(t));$("#sunset").text(Globalize.dateFormatter({time:"short"})(i));$("#sunhours").text(r.getHours()-1+" hours "+r.getMinutes()+" minutes")},n.prototype.setStaticMapLocation=function(n){$("#locationmap").attr("src","/en-us/image/staticmap?s=336,220&ll="+n)},n.prototype.saveCookie=function(n,t,i){Cookies.set(n,t,{expires:i,path:"/"})},n.prototype.readCookie=function(n){return Cookies.get(n)},n.prototype.formatTime=function(n){var i="PM",t=n.getHours(),r=(n.getMinutes()+100).toString().substr(1),u=(n.getSeconds()+100).toString().substr(1);return t<12?i="AM":t-=12,t+":"+r+":"+u+" "+i},n}(),locationForecast=new Forecast;$("#forecast-hp").length>0&&(locationForecast.BindForecastHomePage("#forecast-hp"),locationForecast.BindForecastTextHomepage("#location-forecast-hp"));$("#forecast").length>0&&locationForecast.BindForecastForecastPage("#forecast");Localize=function(){function n(){}return n.load=function(){if(!this._loaded){var n=culture.split("-")[0];$.ajax({type:"GET",url:"/cldr/supplemental/likelySubtags.json",dataType:"json",success:function(n){Globalize.load(n)},async:!1});$.ajax({type:"GET",url:"/cldr/supplemental/plurals.json",dataType:"json",success:function(n){Globalize.load(n)},async:!1});$.ajax({type:"GET",url:"/cldr/main/"+n+"/numbers.json",dataType:"json",success:function(n){Globalize.load(n)},async:!1});$.ajax({type:"GET",url:"/cldr/main/"+n+"/dateFields.json",dataType:"json",success:function(n){Globalize.load(n)},async:!1});$.ajax({type:"GET",url:"/cldr/main/"+n+"/ca-gregorian.json",dataType:"json",success:function(n){Globalize.load(n)},async:!1});$.ajax({type:"GET",url:"/cldr/main/"+n+"/timeZoneNames.json",dataType:"json",success:function(n){Globalize.load(n)},async:!1});this._loaded==!0;Globalize.locale(n)}},n.ToFormattedDate=function(n){this.load();var i=n,u=new Date,r=i.getDate()-u.getDate(),t="";return Math.abs(r)<2?(t+=Globalize.formatRelativeTime(r,"day")+", ",t+=Globalize.dateFormatter({skeleton:"MMMMd"})(i)):(t+=Globalize.dateFormatter({datetime:"full"})(i).split(",")[0]+", ",t+=Globalize.dateFormatter({skeleton:"MMMMd"})(i)),this.capitalize(t)},n.capitalize=function(n){return n.charAt(0).toUpperCase()+n.slice(1)},n}(),function(){"use strict";function st(n){return n.valueOf()/a-.5+b}function e(n){return new Date((n+.5-b)*a)}function o(n){return st(n)-k}function d(i,r){return u(n(i)*t(s)-l(r)*n(s),t(i))}function v(i,r){return p(n(r)*t(s)+t(r)*n(s)*n(i))}function g(i,r,f){return u(n(i),t(i)*n(r)-l(f)*t(r))}function nt(i,r,u){return p(n(r)*n(u)+t(r)*t(u)*t(i))}function tt(n,t){return i*(280.16+360.9856235*n)-t}function ht(n){return n<0&&(n=0),.0002967/Math.tan(n+.00312536/(n+.08901179))}function it(n){return i*(357.5291+.98560028*n)}function rt(t){var r=i*(1.9148*n(t)+.02*n(2*t)+.0003*n(3*t)),u=i*102.9372;return t+r+u+f}function ut(n){var i=it(n),t=rt(i);return{dec:v(t,0),ra:d(t,0)}}function ct(n,t){return Math.round(n-y-t/(2*f))}function ft(n,t,i){return y+(n+t)/(2*f)+i}function et(t,i,r){return k+t+.0053*n(i)-.0069*n(2*r)}function lt(i,r,u){return w((n(i)-n(r)*n(u))/(t(r)*t(u)))}function at(n,t,i,r,u,f,e){var o=lt(n,i,r),s=ft(o,t,u);return et(s,f,e)}function ot(r){var o=i*(218.316+13.176396*r),u=i*(134.963+13.064993*r),s=i*(93.272+13.22935*r),f=o+i*6.289*n(u),e=i*5.128*n(s),h=385001-20905*t(u);return{ra:d(f,e),dec:v(f,e),dist:h}}function c(n,t){return new Date(n.valueOf()+t*a/24)}var f=Math.PI,n=Math.sin,t=Math.cos,l=Math.tan,p=Math.asin,u=Math.atan2,w=Math.acos,i=f/180,a=864e5,b=2440588,k=2451545,s=i*23.4397,r={},h,y;r.getPosition=function(n,t,r){var h=i*-r,f=i*t,e=o(n),u=ut(e),s=tt(e,h)-u.ra;return{azimuth:g(s,f,u.dec),altitude:nt(s,f,u.dec)}};h=r.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];r.addTime=function(n,t,i){h.push([n,t,i])};y=.0009;r.getTimes=function(n,t,r){for(var c=i*-r,g=i*t,nt=o(n),w=ct(nt,c),b=ft(0,c,w),l=it(b),a=rt(l),tt=v(a,0),u=et(b,l,a),s,y,d,p={solarNoon:e(u),nadir:e(u-.5)},f=0,k=h.length;f<k;f+=1)s=h[f],y=at(s[0]*i,c,g,tt,w,l,a),d=u-(y-u),p[s[1]]=e(d),p[s[2]]=e(y);return p};r.getMoonPosition=function(r,f,e){var y=i*-e,a=i*f,v=o(r),s=ot(v),h=tt(v,y)-s.ra,c=nt(h,a,s.dec),p=u(n(h),l(a)*t(s.dec)-n(s.dec)*t(h));return c=c+ht(c),{azimuth:g(h,a,s.dec),altitude:c,distance:s.dist,parallacticAngle:p}};r.getMoonIllumination=function(i){var e=o(i||new Date),r=ut(e),f=ot(e),s=149598e3,h=w(n(r.dec)*n(f.dec)+t(r.dec)*t(f.dec)*t(r.ra-f.ra)),c=u(s*n(h),f.dist-s*t(h)),l=u(t(r.dec)*n(r.ra-f.ra),n(r.dec)*t(f.dec)-t(r.dec)*n(f.dec)*t(r.ra-f.ra));return{fraction:(1+t(c))/2,phase:.5+.5*c*(l<0?-1:1)/Math.PI,angle:l}};r.getMoonTimes=function(n,t,u,f){var s=new Date(n),d,a,g,nt,h,l,v,y,p,tt,it,w,o,b,rt,e,k;for(f?s.setUTCHours(0,0,0,0):s.setHours(0,0,0,0),d=.133*i,a=r.getMoonPosition(s,t,u).altitude-d,e=1;e<=24;e+=2){if(g=r.getMoonPosition(c(s,e),t,u).altitude-d,nt=r.getMoonPosition(c(s,e+1),t,u).altitude-d,v=(a+nt)/2-g,y=(nt-a)/2,p=-y/(2*v),tt=(v*p+y)*p+g,it=y*y-4*v*g,w=0,it>=0&&(rt=Math.sqrt(it)/(Math.abs(v)*2),o=p-rt,b=p+rt,Math.abs(o)<=1&&w++,Math.abs(b)<=1&&w++,o<-1&&(o=b)),w===1?a<0?h=e+o:l=e+o:w===2&&(h=e+(tt<0?b:o),l=e+(tt<0?o:b)),h&&l)break;a=nt}return k={},h&&(k.rise=c(s,h)),l&&(k.set=c(s,l)),h||l||(k[tt>0?"alwaysUp":"alwaysDown"]=!0),k};typeof exports=="object"&&typeof module!="undefined"?module.exports=r:typeof define=="function"&&define.amd?define(r):window.SunCalc=r}();var Cookies,language,culture,recordIndex=0,mapurl="/en-us/image/staticmap?s=200,236&ll={lat},{lon}",detailmapurl="/en-us/image/staticmap?s=200,236&ll={lat},{lon}",targetUrl="/"+culture+"/forecast/d/{locationid}/{name}",USERLOCATION_COOKIE="wpv2location";$("#locationsearch").autocomplete({source:function(n,t){findLocations(n,t)},minLength:3});mouseEvent=null;$("#countrycodes").on("change",function(){var n={term:$("#location").val(),country:$("#countrycodes").val()};findLocations(n,null)});$("#location").on("input",function(){$("#location").val().length==0&&$("#resultset").hide()});$("#clear").on("click",function(){$("#location").val("");$("#resultset").hide()});$(".zoekplaats input").on("keydown",function(n){try{processKeyInput(n)}catch(n){}});activeRequest="";$.ajax({url:"https://api.themeteocompany.com/forecast/GetLocationsByName",type:"GET",cache:!0,dataType:"json",success:function(n){var t,r,i,u;if(n&&n.length!=0){for(t="",r=!1,t+="<select id='countrycodes'>",i=0;i<n.length;i++)n[i].DisplayOrder!=99||r||(t+="<option class='split'>===============================<\/option>",r=!0),u="",t+="<option "+u+" value='"+n[i].CountryCode+"' class=''>"+n[i].Name+"<\/option>";t+="<\/select>";$("#countrylist").html(t)}}})