// JavaScript para googlemaps Sacado de http://jsfiddle.net/Kai/Unh2M/
//<![CDATA[
function initialize() {
    /*var stylez = [
      {
        featureType: "all",
        stylers: [
          { hue: "#0000ff" },
          { saturation: 0 }
        ]
      },
      {
        featureType: "poi",
        elementType: "label",
        stylers: [
          { visibility: "off" }
        ]
      }
    ];
	*/
	var stylez = [	
	{ featureType: "all", elementType: "all", stylers: [{ visibility: "on" }]}
	];

	/*Pos do mapa */
    var latlng = new google.maps.LatLng(42.399000, -8.805500); // Senseixon
    
	/*Pos do infoWindow */
	var latlngInfo = new google.maps.LatLng(42.398005, -8.805500), // Oficina
	
	
	
        mapOptions = {
            mapTypeControlOptions: {
                /*mapTypeIds: [google.maps.MapTypeId.ROADMAP, "Edited"] */
            },
            zoom: 14,
            center: latlng
        },
        
        map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions),
        
        styledMapType = new google.maps.StyledMapType(stylez, {name: "Edited"}),
        
        marker = new google.maps.Marker({
            position: latlngInfo, 
            map: map, 
            animation: google.maps.Animation.DROP,
            title:"Servinauta Sanxenxo"
        }),
        
        infowindow = new google.maps.InfoWindow({
            content: "<div style=\"height:100px; width:320px;font-size:11px;\"><strong>Servinauta</strong><br>Puerto Deportivo Juan Carlos I, Local 9<br><br>36960 - Sanxenxo (Pontevedra) - Espa&ntilde;a<br>Tel.: 986 691 783 - eMail: <a href=\"mailto:info@servinauta.com\">info@servinauta.com</a></div>"
        });
        
        map.mapTypes.set("Edited", styledMapType);
        map.setMapTypeId('Edited');
    
    function toggleBounce () {
        if (marker.getAnimation() != null) {
            marker.setAnimation(null);
        } else {
            marker.setAnimation(google.maps.Animation.BOUNCE);
        }
    }
    
    // Add click listener to toggle bounce
    google.maps.event.addListener(marker, 'click', function () {
        toggleBounce();
        infowindow.open(map, marker);
        setTimeout(toggleBounce, 1500);
    });
}

//]]>
