Do you have 2 questions in your post? I will answer for this one:
How to get selected tab title?
Firstly, look this example: jsFiddle
Is it what you want to achieve? Select some tab and press click me
link. Alert with selected tab name will be shown.
Java script code:
var selected = $("#tabs").tabs("option", "active");
var selectedTabTitle = $($("#tabs li")[selected]).text();
alert(selectedTabTitle);
It is very simple. Tell me, if you need comments.
Note, that if you use jQuery <= 1.8 you have to use tabs("option", "selected");
, but if you use jQuery > 1.8 you have to use tabs("option", "active");
(source)
If you have question how to open dialog, create new post for it.