$(function()
{
	$('a[href=#jaa]').mouseover(function()
	{
		target = $(this).find('img');
		
		$('ul.jaaMenuChild').css('display', 'block');
		target.attr("src", target.attr("src").replace(/^(.+)(_off)(\.[a-z]+)$/, "$1_over$3"));
		
		return false;
	})
	
	$('.jaaMenu img, .jaaMenu ul').mouseout( function() { timerStart() } );
	$('.jaaMenu img, .jaaMenu ul').mouseover( function() { timerStop() } );
	
	var timer;
	
	var timerStop = function()
	{
		clearTimeout(timer);
	}
	
	var timerStart = function()
	{
		timer = setTimeout(function()
		{
			$('ul.jaaMenuChild').css('display', 'none');
			target.attr("src", target.attr("src").replace(/^(.+)(_over)(\.[a-z]+)$/, "$1_off$3"));
		}, 500);
	}
})

