(function(){if(typeof window.spWeather==="undefined"){window.spWeather=new function(){var a=window.webContext+"/RWeatherService/";this.CityWeather=function(c,b){this.city={id:c,name:b};this.forecasts=[]};this.translators={};this.load=function(d,c,b){window.sp.ajaxRequest(a).withParam("city",d).send().then(function(g){var f=g.getResponseHeader("X-WeatherService");if(spWeather.translators[f]){var e=spWeather.translators[f].translate(g.responseAsJson());if(typeof c==="function"){c(e)}else{console.log("ERROR spWeather: no renderer of weather data specified!")}}else{console.log("ERROR spWeather: no data translator for weather service: ",f)}},function(){if(b){b()}})};this.iconBaseUrl=window.webContext+"/look/jsp/imgDesign/meteo/"}}})();