/**
* Assign the view handler
*/

viewHandler = Textiles;

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

	var _instance = this;



	// 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 links
		var anchors = YAHOO.util.Dom.getElementsByClassName('viewItem', 'a', document.getElementById('textilesBody'));
		for (var x = 0, title = '', tooltipHtml = ''; x < anchors.length; x++)
			{
			title = anchors[x].getAttribute('title');
			if (title != '')
				{
				tooltipHtml = '<div class="text"><span>' + title + '</span><img class="arrow" src="images/global-elements-tooltip-arrow.png"/></div>';
				anchors[x].setAttribute('title', '')
				var tooltip = new YAHOO.widget.Tooltip('textilesTooltip' + x, { context: anchors[x], text: tooltipHtml, preventoverlap: true, showDelay: 200, effect: {effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25} });
				}
			}
		}
	}

