Щито?
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script>
$(document).ready(function () {
$('a.btn-ok, #dialog-overlay, #dialog-btn').click(function () {
$('#dialog-overlay, #dialog-box').hide();
return false;
});
$(window).resize(function () {
if (!$('#dialog-box').is(':hidden')) popup();
});
});
function popup(message) {
var maskHeight = $(document).height();
var maskWidth = $(window).width();
var dialogTop = (maskHeight/3) - ($('#dialog-box').height());
var dialogLeft = (maskWidth/2) - ($('#dialog-box').width()/2);
$('#dialog-overlay').css({height:maskHeight, width:maskWidth}).show();
$('#dialog-box').css({top:dialogTop, left:dialogLeft}).show();
$('#dialog-message').html(message);
}
</script>
<div id="dialog-box">
<div class="dialog-content">
<div id="dialog-message" align="center">
<img src="">
</div>
</div>
</div>
<a href="#dialog-box" rel="test.gif" onclick="popup('<img src=\'http://javascript.ru/forum/images/ca_serenity/misc/logo.gif\'>');">test.gif</a>