Code from video 5 of the jQuery Mobile series