<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/sessionStartGeneral.php") ?>
<?php
  if(!isset($_GET['page'])){
    header('Location: index.php');
  }else{
    $theFile = $_GET['page'];
  }
  
  $theSiteParts = explode(".", $_SERVER['HTTP_HOST']);
  $theSite = $theSiteParts[0];
?>
<?php
  $pageTitle = "";
  $pageDescription = "";
  $pageKeywords = "";
?>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/header.php") ?>
<?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
          if($theFile == "exclusive-brands"){
		?>
		  <div class="span8 leftSide">
			<h1>Exclusive Brands</h1>
			<p>We are dedicated to providing you with access to brands that provide great-tasting, quality products. Here is more information behind some of the brands you see in our grocery store:</p>
			<div class="accordion" id="exclusiveBrands">
		<?php
		  }//end if($theFile == "exclusive-brands")
		  
		  //ALWAYS INCLUDE THE FILE, THE WRAPPING IS ONLY DONE IF IT IS THE EXCLUSIVE BRANDS PAGE
		  include('https://afsshareportal.com/siteContent/' . $theFile . '.php?theSite=' . $theSite);
		  
		  if($theFile == "exclusive-brands"){
		?>
			</div><!-- end #exclusiveBrands -->
		  </div><!-- end .span8.leftSide -->
		  <div class="span4 rightSide">
			<?php include($_SERVER['DOCUMENT_ROOT'] . "/includes/sidebar.php"); ?>
		  </div>
		<?php
		  }//end if($theFile == "exclusive-brands")
        ?>
		
        
      </section>
    </section>
      
    
    
    
    <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/footer.php"); ?>
  <script>
	
	var oldTitle = $(document).attr("title");
	
	$(document).attr("title", oldTitle + pageTitle);
	
    $(".grown").not("." + theStateAbbr).remove();
    
    $(".needTheState").text(theState);
    $(".needFacebookLink").attr("href", facebookURL);
    
	$(".accordion-heading a").on('click', function(){
	  $(".accordion-heading").removeClass("viewed");
	  var $this = $(this);
	  var $aHeading = $this.parents(".accordion-heading");
	  setTimeout(function(){
		if($aHeading.siblings(".accordion-body").is(".in")){
		  $aHeading.addClass("viewed");
		}
	  }, 50);
	});
	
	$("#pinchpound").closest('.accordion-group').remove();
	$("#beleve").closest('.accordion-group').remove();
	$("#dilusso").closest('.accordion-group').remove();
	$("#sweetps").closest('.accordion-group').remove();
    
    
    
    $("#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>
