
// Pop a url into a new window
function popout (url, w, h)
{
	if (!w)
		w = 500;
	if (!h)
		h = 400;
	window.open(url, "", "width="+w+", height="+h+", location=no, resizable=yes, scrollbars=yes, toolbar=no");
	return false;
}
// Pop an element into a new window (overwrites)
function popouta (e, w, h, name)
{
	var width = 400;
	var height = 400;
	if (w) width = w;
	if (h) height = h;
	var url = window.location;
	if (e) {
		if (e.href)
			url = e.href;
		else if (e.src)
			url = e.src;
		else
			url = e;
	}
	if (!name) name = 'help';
	window.open(url, name, "width="+width+", height="+height+", location=no, resizable=yes, scrollbars=yes, toolbar=no");
	return false;
}

/** Tab interface **/
$(function () {	
	
	$('#page_home_verticals').find('a').each( function() {
		if (this.rel) {
			var nl = this.href;
			$(this).attr('href',this.rel).bind('click.nav', function() {
				setTimeout(function(){window.location = nl;}, 0);
				return false;
			});
			this.href = this.rel;
			this.rel = nl;
		}
	}).end().tabs(1, {
		fxFade: true,
		fxSpeed: 200,
		event: 'mouseover',
		panelClass: 'tab',
		hideClass: 'hide',
		selectedClass: 'active',
		bookmarkable: false
	}).tabsRotate(2200);
	
});
