Similarly to the previous recipe, we start by assigning a function to the wp_enqueue_scripts action hook. When executed, the callback makes a call to wp_enqueue_script to request for jQuery to be loaded from the local copy of WordPress. The next line calls the add_thickbox function, which is a utility function that makes multiple calls to wp_enqueue_script and wp_enqueue_style to load the appropriate JavaScript and stylesheet in the page header.
Once all the required elements are loaded, the next section of the recipe outputs a block of JavaScript code to the page footer which uses jQuery to register a function that will be called when the entire page is loaded. When this happens, the setTimeout JavaScript function is used to register a function that will be called 2000 milliseconds later and will take care of calling tb_show to display the pop-up dialog. tb_show has three arguments, with the first one indicating the dialog title, the second containing the address of the content to render within the box, and the third expecting a path to a group of images to be displayed. In our case, the last argument is left null. Notice that the width and height (in pixels) of the dialog are indicated as part of the address of the content page to be displayed.