// <![CDATA[
	// opacity
	function opacity(element, value) {
		var value_noie = value / 100;
		$(element).css('filter', 'alpha(opacity=' + value + ')');
		$(element).css('-moz-opacity', value_noie);
		$(element).css('-khtml-opacity', value_noie);
		$(element).css('opacity',value_noie);
	}

	// center horizontally
	function centerHoriz(lo_que) {
		var x = parseFloat($(window).width()) / 2 - parseFloat($(lo_que).width()) / 2;
		var y = $(window).scrollTop() + $(window).height() / 2 - parseFloat($(lo_que).height()) / 2;
		x = x + 'px';
		y = y + 'px';
		$(lo_que).css({'left': x, 'top': y});
	}

	// center vertically
	function centerVert(lo_que) {
		var y = $(window).scrollTop() + $(window).height() / 2 - parseFloat($(lo_que).height()) / 2;
		$(lo_que).css({'top': y});
	}

	// image load
	function loadImg(sID, sURL) {
		$(sID).unbind("load");
		$(sID).bind("load", function() { $(this).fadeIn(); } )
		$(sID).stop(true, true).fadeOut("normal", function () { $(sID).attr('src', sURL); } );
	}
	
	
	function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
	}
	

	$(document).ready(
		function() {
	

		//FIXES DEL SLIDER DE NOTICIAS
		equalHeight($(".noticiasSlider li"));
		//equalHeight($(".noticiasSlider"));
		var heightSlider = $(".noticiasSlider li").height();
		$("#slider").css("height", heightSlider + "px");
			
		// Menu Desplegable //
		$(document).ready(function() {
		 $('#menu-menu-superior li:has(.sub-menu)').hover(
		 function(e)
		 {
			 $(this).find('a').addClass('active');
			 $(this).find('.sub-menu').fadeIn(500).css("z-index","9999");
		 },
		 function(e)
		 {
			 $(this).find('a').removeClass('active');
			 $(this).find('.sub-menu').hide();
		 }
		 );
		

		 $('#nav2 li:has(ul)').hover(
		 function(e)
		 {
			 
			 $(this).addClass('current_page_item');
			 $(this).children('ul').hide();
			 $(this).children('ul').fadeIn(500).css("z-index","9999");
		 },
		 function(e)
		 {
//			 $(this).find('a').removeClass('active').fadeIn();
			 $(this).children('ul').hide();
			 $(this).removeClass('current_page_item');
		 }
		 );
		}); 
		
		
		//efecto sebra en las tablas de contenido		
		$("tr:odd").addClass("odd");
		
		
		}
	);
	
// ]]>
