var Nouincolor = new Class({
	initialize: function(options){

		this.wrapper = $('wrapper');
		this.titre = $('titre-rubrique');
		this.images = $('images');
		this.texte = $('texte');

		
		this.prepareTurkey();
		this.getAssets();
	},
	
	prepareTurkey: function(){
		// hide the wrapper
		this.images.fade('hide');
		this.texte.fade('hide');
		
		this.images.set('opacity', 0);
		this.texte.set('opacity', 0);
		this.titre.set('tween', {duration: 700, transition: 'expo:inOut'});
		this.titre.set('morph', {duration: 2700, transition: 'expo:inOut'});
	},
	
	showTitre: function(){
		// show wrapper
		this.wrapper.fade(1);
		
		this.titre.tween('left', 200);
		this.showImages.delay(900, this);
		this.showTexte.delay(1600, this);
		
	},
	
	showTexte: function(){
		this.texte.morph({
			'opacity': 1
		});
		this.hideTitre.delay(900, this);
	},
	
	showImages: function(){
		this.images.morph({
			'opacity': 1,
			'top': [30, 0]
		});
	},
	
	hideTitre: function(){
		this.titre.tween('left', 0);
		this.titre.morph({
			'opacity': 0
		});
	},
		
	getAssets: function(){
		this.showTitre();
	},
	
	
});

window.addEvent('domready', function(){
	new Nouincolor();
});
