# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/admin/settings/appearance.php
--- moodle/admin/settings/appearance.php Base (1.56)
+++ moodle/admin/settings/appearance.php Locally Modified (Based On 1.56)
@@ -24,6 +24,7 @@
             1 => get_string('hidefromstudents', 'admin'),
             2 => get_string('hidefromall', 'admin')
         )));
+    $temp->add(new admin_setting_configtextarea('custommenuitems', get_string('custommenuitems', 'admin'), get_string('configcustommenuitems', 'admin'), '', PARAM_TEXT, '50', '10'));
     $ADMIN->add('themes', $temp);
     $ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
 
Index: moodle/lang/en/admin.php
--- moodle/lang/en/admin.php Base (1.84)
+++ moodle/lang/en/admin.php Locally Modified (Based On 1.84)
@@ -153,6 +153,15 @@
     http://site.example.com/admin/cron.php?password=opensesame
 </pre>If this is left empty, no password is required.';
 $string['configcurlcache'] = 'Time-to-live for cURL cache, in seconds.';
+$string['configcustommenuitems'] = 'Menu items need to be specifically formatted in order for the custom menu block to understand them. A menu block is made up of up to four items seperated by pipes (shift + backslash) and should be as follows: text|link|title|sortorder. The first option text is mandatory and the rest are optional. Additionally you can signify a structure using hyphens, first level items shouldn\'t have hyphens, after an items level is determined by the number of hyphens. For example:<pre>
+
+First level first item|http://www.moodle.com/
+-Second level first item|http://www.moodle.com/partners/
+-Second level second item|http://www.moodle.com/hq/
+--Third level first item|http://www.moodle.com/jobs/
+-Second level third item|http://www.moodle.com/development/
+First level second item|http://www.moodle.com/feedback/
+First level third item<pre>';
 $string['configdbsessions'] = 'If enabled, this setting will use the database to store information about current sessions.  This is especially useful for large/busy sites or sites built on cluster of servers.  For most sites this should probably be left disabled so that the server disk is used instead.  Note that changing this setting now will log out all current users (including you). If you are using MySQL please make sure that \'max_allowed_packet\' in my.cnf (or my.ini) is at least 4M.';
 $string['configdebug'] = 'If you turn this on, then PHP\'s error_reporting will be increased so that more warnings are printed.  This is only useful for developers.';
 $string['configdebugdisplay'] = 'Set to on, the error reporting will go to the HTML page. This is practical, but breaks XHTML, JS, cookies and HTTP headers in general. Set to off, it will send the output to your server logs, allowing better debugging. The PHP setting error_log controls which log this goes to.';
@@ -380,6 +389,8 @@
 $string['curlrecommended'] = 'Installing the optional cURL library is highly recommended in order to enable Moodle Networking functionality.';
 $string['curlrequired'] = 'The cURL PHP extension is now required by Moodle, in order to commnunicate with Moodle repositories.';
 $string['customcheck'] = 'Other Checks';
+$string['custommenu'] = 'Custom menu';
+$string['custommenuitems'] = 'Custom menu items';
 $string['datarootsecurityerror'] = '<p><strong>SECURITY WARNING!</strong></p><p>Your dataroot directory is in the wrong location and is exposed to the web. This means that all your private files are available to anyone in the world, and some of them could be used by a cracker to obtain unauthorised administrative access to your site!</p>
 <p>You <em>must</em> move dataroot directory ({$a}) to a new location that is not within your public web directory, and update the <code>$CFG->dataroot</code> setting in your config.php accordingly.</p>';
 $string['datarootsecuritywarning'] = 'Your site configuration might not be secure. Please make sure that your dataroot directory ({$a}) is not directly accessible via web.';
Index: moodle/lib/javascript-static.js
--- moodle/lib/javascript-static.js Base (1.146)
+++ moodle/lib/javascript-static.js Locally Modified (Based On 1.146)
@@ -1518,3 +1518,24 @@
         this.Y = Y;        
     }
 }
