I just copied your code in to the footer template, made a few changes to get it to run (liike the 'the_hash' thing and changing the url). I changed it to call misc.php?do=ajax then put a plugin on misc_start that just has:
Code:
if ($_REQUEST['do'] == 'ajax')
die("foo");
Then using Firebug I could see that it was making the request and getting the "foo" response. So no, I didn't have to add any js files.