var snapshotVal;
var ref = new Firebase('https://bike-map-fd305.firebaseio.com/');
gba = [];
gda = [];

ref.on('value', function(snapshot) {
  snapshotVal = snapshot.val();
  console.log(snapshot.val());
  bikesAvailableAll();
  docksAvailableAll();
}, function (errorObject) {
  console.log('The read failed: ' + errorObject.code);
});

function bikesAvailableAll (){
  for(i = 0 ; i < Object.keys(snapshotVal.data).length; i++){
    temp = [];
    snapshotVal.data[Object.keys(snapshotVal.data)[i]].stations.forEach(function(station){
      temp.push(station.ba);
      gba.push(temp);
    });
  };
}

function docksAvailableAll (){
  for(i = 0 ; i < Object.keys(snapshotVal.data).length; i++){
    temp = [];
    snapshotVal.data[Object.keys(snapshotVal.data)[i]].stations.forEach(function(station){
      temp.push(station.da);
      gda.push(temp);
    });
  };
}

@@ -76,16 +76,20 @@
 com/');%0A
+var 
 gba = %5B%5D
@@ -90,16 +90,20 @@
 a = %5B%5D;%0A
+var 
 gda = %5B%5D
@@ -362,32 +362,44 @@
 vailableAll ()%7B%0A
+  gba = %5B%5D;%0A
   for(i = 0 ; i 
@@ -617,16 +617,16 @@
   %7D;%0A%7D%0A%0A
-
 function
@@ -648,16 +648,28 @@
 All ()%7B%0A
+  gda = %5B%5D;%0A
   for(i 

fix data