function ampliareduce(id,e)
{
  if (jQuery('#noticia'+id).is (':hidden'))
  {
    jQuery('#noticia'+id).css("height","auto");
    jQuery('#noticia'+id).css("display","none");
    jQuery('#noticia'+id).css("visibility","visible");

    jQuery("#noticia"+id).slideDown(500);
    
    var total = jQuery('.contenidoNoticia').length;
    for(i=1;i<=total;i++)
    {
      if(i!=id)
      {
        if(jQuery('#noticia'+i) != null)
        {
            if (jQuery('#noticia'+i).is (':visible')) cierra(i,e);
        }
      }
    }

    jQuery("#desplegar"+id).removeClass("desplegar");
    jQuery("#desplegar"+id).addClass("recoger");
  }

  else
  {
    jQuery("#desplegar"+id).removeClass("recoger");
    jQuery("#desplegar"+id).addClass("desplegar");
    jQuery("#noticia"+id).slideUp(500,
      function ()
      {
        jQuery('#noticia'+id).css("display","none");
        jQuery('#noticia'+id).css("visibility","hidden");
      }
    );
  }
}

function cierra(id,e)
{
  jQuery("#desplegar"+id).removeClass("recoger");
  jQuery("#desplegar"+id).addClass("desplegar");
  jQuery("#noticia"+id).slideUp(500,
    function ()
    {
      jQuery('#noticia'+id).css("display","none");
      jQuery('#noticia'+id).css("visibility","hidden");
    }
  );
}	

function ocultar()
{
  jQuery("div.contenidoNoticia").css("visibility","hidden");
  jQuery("div.contenidoNoticia").css("display","none");
}

function amp(a, b){
	ampliareduce(a, b);	
}

