/* * * * Functionality Menu Code  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#nav {
	height: 32px; /* height & line-height is setting the height of all the links */
	line-height: 32px; /* height & line-height should match */
	position: relative;
	z-index: 2;
	padding-top: 3px;
}

#nav * {
	margin: 0;
	padding: 0;
	list-style-type: none;
}

#nav li {
	float: left; /* makes the list items sit side by side. note: if you try to get the list items to stack by unfloating the li elements, IE6+ leaves gaps */
	position: relative; /* positioning content for the nested ul (drop down) */
}

#nav a {
	display: block; /* no divider needed to the left of first list items */
	padding: 0 13px 0 34px; /* pads the link away from the list item - do no set vertical paddings */
}	



/* start of drop style */

#nav ul li ul li ul  {
	top:-1px; /* set to negative value of border-top for perfect pop-out alignment -set to 0 if border is 0 - don't remove! */
} 

#nav li ul {
	display: none; /* hides the drop-down (revealed when hovered. see below) */
	position: absolute; /* positions the drop-down relative to the parent li position context */
	left: 0px; /* precisely positions the drop-down */

}		

#nav li:hover ul,
#nav li.hover ul {	
	display: block; /* displays the menu when hovered */
}

#nav li ul li {	
	width: 100%; /* makes each li the width of the ul and therefore stack */
}


/* * * * drop-downs start here * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#nav ul li ul { 
	border:0; /* stops inheritance from level 1 ul */
	margin-left:0px; /* stops inheritance from level 1 ul */
	position:absolute; /* positions the drop-down ul in relation to its relatively positioned li parent */
	width: 20em; /* sets the width of menu levels 2 - 4 */
}

#nav ul li ul li {
	width:100%;
	padding: 0; /* stops inheritance */
	border-left:0; /* stops inheritance */
	border-right:0; /* stops inheritance */
	line-height: 1.3em;
}
	
#nav ul li ul {
	display:none; /* conceals the drop-down when menu not hovered */
} 
	
#nav ul li:hover ul,
#nav ul li.hover ul {
	display:block; /* shows the drop-down when the menu is hovered */
	/* z-index:1000; /* Safari needs this to display menu on top of other page elements */
} 

#nav .vertical li ul li:first-child {
	border-top: none; /* removes top border from first drop-down li */
}	

/* pop-outs starts here (n-level) */
body #nav ul li ul li ul  {
	left:100%;
	position:absolute; /* associated menu with parent li positioning context */
	visibility:hidden; /* ensures that level 3 menu is not reveal when level 2 is reveled */
	top:-1px; /* aligns level 3 and 4 pop-out with previous level */
}
	
#nav ul li ul li:hover ul,
#nav ul li ul li.hover ul {
	visibility:visible;
} /* shows level 3 menu when associated level 2 li is hovered */

/* second and third level popouts here*/
#nav ul li ul li:hover ul li ul,
#nav ul li ul li.hover ul li ul {
	visibility:hidden; /* ensures that level 4 is not reveal when level 3 is reveled */
}
 
#nav ul li ul li ul li:hover ul,
#nav ul li ul li ul li.hover ul {
	visibility:visible; /* shows level 4 menu when associated level 3 li is hovered */
}  


/* * * * Customizable Menu Code  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#nav li {
	border-right: 0px solid #000; /* adds border to the right of each horiz level 1 menu item *//* set to 0px to remove */
}

#nav ul.group {
	padding-left:20px;
}


/* * * * Individual Nav Items' Background * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* home */
#nav #nav-home a
{
	background: url('../design/nav-home.jpg') top left no-repeat; 
}
.home #nav #nav-home a, #nav #nav-home a:hover
{
	background: url('../design/nav-home-on.jpg') top left no-repeat; 
}
/* about */
#nav #nav-about a
{
	background: url('../design/nav-about.jpg') top left no-repeat; 
}
.about #nav #nav-about a, #nav #nav-about a:hover
{
	background: url('../design/nav-about-on.jpg') top left no-repeat; 
}
/* residential */
#nav #nav-residential a
{
	background: url('../design/nav-residential.jpg') top left no-repeat; 
}
.residential #nav #nav-residential a, #nav #nav-residential a:hover
{
	background: url('../design/nav-residential-on.jpg') top left no-repeat; 
}
/* commercial */
#nav #nav-commercial a
{
	background: url('../design/nav-commercial.jpg') top left no-repeat; 
	padding-left: 31px;
}
.commercial #nav #nav-commercial a, #nav #nav-commercial a:hover
{
	background: url('../design/nav-commercial-on.jpg') top left no-repeat; 
}
#nav #nav-commercial ul li a {
	padding-left: 12px;	
}
/* performance */
#nav #nav-performance a
{
	background: url('../design/nav-performance.jpg') top left no-repeat; 
}
.performance #nav #nav-performance a, #nav #nav-performance a:hover
{
	background: url('../design/nav-performance-on.jpg') top left no-repeat; 
}
/* resources */
#nav #nav-resources a
{
	background: url('../design/nav-resources.jpg') top left no-repeat; 
	padding-left: 31px;
}
.resources #nav #nav-resources a, #nav #nav-resources a:hover
{
	background: url('../design/nav-resources-on.jpg') top left no-repeat; 
}
#nav #nav-resources ul li a {
	padding-left: 12px;	
}
/* contact */
#nav #nav-contact a
{
	background: url('../design/nav-contact.jpg') top left no-repeat;
	padding-left: 23px;
}
.contact #nav #nav-contact a, #nav #nav-contact a:hover
{
	background: url('../design/nav-contact-on.jpg') top left no-repeat; 
}
#nav #nav-contact ul li a {
	padding-left: 12px;	
}

/* * * * End Individual Nav Items' Background * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


#nav ul.group ul a {
	background: #fff;
}

#nav ul.group ul a:hover {
	background: #fff;
}	

#nav a {
	color:#dbdbdb;	/* sets the color of all menu types */
	text-decoration: none;
	font-size: 1.1em;
	font-weight: bold;
}

#nav a:hover {
	color: #fff;
}

/* start of drop style */

#nav ul.group ul {
	border: 2px solid #5e7291;
	background: #5a91c7;
}

#nav ul.group ul li {
	overflow: hidden;
}

#nav ul.group ul li:hover{
	background: #fff;
}

#nav ul.group #nav-about ul a, #nav ul.group #nav-residential ul a, #nav ul.group #nav-commercial ul a, #nav ul.group #nav-resources ul a, #nav ul.group #nav-contact ul a{
	background-image: none;
	background: #5a91c7;
}

#nav ul.group #nav-about ul a:hover, #nav ul.group #nav-residential ul a:hover, #nav ul.group #nav-commercial ul a:hover, #nav ul.group #nav-resources ul a:hover, #nav ul.group #nav-contact ul a:hover{
	background-image: none;
	background: #fff;
}

#nav ul.group ul a {
	padding: 7px 0 7px 12px;
	width: 100%;
	height: 100%;
	display: block;
	border-bottom: 2px solid #5e7291; /* no divider needed to the left of first list item */
}

#nav ul.group ul a:hover{
	color: #000;
}

#nav ul.group ul li {

}	

#nav ul.group ul li.last a  {
	border-bottom: none; /* no divider needed to the right of first last item */
}
