/**
 *  Location Map as Dialog [jQuery UI]
 *  Instantiates the jQuery UI "dialog" class on the amenities map.
 *  Last modified: 2010-05-18 {pf}
 */
function locationMapDialog() {
    
    $('#locationMap').dialog( {
		'autoOpen': false,
		'draggable': false,
		'modal': true,
		'resizable': false,
		'width': 854,
        'height': 'auto'
    });
	
	//	Bind mailto links with overlay actions
	$('.locationMap').click( function() {
        $('#locationMap').dialog( 'open' );
        return false;
    });
	
	autoOpenModal();
    
}


/**
 *  location Map Initialization [sic]
 *  Instantiates the Google Maps API on the location map after it's
 *  been added to the document.
 *  Last modified: 2010-05-18 {pf}
 */
function locationInitialize() {
    
    if (GBrowserIsCompatible()) {
        
        var dimensions = new GSize(768,518);
        var mapOptions = {size:dimensions};
        var map = new GMap2(document.getElementById("locationMapTarget"), mapOptions);
            map.setCenter( locationCenter, locationZoom );
            map.setUIToDefault();
        
        // Add location marker
        map.addOverlay( locationPin );
        
    }
    
}


function locationMap() {
    
    //	Exclude IE7 due to unresolved GMaps API issues
	if ( isIE7 == false ) {
        locationMapDialog();
        locationInitialize();
    }
    
}
