All that I need to do is add rel="lightbox" into the link tag of the code that's produced when you use the new File Upload box to add an image to the post, where you specify it to use the thumbnail and having it linked to an image.
i.e. Instead of
<a href="http://www..../image.jpg" title="image">...
it would show
<a href="http://www..../image.jpg" title="image" rel="lightbox">...
While it would be easy enough to hack the code, could somebody tell me how to write a plugin which adds this code in?