window.addEvent("domready",function(){
	Fx.Height = Fx.Style.extend({initialize: function(el, options){this.parent(el, 'height', options);this.element.setStyle('overflow', 'hidden');},toggle: function(){return (this.element.offsetHeight > 0) ? this.custom(this.element.offsetHeight, 0) : this.custom(0, this.element.scrollHeight);},show: function(){return this.set(this.element.scrollHeight);}});
	Fx.Opacity = Fx.Style.extend({initialize: function(el, options){this.now = 1;this.parent(el, 'opacity', options);},toggle: function(){return (this.now > 0) ? this.start(1, 0) : this.start(0, 1);},show: function(){return this.set(1);}});
	
	if($('login')){
		var ef = new Fx.Height($('login'), {duration: 200});
		$('login').setStyle('display','block');
		ef.hide();
		var opened = false;
		$('button_login').addEvent("click", function(e){
			new Event(e).stop();
			ef.toggle();
			$('button_login').innerHTML = (!opened) ? '<span>CLOSE LOGIN AREA</span>': '<span>LOGIN</span>';
			opened = !opened; 
		});
	}
});
