function camelCaps(str, theCase) {
  var tempArray = str.split(' ');

  // Make the first character of each word upper- or lowercase
  // depending on the value of theCase
  for (var i = 0; i < tempArray.length; i++) {
    if (theCase) {
      tempArray[i] = tempArray[i].charAt(0).toUpperCase() + tempArray[i].substring(1);
      }
    else {
      tempArray[i] = tempArray[i].charAt(0).toLowerCase() + tempArray[i].substring(1);
      }
    }
  return tempArray.join(' ');
  }

var order = true;