Firebug says jQuery is loaded but $() and jQuery() are not defined

jQuery needs to be outside the wrapper like so:

<script type="text/javascript">
(function($) {
    $(document).ready(function() {
        alert('hello?');
    });
})(jQuery);
</script>

Edit:

A better way would be:

jQuery(document).ready(function($) {
// $() will work as an alias for jQuery() inside of this function
});

Also make sure any inline script tags are AFTER your call to wp_head();

And even better way:

Instead of adding your script tags inline create a functions.js file containing all your extra functions etc. Enqueue it with jQuery as a dependency.

add_action( 'template_redirect', 'c3m_enqueue_scripts' );
function c3m_enqueue_scripts() {
    wp_register_script( 'custom-functions', TEMPLATEPATH .'/path/to/functions.js', array( 'jquery' ) TRUE);
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'custom-functions' );
}