
//////////////////////////////////////////////////////////////////////////////////////////////// resto

menu=new Object();
menu.init=function(){
	
	departl=sel.position().left-15;
	departw=sel.width()+30;
	
	$("#indic").css("left",departl);
	$("#indic").css("width",departw);
	
	
	$(".mm").hover(
		function() {
			var posw = $(this).width()+30;
			var posl = $(this).position().left-15;
			
			$("#indic").stop().animate({
    			left: posl,
    			width: posw
    		},{duration: 500 ,easing:'easeInOutQuad'});
		},
		function() {
			$("#indic").stop().animate({
    			left: departl,
    			width: departw
    		},{duration: 500 ,easing:'easeInOutQuad'});
		}
	);
	
};

galerie=new Object();
galerie.init=function(){

	var settings = {
    thumbListId: "galerieBas",
    imgViewerId: "galerieHaut",
    activeClass: "active",
    activeTitle: "Photo en cours de visualisation",
    loaderTitle: "Chargement en cours",
    loaderImage: "images/ajax-loader.gif"
  };

  var thumbLinks = $("#"+settings.thumbListId).find("a"),
      firstThumbLink = thumbLinks.eq(0),
      highlight = function(elt){
        thumbLinks.removeClass(settings.activeClass).removeAttr("title");
        elt.addClass(settings.activeClass).attr("title",settings.activeTitle);
      },
      loader = $(document.createElement("img")).attr({
        alt: settings.loaderTitle,
        title: settings.loaderTitle,
        src: settings.loaderImage
      });

  highlight(firstThumbLink);

  var imgViewer = $("#"+settings.imgViewerId),
      bigPic = imgViewer.children("img");

  thumbLinks
    .hover(function(e){
      e.preventDefault();
      var $this = $(this),
          target = $this.attr("href");
      if (bigPic.attr("src") == target) return;
      highlight($this);
      imgViewer.html(loader);
      bigPic
        .load(function(){
          imgViewer.html($(this).fadeIn(250));
        })
        .attr("src",target);
    });

};
