Page template that uses lightbox to display post images

You could use WordPress’ built-in Thickbox script. Just place the following code somewhere before wp_footer();:

add_action( 'wp_footer', 't5_thickbox_jquery' );

function t5_thickbox_jquery()
{
?>
<script>
jQuery( 'a img.size-medium, a img.attachment-thumbnail' )
    .parent()
    .addClass( 'thickbox' )
    .attr( 'rel', 'page' );
</script>
<?php
add_thickbox();
}

See this answer for more details.