+
+/**
+ * Custom menu namespace
+ */
+M.core_custom_menu = {
+    /**
+     * This method is used to initialise a custom menu given the id that belongs
+     * to the custom menu's root node.
+     * 
+     * @param {YUI} Y
+     * @param {string} nodeid
+     */
+    init : function(Y, nodeid) {
+        // Get the node
+        var node = Y.one('#'+nodeid);
+        // Remove the javascript-disabled class.... obviously javascript is enabled.
+        node.removeClass('javascript-disabled');
+        // Initialise the menunav plugin
+        node.plug(Y.Plugin.NodeMenuNav);
+    }
+}
Index: moodle/lib/outputcomponents.php
--- moodle/lib/outputcomponents.php Base (1.120)
+++ moodle/lib/outputcomponents.php Locally Modified (Based On 1.120)
@@ -1936,3 +1936,284 @@
         $this->url  = $url;
     }
 }
+
+/**
+ * Custom menu item
+ *
+ * This class is used to represent one item within a custom menu that may or may
+ * not have children.
+ *
+ * @copyright 2010 Sam Hemelryk
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since     Moodle 2.0
+ */
+class custom_menu_item implements renderable {
+    /**
+     * The text to show for the item
+     * @var string
+     */
+    protected $text;
+    /**
+     * The link to give the icon if it has no children
+     * @var moodle_url
+     */
+    protected $url;
+    /**
+     * A title to apply to the item. By default the text
+     * @var string
+     */
+    protected $title;
+    /**
+     * A sort order for the item, not nessecary if you order things in the CFG var
+     * @var int
+     */
+    protected $sort;
+    /**
+     * A reference to the parent for this item or NULL if it is a top level item
+     * @var custom_menu_item
+     */
+    protected $parent;
+    /**
+     * A array in which to store children this item has.
+     * @var array
+     */
+    protected $children = array();
+    /**
+     * A reference to the sort var of the last child that was added
+     * @var int
+     */
+    protected $lastsort = 0;
+    /**
+     * Constructs the new custom menu item
+     *
+     * @param string $text
+     * @param moodle_url $url A moodle url to apply as the link for this item [Optional]
+     * @param string $title A title to apply to this item [Optional]
+     * @param int $sort A sort or to use if we need to sort differently [Optional]
+     * @param custom_menu_item $parent A reference to the parent custom_menu_item this child
+     *        belongs to, only if the child has a parent. [Optional]
+     */
+    public function __construct($text, moodle_url $url=null, $title=null, $sort = null, custom_menu_item $parent=null) {
+        $this->text = $text;
+        $this->url = $url;
+        $this->title = $title;
+        $this->sort = (int)$sort;
+        $this->parent = $parent;
+    }
+
+    /**
+     * Adds a custom menu item as a child of this node given its properties.
+     *
+     * @param string $text
+     * @param moodle_url $url
+     * @param string $title
+     * @param int $sort
+     * @return custom_menu_item
+     */
+    public function add($text, moodle_url $url=null, $title=null, $sort = null) {
+        $key = count($this->children);
+        if (empty($sort)) {
+            $sort = $this->lastsort + 1;
+        }
+        $this->children[$key] = new custom_menu_item($text, $url, $title, $sort, $this);
+        $this->lastsort = (int)$sort;
+        return $this->children[$key];
+    }
+    /**
+     * Returns the text for this item
+     * @return string
+     */
+    public function get_text() {
+        return $this->text;
+    }
+    /**
+     * Returns the url for this item
+     * @return moodle_url
+     */
+    public function get_url() {
+        return $this->url;
+    }
+    /**
+     * Returns the title for this item
+     * @return string
+     */
+    public function get_title() {
+        return $this->title;
+    }
+    /**
+     * Sorts and returns the children for this item
+     * @return array
+     */
+    public function get_children() {
+        $this->sort();
+        return $this->children;
+    }
+    /**
+     * Gets the sort order for this child
+     * @return int
+     */
+    public function get_sort_order() {
+        return $this->sort;
+    }
+    /**
+     * Gets the parent this child belong to
+     * @return custom_menu_item
+     */
+    public function get_parent() {
+        return $this->parent;
+    }
+    /**
+     * Sorts the children this item has
+     */
+    public function sort() {
+        usort($this->children, array('custom_menu','sort_custom_menu_items'));
+    }
+    /**
+     * Returns true if this item has any children
+     * @return bool
+     */
+    public function has_children() {
+        return (count($this->children) > 0);
+    }
+}
+
+/**
+ * Custom menu class
+ *
+ * This class is used to operate a custom menu that can be rendered for the page.
+ * The custom menu is built using $CFG->custommenuitems and is a structured collection
+ * of custom_menu_item nodes that can be rendered by the core renderer.
+ *
+ * To configure the custom menu:
+ *     Settings: Administration > Appearance > Themes > Theme settings
+ *
+ * @copyright 2010 Sam Hemelryk
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since     Moodle 2.0
+ */
+class custom_menu extends custom_menu_item {
+    /**
+     * Creates the custom menu
+     * @param string $text Sets the text for this custom menu, never gets used and is optional
+     */
+    public function __construct($text='base') {
+        global $CFG;
+        parent::__construct($text);
+        $this->override_children(self::convert_text_to_menu_nodes($CFG->custommenuitems));
+    }
+
+    /**
+     * Overrides the children of this custom menu. Useful when getting children
+     * from $CFG->custommenuitems
+     */
+    public function override_children(array $children) {
+        $this->children = array();
+        foreach ($children as $child) {
+            if ($child instanceof custom_menu_item) {
+                $this->children[] = $child;
+            }
+        }
+    }
+
+    /**
+     * Converts a string into a structured array of custom_menu_items which can
+     * then be added to a custom menu.
+     *
+     * Structure:
+     *     text|url|title|sort
+     * The number of hyphens at the start determines the depth of the item
+     *
+     * Example structure:
+     *     First level first item|http://www.moodle.com/
+     *     -Second level first item|http://www.moodle.com/partners/
+     *     -Second level second item|http://www.moodle.com/hq/
+     *     --Third level first item|http://www.moodle.com/jobs/
+     *     -Second level third item|http://www.moodle.com/development/
+     *     First level second item|http://www.moodle.com/feedback/
+     *     First level third item
+     * 
+     * @static
+     * @param string $text
+     * @return array
+     */
+    public static function convert_text_to_menu_nodes($text) {
+        $lines = explode("\n", $text);
+        $children = array();
+        $lastchild = null;
+        $lastdepth = null;
+        $lastsort = 0;
+        foreach ($lines as $line) {
+            $line = trim($line);
+            $bits = explode('|', $line ,4);    // name|url|title|sort
+            if (!array_key_exists(0, $bits) || empty($bits[0])) {
+                // Every item must have a name to be valid
+                continue;
+            } else {
+                $bits[0] = ltrim($bits[0],'-');
+            }
+            if (!array_key_exists(1, $bits)) {
+                // Set the url to null
+                $bits[1] = null;
+            } else {
+                // Make sure the url is a moodle url
+                $bits[1] = new moodle_url($bits[1]);
+            }
+            if (!array_key_exists(2, $bits)) {
+                // Set the title to null seeing as there isn't one
+                $bits[2] = $bits[0];
+            }
+            if (!array_key_exists(3, $bits)) {
+                $bits[3] = $lastsort;
+            }
+            $lastsort = $bits[3]+1;
+            if (preg_match('/^(\-*)/', $line, $match) && $lastchild != null && $lastdepth !== null) {
+                $depth = strlen($match[1]);
+                if ($depth < $lastdepth) {
+                    if ($lastdepth > 1) {
+                        $depth = $lastdepth - 1;
+                        $lastchild = $lastchild->get_parent()->get_parent()->add($bits[0], $bits[1], $bits[2], $bits[3]);
+                    } else {
+                        $depth = 0;
+                        $lastchild = new custom_menu_item($bits[0], $bits[1], $bits[2], $bits[3]);
+                        $children[] = $lastchild;
+                    }
+                } else if ($depth > $lastdepth) {
+                    $depth = $lastdepth + 1;
+                    $lastchild = $lastchild->add($bits[0], $bits[1], $bits[2], $bits[3]);
+                } else {
+                    if ($depth == 0) {
+                        $lastchild = new custom_menu_item($bits[0], $bits[1], $bits[2], $bits[3]);
+                        $children[] = $lastchild;
+                    } else {
+                        $lastchild = $lastchild->get_parent()->add($bits[0], $bits[1], $bits[2], $bits[3]);
+                    }
+                }
+            } else {
+                $depth = 0;
+                $lastchild = new custom_menu_item($bits[0], $bits[1], $bits[2], $bits[3]);
+                $children[] = $lastchild;
+            }
+            $lastdepth = $depth;
+        }
+        return $children;
+    }
+
+    /**
+     * Sorts two custom menu items
+     *
+     * This function is designed to be used with the usort method
+     *     usort($this->children, array('custom_menu','sort_custom_menu_items'));
+     *
+     * @param custom_menu_item $itema
+     * @param custom_menu_item $itemb
+     * @return int
+     */
+    public static function sort_custom_menu_items(custom_menu_item $itema, custom_menu_item $itemb) {
+        $itema = $itema->get_sort_order();
+        $itemb = $itemb->get_sort_order();
+        if ($itema == $itemb) {
+            return 0;
+        }
+        return ($itema > $itemb) ? +1 : -1;
+    }
+}
Index: moodle/lib/outputrenderers.php
--- moodle/lib/outputrenderers.php Base (1.191)
+++ moodle/lib/outputrenderers.php Locally Modified (Based On 1.191)
@@ -2180,9 +2180,111 @@
     public function resource_mp3player_colors() {
         return $this->page->theme->resource_mp3player_colors;
     }
