public function getMenu($name = null, $options = array())
    {
        if (!isset($name))
        {
            $app = JFactory::getApplication();
            $name = $app->getName();
        }

        try
        {
            if (!class_exists('JMenu' . ucfirst($name))) {
                jimport('cms.menu.'.strtolower($name));
            }

            $menu = JMenu::getInstance($name, $options);
        }
        catch (Exception $e) {
            return null;
        }

        return $menu;
    }