

function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.enableScrollWheelZoom();
        map.addControl(new GOverviewMapControl());
        var point =new GLatLng(46.003430691430694,1.8856143951416016);
        map.setCenter(point, 12);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        var msg = '<span style="color:blue;">Le Theil</span> <p style="font-size:10px;color:black">Accès : de St hilaire le château, <br> prendre direction Sardent <br>puis 5ème à droite Le Theil.</p>';
        marker.openInfoWindowHtml(msg);

      }
    }

$(document).ajaxComplete(function(){
  $("#libImages").jqGalScroll();
  if($('#id_gite').length){
    switch ($('#id_gite').val()){
    case 'lezardiere' :
    case 'herisson' :
      $('#contenu').css('height','600px');
      $('#jqGS0').css('margin-top','-390px');
      break;
    case 'accueil' :
      $('#contenu').css('height','auto');
      break;
    case 'contacts':
      $('#contenu').css('height','400px');
      initialize();
      break;
    }
  }
});


function pageload(hash) {
 if(hash) {
   $.get(hash,function(txt){
   //$.get('.'+hash,function(txt){
    $('#contenu').html(txt);
  });
 }
}

$(document).ready(function(){
  //load();

  /*$.historyInit(pageload);
  $("a[@rel='history']").click(function(){
       //suppression du mot cle history, pour que les liens ne soient surchargés qu'une seule fois
       this.rel = this.rel.replace(/history/, '');
       // mise à jour de l'ancre
       var hash = this.href;
       
       // suppression du caractère #
       hash = hash.replace(/^.*com/, '');
       //hash = hash.replace(/^.*#/, '');

       // chargement dans l'historique et appel de pageload
       $.historyLoad(hash);
       // trés important : désactivation du clic du lien a
       return false;
      });*/
});



