/* This file is commented in great detail for educational purposes. There is also
 * an uncommented version for use production use here:
 * http://users.tpg.com.au/j_birch/plugins/superfish/superfish.css
 */

/**************** ESSENTIAL STYLES ***************/
/* This first group of styles are most important for the function of Superfish.
 * The more cosmetic styling rules are grouped together below under the heading
 * ORIGINAL SKIN.
 *
 * Note that this CSS file will create the kind of menu demonstrated on the main
 * page of the Superfish documentation, ie. top tier of menu is horizontal, with
 * subsequent tiers vertical.
 */
 
/* remove any default styles */
.menu, .menu * {
	margin:0;
	padding:0;
	list-style:none;
	font-family: Trebuchet MS, Verdana, sans-serif;
	font-size: 12px;
	color: #FFF;
}

/* top ul.menu element */
.menu {
	line-height:1.0; /* makes calculating the 'top' value for first submenu easier */
}

/* nested submenu ul elements */
.menu ul {
	position:absolute; /* remove from flow and allow positioning */
	top:-999em; /* hide submenu in screen-reader and search-engine friendly way */
	width:140px; /* VARIABLE. Must have a width for menu items to inherit. Use ems so font scaling does not break design*/
}
/* submenu items */
.menu ul li,
.menu a { /* this affects top level anchors too */
	font-size: 12px;
	text-decoration: none;
	color: #FFF;
	}



/* all li elements */
.menu li {
	float:left; /* must float all li elements. Vertical submenu items are restrained by parent ul width (see .menu ul rules above) */
	position:relative; /* make child submenu ul position relative to parent li */
	z-index:1; /* ensure submenus appear above other page items. Increase if needed, but do not exceed thickbox overlay z-index! */
}

/* all anchor elements */
.menu a {
	color: #FFF;
	display:block; /* make IE6 obey width when text-indent is used */
}

/**** Position of second tier of menu ****/
.menu li:hover ul, /* this pure CSS hover is overridden by the .superfish rules below which are applied only when JavaScript is available. This way, the menu degrades to regular CSS dropdown when JavaScript is umenuailable */
ul.menu li.sfHover ul /* this is the familiar IE6 hover support. With Superfish, all browsers use this rule when JS is available. This is because the JS needs to be able to control hide and reveal delays and animations without the pure CSS rule intruding. Note the tag selector ul.menu instead of just .menu - this gives it the most specificity of all and makes it trump all other positioning rules, including the .superfish overrides below */
{
	left:-1px; /* position first submenu directly under parent li */
	top: 26px; /* VARIABLE. This is calculated by adding 1em text height to top and bottom anchor element padding (original skin: .75em top + .75em bottom + 1em text height = 2.5em) */
}

/**** Position of third tier of menu ****/
 /* Note that this rule must appear here in the code order in order for it to override previous positioning rules so that this and subsequent nested submenus still remain hidden when the parent submenu is shown. Do not group these selectors with other top:-999em rules */
.menu li:hover li ul,
.menu li.sfHover li ul {
	top:-999em; /* hide submenu in screen-reader and search-engine friendly way */
}
/* DO NOT attempt to group these selectors with similar earlier rules. The code order is important so the rules override previous ones correctly */
.menu li li:hover ul, /* this pure CSS hover is overridden by the .superfish rules below which are applied only when JavaScript is available. This way, the menu degrades to regular CSS dropdown when JavaScript is umenuailable */
ul.menu li li.sfHover ul /* this is the familiar IE6 hover support. With Superfish, all browsers use this rule when JS is available. This is because the JS needs to be able to control hide and reveal delays and animations without the pure CSS rule intruding. Note the tag selector ul.menu instead of just .menu - this gives it the most specificity of all and makes it trump all other positioning rules, including the .superfish overrides below */
 {
	left: 140px; /* VARIABLE. Offset subsequent submenus to the right by the amount you set for the submenu widths (see .menu ul rules above) */
	top:-1px; /* position subsequent submenus horizontally aligned to parent li */
}

/**** Position of fourth tier of menu (not used on main demo page. You could delete this block for a three tiered menu) ****/
 /* Note that this rule must appear here in the code order in order for it to override previous positioning rules so that this and subsequent nested submenus still remain hidden when the parent submenu is shown. Do not group these selectors with other top:-999em rules */
