/*
	(c) 2011, mamapapacola - patrick schloesser 
*/

// Koordinaten Marker
//  Title, Längengrad, Breitengrad, Layer Index, Infobox Text

var dclbes = [
  ['RaveOnSnow Club', 47.390745, 12.633913, 1, 'text' ],
  ['Tiefgarage', 47.390163931319094, 12.634631395339966, 2, 'Text'],
  ['Smirnoff Lounge', 47.390047716039355, 12.634910345077515, 3, 'Text'],
  ['Open Air Stage', 47.39043994158147, 12.63526439666748, 4, 'Text'],
  ['Kings Club', 47.3908866393381, 12.636095881462097, 5, 'Text'],
  ['Galerie',47.39101374776389, 12.636165618896484, 6, 'Text'],
  ['Castello', 47.39113359257029, 12.63601541519165, 7, 'Text'],
  ['Taverne', 47.39221944672845, 12.636433839797974, 8, 'Text']
];

// map 
function initializegooglemaps() {
  var myOptions = {
    zoom: 17,
    center: new google.maps.LatLng(47.39113359257029, 12.63601541519165),
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map = new google.maps.Map(document.getElementById("googlemaps"),
                                myOptions);
  setMarkers(map, dclbes);
}
function setMarkers(map, locations) {
// marker icon
	var image = new google.maps.MarkerImage('/fileadmin/theme/raveonsnow.com/gfx/icon_googlemaps.png',
		new google.maps.Size(41, 45),
		new google.maps.Point(0,0),
		new google.maps.Point(0, 0));
	var shadow = new google.maps.MarkerImage('dclb-shadow.png',
		new google.maps.Size(47, 30),
		new google.maps.Point(0,0),
		new google.maps.Point(0, 27));

	for (var i = 0; i < locations.length; i++) {
// array marker
	var dclb = locations[i];
	var myLatLng = new google.maps.LatLng(dclb[1], dclb[2]);
	var marker = new google.maps.Marker({
	    position: myLatLng,
	    map: map,
	    icon: image,
//		shadow: shadow,
//	    title: dclb[0],
	    zIndex: dclb[3],
		content: dclb[0]
		});
// infobox show 
	google.maps.event.addListener(marker, 'mouseover', function() {
			if (!this.infowindow) { 
		    this.infowindow = new google.maps.InfoWindow({
		        content: this.content
			    });
			};
			this.infowindow.open(map, this);
		});
	google.maps.event.addListener(marker, 'mouseout', function() {
			if (!this.infowindow) { 
		    this.infowindow = new google.maps.InfoWindow({
		        content: this.content
			    });
			};
			this.infowindow.close(map, this);
		});
	
	}
}


