How can i link a custom post type thumbnail to intermediate size

                    <a rel="lightbox" href="https://wordpress.stackexchange.com/questions/10191/<?php $image_id = get_post_thumbnail_id();
                $image_url = wp_get_attachment_image_src($image_id,"large', true);
                echo $image_url[0];  ?>">
                <?php the_post_thumbnail('thumbnail'); ?>
                </a>

Yeah the above (posted by @null) is correct on getting the url, here it is all put together. Including the rel=lightbox. I call to WP’s large image size here personally for the lightbox image to be linked to.
the_post_thumbnail
wp_get_attachment_image_src