var Title = new Class({
	
	Implements: [Options, Events],
	options:{
		container:null
	},
	
	initialize:function(options) {
		this.setOptions(options);
		//debug('Title:initialize');
		
		this.options.container.setStyle('display', 'block');
		
		this.fx = new Fx.Morph(this.options.container, {
			transition: Fx.Transitions.Sine.EaseOut,
			duration:500
		});
		
		this.fx_left = {
			'left': -120,
			'opacity': 0
		};
		this.fx_right = {
			'left': 120,
			'opacity': 0
		};
		this.fx_center = {
			'left': 0,
			'opacity': 1
		};
		
		this.bound_left = this.leftComplete.bind(this);
		
		this.fx.set(this.fx_right);
	},
	
	goLeft:function() {
		this.fx.addEvent('complete', this.bound_left);
		this.fx.start(this.fx_left);
	},
	
	goCenter:function() {
		this.fx.start(this.fx_center);
	},
	
	setRight:function() {
		this.fx.set(this.fx_right);
	},
	
	leftComplete:function() {
		this.fx.removeEvent('complete', this.bound_left);
		this.setRight();
	}
	
});
