

$(function() {

	$(".time-stamp").prettyDate();
	setInterval(function(){ $(".time-stamp").prettyDate(); }, 5000);

	// xowiki utility portlet
	var tabs = [];
	var tabContainers = [];
	$('div.wiki-tab-bar ul.compact a').each(function () {
		tabs.push(this);
	    });
	$('div.xowiki-history > div').each(function () {
		tabContainers.push($(this).get(0));
	    });
	$(tabContainers).hide().filter(':first').show();

	$(tabs).click(function () {
		// hide all tabs and show selected (hash)
		$(tabContainers).hide().filter(this.hash).show();

		// set up the selected id
		$(tabs).parents("li").removeAttr("id");
		$(this).parent().attr({id: 'tab-bar-active'});

		return false;
	    }).filter(':first').click();

    });


