Revert js async loading
Revert js async loading

--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -34,8 +34,7 @@
 <meta name="viewport" content="width=device-width, initial-scale=1"> 	
 <title>' . $pageTitle . '</title>
         <meta name="google-site-verification" content="-53T5Qn4TB_de1NyfR_ZZkEVdUNcNFSaYKSFkWKx-sY" />
-	<link rel="stylesheet"  href="' . $labsPath . 'css/jquery-ui-1.8.12.custom.css" />
-	<script src="' . $labsPath . 'js/LAB.min.js"></script> ';
+	<link rel="stylesheet"  href="' . $labsPath . 'css/jquery-ui-1.8.12.custom.css" />';
 	if (isDebugServer()) {
 		$jqmcss = $labsPath . 'css/jquery.mobile-1.0b1.css';
 		$jqjs = $labsPath . 'js/jquery-1.6.1.min.js';
@@ -53,16 +52,12 @@
 });
 </script> 
 	<script src="'.$jqmjs.'"></script>
-	
-	 <script>
-	  $LAB.setOptions({AlwaysPreserveOrder:true})
-  .script("' . $jqjs . '").wait()
-
-.script("' . $labsPath . 'js/jquery.ui.core.min.js")
-.script("' . $labsPath . 'js/jquery.ui.position.min.js")
-.script("' . $labsPath . 'js/jquery.ui.widget.min.js").wait()
-  .script("' . $labsPath . 'js/jquery.ui.autocomplete.min.js")
- .wait(function() {
+
+<script src="' . $labsPath . 'js/jquery.ui.core.min.js"></script>
+<script src="' . $labsPath . 'js/jquery.ui.position.min.js"></script>
+<script src="' . $labsPath . 'js/jquery.ui.widget.min.js"></script>
+  <script src="' . $labsPath . 'js/jquery.ui.autocomplete.min.js"></script>
+  <script>
 	$(function() {
 		$( "#geolocate" ).autocomplete({
 			source: "lib/autocomplete.php",
@@ -77,7 +72,6 @@
 			minLength: 2
 		});
 	});
-});
 	</script>';
 	echo '<style type="text/css">';
 	if (strstr($_SERVER['HTTP_USER_AGENT'], 'Android')) echo '.ui-shadow,.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a,.ui-body-b,.ui-btn-up-b,.ui-btn-hover-b,
@@ -181,13 +175,12 @@
 	}
 	echo "\n</div></div></body></html>";
 }
-function timePlaceSettings($geolocate = false)
+function placeSettings()
 {
 	global $service_periods;
 	$geoerror = false;
-	if ($geolocate == true) {
 		$geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "";
-	}
+
 	echo '<div id="error">';
 	if ($geoerror) {
 		echo 'Sorry, but your location could not currently be detected.
@@ -196,27 +189,13 @@
 	}
 	echo '</div>';
 	echo '<div id="settings" data-role="collapsible" data-collapsed="' . !$geoerror . '">
-        <h3>Change Time/Place (' . (isset($_SESSION['time']) ? $_SESSION['time'] : "Current Time,") . ' ' . ucwords(service_period()) . ')...</h3>
+        <h3>Change Location...</h3>
         <form action="' . basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING'] . '" method="post">
         <div class="ui-body"> 
 		<div data-role="fieldcontain">
 	            <label for="geolocate"> Current Location: </label>
 			<input type="text" id="geolocate" name="geolocate" value="' . (isset($_SESSION['lat']) && isset($_SESSION['lon']) ? $_SESSION['lat'] . "," . $_SESSION['lon'] : "Enter co-ordinates or address here") . '"/> <a href="#" style="display:none" name="here" id="here">Here?</a>
 	        </div>
-    		<div data-role="fieldcontain">
-		        <label for="time"> Time: </label>
-		    	<input type="time" name="time" id="time" value="' . (isset($_SESSION['time']) ? $_SESSION['time'] : date("H:i")) . '"/>
-			<a href="#" name="currentTime" id="currentTime" onClick="var d = new Date();' . "$('#time').val(d.getHours() +':'+ (d.getMinutes().toString().length == 1 ? '0'+ d.getMinutes():  d.getMinutes()));" . '">Current Time?</a>
-	        </div>
-		<div data-role="fieldcontain">
-		    <label for="service_period"> Service Period:  </label>
-			<select name="service_period" id="service_period">';
-	foreach ($service_periods as $service_period) {
-		echo "<option value=\"$service_period\"" . (service_period() === $service_period ? " SELECTED" : "") . '>' . ucwords($service_period) . '</option>';
-	}
-	echo '</select>
-			<a href="#" style="display:none" name="currentPeriod" id="currentPeriod">Current Period?</a>
-		</div>
 		
 		<input type="submit" value="Update"/>
                 </div></form>

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -24,7 +24,6 @@
 		<li><a class="nearby" href="routeList.php?nearby=yes">Nearby Routes</a></li>
             </ul>
 <?php
-echo timePlaceSettings();
 echo ' <a href="labs/index.php" data-role="button" data-icon="beaker">Busness R&amp;D</a>';
 include_footer(true)
 ?>

--- a/labs/mywaybalance.php
+++ b/labs/mywaybalance.php
@@ -113,6 +113,10 @@
         <label for="contribute_myway">Contribute MyWay records to timeliness study? </label>
         <input type="checkbox" name="contribute_myway" id="contribute_myway" defaultChecked="no"  />
     </div>
+    <div data-role="fieldcontain">
+        <label for="accept_warning">I accept that Transport for Canberra <a href="http://transport.act.gov.au/myway/protect.html">advise against the use of third party MyWay applications</a> </label>
+        <input type="checkbox" name="accept_warning" id="accept_warning" defaultChecked="no"  />
+    </div>
         <input type="submit" value="Go!"></form>';
 }
 include_footer();

