Vos tenes esto en un link:
 
<?php echo $id; ?> 
Que imprimiría un numero. 
Pero no tenes ningun texto, y estas tratando de obtener el $id como si fuera un texto! 
$(this).text() 
Entonces, la solución es imprimir el $id dentro de cualquier atributo que pueda tener el link. Por ejemplo, en el title: 
<a href="info_portfolio.php" title="<?php echo $id; ?>"> 
Y luego obtenerlo así: 
$(this).attr("title");