+
+    /**
+     * Returns the custom menu if one has been set
+     *
+     * A custom menu can be configured by browing to
+     *    Settings: Administration > Appearance > Themes > Theme settings
+     * and then configuring the custommenu config setting as described.
+     * 
+     * @return string
+     */
+    public function custom_menu() {
+        $custommenu = new custom_menu();
+        return $this->render_custom_menu($custommenu);
 }
 
+    /**
+     * Renders a custom menu object (located in outputcomponents.php)
+     *
+     * The custom menu this method produces makes use of the YUI3 menunav widget
+     * and requires very specific html elements and classes.
+     *
+     * @staticvar int $menucount
+     * @param custom_menu $menu
+     * @return string
+     */
+    protected function render_custom_menu(custom_menu $menu) {
+        static $menucount = 0;
+        // If the menu has no children return an empty string
+        if (!$menu->has_children()) {
+            return '';
+        }
+        // Increment the menu count. This is used for ID's that get worked with
+        // in JavaScript as is essential
+        $menucount++;
+        // Setup the module for this so we get what we need.
+        $module = array(
+            'name' => 'custom_menu',
+            'fullpath' => '/lib/javascript-static.js',
+            'requires' => array('node-menunav')
+        );
+        // Initialise this custom menu
+        $this->page->requires->js_init_call('M.core_custom_menu.init', array('custom_menu_'.$menucount), false, $module);
+        // Build the root nodes as required by YUI
+        $content = html_writer::start_tag('div', array('id'=>'custom_menu_'.$menucount, 'class'=>'yui3-menu yui3-menu-horizontal javascript-disabled'));
+        $content .= html_writer::start_tag('div', array('class'=>'yui3-menu-content'));
+        $content .= html_writer::start_tag('ul');
+        // Render each child
+        foreach ($menu->get_children() as $item) {
+            $content .= $this->render_custom_menu_item($item);
+        }
+        // Close the open tags
+        $content .= html_writer::end_tag('ul');
+        $content .= html_writer::end_tag('div');
+        $content .= html_writer::end_tag('div');
+        // Return the custom menu
+        return $content;
+    }
 
