Using the link you gave, all the profiles are loaded in the document, which are initially hidden. Clicking a profile opens that <div> and closes any other open profiles.
This is the simplest solution. If large amounts of data is used then Ajax(load on demand) would be a better option.
The image enlargements use a lightbox, of which there are many: http://planetozh.com/projects/lightbox-clones/