Moving javascript from layout to it's own file

This is a bit cleaner to have it in it’s own file. Easier to read, and
text editors can deal with it as purely javascript rather than a
mixture of JS, HTML and PHP
Creating a README file
Cleaning up the ignore config for git,
Updating README
Merge branch 'javascript-tidyup'
Merge pull request #1 from Martz/master

Cleaning up some bits