// ---------------------------- =Maps
 (function() {
  var stylez = [
    { featureType: "administrative", elementType: "all", stylers: [ { hue: "#1186ca" },{ saturation: -100 } ] },
    { featureType: "landscape", elementType: "all", stylers: [ { hue: "#1186ca" },{ saturation:-100 } ] },
    { featureType: "poi", elementType: "all", stylers: [ { hue: "#1186ca" },{ saturation:-50 } ] },
    { featureType: "road", elementType: "all", stylers: [ { hue: "#000000" },{ saturation:-100 } ] },
    { featureType: "transit", elementType: "all", stylers: [ { hue: "#1186ca" },{ saturation:-50 } ] },
    { featureType: "water", elementType: "all", stylers: [ { hue: "#1186ca" },{ saturation:0 } ] }
  ];

  var positions = {
    mapkoblenz: [new google.maps.LatLng(50.387890,7.578399), new google.maps.LatLng(50.401077,7.582798)]
  };
  var myOptions = {
    zoom: 13,
    center: positions.mapkoblenz[1],
		scrollwheel: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("mapkoblenz"), myOptions);
  var styledMapOptions = { name: "Grayscale" };
  var gsMapType = new google.maps.StyledMapType(stylez, styledMapOptions);
  map.mapTypes.set('grayscale', gsMapType);
  map.setMapTypeId('grayscale');

  var myInfoWindow = new google.maps.InfoWindow();
	var marker = new google.maps.Marker({ position: positions.mapkoblenz[0], map: map, animation: google.maps.Animation.DROP });
	
  $('.map nav a').click(function(e) {
    e.preventDefault();
		myInfoWindow.close();
    $('.map nav a').removeClass('selected');
    $(this).addClass('selected');
    var c = positions[$(this).attr('rel')];
    map.setCenter(c[1]);
    marker.setPosition(c[0]);
  });

	var myWindowOptions = {
		content: '<strong> A&D Heiz- und Trockenger&auml;te <br />Mietservice GmbH </strong><br/>Carl-Spaeter-Stra&szlig;e 2a <br />56070 Koblenz <br/>Tel.: 0261 922 399 6'
	};
	

			myInfoWindow = new google.maps.InfoWindow(myWindowOptions);
			myInfoWindow.open(map,marker);


	
})();
