(update) Reduced 50bytes thanks to Closure Compiler (http://closure-compiler.appspot.com/home) and some optimisations by @millermedeiros