var gMapData = {
    "latitude"			: 45.47007793328725,
    "longitude"			: 12.282297760248184,
    "zoom"				: 11,
	"disableDefaultUI"	: true,
    "mapTypeId"			: "SATELLITE",
	"markers"			: [{
								"icon"		: {
								"image"		: "/themes/hotel_plazavenice/images/icon_p.png"
								},
								
								"latitude"	: 45.482616343580396,
								"longitude"	: 12.232687622308731,
								"infowindow": {
									"title"		: "Hotel Plaza",
									"text"		: "<span style='font-size:12px;'>Viale Stazione, 36 <br /> 30171 Venezia Mestre - Italy</span><br /><br /><a target='_blank' style='font-size:13px; font-weight:bold;' href='http://www.hotelplazavenice.com/'>WebSite</a> &mdash; <a target='_blank' style='font-size:13px; font-weight:bold;' href='http://www.fastbooking.co.uk/DIRECTORY/crs.phtml?clusterName=ITVENPlaza'>Book Now!</a>",
									"maxWidth"	: 800,
									"maxHeigt"	: 300,
									"open"		: false
								}
							},
							
							{
								
								
								"icon"		: {
								"image"		: "/themes/hotel_plazavenice/images/airport.png"
								},
								"latitude"	: 45.49793616747719,
								"longitude"	: 12.336597740650177,
								"infowindow": {
									"title"		: "Venice Airport <br> Marco Polo",
									"text"		: "",
									"maxWidth"	: 800,
									"maxHeigt"	: 200,
									"open"		: false
								}
							},
							
							{
								"icon"		: {
								"image"		: "/themes/hotel_plazavenice/images/marker_venezia.png"
								},
								
								"latitude"	: 45.44555984520757,
								"longitude"	: 12.319042682647705,
								"infowindow": {
									"title"		: "Venice",
									"text"		: "",
									"maxWidth"	: 800,
									"maxHeigt"	: 200,
									"open"		: false
								}
							}
														
							
							]
}

$(document).ready(function () {
	if (typeof(gMapData) !== 'undefined') {
		$('#map_canvas').show().gMaps(gMapData);
		var map=$.fn.gMaps.maps[0];
		
		var myOptions = {
			scrollwheel: false,
			navigationControl: true			
		};
		if (typeof(map) !== 'undefined') 
			{
				map.setOptions(myOptions);
			}
		
		var clicked=false;
		//Quando clicco la mappa, abilito la scrollwheel 
		$('#map_canvas').click(function () {
			if (!clicked)
			{
				var map=$.fn.gMaps.maps[0];
				var myOptions = {
					scrollwheel: true
				};
				map.setOptions(myOptions);
				clicked=true;
			}
		});
		
		//Quando esco dalla mappa, disabilito la scrollwheel 
		$('#map_canvas').mouseout(function () {
			if (clicked) {
			var map=$.fn.gMaps.maps[0];
			var myOptions = {
				scrollwheel: false
			};
			map.setOptions(myOptions);
			clicked=false;
			}
		});	
	}
});
