Javascript object oriented - zoo example