var Panel = new Abstract({
	
	options: {
		effect: {
			duration: 750,
			transition: Fx.Transitions.Bounce.easeOut
		},
		openString: 'Open Control Panel',
		closeString: 'Close Control Panel',
		panelSize: 110
	},
	
	init: function(options){
		this.setOptions(options);
		
		this.target = $('fxTarget');
		this.padding = $('fxPadding').setStyle('visibility', 'visible');
		this.trigger = $('fxTrigger');
		this.tab = $('fxTab');
		
		this.fx = this.target.effect('height', this.options.effect).set(0);
		this.trigger.setHTML(this.options.openString);
		this.tab.addEvent('click', function(){
			var opened = (!!this.fx.now[0].value);
			this.fx.start((opened) ? 0 : this.options.panelSize);
			this.trigger.setHTML(this.options[((opened) ? 'close' : 'open') + 'String']);
		}.bind(this));
	}
	
}).extend(new Options);

window.addEvent('domready', Panel.init.bind(Panel));