function Carrousel(id, width, nb){
	$('#' + id).append('<span id="span' + id + '" style="display:none;">1</span>');
    	refreshLinkCaroussel(1);

	current = parseInt($('#span' + id).html());
	left = parseInt($('#' + id + ' .items').css('left'));

	$('.jeu').each(function(){
		if(($(this).attr('rel')) == left)
		{
			$('.jeu').eq(current-1).addClass("jeuClick");
		}
	});	
	
	// Navigation : suivante
	
	$('#' + id + ' a.next').die('click').live('click', function(){
		return carrousel.next();
	});

	// Navigation : précédente
	
	$('#' + id + ' a.prev').die('click').live('click', function(){
		return carrousel.prev();
	});

	this.next = function()
	{
		$('.jeu').removeClass("jeuClick");
		var total;
		var current;
		var left;
		       
		current = parseInt($('#span' + id).html());
		left = parseInt($('#' + id + ' .items').css('left'));
		total = $('#' + id + ' .item').length-1;
			
		if( current <= total )
		{
			$('#' + id + ' .items').animate({
			left: '-=' + (width * nb)
			}, 'slow');
			current = current + nb;
		}
		
		// on parcours les vignettes des jeux
		// Si la position LEFT = position de la vignette
		// On ajouter la class jeuClick

		$('.jeu').each(function(){
			if(($(this).attr('rel')) == left)
			{
				$('.jeu').eq(current-1).addClass("jeuClick");
			}
		});
			
		refreshLinkCaroussel( current );
		$('#span' + id).html(current);
		
		return false;
	}
	   
	this.prev = function(){
		$('.jeu').removeClass("jeuClick");
		var current;
		var left;
		       
		current = parseInt($('#span' + id).html());
		left = parseInt($('#' + id + ' .items').css('left'));
				       
		if ( current > 1 ) {
			$('#' + id + ' .items').animate({
			left: '+=' + (width * nb)
			}, 'slow');  
			current = current - nb;
		}

		$('.jeu').each(function(){
			if(($(this).attr('rel')) == left)
			{
				$('.jeu').eq(current-1).addClass("jeuClick");
			}
		});
		
		refreshLinkCaroussel(current);
		$('#span' + id).html(current);
		return false;
	}
	   
	// Mise à jour des flèches de navigation (visible/cachée)
	function refreshLinkCaroussel( current ){       
		var total;
		total = $('#' + id + ' .item').length;    //nombre d'élément au total
	       
		if( current == total || current > total - 1)
		    $('#' + id + ' a.next').hide();
		else
		    $('#' + id + ' a.next').show();
		if( current == 1 )
		    $('#' + id + ' a.prev').hide();
		else
		    $('#' + id + ' a.prev').show();
	}

	this.goTo = function(game){
		var pos;
		pos = -(game) / width;
		pos = pos + 1;
		
		$('#' + id + ' .items').animate({
			left: game
		    }, 'fast');
					
		$('#spanmonPetitCarroussel').text(pos);
			refreshLinkCaroussel(pos);
			return false;
	}
}

