Code from video 4 of the jQuery Mobile series