+    /**
+     * Renders a custom menu node as part of a submenu
+     *
+     * The custom menu this method produces makes use of the YUI3 menunav widget
+     * and requires very specific html elements and classes.
+     *
+     * @see render_custom_menu()
+     *
+     * @staticvar int $submenucount
+     * @param custom_menu_item $menunode
+     * @return string
+     */
+    protected function render_custom_menu_item(custom_menu_item $menunode) {
+        // Required to ensure we get unique trackable id's
+        static $submenucount = 0;
+        if ($menunode->has_children()) {
+            // If the child has menus render it as a sub menu
+            $submenucount++;
+            $content = html_writer::start_tag('li');
+            $content .= html_writer::link('#cm_submenu_'.$submenucount, $menunode->get_text(), array('class'=>'yui3-menu-label', 'title'=>$menunode->get_title()));
+            $content .= html_writer::start_tag('div', array('id'=>'cm_submenu_'.$submenucount, 'class'=>'yui3-menu custom_menu_submenu'));
+            $content .= html_writer::start_tag('div', array('class'=>'yui3-menu-content'));
+            $content .= html_writer::start_tag('ul');
+            foreach ($menunode->get_children() as $menunode) {
+                $content .= $this->render_custom_menu_item($menunode);
+            }
+            $content .= html_writer::end_tag('ul');
+            $content .= html_writer::end_tag('div');
+            $content .= html_writer::end_tag('div');
+            $content .= html_writer::end_tag('li');
+        } else {
+            // The node doesn't have children so produce a final menuitem
+            $content = html_writer::start_tag('li', array('class'=>'yui3-menuitem'));
+            if ($menunode->get_url() !== null) {
+                $url = $menunode->get_url();
+            } else {
+                $url = '#';
+            }
+            $content .= html_writer::link($url, $menunode->get_text(), array('class'=>'yui3-menuitem-content', 'title'=>$menunode->get_title()));
+            $content .= html_writer::end_tag('li');
+        }
+        // Return the sub menu
+        return $content;
+    }
+}
+
+
 /// RENDERERS
 
 /**
Index: moodle/theme/base/config.php
--- moodle/theme/base/config.php Base (1.13)
+++ moodle/theme/base/config.php Locally Modified (Based On 1.13)
@@ -117,7 +117,7 @@
     'popup' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
     // No blocks and minimal footer - used for legacy frame layouts only!
     'frametop' => array(
@@ -129,7 +129,7 @@
     'embedded' => array(
         'file' => 'embedded.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
     // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
     // This must not have any blocks, and it is good idea if it does not have links to
@@ -137,7 +137,7 @@
     'maintenance' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>true),
+        'options' => array('noblocks'=>true, 'nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
 );
 
Index: moodle/theme/base/layout/frontpage.php
--- moodle/theme/base/layout/frontpage.php Base (1.4)
+++ moodle/theme/base/layout/frontpage.php Locally Modified (Based On 1.4)
@@ -1,8 +1,12 @@
 <?php
 
+
 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
 
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
 $bodyclasses = array();
 if ($hassidepre && !$hassidepost) {
     $bodyclasses[] = 'side-pre-only';
@@ -11,6 +15,9 @@
 } else if (!$hassidepost && !$hassidepre) {
     $bodyclasses[] = 'content-only';
 }
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -32,6 +39,9 @@
             echo $OUTPUT->lang_menu();
             echo $PAGE->headingmenu;
         ?></div>
+        <?php if ($hascustommenu) { ?>
+        <div id="custommenu"><?php echo $custommenu; ?></div>
+         <?php } ?>
     </div>
 <!-- END OF HEADER -->
 
Index: moodle/theme/base/layout/general.php
--- moodle/theme/base/layout/general.php Base (1.6)
+++ moodle/theme/base/layout/general.php Locally Modified (Based On 1.6)
@@ -6,6 +6,9 @@
 $hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
 $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
 
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
 $bodyclasses = array();
 if ($hassidepre && !$hassidepost) {
     $bodyclasses[] = 'side-pre-only';
@@ -14,6 +17,9 @@
 } else if (!$hassidepost && !$hassidepre) {
     $bodyclasses[] = 'content-only';
 }
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -24,7 +30,6 @@
 </head>
 <body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
 <?php echo $OUTPUT->standard_top_of_body_html() ?>
-
 <div id="page">
 <?php if ($hasheading || $hasnavbar) { ?>
     <div id="page-header">
@@ -37,6 +42,9 @@
             }
             echo $PAGE->headingmenu
         ?></div><?php } ?>
+        <?php if ($hascustommenu) { ?>
+        <div id="custommenu"><?php echo $custommenu; ?></div>
+        <?php } ?>
         <?php if ($hasnavbar) { ?>
             <div class="navbar clearfix">
                 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
Index: moodle/theme/base/style/core.css
--- moodle/theme/base/style/core.css Base (1.26)
+++ moodle/theme/base/style/core.css Locally Modified (Based On 1.26)
@@ -521,18 +521,16 @@
 .path-backup .mform .grouped_settings.section_level .normal_setting {width:50%;margin:0;margin-left:50%;}
 .path-backup .notification.dependencies_enforced {text-align:center;color:#A00;font-weight:bold;}
 .path-backup .backup_progress {text-align:center;}
-.path-backup .backup_progress .backup_stage {color:#999;}
+.path-backup .backup_progress span.backup_stage {color:#999;}
 .path-backup .backup_progress .backup_stage.backup_stage_current {font-weight:bold;color:inherit;}
 .path-backup .backup_progress .backup_stage.backup_stage_next {}
-.path-backup .backup_progress .backup_stage.backup_stage_complete {color:inherit;}
+.path-backup .backup_progress span.backup_stage.backup_stage_complete {color:inherit;}
 
-
 /**
  * Web Service
  */
 #webservice-doc-generator td {text-align: left;border: 0px solid black;}
 
