$(document).ready(function(){

	$('#iner').innerfade({ 
		animationtype: 'fade', 
		speed: 'slow', 
		timeout: 3000, 
		type: 'sequence', 
		containerheight: '449px'
		}); 
		
		
		// Gestion de la gallerie 
		
		// afficher le première image 
		$('.gallery').before('<div id="ggi"></div>');
		$('.gallery li:first').children('img').clone().prependTo('#ggi');
		//$('.gallery').after('<div id="ggibt"><span id="prev" class="btg"><</span><span id="next" class="btg">></span></div>');	
		
		// le hover sur les vignettes 
		$('.gallery li img').css({opacity:0.6});
		$('.gallery li img').hover(function(){
			$(this).css({opacity:1});
			},
			function(){
			$(this).css({opacity:0.6});
			}
			);
		// le click sur les vignetes
		$('.gallery li img').click(function(){
			$('#ggi img').replaceWith($(this).clone());
							
		});	
		
		// le click sur les boutons 
		$('#next').click(function(){
			
			var nom=$("#ggi img").attr("src");
			$('.gallery li img[src=nom]').css({opacity:0});
			alert(nom);
		});			
});


