code: function shuffle(a) {
    var n = a.length;
    for (var i = n - 1; i > 0; i--) {
      var j = Math.random() * i | 0; // 0 ≤ j < i
      var t = array[j];
      array[j] = array[i];
      array[i] = t;
    }
    return a;
  }
docs: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle