move JS to inline footer rather than an additional HTTP call