﻿// navigation principale (en haut de page)
// la classe utilisee pour designer la page en cours d'affichage est "currentpage"
jQuery.noConflict();
jQuery(document).ready( function($) {
	
  var image = 'img/sopexa_marker.png';


	 function initialize() {
    var myLatlng = new google.maps.LatLng(48.880648,2.291465);
	  var myOptions = {
	    zoom: 14,
	    center: myLatlng,
	    mapTypeId: google.maps.MapTypeId.ROADMAP,
   		scaleControl: false,
	    navigationControl: true,
   		mapTypeControl : false

	  }
	 var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	    
	 var contentString = '<h4 class="rouge" id="firstHeading" class="firstHeading">Sopexa Groupe</h4>'+
		    '<p class="grisfonce">11 bis, rue Torricelli</p>'+
		    '<p class="grisfonce">75017 Paris</p>'+
		    '<p class="grisfonce">FRANCE</p>'+
		    '<p><a href="http://www.sopexa.com" class="grisfonce souligne">sopexa.com</a></p>';
		
		var infowindow = new google.maps.InfoWindow({
		    content: contentString
		});
		
		var marker = new google.maps.Marker({
		    position: myLatlng,
		    map: map,
		    title:"Sopexa",
      	icon: image
		});
		
		google.maps.event.addListener(marker, 'click', function() {
		  infowindow.open(map,marker);
		});
  }
  $("#bt_popup_gmap").bind('click',function() { // charge la carte quand le bouton est cliqué : évite les bugs lié à la taille de la fenetre dûs aux redimentionnements de Jquery.hide
		initialize();
	});
});
