window.onload = function()
{
	contact = new Fx.Height('contact-content', {duration: 500});
	contact.hide();

	$('contact-button').getElement('a').addEvent
	(
		'click', function()
		{
			if (this.style.backgroundPosition == "0px -21px") this.style.backgroundPosition = "0px 0px";
			else this.style.backgroundPosition = "0px -21px";

			contact.toggle();
			return false;
		}
	);
	
	friends = new Fx.Height('friends-content', {duration: 500});
	friends.hide();
	
	$('friends-button').addEvent
	(
		'click', function()
		{
			if (this.style.backgroundPosition == "0px -21px") this.style.backgroundPosition = "0px 0px";
			else this.style.backgroundPosition = "0px -21px";

			friends.toggle();
			return false;
		}
	);

	resources = new Fx.Height('resources-content', {duration: 500});
	resources.hide();
	
	$('resources-button').addEvent
	(
		'click', function()
		{
			if (this.style.backgroundPosition == "0px -21px") this.style.backgroundPosition = "0px 0px";
			else this.style.backgroundPosition = "0px -21px";

			resources.toggle();
			return false;
		}
	);

	if (color = getCookie('color')) setColor(color);
	else setColor('color-blue');

	if (size = getCookie('size')) setSize(size);
	else setSize("size-12");
	
	//Lightbox.show('indevelopment.png', 'Contemporary Multimedia');
}

Fx.Height = Fx.Style.extend
({
 	        initialize: function(el, options)
			{
 	                $(el).setStyle('overflow', 'hidden');
 	                this.parent(el, 'height', options);
 	        },
 	
 	        toggle: function()
			{
 	                var style = this.element.getStyle('height').toInt();
 	                if (style > 0) return this.start(style, 0);
 	                else return this.start(0, this.element.scrollHeight);
 	        },
 	
 	        show: function()
			{
 	                return this.set(this.element.scrollHeight);
 	        }
 	
});
