text: $(document).ready(function(){var s,o,c,r,n,a,e,l,i,t,d;navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(g){s=g.coords.latitude,o=g.coords.longitude;var m="https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/weather?lat="+s+"&lon="+o+"&APPID=0113bf72a83d2ad796778df7f8a4524b";$.getJSON(m,function(s){function o(){800==d&&l>=25?($(".container").css("background","#FE938C"),$(".icon").html('<img src="img/sunny.png" alt="clear-day">'),$(".slider").addClass("yellow"),$(".deg").css("color","#FE938C")):800==d&&l<=25?($(".container").css("background","#8CADFE"),$(".icon").html('<img src="img/sunny.png" alt="clear-day">'),$(".deg").css("color","#8CAEFE"),$(".slider").addClass("yellow")):801===d?($(".container").css("background","#8CADFE"),$(".icon").html('<img src="img/fewclouds.png" alt="few-clouds">'),$(".deg").css("color","#8CADFE"),$(".slider").addClass("yellow")):d>=802&&d<=804?($(".container").css("background","#878787"),$(".icon").html('<img src="img/cloudy.png" alt="cloudy">'),$(".slider").addClass("grey"),$(".deg").css("color","#878787")):d>=300&&d<=321||d>=500&&d<=531?($(".container").css("background","#878787"),$(".icon").html('<img src="img/rain.png" alt="rainy">'),$(".slider").addClass("blue"),$(".deg").css("color","#878787")):d>=200&&d<=232?($(".container").css("background","#4E5A77"),$(".icon").html('<img src="img/thunderstorm.png" alt="thunderstorm">'),$(".slider").addClass("blue"),$(".deg").css("color","#4E5A77")):d>=600&&d<=622&&($(".container").css("background","#878787"),$(".icon").html('<img src="img/snowy.png" alt="snowy">'),$(".slider").addClass("grey"),$(".deg").css("color","#878787"))}function g(){800==d?($(".container").css("background","#001548"),$(".icon").html('<img src="img/clearnight.png" alt="clear-night">'),$(".slider").addClass("yellow"),$(".deg").css("color","#001548")):801==d?($(".container").css("background","#001548"),$(".icon").html('<img src="img/cloudynight.png" alt="few-clouds">'),$(".slider").addClass("yellow"),$(".deg").css("color","#8CADFE")):d>=802&&d<=804?($(".container").css("background","#001548"),$(".icon").html('<img src="img/cloudy.png" alt="few-clouds">'),$(".slider").addClass("grey"),$(".deg").css("color","#878787")):d>=300&&d<=321||d>=500&&d<=531?($(".container").css("background","#001548"),$(".icon").html('<img src="img/Rain.png" alt="rainy">'),$(".slider").addClass("blue"),$(".deg").css("color","#878787")):d>=600&&d<=622?($(".container").css("background","#001548"),$(".icon").html('<img src="img/snowy.png" alt="snowy">'),$(".slider").addClass("grey"),$(".deg").css("color","#878787")):d>=200&&d<=232&&($(".container").css("background","#001548"),$(".icon").html('<img src="img/thunderstorm.png" alt="thunderstorm">'),$(".slider").addClass("blue"),$(".deg").css("color","#4E5A77"))}c=s.name;var m=s.main.temp;r=9*(m-273.15)/5+32,e=Math.round(r),n=5*(e-32)/9,l=Math.round(n),d=s.weather[0].id,a=s.weather[0].description,i=s.sys.sunrise,t=s.sys.sunset,$(".city").html(c),$(".description").html(a),$(".temp").html(l);var u=new Date,h=Math.floor(u.getTime()/1e3);h<=t&&h>=i?o():g();var p=!0;$(".slider").click(function(){!1===p?($(".temp").html(l),p=!0):($(".temp").html(e),p=!1)})})},function(s){s.code==s.PERMISSION_DENIED&&$(".weatherapp").remove(),$(".container").html('<div class="error"><p class="oops"><i class="fa fa-thumbs-down" aria-hidden="true"></i></br>We could not locate you!</p><p>Please refresh your browser and allow this app to use your location.</p></div>')})});