//	Call the "use" method, passing in "node-menunav".  This will load the 
//	script and CSS for the MenuNav Node Plugin and all of the required 
//	dependencies.

YUI({combine: true, timeout: 10000}).use("node-menunav", function(Y) {
	
	// remove menu styling that applies when js is not enabled
	Y.one("body").removeClass('no-js');

	//	Retrieve the Node instance representing the root menu
	//	(<div id="menu">) and call the "plug" method
	//	passing in a reference to the MenuNav Node Plugin.

	var menu = Y.one("#mainMenu");

	menu.plug(Y.Plugin.NodeMenuNav, {
		submenuShowDelay: 10
		,submenuHideDelay: 10
		,mouseOutHideDelay: 500
	});

	//	Show the menu now that it is ready

	menu.get("ownerDocument").get("documentElement").removeClass("yui-loading");
	
});
