/**
* Assign the view handler
*/

viewHandler = AboutPage;

/**
* Creates a new object with methods used by the About page
*
* @author				Matt Gifford
* @copyright			2008 Timeshifting Interactive Limited
*/
function AboutPage()
	{
	// Step 1. Define Properties

	var _instance = this;
	var _tooltips = [];



	// Step 2. Define Public Methods

	/**
	* Sets up the initial page state and event handlers
	*/
	this.init = function()
		{
		// Call generic page init method
		this.base.init.call(this);

		// Add tooltips to person divs
		var anchors = document.getElementById('aboutPeople').getElementsByTagName('a');
		for (var x = 0; x < anchors.length; x++)
			{
			// Add tooltip
			var content = '<div class="tooltipGeneric"><div class="tooltipGenericInner">' + anchors[x].title + '<img src="images/global-elements-tooltip-arrow-black-fs8.png" alt=""/></div></div>';
			_tooltips[_tooltips.length] =  new YAHOO.widget.Tooltip("personAnchorTooltip" + x, { context: anchors[x], text: content, preventoverlap: false });
			}
		}


	/**
	* Toggles the display of an about page module
	*
	* @param		obj			The button clicked
	*/
	this.toggleModule = function(obj)
		{
		// Find the module div
		var module = obj.parentNode.parentNode;

		// Toggle the state
		if (module.className.indexOf('expanded') != -1)
			{
			module.className = module.className.replace(/\s?expanded/g, '') + ' collapsed';
			var body = module.getElementsByTagName('div')[1];
			body.className += ' hidden';
			}
		else
			{
			module.className = module.className.replace(/\s?collapsed/g, '') + ' expanded';
			var body = module.getElementsByTagName('div')[1];
			body.className = body.className.replace(/\s?hidden/g, '');
			}
		}
	}

