$(document).ready(function() {
	
	jQuery.preloadImages = function(montableau,monextension,monchemin){
		base = monchemin+'images/generique/';
		for(var i = 0; i<montableau.length; i++){
			imgsrc= base + montableau[i].name + monextension ;
			jQuery("<img>").attr("src", imgsrc);
		}
	};
	
	jQuery.rollImages = function(macible) {	
		$(macible).mouseover(function() {
			src = $(this).attr('name');
			targetsrc = $('#accueil ul').attr('class');
			if(src != targetsrc){
				$('#accueil ul').fadeOut("fast",function(){
					$('#accueil ul').attr("className", src);
					$('#accueil ul').fadeIn("fast");
				});
			};	
			}
		);
	}
	
	jQuery.rollImages2 = function(macible) {	
		$(macible).hover(function(){
			base = '../images/generique/';
			base2 = $(this).attr('name');
			imgsrc= base + base2 + '-on.gif' ;
			$(this).children('img').attr('src',imgsrc);
		},function(){
			base = '../images/generique/';
			base2 = $(this).attr('name');
			imgsrc= base + base2 + '.gif' ;
			$(this).children('img').attr('src',imgsrc);
		});
	}

	
});
       