text: function clone(obj) {
      var copy;
  
      // Handle the 3 simple types, and null or undefined
      if (null == obj || "object" != typeof obj) return obj;
  
      // Handle Date
      if (obj instanceof Date) {
          copy = new Date();
          copy.setTime(obj.getTime());
          return copy;
      }
  
      // Handle Array
      if (obj instanceof Array) {
          copy = [];
          for (var i = 0, len = obj.length; i < len; i++) {
              copy[i] = clone(obj[i]);
          }
          return copy;
      }
  
      // Handle Object
      if (obj instanceof Object) {
          copy = {};
          for (var attr in obj) {
              if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
          }
          return copy;
      }
  
      throw new Error("Unable to copy obj! Its type isn't supported.");
  }
  
  
  if (!Array.prototype.last){
      Array.prototype.last = function(){
          return this[this.length - 1];
      };
  }
  
  function shuffle(array) {
    var currentIndex = array.length, temporaryValue, randomIndex;
  
    // While there remain elements to shuffle...
    while (0 !== currentIndex) {
  
      // Pick a remaining element...
      randomIndex = Math.floor(Math.random() * currentIndex);
      currentIndex -= 1;
  
      // And swap it with the current element.
      temporaryValue = array[currentIndex];
      array[currentIndex] = array[randomIndex];
      array[randomIndex] = temporaryValue;
    }
  
    return array;
  }
  
  function enableSubmit(id, time){
      document.getElementById(id).disabled = true;
      document.getElementById('hint').innerHTML = 'Please think through the task first!';
      setTimeout(function(){
          document.getElementById(id).disabled = false;
          document.getElementById('hint').innerHTML = 'Please select one when you are ready!';
      }, time * 1000);
  }