-/*
- * Close a menu.
- */
-function closeMenu(menu) {
- clearTimeout(menu.timer);
- menu.hide();
-}
-
-/*
- * Callback called when the mouse enters a menu anchor.
- */
-function enterMenuAnchor(event, anchor, menu, delay, align) {
- if (!anchor.hasClass("disabled")) {
- clearTimeout(menu.timer);
-
- if (delay > 0) {
- menu.timer = setTimeout(function () { openMenu(anchor, menu, align); }, delay);
- } else {
- openMenu(event, menu, align);
- }
- }
-}
-
-/*
- * Callback called when the mouse leaves a menu anchor.
- */
-function leaveMenuAnchor(event, anchor, menu) {
- var to = event.relatedTarget;
-
- if (!menu.is(to) && menu.has(to).length === 0) {
- menu.hide();
- }
-
- clearTimeout(menu.timer);
-}
-
-/*
- * Callback called when the mouse leaves a menu.
- */
-function leaveMenu(event, anchor, menu) {
- var to = event.relatedTarget;
-
- if (!anchor.is(to) && menu.has(to).length === 0) {
- menu.hide();
- }
-
- clearTimeout(menu.timer);
-}
-