I saw there is an answered question about whether there is a difference between using $(document).ready(function(){}) and $(function(){}) (there is
$(document).ready(function(){})
$(function(){})
I believe the authors of jQuery recommend using $(document).ready(function(){...}); since it makes your code more transparent.
$(document).ready(function(){...});