function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}


/* popup centrat */
function popup(url,windowname,width,height,features) { 
width=(width)?width:screen.width/2; 
height=(height)?height:screen.height/2; 
var screenX = (screen.width/2 - width/2); 
var screenY = (screen.height/2 - height/2); 
if (features) {
var features= "width=" + width + ",height=" + height + "," + features; 	
} 
else {
var features= "width=" + width + ",height=" + height +",scrollbars=yes,status=no,resizable=no"; 
}
features += ",screenX=" + screenX + ",left=" + screenX; 
features += ",screenY=" + screenY + ",top=" + screenY; 

var mywin=window.open(url, windowname, features); 
if (mywin) 
mywin.focus(); 
return mywin; 
} 

//-----------------------------------------------------------------------------------------
//	MENÚ
//-----------------------------------------------------------------------------------------

	$(document).ready(function(){
		
		$("#boto_menu_1").click(function () {
			$("#contingut_menu_1").toggle("slow");
			$("#boto_menu_1 .img").toggle("fast");
			$("#boto_menu_1 .img2").toggle("fast");
		});
		$("#boto_menu_2").click(function () {
			$("#contingut_menu_2").toggle("slow");
			$("#boto_menu_2 .img").toggle("fast");
			$("#boto_menu_2 .img2").toggle("fast");
		});
		$("#boto_menu_3").click(function () {
			$("#contingut_menu_3").toggle("slow");
			$("#boto_menu_3 .img").toggle("fast");
			$("#boto_menu_3 .img2").toggle("fast");
		});
		$("#boto_menu_4").click(function () {
			$("#contingut_menu_4").toggle("slow");
			$("#boto_menu_4 .img").toggle("fast");
			$("#boto_menu_4 .img2").toggle("fast");
		});
		$("#boto_menu_5").click(function () {
			$("#contingut_menu_5").toggle("slow");
			$("#boto_menu_5 .img").toggle("fast");
			$("#boto_menu_5 .img2").toggle("fast");
		});
		$("#boto_menu_6").click(function () {
			$("#contingut_menu_6").toggle("slow");
			$("#boto_menu_6 .img").toggle("fast");
			$("#boto_menu_6 .img2").toggle("fast");
		});
		$("#boto_menu_7").click(function () {
			$("#contingut_menu_7").toggle("slow");
			$("#boto_menu_7 .img").toggle("fast");
			$("#boto_menu_7 .img2").toggle("fast");
		});
		$("#boto_menu_8").click(function () {
			$("#contingut_menu_5").toggle("slow");
			$("#boto_menu_8 .img").toggle("fast");
			$("#boto_menu_8 .img2").toggle("fast");
		});
		
	});

