// JavaScript Document
Fx.SlideAndFade = Fx.Styles.extend({
	
	initialize: function(el, h, options){
		this.parent(el, options);
		this.iniHeight = h;
	},

	hide: function(){
		this.custom({
			'height': [this.element.offsetHeight, 0],
			'opacity': [1, 0]
		});
	},

	show: function(){
		this.custom({
			'height': [0, this.iniHeight],
			'opacity': [0, 1]
		});
	},
	
	toggle: function(){
		if (this.element.offsetHeight > 0) return this.hide();
		else return this.show();
	}
});	