The biggest question is what additional problems are you having in making it work locally? I'd start with that - just trying it out and fixing stuff.
Some suggestions:
- Make sure you use strict and warnings. They will help in any debugging efforts (as well as make you code better, anyways.)
- Make sure you're thinking about what you're doing. Think through the ramifications of a given change and don't just "try it to try it".
------
/me wants to be the brightest bulb in the chandelier!
Vote paco for President!