Replace class.js from John Resig by base.js from Dean Edwards