/* Tutorial from Web Desigener Mag Issue 210 page 52 - Adapted by Michael McCarthy */


#nav ul{
  margin: 0;
  padding: 3px;
  list-style: none;
  color: #333;
  background:#cc3300;
  overflow: hidden; 
  text-align: center;
}

#nav li {
  display: inline-block;
}

#nav a {
  display: block;
  color:#f5f57b;
  text-decoration: none;
  padding: 10px;
  font-weight: bold;
}

#nav a:hover { background: rgba(255,255,255, .1); color: #fff }
#nav .active a { color: #fff; background: rgba(0,0,0, .3) }
#nav li:first-child a { border-top: 0 }
#nav li:last-child a { border-bottom: 0 }
#toggle { display: none }

@media screen and (max-width: 40em) {
  .js #nav {
    clip: rect(0 0 0 0);
    max-height: 0;
    position: absolute;
    overflow: hidden;
	display: block;
  }
  #nav li{
    top: 0;
    width: 100%;
    position: relative;
	display: inline-block;
	*width: 24.9%; /*IE7 Hack */
	_width:19% /*IE7 Hack */
  }
  #nav.opened { max-height: 9999px }
  #nav a:hover { background: rgba(255,255,255, .1); color: #fff }
  #nav .active a:hover { color: #fff; background: rgba(0,0,0, .3) }
  #toggle {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: block;
    width: 70px;
    height: 55px;
    float: right;
	/* Position of Toggle Below - Position is on right of screen*/
    margin: 0 0 1em 0;
    text-indent: -9999px;
    overflow: hidden;
	/* Toggle image */
    background: #f5f57b url("images/hamburger.gif") no-repeat 50% 33%;
  }
  .main {
    -webkit-overflow-scrolling: auto;
    box-shadow: none;
    padding: 0 2em 2em;
    border-radius: 0;
    position: relative;
    width: 100%;
    overflow: hidden;
  }
  .main::-webkit-scrollbar { background-color: transparent }
}

@media screen and (min-width: 768em) {
  #nav li { width: 100% }
  
}
