﻿/*
Taken from: http://matthewjamestaylor.com/blog/centered-dropdown-menus
*/
/* Main menu settings */
#centeredmenu {
   clear:both;
   float:left;
   margin:0px 0px 8px 0px;
   padding:0;
   width:100%;
   font-family: Arial, Helvetica, sans-serif; /* Menu font */
   font-size:12px; /* Menu text size */
   font-weight:bold;
   z-index:998; /* This makes the dropdown menus appear above the page content below */
   position:relative;
}

#centeredmenu li {margin: 0px 5px 0px 5px !important; }

/* Top menu items */
#centeredmenu ul {
   margin:0;
   padding:0;
   list-style:none;
   float:right;
   position:relative;
   right:50%;

}
#centeredmenu ul li {
   margin:0 0 0 1px;
   padding:0;
   float:left;
   position:relative;
   left:50%;
   top:1px;
   
}
#centeredmenu ul li a {
   display:block;
   margin:0;
   padding:.35em 1.25em .35em 1.25em;
   font-size:1em;
   line-height:1em;
   background:#ddd;
   background-image:url(../images/mainNav_bg.jpg);
   text-decoration:none;
   color:White; 
   font-weight:bold;
}
#centeredmenu ul li.active a {
   color:#999999;
   text-decoration:underline;
   background:#000;
   background-image:url(../images/mainNav_bg.jpg);
}
#centeredmenu ul li a:hover {
   background:#36f; /* Top menu items background colour */
   color:#999999;
   text-decoration:underline;
}
#centeredmenu ul li:hover a,
#centeredmenu ul li.hover a { /* This line is required for IE 6 and below */
   background:#36f; /* Top menu items background colour */
   background-image:url(../images/mainNav_bg.jpg);
   color:#999999;
}

/* Submenu items */
#centeredmenu ul ul {
   display:none; /* Sub menus are hiden by default */
   position:absolute;
   left:-6px;
   right:auto; /*resets the right:50% on the parent ul */
   min-width: 100%;
}
#centeredmenu ul ul li {
   left:auto;  /*resets the left:50% on the parent li */
   margin:0; /* Reset the 1px margin from the top menu */
   clear:left;
   min-width: 100%;
}
#centeredmenu ul li ul li
{
    border:1px solid #fff; /* sub menu item horizontal lines */
    min-width: 100%;
    background: #bbb;
}

#centeredmenu ul ul li a,
#centeredmenu ul li.active li a,
#centeredmenu ul li:hover ul li a,
#centeredmenu ul li.hover ul li a { /* This line is required for IE 6 and below */
   font-weight:bold; /* resets the bold set for the top level menu items */
   background: #bbb; /* resets the img background from the top level menu items */
   text-decoration:none; /* resets the text-decoration from the top level menu items */
   padding:5px 0px 5px 0px; /* resets the padding from the top level menu items */
   text-indent: 15px;
   color:#fff;
}
#centeredmenu ul ul li a:hover,
#centeredmenu ul li.active ul li a:hover,
#centeredmenu ul li:hover ul li a:hover,
#centeredmenu ul li.hover ul li a:hover { /* This line is required for IE 6 and below */
   color:#333;
   background: #bbb;
   width: 100%;
   text-decoration: underline;
   padding:5px 0px 5px 0px;
   text-indent: 15px;
}

/* Flip the last submenu so it stays within the page */
#centeredmenu ul ul.last {
   left:auto; /* reset left:0; value */
   right:0; /* Set right value instead */
}

/* Make the sub menus appear on hover */
#centeredmenu ul li:hover ul,
#centeredmenu ul li.hover ul { /* This line is required for IE 6 and below */
   display:block; /* Show the sub menus */
}
