<\/div>')}f+="<\/div>";$(".results").html(f);$("html, body").animate({scrollTop:$(".results").offset().top},500)},"json")}var userLocation=null;$(document).ready(function(){function n(){var n=null;return navigator.geolocation?n=navigator.geolocation.getCurrentPosition(t,i):alert("Geolocation is not supported by this browser."),n}function t(n){var t=n.coords.latitude,i=n.coords.longitude;return console.log(t),console.log(i),userLocation={userLat:t,userLon:i}}function i(n){console.log(n);switch(n.code){case n.PERMISSION_DENIED:console.log("User denied the request for Geolocation.");break;case n.POSITION_UNAVAILABLE:console.log("Location information is unavailable.");break;case n.TIMEOUT:console.log("The request to get user location timed out.");break;case n.UNKNOWN_ERROR:console.log("An unknown error occurred.")}}userLocation=n();$(".distributor-search-results").hide();$.ajax({url:"/Plugins/MiscFunctions/GetStates",type:"get",success:function(n){$("#select-state").html("");$("#select-state").append("