<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/sessionStartGeneral.php") ?>
<?php
  if(isset($_GET['error'])){
    if($_GET['error'] == "noAccess"){
?>
  <div id="noEditError">
        <div class="alert alert-error">
              <a class="close" data-dismiss="alert" href="#">x</a>You do not have sufficient privileges to access the administration area of this website. Please contact the web administrator if you need further assistance.
        </div>
  </div>
<?php
    }else if($_GET['error'] == "noPage"){
?>
  <div id="noPageError">
      <div class="alert alert-error">
            <a class="close" data-dismiss="alert" href="#">x</a><br>The requested page does not exist in our site. If you believe it does exist, please find it using the navigation or links at the bottom of the page.<br>
      </div>
    </div>
<?php
    }
  }
  
  if(isset($_GET['loc'])){
    $theMissingFile = $_SERVER['QUERY_STRING'];
    include($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/missingFiles.php");
    header("Location: https://" . $_SERVER['SERVER_NAME'] . "?error=noPage");
  }
?>
<?php
  $pageTitle = "Home";
  $pageDescription = "At Peterson's Fresh Market we have everything you need, and expect, from your local grocery store in Riverton, Utah";
  $pageKeywords = "Riverton, Utah, Petersons, grocery, store, market, fresh foods";
?>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/header.php") ?>
<script src="/js/jquery.cookie.js"></script>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/mainNav.php")?>
    
    
    
    <section class="container">
      <div id="blankBuffer" class="carousel-buffer"></div>
      
      <section class="container" id="mainContent">
        <?php include("includes/hotDealHome.php"); ?>
        <article class="row">
          <div class="span8 leftSide">
            <div class="paddingHelpLeft">
              <?php include("includes/carousel.php"); ?>
              <br>
              <?php
                $storeDeals = "home";
                $priceWarning = false;
                $numWanted = 4;
                $rowCount = 4;
                //include("includes/adItems.php");
              ?>
              <?php include("includes/wp-posts.php"); ?>
              <?php include("includes/departments.php"); ?>
            </div>
          </div><!--end left side div-->
            
          <div class="span4 rightSide">
            <div class="paddingHelpRight">
              <?php //include("includes/rewardsBox.php"); ?>
              <?php include("includes/onlineShoppingBox.php"); ?><br>
              <?php include("includes/storeInformation.php"); ?>
              <?php include_once("includes/facebookWall.php"); ?>
            </div>
          </div><!-- end right side div -->
        </article>
        
      </section>
    </section>
    
    <style>
      #standardSSOmodal,
      #standardSSOmodal .modal-footer {
        background: none;
        border: none;
        box-shadow: none;
      }
      
      #standardSSOmodal .modal-footer {
        width: auto;
        display: block;
        text-align: center;
      }

      #standardSSOmodal .modal-footer .btn + .btn {
        margin-left: 0;
      }
    </style>
    <div id="standardSSOmodal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      
      <div class="modal-body">
        <img class="modal-content" id="img01" src="/Kickstrap/img/PetersonsPopup800x800.jpg" style="max-height: 400px;width: auto;margin: 0 auto;display: block;">
      </div>
      <div class="modal-footer btn-group">
        <a href="/register" id="shoppingRedirect" class="btn btn-large btn-primary">Register</a>
        <button id="ssoModalClose" class="btn btn-large" data-dismiss="modal" aria-hidden="true">Close</button>
      </div>
    </div>
    
    
    
    <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/footer.php"); ?>
  <script>
    $(document).ready(function() {
      if ($.cookie('show_sso_modal') == null || $.cookie('show_sso_modal') == "yes") {
        $.cookie('show_sso_modal', 'yes', { expires: 7, path: '/' });
        $("#standardSSOmodal").modal("show");
      }
      
      $("#ssoModalClose").on("click touch", function(){
        $.cookie('show_sso_modal', 'no', { expires: 7, path: '/' });
      });
    });
  </script>
  <script>
   
    $("#rightSidebarCollapse h4").bind("click", function(){
      $this = $(this).children("i");
      $siblings = $(this).parents(".accordion-group").siblings();
      $("h4", $siblings).children("i").removeClass("icon-minus-sign").addClass("icon-plus-sign");
      if($this.hasClass("icon-plus-sign")){
        $this.removeClass("icon-plus-sign").addClass("icon-minus-sign");
      }else{
        $this.removeClass("icon-minus-sign").addClass("icon-plus-sign");
      }
    });
   
   $(".weeklySpecial:last-child").css("margin-right", "0");
   
  </script>
  
</body>
</html>
