I think you could do it with JQuery, too.
The truth is, I hated this effect - it's not something I would ever do on my own site. But it got the job done when I was hired to do it.
If you do this, and I don't recommend that you do, use VERY small sound files. Otherwise your site usability will be very bad, along with having possibly annoying sounds.