<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/common/constants.php'); ?>
    <script>
      $( 'ul.nav li:has(ul)' ).doubleTapToGo();
      
      $(window).resize(function(){
        var windowWidth = $(window).width();
        //$("#windowWidth").text(windowWidth);
        if(windowWidth < 765){
          $(".rightSide").css("height", "");
        }else{
          var leftHeight = $(".leftSide").height();
          var rightHeight = $(".rightSide").height();
          //console.log("windowWidth: " + windowWidth + "\nleftHeight: " + leftHeight + "\nrightHeight: " + rightHeight);
          if(leftHeight > rightHeight){
            $(".rightSide").css("height", leftHeight);
          }
        }
      });
        
      function setColWidth(){
        var windowWidth = $(window).width();
        //$("#windowWidth").text(windowWidth);
        
        if(windowWidth < 765){
          $(".rightSide").css("height", "");
        }else{
          var leftHeight = $(".leftSide").height();
          var rightHeight = $(".rightSide").height();
          //console.log("leftHeight: " + leftHeight + "\nrightHeight: " + rightHeight);
          if(leftHeight > rightHeight){
            $(".rightSide").height(leftHeight + 75);
          }
        }
      }

      $("#optOutEmail_2").closest('.checkbox').remove();
      $("#optOutEmail_7").closest('.checkbox').remove();
      $("#optOutEmail_6").closest('.checkbox').remove();
      $("#optOutEmail_8").closest('.checkbox').remove();
    </script>
    
      <!--! KICKSTRAP FOOTER -->
       <div class="hidden"><h1>No Stylesheet Loaded</h1><p><strong>Could not load Kickstrap.</strong>There are <a href="http://getkickstrap.com/docs/1.2/troubleshooting/#lessjs-errors">several common reasons for this error.</a></p></div>
      <div id="push"></div>
  </div> <!-- body padding -->
  </div> <!-- sf-wrapper -->
    <footer class="container" id="footer">
      <p><small>Copyright <?php echo date("Y"); ?>. Design and Maintenance by Associated Food Stores. &nbsp;| &nbsp;<a href="/admin">Administration</a> &nbsp;| &nbsp;<a href="/contactUs">Contact Us</a> &nbsp;| &nbsp;<a href="/recalls">Recalls</a>&nbsp;| &nbsp;<a href="/terms">Promotion Terms &amp; Conditions</a></small></p>
    </footer>
</div>


<!-- Modal -->
<div id="loginModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
    <h3 id="myModalLabel">Login</h3>
  </div>
  <div class="modal-body">
    <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/loginForm.php'); ?>
  </div>
  <div class="modal-footer">
    <div style="max-width: 70%; float: left;">
      <a href="/register" class="pull-left">Register | </a>
      <a href="#forgotPassword" class="pull-left" data-toggle="modal" role="button">&nbsp;Forgot password?</a>
    </div>

    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
  </div>
</div>

<?php
  require_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/class.brdata.inc.php");
  $brdataObj = new brdata();
  $securityQuestions = $brdataObj->getSecurityQuestions();
?>

<!-- Modal -->
<div id="forgotPassword" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
  <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
  <h3 id="myModalLabel">Forgot Password?</h3>
  </div>
  <div class="modal-body">
  <p>Fill out the form below with the information you provided when you created your account.</p>
  <form method="POST" action="/admin/lookUp.php" name="passwordResetRequestForm" id="passwordResetRequestForm" class="cf" accept-charset="UTF-8">
    <input type="hidden" value="changePasswordRequest" name="action">
    <!-- Text input-->
    <div class="control-group">
      <label class="control-label" for="pwResetEmail">
      Email Address* <span class="hideObject text-error" id="pwResetEmailErrorMsg"> - Provide an email</span>
      </label>
      <div class="controls">
      <input id="pwResetEmail" name="pwResetEmail" type="text" placeholder="example@example.com" class="input-xlarge required"">
      
      </div>
    </div>
    <!-- Select Basic -->
    <div class="control-group">
      <label class="control-label" for="pwResetSecurityquestion">Security Question</label>
      <div class="controls">
      <select id="pwResetSecurityquestion" name="pwResetSecurityquestion" class="input-xlarge">
        <?php echo $securityQuestions; ?>
      </select>
      </div>
    </div>
    
    <!-- Text input-->
    <div class="control-group">
      <label class="control-label" for="pwResetSecurityanswer">
      Security Answer* <span class="hideObject text-error" id="pwResetSecurityanswerErrorMsg"> - Provide a security answer</span>
      </label>
      <div class="controls">
      <input id="pwResetSecurityanswer" name="pwResetSecurityanswer" type="text" placeholder="" class="input-xlarge required">
      
      </div>
    </div>
    
    <!-- Text input-->
    <div class="control-group">
      <label class="control-label" for="newPW">New Password*</label>
      <div class="controls">
      <input id="newPW" name="newPW" type="password" placeholder="New Password" class="input-xlarge required"">
      
      </div>
    </div>
    
    <button class="btn" type="submit">Request Password Reset</button>
  </form>
  </div>
  <div class="modal-footer">
  <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
  </div>
</div>
<?php
  if(isset($loggedIn) && $loggedIn === true){
?>
  <div id="loggedInContainerMobile" class="visible-phone">
  Hello, <?php echo $_SESSION['Username']; ?>
  <?php
    if(isset($_SESSION['MyStoreAFS']['store_name']) && isset($purposefullyFalse)){
  ?>
    <br>
    My Store:<?php echo $_SESSION['MyStoreAFS']['store_name']; ?>
  <?php
    }
  ?>
  <br>
  <a href="/account">My Account</a><br>
  <a href="/admin/logout.php">Log Out</a>
  </div>
<?php
  }else{
?>
  <div id="loggedOutContainerMobile" class="visible-phone">
  <a href="#loginModal" data-toggle="modal" role="button" class="btn btn-primary" style="float:left;width:42.5%;">Log In</a>
  <a href="/register" class="btn btn-default" style="float:right;width:42.5%; color: #DA262A">Register</a>
  </div>
<?php
  }
?>  
  
  
  
  
