function render(&$params, $callback)
 {
     // Include the new menu class
     $xml = modNewMainMenuHelper::getXML($params->get('menutype'), $params, $callback);
     if ($xml) {
         $class = $params->get('class_sfx');
         // add icon class if menu images are enabled
         if ($params->get('menu_images') && $params->get('menu_images') != -1) {
             $class .= ' icon';
         }
         $xml->addAttribute('class', 'menu' . ' ' . $class);
         if ($tagId = $params->get('tag_id')) {
             $xml->addAttribute('id', $tagId);
         }
         $result = JFilterOutput::ampReplace($xml->toString((bool) $params->get('show_whitespace')));
         $result = str_replace(array('<ul/>', '<ul />'), '', $result);
         echo $result;
     }
 }
                foreach ($node->children() as $child) {
                    if ($child->name() == 'ul') {
                        $node->removeChild($child);
                    }
                }
            }
        }
        if ($node->name() == 'li' && ($id = $node->attributes('id'))) {
            if ($node->attributes('class')) {
                $node->addAttribute('class', $node->attributes('class') . ' item' . $id);
            } else {
                $node->addAttribute('class', 'item' . $id);
            }
            foreach ($node->children() as $child) {
                if ($child->_level == '2' && $child->_name == 'a') {
                    $child->addAttribute('class', $node->attributes('class') . ' top-level');
                }
            }
        }
        if (isset($path) && $node->attributes('id') == $path[0]) {
            $node->addAttribute('id', 'current');
        } else {
            $node->removeAttribute('id');
        }
        $node->removeAttribute('level');
        $node->removeAttribute('access');
    }
    define('modNewMainMenuXMLCallbackDefined', true);
}
modNewMainMenuHelper::render($params, 'modNewMainMenuXMLCallback');