$( document ) . ready ( 
  function() {
     $('a.enlaceportada').each (
      function( i ) {
        $( this ).after( '<code></code>' );
      }
    )
    $( 'enlaceportada' ).hide();
    $('a.enlaceportada').toggle (  
      function() {
		if( !this.old ){
		  this.old = $(this).html();
		}
		$(this).html('Cerrar');
        parseCode(this);
      },
      function() {
        $(this).html(this.old);
        $(this.nextSibling).hide();
      }
    )
    function parseCode(o){
      if(!o.nextSibling.hascode){
          $.get (o.href,
            function(code){
              o.nextSibling.innerHTML='<code>'+code+'</code>';
              o.nextSibling.hascode=false;
            }
          );
      }
      $(o.nextSibling).show();
    }
  }
)