[12,4,16,3].sort(function() {
return 0.5 - Math.random();
}); // [12, 16, 3, 4]
function shuffle(array) {
// original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
for (var j, x, i = array.length; i; j = parseInt(Math.random() * i), x = array[--i], array[i] = array[j], array[j] = x);
return true;
}