text: $(function(){function e(){if(navigator.geolocation)navigator.geolocation.getCurrentPosition(t,r);else $("#lblResult").html("Geolocation is not supported by this browser.")}function t(e){$.ajax({url:"http://api.geonames.org/srtm3JSON?lat="+e.coords.latitude+"&lng="+e.coords.longitude+"&username=fanmixco",async:false,dataType:"json",success:function(e){var t=new gravity;var r=e.lat;var i=e.lng;var s=e.srtm3;t.setLocation(r,i,s);var o=t.getGravity();$("#lblResult").html(o.toFixed(3)+" m/s&#178;");$("#gravityResult").val(o);$("#lblLatitude").html("latitude: <br />"+r.toFixed(6)+"&deg;");$("#lblLongitude").html("longitude: <br />"+i.toFixed(6)+"&deg;");$("#lblAltitude").html("altitude: <br />"+i.toFixed(0)+" m");n()}})}function n(){var e=$(".ui-footer");var t=e.position();$("#location").css("top",t.top-$("#tblLocation").height())}function r(e){switch(e.code){case e.PERMISSION_DENIED:$("#lblResult").html("User denied the request for Geolocation.");break;case e.POSITION_UNAVAILABLE:$("#lblResult").html("Location information is unavailable.");break;case e.TIMEOUT:$("#lblResult").html("The request to get user location timed out.");break;case e.UNKNOWN_ERROR:$("#lblResult").html("An unknown error occurred.");break}}jQuery("#lblResult").fitText();e();$(window).resize(function(){n()})})