title: jQuery - Appending sorted content to a div doesn't work in IE9 and Safari
body: <p>Using jQuery 1.5.2, I'm giving a random position to the children of a div, the code works in Firefox, Chrome and Opera, but it doesn't work in IE7-9 and Safari. What is wrong?</p>
  
  <p>A second question, when the page is refresed multiple times, the random pattern is not very random, sometimes the same number stays in first place, etc. Any hint to increase the randomness of the script?</p>
  
  <p>PD: the jquery fiddle is 1.6.4</p>
  
  <p><a href="http://jsfiddle.net/6cqtP/" rel="nofollow">http://jsfiddle.net/6cqtP/</a></p>
  
  <p><strong>SCRIPTS</strong>  </p>
  
  <pre><code>jQuery(document).ready(function() {
                jQuery('#postscript-top-inner').each(function(){
              var parent = jQuery(this);
              var content = parent.find('.block-nodeblock');
  
              content.sort(function(a){
                    var new_position = parseInt( Math.random()*4 );
                    return( new_position );
              })
              .appendTo(parent);       
  
        });
  });
  </code></pre>
  
  <p><strong>HTML</strong>  </p>
  
  <pre><code>&lt;div id="postscript-top-inner"&gt;
   &lt;div class="block-nodeblock"&gt;
  1
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  2
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  3
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  4
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  5
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  6
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  7
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  8
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  9
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  10
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  11
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  12
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  13
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  14
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  15
   &lt;/div&gt;
    &lt;div class="block-nodeblock"&gt;
  16
   &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS</strong>  </p>
  
  <pre><code>#postscript-top-inner{width: 460px; margin:0 auto}
  .block-nodeblock{width:50px; padding:25px 0; background: gray; margin:0 10px 10px 0; text-align:center; float: left}
  </code></pre>