navHover = function() {
	var lis = document.getElementById("navmenu-h").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.style.background = "transparent";
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
			this.style.background = "url('images/separation_items.gif') right no-repeat";
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);



ShowTooltip = function(e)
{
	var text = $(this).next('.tooltip-text');
	if (text.attr('class') != 'tooltip-text')
		return false;

	text.fadeIn()
		.css('top', e.pageY)
		.css('left', e.pageX+10);

	return false;
}
HideTooltip = function(e)
{
	var text = $(this).next('.tooltip-text');
	if (text.attr('class') != 'tooltip-text')
		return false;

	text.fadeOut();
}

SetupTooltips = function()
{
	$('.title_msj')
		.each(function(){
			$(this)
				.after($('<span/>')
					.attr('class', 'tooltip-text')
					.html($(this).attr('title')))
				.attr('title', '');
		})
		.hover(ShowTooltip, HideTooltip);
}


$(document).ready(function() {
	SetupTooltips();

	//Search Box-----------------------------------------------------
	$("#search_text").click(	function(){$(this).val('')} 	);
	$("#search_form input[@type='image']").click(	function(){$('#search_text').val('')} 	);
	$("#search_form").submit( function(){if ($('#search_text').val()==''){alert('No ha ingresado texto de búsqueda');return false;} }	)
	//---------------------------------------------------------------

});