NBN.mesh.GMap=new Class({indentifier:"GMap",getOptions:function(){return{zoomLevel:4,boundry:{lat:37.579412513438385,lng:-98.876953125},controls:[new GLargeMapControl()],enableScrollWheelZoom:false,enableDoubleClickZoom:false,disableDragging:false,disableDoubleClickZoom:false,disableInfoWindow:false,iconAnchorSize:[8,21],iconInfoAnchor:[6,9],iconSize:[14,21],iconImage:"/static/img/corp/mappointer_dn.png",rawData:{}}},initialize:function(B,A){this.mapEle=$(B);this.setOptions(this.getOptions(),A);this.markerStore={}},setMarkers:function(){for(var A in this.options.rawData){for(var B in this.options.rawData[A]){this.setMarker(this.options.rawData[A][B])}}},setMarker:function(B){var A=new GLatLng(B.lat,B.lng);var C=this.createIcon();var D=new GMarker(A,C);this.markerStore[B.id]={marker:D,rawData:B};this.map.addOverlay(D);this.addMarkerEvents(D,B)},createIcon:function(){var A=this.options;var B=new GIcon();B.image=A.iconImage;B.iconSize=new GSize(A.iconSize[0],A.iconSize[1]);B.iconAnchor=new GPoint(A.iconAnchorSize[0],A.iconAnchorSize[1]);B.infoWindowAnchor=new GPoint(A.iconInfoAnchor[0],A.iconInfoAnchor[1]);return B},load:function(){if(GBrowserIsCompatible()){this.map=new GMap2(document.getElementById(this.mapEle.id));if(this.options.enableScrollWheelZoom){this.map.enableScrollWheelZoom()}if(this.options.enableDoubleClickZoom){this.map.enableDoubleClickZoom()}if(this.options.disableDragging){this.map.disableDragging()}if(this.options.disableDoubleClickZoom){this.map.disableDoubleClickZoom()}if(this.options.disableInfoWindow){this.map.disableInfoWindow()}this.options.controls.each(function(A){this.map.addControl(A)},this);this.map.setCenter(new GLatLng(this.options.boundry.lat,this.options.boundry.lng),this.options.zoomLevel);this.setMarkers()}else{this.mapEle.setHTML('<div class="error">Sorry, Google Maps is not compatible with this browser.</div>')}},unload:function(){GUnload()},addMarkerEvents:function(){}});NBN.mesh.GMap.implement(new Events);NBN.mesh.GMap.implement(new Options);NBN.mesh.GMap.implement(new Chain);NBN.mesh.MallGDirection=NBN.mesh.GMap.extend({infoWindowContent:function(A){return["<b>",A.name,"</b><br/><em>",A.city,", ",A.state,"</em>",'<br/><a class="website" href="',A.search,'">Search ',A.name," &rsaquo;&rsaquo;</a>"].join("")},addMarkerEvents:function(C,B){var A=this;GEvent.addListener(C,"click",function(){var D=A.infoWindowContent(B);var E=['<br/><br/><b>Get directions:</b> <a href="javascript:void(0);" onclick="toHere(',B.id,')">To here</a> - <a href="javascript:void(0);" onclick="fromHere(',B.id,')">From here</a>'].join("");var F=D.concat(E);C.openInfoWindowHtml(D+E)})},toHere:function(D){var B=this.markerStore[D];var A=this.infoWindowContent(B.rawData);var C=['<br/><br/><b>Get directions:</b> To here - <a href="javascript:void(0);" onclick="fromHere(',B.rawData.id,')">From here</a><br/><label>Start address</label><br/><form action="http://maps.google.com/maps" target="_blank"><input SIZE=40 MAXLENGTH=40 name="saddr" value=""/><input type="hidden" name="daddr" value="',B.rawData.lat,",",B.rawData.lng,'"/><input type="submit" value="Go"/></form>'].join("");B.marker.openInfoWindowHtml(A+C)},fromHere:function(D){var B=this.markerStore[D];var A=this.infoWindowContent(B.rawData);var C=['<br/><br/><b>Get directions:</b> <a href="javascript:void(0);" onclick="toHere(',B.rawData.id,')">To here</a> - from here<br/><label>End address</label><br/><form action="http://maps.google.com/maps" target="_blank"><input size="40" maxlength="40" name="daddr" value=""/><input type="hidden" name="saddr" value="',B.rawData.lat,",",B.rawData.lng,'"/><input type="submit" value="Go"/></form>'].join("");B.marker.openInfoWindowHtml(A+C)}});