As a general comment, within the functions make sure that you avoid JavaScript hoisting with the variables. http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html

Also for the variables at the top of a function as a style comment do multiple vars with this type of format:

```JavaScript
var foo, bar, baz;
```

Or if you're initializing:

```JavaScript
var foo, 
    bar = 1,
    baz = 2;
```