There have been a few threads on jQuery in 4.7, mostly filled with disappointing tales of incompatibilities of Drupal's JS files and jQuery.
Not being a JS guru, and not wanting to be, I decided to use jQuery for a client project and created a jquery47 module to allow anyone else to use my hacked up jQuery.
You can find it here: http://drupal.org/project/jquery47
First, a note: to make jQuery compatible with Drupal, I had to rename the $ function to JQ. Sorry, there's really no way around this. When Drupal 5.0 comes out, you'll have to rename all your calls to JQ('...') to $('...').
Write your JS file and put it somewhere. Using drupal_get_path() get your file's path. Call jquery_add_js($yourfilepath) and you're ready to go.