Corrections to JSDoc
Remove trailing commas, add trailing semicolons
Simplify return statements
Remove two noop backslashes in regexes
Remove unused variables
Fix some bad HTML
Fix inefficent jQuery usage

Some jQueries can be cached and reused. This commit does that.
Fix this/self usage warning

To clarify the intent of using 'this' inside the closure, it is first assigned to a variable.
Merge pull request #2141 from riking/correctness

Lots of JS correctness fixes