var timeout, timeoutElm;
jQuery(document).ready(function () 
{ 
	jQuery('.mainNavigation .mainNavigationitem')
		.mouseover(function () 
		{ 
			if (timeoutElm == this) clearTimeout(timeout);
			jQuery(this).find('img').attr('src',function() 
			{
				if (jQuery(this).attr('src').indexOf('_hov.gif') == -1)
				{
				    return jQuery(this).attr('src').replace('.gif', '_hov.gif');
				}
				return jQuery(this).attr('src');
			});
			jQuery(this).addClass('selected');
			
		})
		.mouseout(function () 
		{ 
			var self = this;
			timeoutElm = this;
			timeout = setTimeout(function () 
			{
				jQuery(self).removeClass('selected');
				jQuery(self).find('img').attr('src',function() 
				{
					return jQuery(this).attr('src').replace('_hov.gif', '.gif');
				});
			},50);
		});
});
