But wait... if you are defining the functions at the top of the page doesn't it get called before the elements are loaded?
$(document).ready( function... )
This is similar to the onLoad property in the Body tag.
Note: if an element doesn't exist, it is OK select and then try calls on them. This is hugely helpful if you have a js file that is included on a lot of pages that have different elements.
This paragraph is hidden until the document is loaded, then it drops in.
This paragraph fades in over 5 seconds, then brings up an alert box when it is done.