/* CSS Document */

/* HORIZONTAL DROP DOWN MENU */

#menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    float: left; /* this makes the first UL horizontal */
    font-size: 10px;
    border-left:2px solid #838383;
    right: -1px;
    left: -1px;
}

#menu ul:first-of-type {
    border-left:0px solid #838383;
}

/*  COLOURING ETC */

#menu a {
    text-decoration: none;
    display: block;
}

#menu h2, #menu h3 {
    padding: 0;
    margin: 0;
    font-size: 10pt;
}

#menu h2 a, #menu h3 a {
    padding: 7px 13px 2px;
    cursor: pointer;
}

#menu h3 a {
    padding-top: 5px;
    padding-bottom: 5px;
}
#menu h2 a {
    color: #000;
    font-weight: normal;
    height: 19px;
    background-color: #D3D3D3;
    text-align: center;
    border-bottom: 1px solid #838383;        
}

#menu h2 a:hover {
    color: #000;
    font-weight: normal;
    background-color: #FFF;
}

#menu h2 a.down {
    background-color: #003399;
}

#menu h2 a.down:hover {
    color: #000;
}

#menu ul:nth-last-child(2) h2 a {
    border-right: none;
}

#menu h3 a {
    font-weight: normal;
    background-color: #D3D3D3;
    color: #000;
    text-align: center;
    border-top: 0px solid #838383;        
    border-left: 1px solid #838383;        
    border-right: 1px solid #838383;        
    border-bottom: 1px solid #838383;        
}

#menu h3 a:hover {
    text-decoration: none;
    color: #000;
    font-weight: normal;
    background-color: #FFF;
}


#menu ul ul ul li h3 a {
    background-color: #FAF2BD;
}


/*   -------- positioning the SUBMENUS --------------

The position: relative; on the <li> elements establish containing blocks for the descendant <ul> elements.

All secondary levels and deeper are given position: absolute; and a high z-index in order to make them appear, drop down above following content. the third level and deeper lists are the ones we want to move so "offset" positioning co-ordinates only required to be input onto them.
*/

#menu li {
    position: relative;
    z-index: 700;
}

#menu ul ul {
    position: absolute;
    z-index: 500;
}

#menu ul ul ul {
    top: 0;
    left: 100%;
}

/*   -------- HIDING AND REVEALING --------------*/

div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul {
    display: none;
}

div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {
    display: block;
}
