Using window.onload commands the 'rails way'

I’m trying to integrate niftycube
(Nifty Corners Cube - freedom to round) into my rails app.
It however requires that you specify window.onload commands for each of
the rounded areas which you wish to use.

Given that my app is setup using layouts, I was wondering if anyone had
any good ideas of how to incorporate this into the application.

One approach that comes to mind is to do <%= javascript_tag
“window.onload=function() {Nifty(‘div#box’,‘big’);}” %> inline in the
view, but this doesn’t seem to work if there are multiple divs you want
rounded in one view, (the onload function gets over ridden). I guess
you could also add an element to an array every time you want something
rounded but this seems cumbersome.

Any ideas?