Slight code rearrangment.  Added script files to functions.php, re/moved code from footer.php