$(document).ready(function(){	
//Chi siamo - Corporate Governance ==============================
	$("#bios div[id]").hide();
	 $("#bios div#bioIntro").show();
	$("#menuCorporate li a").click(function(){	
		var target = $(this).attr("href");
		$("#bios div[id]").hide();
		if($(this).hasClass("active")){
			$("#bios div#bioIntro").show();
			$(this).removeClass("active");	
		}else{
			$(target).show();	
			$("#menuCorporate li a").removeClass("active");	
			$(this).addClass("active");
		}		
		return false;
		}
	);
	$(".governance a").click(function(){	
		var targetBio = $(this).attr("href");
		$("#bios div[id]").hide();
		$('#cvs').show();
		$(targetBio).show();
		return false;
	});
	$("a.ritorna").click(function(){	
		var targetRitorna = $(this).attr("href");
		$("#bios div[id]").hide();		
		$(targetRitorna).show();
		return false;
	});
	$("a.intro").click(function(){	
		var targetRitorna = $(this).attr("href");
		$("#bios div[id]").hide();		
		$(targetRitorna).show();
		$("#menuCorporate li a").removeClass("active");	
		return false;
	});
	
//Dati finanziari ==========================================================
$("#bilancio2007").hide();

/* $("#menuBilancio a").click(function(){
	var target=$(this).attr("href");
	$(".bilancio").hide();
	$(target).show();
	$("#menuBilancio a").removeClass("active");
	$(this).addClass("active");
	return false;
});	*/

// link in popoup ==========================================================
    $('a[rel="popup"]').click( function() {
    	targetPopup=$(this).attr('href');
    	var larghezza= 600;
    	var altezza= 600;
    	var windowLeft = (screen.width - larghezza) / 2;
  		var windowTop = (screen.height - altezza) / 2;
        window.open(targetPopup, 'popup', 'height='+ altezza +', width='+larghezza+', top=' + windowTop + ',left=' + windowLeft + ',scrollbars=yes, resizable=0, menubar=0, toolbar=0, location=0, statusbar=0, fullscreen=0')
        return false;
    });
});
   
// POPUP da Flash Storia Reel
function apriPopAnno(a){
	    var larghezza= 600;
    	var altezza= 600;
    	var windowLeft = (screen.width - larghezza) / 2;
  		var windowTop = (screen.height - altezza) / 2;
  		window.open('pop_history.php?a='+a, 'popupStoria', 'height='+ altezza +', width='+larghezza+', top=' + windowTop + ',left=' + windowLeft + ',scrollbars=yes, resizable=0, menubar=0, toolbar=0, location=0, statusbar=0, fullscreen=0');
 }

