var apitab = "";
var time;
jQuery(function() {
	apitab = jQuery("ul.tabs").tabs("div.panes > div.contenutotab",{
		event: 'mouseover',
		api: true
	});
	
	jQuery(".apripopupregolamento").overlay({
		target: '#popup1',
		close: '.chiuditxt',
		fixed: false,
		top: 192
	});
	
	jQuery('#landing').bind('mouseleave',function() {
		time = setTimeout("setTab0()",10000);
	});
	
	jQuery('#landing').bind('mouseenter',function() {
		clearTimeout(time);
	});
})

function setTab0() {
	apitab.click(0);
}

function DisplayPopup(popurl,popname,winprops) {
	winpopup = window.open(popurl,popname,winprops);
	if (winpopup==null) {
		document.location.href='/ErrBlPopup.stm';
  	} else {
		winpopup.window.focus();
	}
	return winpopup;
}
