Fixed Custom Messages section of Documentation

The javascript was invalid, so I fixed it. Sorry if this pull request comes through a bit cluttered. I just updated my version to match yours.