
$(document).ready
(
	function()
	{
		var config = 
		{    
			 sensitivity: 3, 	// number = sensitivity threshold (must be 1 or higher)    
			 interval: 100,  	// number = milliseconds for onMouseOver polling interval    
			 over: openMenu,  	// function = onMouseOver callback (REQUIRED)    
			 timeout: 100,   	// number = milliseconds delay before onMouseOut    
			 out: closeMenu    	// function = onMouseOut callback (REQUIRED)    
		};
		
		function openMenu() 
		{
			$('ul#' + $(this).find('a span').attr('rel')).show();
		}
	 
		function closeMenu() 
		{
			$('ul#' + $(this).find('a span').attr('rel')).hide();			
		}
	
		$('div.menu ul li').hoverIntent(config);  
	}
);

/*jQuery.fn.golfspainmenu = function() 
{    
    var config = 
	{    
         sensitivity: 3, 	// number = sensitivity threshold (must be 1 or higher)    
         interval: 100,  	// number = milliseconds for onMouseOver polling interval    
         over: openMenu,  	// function = onMouseOver callback (REQUIRED)    
         timeout: 100,   	// number = milliseconds delay before onMouseOut    
         out: closeMenu    	// function = onMouseOut callback (REQUIRED)    
    };
    
    function openMenu() 
	{
        //alert($(this).children().hasClass('current'));
        if(!$(this).hasClass('current')) $(this).addClass('hover');
        $('ul:first',this).css('visibility', 'visible');
    }
 
    function doClose() 
	{
        $(this).removeClass('hover');
        $('ul:first',this).css('visibility', 'hidden');
    }

    $(this).find('li').hoverIntent(config);    
}*/
