John Resig's class based OOP in Javascript