Accordion = function(name, id, imagePath)
{
	this.name = name;
	this.id = id;
	this._imagePath = imagePath;
	this.toggleElement = this._getElement('toggle');
	this.contentElement = this._getElement('content');
	this._displayToggle('more');
}

Accordion.prototype.hideContent = function()
{
	//new Effect.BlindUp(this.contentElement, {});
	this.contentElement.slideUp('normal');
	this._displayToggle('more');	
}

Accordion.prototype.showContent = function()
{
	//new Effect.BlindDown(this.contentElement, {});
	this.contentElement.slideDown('normal');
	this._displayToggle('hide');
}

Accordion.prototype.toggle = function()
{
	//if (this.contentElement.visible())
	if (this.contentElement.is(':visible'))
		this.hideContent();
	else
		this.showContent();
}

// private 
Accordion.prototype._getElement = function(type)
{
	return $("#"+this.name.replace(" ", "_") + '_accordion_'+type+'_' + this.id);
}

Accordion.prototype._getImage = function(name)
{
	return '<img src="'+this._imagePath+'/button_'+name+'.gif">';
}

Accordion.prototype._displayToggle = function(name)
{
	this.toggleElement.html(this._getImage(name) + this.name);
}