// JavaScript Document
function googlemap() {
	
	var map = null;
	var geocoder = null;
	
    if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
		address = $("#map").attr("title"); //Get address from divs title-attribute
        geocoder = new GClientGeocoder();

        if (geocoder) {
            geocoder.getLatLng(
                address,
                function(point) {
                    if (!point) {
                       alert("Google map for "+ address + " could not found");
                   } else {
                       map.addControl(new GSmallMapControl());	

					   map.setCenter(point, 13);
					   
                      var marker = new GMarker(point);
					  
                      map.addOverlay(marker);
				}
              }
          );
      }
    }
}


$(document).ready(function () {

	googlemap();
	
	
  });