<div id="storeInfoContainer">
    
</div>

<script>
	
    function getStoreInfoFront(){
	  $.ajax({
		type: "GET",
		url: base_site + "lookUpFeatures.php",
		data: "action=storeInfo&website_url=" + web_URL,
		dataType: "jsonp",
		jsonp : "callback",
		jsonpCallback: "jsonpcallbackInfoFront"
	  });
    }
	
    getStoreInfoFront();	

    
    function jsonpcallbackInfoFront(theStoreInfo){
        var theHTML = "";
		//console.log(theStoreInfo);
		var theLocations = new Array();
		
		$.each(theStoreInfo, function(){
            //console.log(this);
			//if(this.store_id == theStoreID){
				//storeInfo += "<h3>" + this.store_name + "</h3>";
				//storeInfo += "<div class='aLocation'>";
				var storeInfo = "";
				
				storeInfo += "<h4 class='header'><a href='/" + this.store_name.replace("Blair's ", "").toLowerCase() + "'><span>" + this.store_name.replace("Blair's ", "") + "</span></a></h4>";
				storeInfo += "<div class='forBackground'>";
				storeInfo += "<div class='infoPad'>";
				storeInfo += "<h5>Store Hours</h5>";
				
				if(this.store_hMonOpen == "24 Hours"){
					storeInfo += "<p>Mon-Sun: ";
					storeInfo += "<span>" + this.store_hMonOpen + "</span></p>";
				}else{
					if(this.store_hMonOpen == this.store_hSatOpen && this.store_hMonClose == this.store_hSatClose){
						if(this.store_hMonOpen == this.store_hSunOpen && this.store_hMonClose == this.store_hSunClose){
							storeInfo += "<p>Mon-Sun: ";
							storeInfo += "<span>" + this.store_hMonOpen + " - " + this.store_hMonClose + "</span></p>";
						}else{
							storeInfo += "<p>Mon-Sat: ";
							storeInfo += "<span>" + this.store_hMonOpen + " - " + this.store_hMonClose + "</span></p>";
							storeInfo += "<p>Sunday: ";
							storeInfo += "<span>" + this.store_hSunOpen + " - " + this.store_hSunClose + "</span></p>";
						}
					}else{
						storeInfo += "<p>Mon-Fri: ";
						storeInfo += "<span>" + this.store_hMonOpen + " - " + this.store_hMonClose + "</span></p>";
						storeInfo += "<p>Saturday: ";
						storeInfo += "<span>" + this.store_hSatOpen + " - " + this.store_hSatClose + "</span></p>";
						storeInfo += "<p>Sunday: ";
						storeInfo += "<span>" + this.store_hSunOpen + " - " + this.store_hSunClose + "</span></p>";
					}
				}
                
				storeInfo += "<h5>Phone Number</h5>";
				storeInfo += "<p><a href='tel:" + this.store_phone + "'>" + this.store_phone.replace(/(\d{3})(\d{3})(\d{4})/, '$1-$2-$3') + "</a></p>";
				
				storeInfo += "<h5>Store Address</h5>";
				storeInfo += "<p>" + this.store_address + ", " + this.store_city + ", " + theStateAbbr + " " + this.store_zip + "</p>";
				
                storeInfo += "</div>";
				storeInfo += "</div>";
				storeInfo += "<br>";
				//storeInfo += "</div>";
				
				theLocations[this.store_name.replace("Blair's ", "").toLowerCase()] = storeInfo;
			//}
        });
		
        //console.log(theLocations);
        
		$("#storeInfoContainer").append(theLocations['powell']);
		$("#storeInfoContainer").append(theLocations['worland']);
		$("#storeInfoContainer").append(theLocations['thermopolis']);
		$("#storeInfoContainer").append(theLocations['greybull']);
		//$("#theServices").html(theHTML);
		
        
        
	}
</script>