$.fn.reorder = function() {
  function random_order() { return(Math.round(Math.random())-0.5); }
 
  return($(this).each(function() {
    var $this = $(this);
    var $children = $this.children();
    var childCount = $children.length;
 
    if (childCount > 1) {
      $children.remove();
 
      var indices = new Array();
      for (i=0;i<childCount;i++) { indices[indices.length] = i; }
      indices = indices.sort(random_order);
      $.each(indices,function(j,k) { $this.append($children.eq(k)); });
    }
  }));
};

$(document).ready(function() {
  $('#company-list').reorder();
});