!function(a){a.extend(a.ui.gmap.prototype,{getCurrentPosition:function(a,b){navigator.geolocation?navigator.geolocation.getCurrentPosition(function(b){a(b,"OK")},function(b){a(null,b)},b):a(null,"NOT_SUPPORTED")},watchPosition:function(a,b){navigator.geolocation?this.set("watch",navigator.geolocation.watchPosition(function(b){a(b,"OK")},function(b){a(null,b)},b)):a(null,"NOT_SUPPORTED")},clearWatch:function(){navigator.geolocation&&navigator.geolocation.clearWatch(this.get("watch"))},autocomplete:function(b,c){var d=this;a(this._unwrap(b)).autocomplete({source:function(b,c){d.search({address:b.term},function(b,d){"OK"===d?c(a.map(b,function(a){return{label:a.formatted_address,value:a.formatted_address,position:a.geometry.location}})):"OVER_QUERY_LIMIT"===d&&alert("Google said it's too much!")})},minLength:3,select:function(a,b){d._call(c,b)},open:function(){a(this).removeClass("ui-corner-all").addClass("ui-corner-top")},close:function(){a(this).removeClass("ui-corner-top").addClass("ui-corner-all")}})},placesSearch:function(a,b){this.get("services > PlacesService",new google.maps.places.PlacesService(this.get("map"))).search(a,b)},clearDirections:function(){var a=this.get("services > DirectionsRenderer");a&&(a.setMap(null),a.setPanel(null))},pagination:function(b){var c=a(""),d=this,e=0,b=b||"title";d.set("p_nav",function(a,f){a&&(e+=f,c.find(".display").text(d.get("markers")[e][b]),d.get("map").panTo(d.get("markers")[e].getPosition()))}),d.get("p_nav")(!0,0),c.find(".back-btn").click(function(){d.get("p_nav")(e>0,-1,this)}),c.find(".fwd-btn").click(function(){d.get("p_nav")(e