Here's an example that fades & closes the image on the left when the user double-clicks on it. (It's live, so go ahead and try it!). The protoscript below says: for an element with id set to avatar, fade it out when the user double-clicks on it and close it when the fade completes. You can click here to restart the example.
For a full description of this behavior see the DblClick Documentation Page.