jQuery(document).ready(function(){



	if(jQuery('.blocGalerie .visite .apercu a').attr('href')!='') jQuery('.blocGalerie .visite').show();

	jQuery('.lvl1').each(function () {	
		jQuery(this).find('a:first').click(function () { 
			return false;
		});
	});
	
	jQuery('.resa a, .btn_reserver a').click(function () {	
		window.open(jQuery(this).attr('href'));
			return false;
	});
	
	
	jQuery('#lightbox-nav-btnPrev').click(function () {	
			return false;
	});
	
	jQuery('.targetBlank').click(function () {	
		window.open(jQuery(this).attr('href'));
			return false;
	});
	
});



var map = null;
    var geocoder = null;

    function initializeMap() {
	//alert('init');
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_village"));
        map.setCenter(new GLatLng(47.15984, 2.988281), 5);
       // map.addControl(new GLargeMapControl()); // outils à gauche
        map.setUIToDefault();
	//map.enableScrollWheelZoom();		
        geocoder = new GClientGeocoder();
      }
	//  alert(adresseVillage);
   if(document.getElementById('map_village')) {  showAddress(adresseVillage);}
    }

    function showAddress(address) {
	//	alert('show adresse');
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
