Layouts for rjs templates?

I was wondering if you could create a layout for rjs templates as you
would for rhtml templates?

Let’s say every time an rhs template was rendered I wanted a jvascript
pop up to say “hi!”

Can you make a file called application.rjs in your layouts directory and
do something like:

page.alert ‘hey’

If I can’t how else could I accomplish this functionality?