/**
* Assign the view handler
*/

viewHandler = About;

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

	var _instance = this;
	this.videoEmbedded = false;



	// 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);

		// Init email address links
		var anchors = document.getElementById('aboutContent').getElementsByTagName('a');
		for (var x = 0; x < anchors.length; x++)
			{
			if (anchors[x].innerHTML.indexOf('-at-') != -1)
				{
				var text = new String(anchors[x].innerHTML);
				text = text.replace(/-at-/g, '@');
				text = text.replace(/-dot-/g, '.');
				anchors[x].innerHTML = text;
				anchors[x].href = 'mailto:' + text;
				}
			}
		}


	/**
	* Inserts the video into the document
	*/
	this.embedVideo = function()
		{
		if (xhtml.videoEmbedded == false)
			{
			try {
			
			
			this.href = 'javascript:;';
			document.getElementById('videoContainer').innerHTML = '<div><iframe src="http://www.msnbc.msn.com/id/22425001/vp/28811623#28811623" frameborder="0" height="339" scrolling="no" width="425"></iframe></div>';
			xhtml.videoEmbedded = true;
			} catch (err) { _log(err); }
			}
		}
	}
