/**
 * Le controller des categories
 */
petzl.controllers.DealerLocator = function ()
{
	
	function init(){
		var mapOptions = {
          center: new google.maps.LatLng(45.569216, 5.930729),
          zoom: 12,
          panControl: false,
          zoomControl: false,
          scaleControl: false,
          streetViewControl: false,
          overviewMapControl: false,
          mapTypeControl: false,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
		
        var map = new google.maps.Map(document.getElementById("map"),
            mapOptions
        );
        
        
        var contentString = '<div class="infoWindow"><p class="dealerName"><b>Frasteya</b></p>'+
			'<ul>'+
				'<li>450 avenue de Chambéry<br/>73230 St Alban Leysse -<br/> France</li>'+
				'<li>04.79.33.51.06</li>'+
				'<li><a href="#">www.monmagasin.com</a></li>'+
				'<li>contact@monmagasin.com</li>'+
			'</ul></div>';

    var infowindow = new google.maps.InfoWindow({
        content: contentString
    });
        
        var marker = new google.maps.Marker({
            position: new google.maps.LatLng(45.569216, 5.930729),
            map: map,
            icon : '../static/img/marker.png',
            title: "DA"
        });
        
        marker.setMap(map);

        google.maps.event.addListener(marker, 'click', function() {
        	infowindow.open(map,marker);
        });
	}
	
	/**
	 * Initialisation
	 */
	init();
};