!function(a){if(!navigator.geolocation){var b=function(){setTimeout(function(){throw"document.write is overwritten by geolocation shim. This method is incompatible with this plugin"},1)},c=0,d=webshims.cfg.geolocation||{};navigator.geolocation=function(){var e,f={getCurrentPosition:function(c,f,g){var h,i,j,k,l=2,m=function(){if(!j)if(e){if(j=!0,c(a.extend({timestamp:(new Date).getTime()},e)),o(),window.JSON&&window.sessionStorage)try{sessionStorage.setItem("storedGeolocationData654321",JSON.stringify(e))}catch(b){}}else f&&!l&&(j=!0,o(),f({code:2,message:"POSITION_UNAVAILABLE"}))},n=function(){l--,p(),m()},o=function(){a(document).off("google-loader",o),clearTimeout(i),clearTimeout(h)},p=function(){if(e||!window.google||!google.loader||!google.loader.ClientLocation)return!1;var b=google.loader.ClientLocation;return e={coords:{latitude:b.latitude,longitude:b.longitude,altitude:null,accuracy:43e3,altitudeAccuracy:null,heading:parseInt("NaN",10),velocity:null},address:a.extend({streetNumber:"",street:"",premises:"",county:"",postalCode:""},b.address)},!0},q=function(){if(!e&&(p(),!e&&window.JSON&&window.sessionStorage))try{e=sessionStorage.getItem("storedGeolocationData654321"),e=e?JSON.parse(e):!1,e.coords||(e=!1)}catch(a){e=!1}};return q(),e?(setTimeout(m,1),void 0):d.confirmText&&!confirm(d.confirmText.replace("{location}",location.hostname))?(f&&f({code:1,message:"PERMISSION_DENIED"}),void 0):(k=function(){a.ajax({url:"http://freegeoip.net/json/",dataType:"jsonp",cache:!0,jsonp:"callback",success:function(a){l--,a&&(e=e||{coords:{latitude:a.latitude,longitude:a.longitude,altitude:null,accuracy:43e3,altitudeAccuracy:null,heading:parseInt("NaN",10),velocity:null},address:{city:a.city,country:a.country_name,countryCode:a.country_code,county:"",postalCode:a.zipcode,premises:"",region:a.region_name,street:"",streetNumber:""}},m())},error:function(){l--,m()}})},a.ajax?k():(webshims.ready("$ajax",k),webshims.loader.loadList(["$ajax"])),clearTimeout(i),window.google&&window.google.loader?l--:i=setTimeout(function(){d.destroyWrite&&(document.write=b,document.writeln=b),a(document).one("google-loader",n),webshims.loader.loadScript("http://www.google.com/jsapi",!1,"google-loader")},800),h=g&&g.timeout?setTimeout(function(){o(),f&&f({code:3,message:"TIMEOUT"})},g.timeout):setTimeout(function(){l=0,m()},1e4),void 0)},clearWatch:a.noop};return f.watchPosition=function(a,b,d){return f.getCurrentPosition(a,b,d),c++,c},f}(),webshims.ready("WINDOWLOAD",function(){webshims.loader.loadList(["$ajax"])}),webshims.isReady("geolocation",!0)}}(webshims.$);