ThickBoxLite is a project mainly written in JavaScript, it's free.
An ajax only version of ThickBox
This is a stripped down version of Thickbox (http://jquery.com/demo/thickbox/) that only does AJAX loading, and has dynamic height and width calculation.
http://labs.dangerisgo.com/thickboxlite