To make a JavaScript class with a public method I\'d do something like:
function Restaurant() {} Restaurant.prototype.buy_food = function(){ // something
All of this closure will cost you. Make sure you test the speed implications especially in IE. You will find you are better off with a naming convention. There are still a lot of corporate web users out there that are forced to use IE6...