You can see title
using option
like
$("selector").dialog('option', 'title', 'New Title');
So you use following code
$("#dialog").dialog('option', 'title', $(this).next().find('img').attr('title'));
EDIT
//Fetch title here
tit=$(this).next().find('img').attr('title');
$("#dialog").dialog("option", "position", {
modal:"true",
my: "center",
at: "center",
title: tit, //tit instead of 'tit'
of: window
});