restaurant: use of $.when to sequence the ajax calls