var Accueil = {

	boutons: function() {
		// On crée une "chaine" pour l'effet d'apparition des boutons l'une après l'autre
		var items = $$('#sidebar li');
		var itemsChain = new Chain();
		items.each(function(le) {
			fx = new Fx.Styles(le);
			fx.set({'opacity': 0, 'margin-left':-400});
			itemsChain.chain(function() {
				fx = new Fx.Styles(le, {'duration': 900, 'transition': Fx.Transitions.Elastic.easeOut});
				fx.start({'opacity': 1, 'margin-left':0});
			});
		});
		// On exécute la chaine
		var runChain = function() {
			itemsChain.callChain();
			if (itemsChain.chains.length == 0) { runChain = $clear(timer); } 
		}
		var timer = runChain.periodical(200);
	},
	
	clignotement: function() {
		var cliquezIci = new Element('a', {id: 'cliquezIci', href: './promo.html'});
		var cliquez = new Element('p', {id: 'cliquez'});
		var ici = new Element('p', {id: 'ici'});
		cliquez.appendText('Cliquez');
		ici.appendText('ici');
		cliquezIci.setStyles({
			display: 'block',
			position: 'absolute',
			zIndex: 10,
			top: 84,
			left: 165,
			color: '#fff',
			fontWeight: 'bold',
			textAlign: 'center'
		});
		cliquezIci.inject('sidebar', 'top');
		cliquez.inject('cliquezIci', 'top');
		ici.inject('cliquezIci', 'bottom');
		var flashCliquezIci = new Fx.Style('cliquezIci', 'opacity', {duration: '600'});
		flashCliquezIci.hide();
		flashCliquezIci.start(0.1, 0.99);
	}
	
}
