	function generarRollOverMenu () {
		$$('#menu-der a').each(function (el) {
			el.addEvent('mouseenter', function () {
				$('leyenda-boton').set('html',(this.getProperty('title')));
			});
		});
	}

	function iniciarMultiBox ()
	{
		var multiboxArray = $$('a.multibox');
		if (multiboxArray.length > 0) {
			window.addEvent('domready', function(){
				//call multiBox
				var initMultiBox = new multiBox({
					mbClass: '.multibox',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
					container: $(document.body),//where to inject multiBox
					useOverlay: true,//use a semi-transparent background. default: false;
					//maxSize: {w:600, h:400},//max dimensions (width,height) - set to null to disable resizing
					//addRollover: true,//add rollover fade to each multibox link
					//addOverlayIcon: true,//adds overlay icons to images within multibox links
					//addChain: true,//cycle through all images fading them out then in
					recalcTop: true,//subtract the height of controls panel from top position
					//addTips: true,//adds MooTools built in 'Tips' class to each element (see: http://mootools.net/docs/Plugins/Tips)
					autoOpen: 0//to auto open a multiBox element on page load change to (1, 2, or 3 etc)
				});
			});
		}
	}

	function iniciarScrollNoticias ()
	{
		if ($('contenedor-noticias')) {
			$$('div.cuerpo-noticias').each(function (el) {
				eval('mySlide'+el.id+' = new Fx.Slide(el.id);');
				if($('id_noticia')) {
					if (el.id != ('not' + $('id_noticia').get('text'))) {
						eval('mySlide'+el.id+'.toggle();');
					}
				} else {
					eval('mySlide'+el.id+'.toggle();');
				}
			});
			$$('p.boton-noticias').each(function (el) {
				el.addEvent('click', function (){
					$$('div.cuerpo-noticias').each(function (el) {
						eval('mySlide'+el.id+'.hide();');
					});
					eval('mySlidenot'+this.id+'.toggle();');
				});
			});
		}
	}

	function iniciarEnlacesExternos ()
	{
		$$('a.externo').each(function (el) {
			el.setAttribute('target', '_blank');
		});
	}

	window.addEvent('domready', function () {
		generarRollOverMenu();
		iniciarMultiBox();
		iniciarScrollNoticias();
		iniciarEnlacesExternos();
	});
