
		jQuery(document).ready(function() { 

			var geocoder;
			var map;
			
			mapCanvas = document.getElementById("map")
			
			if (mapCanvas !== null || GBrowserIsCompatible()) {
        	
						map = new GMap2(mapCanvas);
						
        		//map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        		geocoder = new GClientGeocoder();
        		
	            if (geocoder) {
                    geocoder.getLatLng(
											'12501 Bermuda Triangle Road Chester, VA  23836-2578',
                      function(point) {
                        if (!point) 
                        {
                          //alert("The address was not found.");
                        } 
                        else 
                        {
                          map.setCenter(point, 13);
                          var marker = new GMarker(point);
                          map.addOverlay(marker);
                          var html = '<h3>Location of next meeting!</h3><p id="meeting_location">The CBA Annual Steak Cookout</p><p>12501 Bermuda Triangle Road</p><p>Chester, VA  23836-2578</p>';
                    
                          marker.openInfoWindowHtml(html);
                        }
                      }
                    );
              }// end of if geocoder
			
      		}// end of if browser compatible
		
		
			jQuery('#directions_form').submit(function(e){
				e.preventDefault();
                var start = jQuery('#start').val();
                 var directionsPanel = document.getElementById("directions");
                 var directions = new GDirections(map, directionsPanel);
                 directions.load("from: "+start+" to: 3712 Festival Park Plaza, Chester, VA 23831");
			});
	
		
		jQuery('#print_directions').click(function(e){
			e.preventDefault();
			window.print();
		});
		
		
		
		});// end of ready
		
		
		
		
		jQuery(document).unload(function() {
			GUnload();
		});
