function initPage() {
	$(document.body).hide();
	$(document.body).fadeIn(500);
	glosLinks();
}

$(document).ready(function() {initPage();});
function glosLinks(){
		$('a[@rel=glos]').each(function(i){
									var $thislink = $(this);
									$thislink.attr({
												   'href': 'index.php?rec=dinamic/glos&search=' + $thislink.attr('href')
												   });
									});
}
///html
function cargarContenidoHTML(donde, que){
	$('#news').slideUp(500, function() {
									 $('#news').html("");
									 setTimeout(function(){$('#hoja_estilo').attr('href',  'stylesinnews.css');   
															   }, 100);
									 
									 });	
	
	$('#'+donde).fadeOut(500, function() {
			$('#'+donde).load(que, function(response, status, xhr) {
					if (status == "error") {
   						//$('#'+donde)innerHTML= = "Sorry but there was an error: ";
						$('#'+donde).fadeIn(500);
  					}else{
					$('#'+donde).fadeIn(500);
					document.getElementById("capabilities").removeChild(document.getElementById("temporal"));
					glosLinks();
					}
			});
	});
	var newdiv = document.createElement('div');
	newdiv.setAttribute('id','temporal');
	document.getElementById(donde).parentNode.appendChild(newdiv);
	newdiv.innerHTML="<div align='center' style='margin-top: 160px;' >&nbsp;<img align='center' src='images/ajax-loader.gif' />&nbsp;</div>";
}

function reloadPage(que){
	var newdiv = document.createElement('div');
	newdiv.setAttribute('id','temporal2');
	document.body.appendChild(newdiv);
	newdiv.innerHTML="<div class='loading' style='vertical-align: middle'><img  src='images/ajax-loader2.gif' /></div>";
	$('body div:first').fadeOut(800, function(){ 
										   setTimeout(function(){document.location.href=que;   
															   }, 600);
										   });
}
/*
		*/
