jQuery

refactoring code into jQuery. Finally a breakthru in understanding!