drupal 7 - drupal_add_js - inline doesn't execute
Go through this document http://drupal.org/node/171213 It shows how to use Jquery. The syntax for jquery ready function is:

jquery(document).ready(function($) {
// Code that uses jQuery's $ can follow here.
});