.menu li li:hover li ul,
.menu li li.sfHover li ul {
	top:-999em; /* hide submenu in screen-reader and search-engine friendly way */
}
/* DO NOT attempt to group these selectors with similar earlier rules. The code order is important so the rules override previous ones correctly */
.menu li li li:hover ul, /* this pure CSS hover is overridden by the .superfish rules below which are applied only when JavaScript is available. This way, the menu degrades to regular CSS dropdown when JavaScript is umenuailable */
ul.menu li li li.sfHover ul /* this is the familiar IE6 hover support. With Superfish, all browsers use this rule when JS is available. This is because the JS needs to be able to control hide and reveal delays and animations without the pure CSS rule intruding. Note the tag selector ul.menu instead of just .menu - this gives it the most specificity of all and makes it trump all other positioning rules, including the .superfish overrides below */
 {
	left: 140px; /* VARIABLE. Offset subsequent submenus to the right by the amount you set for the submenu widths (see .menu ul rules above) */
	top:-1px; /* position subsequent submenus horizontally aligned to parent li */
}

/**** Position of further tiers of menu ****/
/* To add further tiers, you need copy the previous block of code (everything back until the "Position of fourth tier of menu" comment) and paste it in here. Then add an extra li just after .menu in each of the pasted selectors. So the new block will differ from the copied block in the same way that the block for the fourth tier differs from the block for the third tier.*/


/**** Very important ****/
/* this negates the pure CSS hovers so submenu remains hidden and JS controls when and how it appears. This is in turn is overridden by the .sfHover rules above as they have greater specificity */
/* notice there are three selectors here. You need three for a four tier menu system. If you had a five tier system you would copy the last selector of these three and paste it below to create a fourth selector and add another li just after the .superfish part. On the other hand if you only had a three tiered menu you could delete the third line here and save some file size.*/
.superfish li:hover ul,
.superfish li li:hover ul,
.superfish li li li:hover ul {
	top: -999em; /* hide submenu in screen-reader and search-engine friendly way */
}

/* A quick note about issues with submenus appearing under Flash animations. Some say that setting wmode="opaque" or  wmode="transparent" on the embed or object tag is sufficient. This does fix many issues but I find it sometimes helps to also add this CSS: */
embed, object {
	position: relative;
	z-index: 0;
	}

/******************** ORIGINAL SKIN ******************/
/*
 * The CSS below is my attempt to extract most of the stuff you need to change in order
 * to reskin the menu with the appearance you require. However, certain rules above
 * (indicated with the word "VARIABLE") may also need to be altered to suit the width
 * and height of your menu items and submenus. For example, if you need wider submenus
 * eg: .menu ul { width:12em} then you will need to also apply that value
 * to the left offset of any deeper nested submenus, eg:
 * .menu li li:hover ul,
 * ul.menu li li.sfHover ul {
	 left:12em; top:-1px;
   }
 *
 * Other than that, most of the cosmetic stuff is below:
 */

.menu {
	/* if you want to change font-size, do it here as opposed to setting it on deeper nested anchor elements for example,  so that the em unit is the same size for all elements in the menu */
	float: right; /* necessary if you don't want this element to collapse */
	margin-left: 0; /* add space beneath menu. Purely cosmetic */
	font-size: 12px;
	}
.menu li {
	background: #410057 url('../images/purplegrad.png') repeat-x; /* default background colour */
	border-left: 1px solid #FFF; 
	border-right: 1px solid #FFF;
	width: 140px; /* affects top level menu items only, as nested li elements have width 100% of their ul parent (see .menu ul rules above)*/
}
.menu li ul {
	border-bottom: 1px solid #FFF; }
.menu a {
	color: #FFF;
	padding: 10px 0px; /* note that the top and bottom padding will affect the 'top' value (marked with the word "VARIABLE") of the second tier of menu (see "essential rules" above and alter accordingly) */
	text-decoration:none;
	text-align: center; 
	font-weight: bold; 
}
/* if link text runs over two or more lines, you will want padding in the anchor element instead of relying on text-indent to provide space. The following disabled rule shows how to style the submenu links in this case. Note that the width plus left and right padding must equal the width set above for the submenu (.menu ul) */
/*
.menu ul a {
	width: 7.45em;
	padding: .75em 1em;
	text-indent: 0;
	}
*/
.menu li:hover, .menu li.sfHover, .menu li a:hover {
	background: #410057; 
	text-decoration: none;
	color: #FFCC00; }
.menu li li a:focus, .menu li li a:hover, .menu li li a:active {
	background:#410057; /* hover highlight */
	text-decoration: none; 
	color: #FFCC00;
}
.menu li li {
	z-index: 999;
	background:#410057 url(../images/purplegrad.png) repeat-x; /* slightly darker shade for nested submenus */
}
.menu li li a {
	font-size: 12px;
	padding: 8px 0px; 
	text-indent: 15px; 
	text-align: left; 
	font-weight: normal; 
	text-decoration: none;
	color: #FFF; 
}
.menu li li li {
	font-size: 12px;
	background:#DDD; /* slightly darker shade for nested submenus */
}

.menu li li span {
	font-family: Tahoma, Arial;
	position: absolute;
	top: 5px;
	right: 5px;
	display: block;
	}