var Navigation = new (function()
{
	this.createNavigation = function(flyoutCount)
	{
		var animation = new Array();
		
		for (var i = 0; i < flyoutCount; i++)
		{
			document.getElementById('group' + i).onmouseover = (function(index)
			{
				return function(e)
				{
					if (animation[index])
					{
						animation[index].stop();
					}
					
					animation[index] = new YAHOO.util.Anim('flyout' + index, {height: {to: document.getElementById('flyout-inner' + index).clientHeight, units: 'px'}}, 0.5, YAHOO.util.Easing.easeOut);
					animation[index].animate();
				};
			})(i);
			
			document.getElementById('group' + i).onmouseout = (function(index)
			{
				return function(e)
				{
					if (animation[index])
					{
						animation[index].stop();
					}
					
					animation[index] = new YAHOO.util.Anim('flyout' + index, {height: {to: '0', units: 'px'}}, 0.5, YAHOO.util.Easing.easeOut);
					animation[index].animate();
				};
			})(i);
		}
	};
})();