class inheritance thanks to John Resig
add class.js and dependency
rewrite js to use classes an inheritance