There are four ways to add JavaScript to your page:
It is recommended to include JS only on specific pages where it is absolutely required. This would lower the processing overhead of your superbook when it loads into the dom.
Restricting use of JS specifically to pages also helps in debugging by knowing exactly where to look.