At present, intranetuserjs is expanded somewhere before the </body> tag. This means that everything in intranetuserjs *must* be wrapped in $(document).ready( function(){ ... }); It's considered good jquery coding practice to move all jquery directly before the </body> tag so that this isn't necessary. I believe that this is the case for the OPAC already.