Local javascript code in separate file

The local javascript file now taken to a separate file this separates
out the code dependent on jquery, which resides in the main html file
and the local non-dependent code that is now in a separate file.