¡Solucionado!
 
Al final el código queda así:    
Código JavaScript
:
Ver original$(document).ready(function(){
    $("img").each(function(n){
        w = $(this).width();
        h = $(this).height();
        $(this).attr("dims",w+","+h);
    });
    $("img").css({width:80,height:80});
    $("img").click(function(){
        d = $(this).attr("dims").split(",");
        $(this).animate({width:d[0],height:d[1]},"slow");
    });
});
  
Muchas gracias por tu ayuda, eall.