header_footer_only javascript includes core, so keep the runner there
Use 'root' instead of 'window' within libs
Simplify raw JS into jQuery enumerator

Makes it easier to read.