<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/sessionStartGeneral.php") ?>
<?php
  $pageTitle = "Frequently Asked Questions";
  $pageDescription = "Frequently Asked Questions about Peterson's Personal Shopper";
  $pageKeywords = "FAQ, Frequently Asked Questions, employment, community event";
  
  $theSiteParts = explode(".", $_SERVER['HTTP_HOST']);
  $theSite = $theSiteParts[0];
?>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/header.php") ?>
<script src="/Kickstrap/js/jquery.h5validate.js" type="text/javascript"></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">
			<article class="row">
				<?php include('https://afsshareportal.com/siteContent/online-shopping-faq.php?theSite=' . $theSite); ?>
				
				<div class="span4 rightSide">
					<div class="paddingHelpRight">
						<div class="paddingHelpRight" id="theSidebar">
							<a href="https://rosieapp.com/shopstore/petersons" target="_blank"><img src="/Kickstrap/img/rosie/personalShopperLogo.png" width="100%" alt="Peterson's Personal Shopper"></a>
							<hr>
							<?php include($_SERVER['DOCUMENT_ROOT'] . "/includes/rewardsBox.php"); ?>
							
							<?php include_once("includes/facebookWall.php"); ?>
							<?php //include_once(DOCUMENT_ROOT . "/includes/featuredRecipe.php"); ?>
						</div>
					</div>
				</div><!-- end right side div -->
			</article>
        
		</section>
    </section>
      
    
    
    
    <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/footer.php"); ?>
	<script>
	
	function getStoreLocations(){
		 $.ajax({
			 type: "POST",
			 url: "/admin/lookUp.php",
			 data: "action=getStoreLocations",
			 dataType: "json",
			 success: function(theResponse){
				 var theHTML = "";
				 theHTML += "<option>Choose Location</option>";
				 //console.log("num locations: " + theResponse.length);
				 //console.log(theResponse);
				 
				 var alreadyHas = ["1"];
				 if(theResponse.length > 1){
				   $.each(theResponse, function(){
						if($.inArray(this.store_id, alreadyHas) == -1){
							theHTML += "<option>" + this.store_name + "</option>";
						}
				   });
				   
				   $("#location").append(theHTML);
				 }else{
				   $("#location").closest("div").remove();
				 }
			 }
		 });
	 }
	 
	 getStoreLocations();
	
	 $('#contactForm').h5Validate();
			 
	 $("#contactForm").submit(function(event){
		 event.preventDefault();
		 
		 var myResult = validateForm("contactForm");
		 
		 var theLocation = $("#location").val();
		 
		 if(myResult == true)
		 {
			 var self = $(this);	
			 self.unbind('submit').submit()
		 }
	 });
  </script>
	
	<script>
		$(document).ready(function(){
			var hash = window.location.hash;
			if(hash != ""){
				$(hash).closest(".accordion").closest(".accordion-group");
				$("#collapse_about").collapse("hide");
				$(hash).closest(".accordion").closest(".accordion-group").find(".collapse").first().collapse("show");
				$(hash).collapse("show");
			}
			
			$("#requestFormReveal").on("click", function(e){
				e.preventDefault();
				
				$("#requestForm").removeClass("hideObject");
			});
			
			$(".backToTop").on("click", function(e){
				e.preventDefault();
				$("html, body").animate({ scrollTop: 0 }, "slow");
				return false;
			});
		});
	</script>
</body>
</html>
