Author meant class instead of id
Description of Erratum
On line 3:
//add the jQuery UI dialog to all elements with id of dialog
...author meant class, not id - sorry Jake! :)
Recommended Correction
//add the jQuery UI dialog to all elements with class of dialog