$j(document).ready(function(){
  for(var i=0;i<whenReady.length;i++) {
    whenReady[i].call();
  }
});

