//if ( com == undefined ) com = {};
//if ( com.soulfresh == undefined ) com.soulfresh = {};

/**
 * The information object that slides open and closed
 */
var vMethods = {
		initialize: function()
		{
			this.isOpen = false;
			this.openW = 340;
			this.closedW = 40;
			this.container = 'contact';
			this.button = null;
		},
		setButton: function( vE )
		{
			this.button = vE;
			this.button.clickControl = this;
			this.button.onclick = function(){ this.clickControl.click() };
		},
		openTab: function()
		{
			new Effect.Morph( this.container, {
				  style: 'width:' + this.openW + 'px;',
				  duration: 0.2,
				  transition: Effect.Transitions.sinoidal
				});
		},
		closeTab: function()
		{
			new Effect.Morph( this.container, {
				  style: 'width:' + this.closedW + 'px;',
				  duration: 0.5,
				  transition: Effect.Transitions.sinoidal //spring
				});
		},
		click: function()
		{
			if ( !this.isOpen )
			{
				this.isOpen = true;
				this.openTab();
			}
			else
			{
				this.isOpen = false;
				this.closeTab();
			}
			return false;
		}
};

var Info = Class.create( vMethods );

