Switch tabs via text link AND modify an attribute of an object in the loaded tab panel?

Switch tabs via text link AND modify an attribute of an object in the loaded tab panel?

I need to be able to click a link in one tab and do two things:

1) Switch to a different tab
and
2) Change the src attribute of an iframe contained inside of the newly loaded tab's content only when the previously mentioned text link is clicked

I can get #1 to work just fine as per the documentation example on how to switch tabs via text link. My problem is figuring out how to do #2. I've tried a bunch of things over the past couple of days to remedy this, but have been quite unsuccessful.

Does anyone know of a way to do this? I'm using jQuery 1.3.2 and UI 1.7.2.