$(function()
{
	var id = "primaryNav"
	var timeout = 1200
	
	$('#' + id + ' li').
		mouseover(function()
		{
			var root = $(this).parents('#' + id).get(0)
			if(root.current)
				$(root.current).removeClass('current')
			if(root.timeout)
			{
				clearTimeout(root.timeout)
				root.timeout = null
			}
			root.current = this
			$(this).addClass('current')
		}).
		mouseout(function()
		{
			var self = this
			var root = $(this).parents('#' + id).get(0)
			if(root.timeout)
				clearTimeout(root.timeout)
			root.timeout = setTimeout(function(){$(self).removeClass('current')}, timeout)
		})
})
