Smooth scrolling with RJS -> error

Hi there,

can anybody tell me what's wrong with this controller part...?

  render :update do |page|
    page.call "jQuery('html,body').animate({
          scrollTop:jQuery('#top').offset().top}, 2000)"
  end

The error I get is...

  "RJS error:

  TypeError: jQuery("html,body").animate({
          scrollTop:jQuery("#top").offset().top}, 2000) is not a
function"

The idea is to have the controller "smooth scroll" to the DIV with the
ID 'top' (which would contain the error message).

(Nothing else besides the jQuery core is needed with this code.)

Thanks for any help!
Tom