How to get jquery working on Drupal 7 - for Newbies
A couple of things here:


If you can avoid entering javascript and PHP into the site via the UI it will possibly save you troubles down the line. If you have no alternatives it is ok but here are some reasons why it is not a great idea: https://drupal.stackexchange.com/a/2512/10729 (note that that is aimed at PHP, not js but most of the points still stand for js). The examples module has an example of creating custom blocks.
For attaching js, if you want it on all pages you can add it to your theme's info file. If you only want it in some places though, best to use drupal_add_js() so it is only on pages it needs to be. For attaching js behaviour to forms you can also use #attached attribute on your form items.
If you use $(document).ready(), it will fire your javascript when the page loads, however if the page is updated via ajax then your javascript will not fire again, so new markup won't be affected by whatever your javascript is. To handle these cases you should use drupal behaviors instead of document ready.


For example:

(function ($) {
  Drupal.behaviors.yourBehaviorName = {
    attach: function (context, settings) {
      // Do your thing here.
    }
  };
})(jQuery);


I recommend reading these pages:
Managing JavaScript in Drupal 7
Working with JavaScript and jQuery