--- a/routeList.php
+++ b/routeList.php
@@ -44,7 +44,7 @@
 		include_header("Routes Nearby", "routeList", true, true);
 		trackEvent("Route Lists", "Routes Nearby", $_SESSION['lat'] . "," . $_SESSION['lon']);
 		navbar();
-		timePlaceSettings(true);
+		placeSettings();
 		if (!isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "") {
 			include_footer();
 			die();

file:a/stop.php -> file:b/stop.php
--- a/stop.php
+++ b/stop.php
@@ -61,6 +61,7 @@
 	}
 }
 include_header($stop['stop_name'], "stop");
+
 /*$serviceAlerts = json_decode(getPage(curPageURL() . "/servicealerts_api.php?filter_class=stop&filter_id=".$stopid) , true);
 
 foreach($serviceAlerts['entities'] as $serviceAlert) {
@@ -82,7 +83,31 @@
 		)
 	)) ;
 }
-timePlaceSettings();
+
+// time settings
+echo '<div id="settings" data-role="collapsible" data-collapsed="true">
+<h3>Change Time (' . (isset($_SESSION['time']) ? $_SESSION['time'] : "Current Time,") . ' ' . ucwords(service_period()) . ')...</h3>
+        <form action="' . basename($_SERVER['PHP_SELF']) . "?" . $_SERVER['QUERY_STRING'] . '" method="post">
+        <div class="ui-body"> 
+    		<div data-role="fieldcontain">
+		        <label for="time"> Time: </label>
+		    	<input type="time" name="time" id="time" value="' . (isset($_SESSION['time']) ? $_SESSION['time'] : date("H:i")) . '"/>
+			<a href="#" name="currentTime" id="currentTime" onClick="var d = new Date();' . "$('#time').val(d.getHours() +':'+ (d.getMinutes().toString().length == 1 ? '0'+ d.getMinutes():  d.getMinutes()));" . '">Current Time?</a>
+	        </div>
+		<div data-role="fieldcontain">
+		    <label for="service_period"> Service Period:  </label>
+			<select name="service_period" id="service_period">';
+	foreach ($service_periods as $service_period) {
+		echo "<option value=\"$service_period\"" . (service_period() === $service_period ? " SELECTED" : "") . '>' . ucwords($service_period) . '</option>';
+	}
+	echo '</select>
+			<a href="#" style="display:none" name="currentPeriod" id="currentPeriod">Current Period?</a>
+		</div>
+		
+		<input type="submit" value="Update"/>
+                </div></form>
+            </div>';
+
 echo '</span><span class="content-primary">';
 echo '  <ul data-role="listview"  data-inset="true">';
 if (sizeof($allStopsTrips) > 0) {

--- a/stopList.php
+++ b/stopList.php
@@ -40,7 +40,6 @@
 		$stops = getStops();
 		include_header("All Stops", "stopList");
 		navbar();
-		timePlaceSettings();
 	}
 	else if (isset($nearby)) {
 		$listType = 'nearby=yes';
@@ -48,7 +47,7 @@
 		trackEvent("Stop Lists", "Stops Nearby", $_SESSION['lat'] . "," . $_SESSION['lon']);
 		navbar();
 		if (!isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "") {
-			timePlaceSettings(true);
+			placeSettings();
 			include_footer();
 			die();
 		}
@@ -65,7 +64,7 @@
 			);
 		}
 		echo staticmap($stopPositions, 0, "iconb", true, true);
-		timePlaceSettings(true);
+		placeSettings();
 		echo '</span><span class="content-primary">';
 	}
 	else if (isset($suburb)) {
@@ -78,7 +77,6 @@
 		$stops = getStops(true, $firstLetter);
 		include_header("Timing Points / Major Stops", "stopList");
 		navbar();
-		timePlaceSettings();
 	}
 	echo '  <ul data-role="listview" data-filter="true" data-inset="true" >';
 	if (!isset($firstLetter) && !isset($suburb) && !isset($nearby)) {