"use strict";!function(){var e=0,t=0,o={gbp:0,usd:0},n={gbp:0,usd:0};MicroEvent.mixin(this);var r=this,s=function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},a=function(e,t){var o=void 0,n=void 0;return o=e.getTime(),n=t.getTime(),(n-o)/864e5},i=function(){navigator.geolocation.getCurrentPosition(l)};this.bind("displayWeather",function(e){$("#weather").html(e.currently.summary+" "+e.currently.temperature+"°c "+e.daily.summary+"")});var l=function(e){var t=e.coords.latitude,o=e.coords.longitude;$.ajax({type:"GET",url:"https://api.forecast.io/forecast/9ad2a41d420f3cf4960571bb886f710c/"+t.toString()+","+o.toString()+"?units=uk2",data:"",dataType:"jsonp",timeout:1e4,context:$("body"),contentType:"application/json",headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"PUT, GET, POST, DELETE, OPTIONS","Access-Control-Allow-Headers":"Content-Type"},success:function(e){r.trigger("displayWeather",e)},error:function(e,t){}})},c=function(r,s){var a=void 0,i=void 0,l=$("#btc");0!==e?(l.removeClass(),r>e?l.addClass("up"):r