function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// use chageImage() from GoLive but throug jQuery
// changeImages('logo_ayun1','img/bots/logo_ayun2.gif');
function changeImages() {
	var id = "#"+arguments[0];
	var image = arguments[1];
	
	$(id).attr("src",image);
	
}


jQuery(function(){
	var $opacitybuttons = $("#logo,#BOT_CONVOCATORIA_a, #descargas2, #hoteles, #bot_facebook, #bot_twitter, #bot_flickr");
	
	$opacitybuttons.hover( function(){ $(this).css("opacity","0.5"); }, function(){ $(this).css("opacity","1"); } );
	

	$("#calendario table a")
	.hover(
		function(){
			var tipoText = $(this).parent().attr("class");
			$("#calendario #rollover").html(tipoText);
		},function(){
			$("#calendario #rollover").html("");
		})
	.click(function(){
		var href = $(this).attr("href");
		$("#contenidos .cont").load(href+" #wrapp");
		
		return false;
	});
	
	// because of base URL:
	$("#anclas a").click(function(){
		document.location.hash=$(this).attr("href");
		return false;
	});
	//
	$("#avisolegal").click(function(){
		var URL= $(this).attr("href");
		window.open(URL,"_blank","width=600,height=600,location,menubar,scrollbars,resizable");
		return false;
	});

	$("p.pie").each(function(){
		var height = $(this).height();
		$(this).css("height",height);
	});
	

	
})
