<?php
require_once("includes/quickmysql.php");

$possibleValues = array("shoes","gems","dbIntimo","exclusives","store","bio","press");

// checks if the get variable page is defined
// if it is, store it in $page, otherwise set $page = home
if (isset($_GET["page"])){
  $page = $_GET["page"];
}else{
  // home page
  $page = "home";
}

// loops through the possibleValues array
// and if $page is equal to any one of the values 
// it sets the varaible okToRequire = true;
$okToRequire = false;
for ($i = 0; $i < count($possibleValues); $i++){
  if ($page == $possibleValues[$i]){
    $okToRequire = true;
  }
}

if ($okToRequire == false){
  $page = "home";
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head><title></title>
  
  <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>

  <script type="text/javascript">
  
  $(function(){
   
   $("#head").click(function(){
    window.location.href = "./";
   
  });
  


  
  
  var btn = $(".btn");
  btn.mouseover(function(){
  $(this).css("color", "CCC").css("opacity", "1");
   
  });
  
  btn.mouseout(function(){
  $(this).css("color", "#999").css("opacity", "0.5");
  
  });
  
  btn.click(function(){
    var page = $(this).text().toLowerCase();
    window.location.href = page;
    
  });
  

});
  

  
  </script>
  <style type="text/css">
 
   html, body {
    padding: 0px;
    margin: 0px;
    border: 0px;
    font-family : helvetica;
    font-size : 12px;
    height: 100%;
    /*background : black;*/
  }
  #head{
  float : relative;
  padding-top : 5px;
  margin-top : 90px;
  background-color: #000000;
  width : 100%;
  height : 150px;
  color: #CCC;
  cursor : pointer;
  

  }
  #centerHeader{
    width : 600px; 
    padding-left: 20px;
    margin-left :140px;
    margin-right : auto;
  }
    
  #cover{
  width : 250px;
  margin-top : 0px;
  padding-left: 60px;
  }
  #nav{
    padding-top : 15px;
    width : 100%;
    height : 25px;
   
    background-color: black;
    border : 0px solid gray;
  }
  #centerNav{
    width : 900px;
    margin-left : auto;
    margin-right : auto;
    margin-top : 0px;
    
  }
  .btn{
  padding : 5px;
  width : 100px;
  margin-right : 0px;
  background-color : black;
  font-size : 13px, 1.5em;
  color : #CCC;
  float : left;
  cursor : pointer;
  font-weight: normal;
  font-family: Arial, Helvetica, Sans-Serif;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  
  }
  #content{
  margin-left: auto;
  margin-right:auto;
  width: 890px;
  padding: 10px;
  height: 100%;
  /*border-left : 1px solid gray;
  border-right : 1px solid gray;*/
  font-family : verdana;
  font-size : 10px;
  letter-spacing: inherit;
  }
  .zdiv{
    border: 1px solid red;
  }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /></head>
  
  <body>
  
 
   <div id="head">
       <!--<div id="centerHeader"><img src="images/cover.png" /><img src="images/logoN.png" /> -->
       <div id="centerHeader"><img src="images/DB_Logo.png" />
      
        </div>
        <!--<div id="cover">
    <img src="images/cover.png" />
     </div>-->
    
</div>
  
  <div id="nav">
    <div id="centerNav">
    <div class="btn">Shoes</div>
    <div class="btn">gems</div>
    <div class="btn">dbIntimo</div>
        <div class="btn">exclusives</div>
        <div class="btn">store</div>
        <div class="btn">bio</div>
        <div class="btn">press</div>
        
    </div>
</div>
  
  <div id="content">
    <?php  require_once($page . ".php"); ?>
        
  </div>
  </body>
</html>