-
 /**
  * Help Content (pop-up)
  */
@@ -541,3 +539,20 @@
 #helppopupbox .yui3-widget-bd {margin:0 1em 1em 1em;border-top:1px solid #FFE691;}
 #helppopupbox .helpheading {font-size: 1em;}
 #helppopupbox .spinner {margin:1em;} 
+
+/**
+ * Custom menu
+ */
+#custommenu {clear:both;}
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content .ul {border:1px solid #000;}
+#custommenu .yui3-menu-horizontal.javascript-disabled ul {margin:0;padding:0;}
+#custommenu .yui3-menu-horizontal.javascript-disabled li {margin:0;padding:0;list-style:none;width:auto;position:relative;}
+#custommenu .yui3-menu-horizontal.javascript-disabled>.yui3-menu-content>ul>li {float:left;}
+#custommenu .yui3-menu-horizontal.javascript-disabled li a {padding:0 10px;}
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu {position:absolute;top:-10000px;left:-10000px;visibility:hidden;white-space: nowrap;max-width: 250px;background-color:#FFF;}
+#custommenu .yui3-menu-horizontal.javascript-disabled li:hover>.yui3-menu {top:100%;left:0;visibility: visible;z-index:10;}
+#custommenu .yui3-menu-horizontal.javascript-disabled li:hover .yui3-menu .yui3-menu {top:0;left:100%;min-width:200px;}
+#custommenu .yui3-menu-horizontal.javascript-disabled>.yui3-menu-content>ul:after {content:"";display:block;clear:both;line-height:0;font-size:0;visibility:hidden;}
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content {font-size:93%;line-height:2;padding:0;}
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content .yui3-menu-content {font-size:100%;}
Index: moodle/theme/standard/style/core.css
--- moodle/theme/standard/style/core.css Base (1.5)
+++ moodle/theme/standard/style/core.css Locally Modified (Based On 1.5)
@@ -289,6 +289,7 @@
  */
 #page-header .headermain {font-size:1.5em;}
 .pagelayout-frontpage #page-header {border-bottom:2px groove #999;margin:0 0.5%;width:99%;}
+.has_custom_menu.pagelayout-frontpage #page-header {border-bottom-width:0;}
 
 .navbar {margin:5px 10px;border:1px solid #DDD;}
 .navbar .breadcrumb {margin:5px;}
@@ -389,3 +390,23 @@
  #page-blocks-community-communitycourse .prioritisetr {background-color: #ffd4ff;}
  #page-blocks-community-communitycourse .additionaldesc {font-size: 80%; color: purple;}
  #page-blocks-community-communitycourse .additionaladmindesc {font-size: 80%; color: #6666ff;}
+
+/**
+ * Custom menu
+ */
+.pagelayout-frontpage #custommenu {padding:0 2px;}
+#custommenu {padding:0 10px;}
+#custommenu .yui3-menu {background-image:url([[pix:theme|hgradient]]);background-repeat: repeat-x;background-color:#e1e1df;}
+#custommenu .yui3-menu .yui3-menu {background-image:none;background-color:#FFF;}
+#custommenu .yui3-menu .yui3-menu-label,
+#custommenu .yui3-menu .yui3-menuitem-content,
+#custommenu .yui3-menu .yui3-menu-content,
+#custommenu .yui3-menu .yui3-menu .yui3-menu-content,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul {border-color:#CCC;}
+#custommenu .yui3-menu .yui3-menuitem-content,
+#custommenu .yui3-menu .yui3-menu .yui3-menuitem-content {cursor:pointer;}
+#custommenu .yui3-menu .yui3-menu-label-menuvisible,
+#custommenu .yui3-menu .yui3-menuitem-active {background-color:#e1e1df;}
+#custommenu .yui3-menu-horizontal.javascript-disabled a {color:inherit;}
+#custommenu .yui3-menu-horizontal.javascript-disabled a:hover {color:blue;text-decoration:none;}
