// JavaScript Document
// Animations pour galleries site Claudine Doury
// Clement Val, mai 2009
$(document).ready(function(){
  $('#s1').cycle({ 
    fx:     'fade', 
    speed:  450, 
    timeout: 0,
    next:   '#next, #s1',
    prev:   '#prev',
    pause: 1,
    after:   onAfter
  });
  $(".menu").fadeTo("slow", 0.3);
  $(".menu").hover(function(event){
    $(this).stop().fadeTo("slow", 1);
  },
  function(){
    $(this).stop().fadeTo("slow", 0.3);
  });
  $(".fleche").css('opacity','0');
  $(".fleche").fadeTo(2000, 0.4);
  $(".fleche").hover(function(event){
    $(this).stop().fadeTo("fast", 1);
    },
    function(){
      $(this).stop().fadeTo("slow", 0.4);
    });
});

function onAfter(curr,next,opts) { 
  $('#output').html(this.alt);
  var caption = (opts.currSlide + 1) + ' / ' + opts.slideCount;
	$('#indice').html(caption);
 }