title: In Safari and I think also IE7 and 8 Math.random() is NOT random?
body: <p><a href="http://koreanwordgame.com/" rel="nofollow">http://koreanwordgame.com/</a></p>
  
  <p>This page first loads 4 words into the options DIVs via Ajax and then randomizes the correct answer with the following function, passing the DIV containing the elements to be randomized as the argument:</p>
  
  <pre><code>var random = function(r){
      r.children().sort(function(a,b){
        var temp = parseInt( Math.random()*10 );
        return( temp%2 );
      }).appendTo(r);            
  };
  
  random($("#option"));
  
  &lt;div id="option"&gt;   
  &lt;div class="option" id="option1" style="background-color: rgb(229, 232, 238); "&gt;light&lt;/div&gt;
  &lt;div class="option" id="option4" style="background-color: rgb(183, 190, 204); "&gt;pot&lt;/div&gt;
  &lt;div class="option" id="option2" style="background-color: rgb(183, 190, 204); "&gt;garlic press&lt;/div&gt;
  &lt;div class="option" id="option3" style="background-color: rgb(183, 190, 204); "&gt;habitant&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is that in Safari the correct answer is always in the top position...</p>
  
  <p>And in IE 7 and 8 it's in the top position far more often than not.</p>
  
  <p>I know it would be possible to make the function "more random" by using a timestamp in there  or something but I'm struggling to make it work properly.</p>