// don't use for ie6(too slow), will disable in html with Conditional comments
// relies on hoverIntent plugin

$(document).ready(function() {
    //disabling for the hover/slide effect to work
    $("#navMenu dl dd").css({'display' : 'none'});


    // for navMenu drop down
    for (i=1; i <= 9; i++)
    {		
	    // the hoverIntent settings for the dropdowns
	    $('#navMenu dl#NM-' + i).hoverIntent({
		    sensitivity: 7, // number = sensitivity threshold (must be 1 or higher) 
		    interval: 200, // number = milliseconds for onMouseOver polling interval    
		    over: eval('expandNM' + i),
		    timeout: 50, // number = milliseconds delay before onMouseOut    
		    out: eval('contractNM' + i)
	    });
    }
});
		
// for navMenu drop down
for (i=1; i <= 9; i++)
{
	// creating dynamic vars
	window['cssNamePath-NM'+i] = '#navMenu dl#NM-' + i + ' dd';
	
	// creating multiple expand functions that will be called from the 'over' state in  hoverIntent
	window['expandNM'+i] = new Function( "$('" + window["cssNamePath-NM"+i] + "').slideDown('medium')" );

	// same as above except for contracting functions that will be called from the 'out' state in  hoverIntent
	window['contractNM'+i] = new Function( "$('" + window["cssNamePath-NM"+i] + "').slideUp(100)" );
}
