optimized code, added yuicompressor (untested)