javascript fork of the coffee script version from fuseelements.