var mapPoint;

google.load( "maps" , "2.x" );

function init() 
{

	var geocoder = new GClientGeocoder();
	
	geocoder.getLatLng(

		$( '.street-address' ).text() + ' ' + $( '.locality' ).text() + ' ' + $( '.region' ).text() ,

		function( point ) 
		{

			if ( point ) 
			{

				$( "#map" ).removeClass( 'hidden' );

				var map = new google.maps.Map2(
					$( "#map" )[0]
				);
				map.setCenter( point , 13 );
				map.addControl( new GSmallMapControl() );

				var marker = new GMarker( point );
				map.addOverlay( marker );
				
				GEvent.addListener( map , "click" , function() { 
					window.open( 'http://maps.google.com/?daddr=' + escape( $( '.street-address' ).text() + ' ' + $( '.locality' ).text()  + ', ' + $( '.region' ).text() ) );
				} );

			} // if

		} // function
	);

} // init

google.setOnLoadCallback( init );