Look up "Lightbox javascript"; they use the same concept.
When an event is triggered, a div's css display attribute goes from none to block, and that's why it suddenly comes into view. The actual vertical and horizontal centering of the object is done with javascript as well.
there u go... you will need to modify index.html and change the
var GB_ROOT_DIR = "http://74.208.8.137/greybox/";
to your own directory where the image are located