You can override the 'options' to attach event handlers. The code below shows how to attach the 'onOpen' and 'onClose' events on the first tab panel.
var p = $('#tt').tabs('getTab', 0);
$.extend(p.panel('options'), {
	onOpen: function(){
		console.log('opened')
	},
	onClose: function(){
		console.log('closed')
	}
})