// Implements the jQuery UI dialog control
function mapOverlay() {
	
	//	Set dialog options and behaviour
	var dialogOptions = {
		'autoOpen': false,
		'draggable': false,
		'modal': true,
		'resizable': false,
		'width': 854,
		'open': function(event, ui) {
			$('#destinationsFrame').attr('src', 'http://bhx.innosked.com/Default.aspx?show=MAP');
		}
	};
	
	//	Setup form as dialog in overlay
	$('#destinationsMap').dialog( dialogOptions );
	
	//	Bind mailto links with overlay actions
	$('a.viewMap').click( function() {
		
        $('#destinationsMap').dialog( 'open' );
		
        return false;
		
    });
	
}

//	Bind on load
$(document).ready( function() {
	mapOverlay();
	autoOpenModal();
});

