
function wellness(){ 
	// fix png
	$(document).pngFix(); 
	
	// per lightbox

	// tabls visita virtuale
	var tabContainers = $('div.container > div')
	tabContainers.hide().filter(':first').show()
	$('div.botTab').show()
	var tabs = $('div.tabs ul.nav a')
	tabs.click(function () {
		tabContainers.hide()
		tabContainers.filter(this.hash).show()
		$('div.tabs ul.nav a').removeClass('selected')
		$(this).addClass('selected')
		$('div.botTab').show()
		return false;
	}).filter(':first').click()

	
	// popup info difficolta
	$("img.livello").hover(function() {
		var txt = $(this).attr('alt')
		//alert(txt)
		$(this).next().text(txt)
		$(this).next("span").stop(true, true).animate({opacity: "show", top: "20"}, "slow")
		}, function() {
			$(this).next("span").animate({opacity: "hide", top: "30"}, "fast")
	});

	$("img.livellob").hover(function() {
		var txt = $(this).attr('alt')
		//alert(txt)
		$(this).next().text(txt)
		$(this).next("span").stop(true, true).animate({opacity: "show", top: "20", left: "100"}, "slow")
		}, function() {
			$(this).next("span").animate({opacity: "hide", top: "30", left: "100"}, "fast")
	});


	// accordion corsi visita virtuale	
	var days = $('div.corsi a.day')
	days.next().hide() //.filter(':first').show() apre il primo	
	days.click(function() {
		if ($(this).next().hasClass('aperto')) {
			$(this).next().slideUp('fast')
			$(this).next().removeClass('aperto')
		}else{
			$('div.corsi div.aperto').slideUp('fast')
			$(this).next().slideDown('fast')
			$(this).next().addClass('aperto')
		}
		return false;
	})
}
$(document).ready(wellness)
