/**
 * @author maggo
 */
var Effect = new Class({
	stuff: null
	,initialize: function(element) {
		this.stuff = $(element);	
		this.stuff.set('morph', {
			duration: 500
		});
	}
	,Fade: function() {
		this.stuff.morph({'opacity': [1,0], 'onComplete': this.stuff.setStyle('display', 'none')});
	}
	,Appear: function() {
		if ($(this.stuff).getStyle('display') == 'none') $(this.stuff).setStyle('display', 'block');
		
		this.stuff.morph({
			'opacity': [0,1]
		});
	}
	,Toggle: function() {
		if ($(this.stuff).style.opacity > 0.5) {
			this.Fade();
		} else {
			this.Appear();
		}
	}
})
