A few things right on top of my head. I'll edit this list when I think of more.
- Don't pollute global namespace. Organize things in objects instead;
- Don't omit 'var' for variables. That pollutes global namespace and might get you in trouble with other such scripts.