function linkmail(domainname, name, domain) {
	location.href = 'mai' + 'lto:' + name + '@' + domainname + '.' + domain;
}

function showhide(obj) {
	var el = document.getElementById(obj);
	if(el.style.display != "block") {
		el.style.display = "block";
	} else {
		el.style.display = "none";
	}
}

function show(obj) {
	var el = document.getElementById(obj);
	el.style.display = "block";
}

function hide(obj) {
	var el = document.getElementById(obj);
	el.style.display = "none";
}

function showhide_in(obj) {
	var el = document.getElementById(obj);
	if(el.style.display != "inline") {
		el.style.display = "inline";
	} else {
		el.style.display = "none";
	}
}

function changeLink(id, n, d, e) {
	document.getElementById(id).innerHTML=n+"@"+d+"."+e;
}
function changeLinkOff(id) {
	document.getElementById(id).innerHTML="email";
}

function change(status, id) {
	document.getElementById(id).src = 'ftbi/images/pulsanti/' + id + '_' + status + '.png';
}


$(document).ready(function() {
	
	$(".scrollable").scrollable({circular: true, speed: 500}).autoscroll({ autoplay: true, interval: 5000, autopause: true }).navigator();
	
	$('.navi a').hover(function() {
		$(".scrollable").scrollable().stop();
		$(".scrollable").scrollable().seekTo($(this).index(), 250);
		$(this).blur();
//		$(this).stop(true, false).animate({"right": "10px"});
	}, function() {
		$(".scrollable").scrollable().play();
//		$(this).stop(true, false).animate({"right": "0px"});
	});
	$('.navi a').click(function() {
		var i = $(this).index() + 1;
		document.location = $('.scrollable .items').children().slice(i).children().attr('href');
	});
	
});
