tbbng_optns = {
	fx: {
		opacity: "toggle",
		duration: "fast"
	},
	select: function(event, ui) {
		jQuery(this).css("height", $(this).height());
		jQuery(this).css("overflow", "hidden");
	},
	show: function(event, ui) {
		jQuery(this).css("height", "auto");
		jQuery(this).css("overflow", "visible");
	}
};

$(function()
{
	$("div.tabbing").each(function() {
		var tabbing = $(this);
		tabbing.prepend("<ul><\/ul>")
		tabbing.tabs(tbbng_optns);
		tabbing.children("div.host_container_item").each(function() {
			var containerId = this.id;
			var containerTitleEl = $(this).find("h2.host_container_head");
			var containerTitle = containerTitleEl.html();
			tabbing.tabs("add", "#"+containerId, containerTitle);
			containerTitleEl.remove();
		});
	});

	if(/^#cntnr_/.exec(document.location.hash))
		$(".ui-tabs").tabs("select", document.location.hash);
	if(/^#cntnt_/.exec(document.location.hash))
		$(document.location.hash).parents("div.ui-tabs").tabs("select", $(document.location.hash).parents("div.ui-tabs-panel").attr("id"));
});
