There's an option in the admin section (in beta3, I think I remember it being in the older versions too) and you just check it to disable linking to full image.
If it isn't there - just find in gallery.php where it generates the image. and remove the <a href="to full image"> bit. You can just change the link to be # and that will just keep redirecting to the same page. I'm pretty sure there's a way around this tough. Maybe right-clicking on the image - although I think that will just give you the large thumb.