$(function(){
	tabs();
	footerLinks();
});

/* genera el comportamiento de tabs */
function tabs(){
	$('#tabs .tabs').idTabs();
}

/* muestras las capas ocultas al hacer mouseover */
function footerLinks(){
	
	$('#footerBottom > li > a').hover(function(){
		$(this).next().show();
	}, function(){
		$(this).next().hide();
	});
	
	$('#footerBottom div.layer').hover(function(){
		$(this).show();
	},function(){
		$(this).hide();
	});
}


/* Mostrar y ocultar categorías */
/*
//antigua función: muestra y oculta otras categorías
function showMe(idcateg){
	if ($('#'+idcateg).css("display")=="none"){
		$('#'+idcateg).show();
	}
	else{
		$('#'+idcateg).hide();
	}
}
*/
//nueva función: muestra otras categorías y oculta el trigger
function showMe(idcateg){
		$('#'+idcateg+'_trigger').hide();
		$('#'+idcateg).show();
}

function submitbuscador(){
		if(document.getElementById('buscador').value.length<3){
			alert("La palabra a buscar debe contener por lo menos 3 caracteres");
			return false;
		}
		else{
				return true;
			}
	}
function submitbuscador_home(){
		if(document.getElementById('palabra').value.length<3){
			alert("La palabra a buscar debe contener por lo menos 3 caracteres");
			return false;
		}
		else{
				return true;
			}
	}


