This page demonstarates prettyPhoto patched to load photos through AJAX when reaching start or end of the list of photos on the pages.
This patch is extremely experimental. Major rewrite of prettyPhoto should be done to make this well. Currently slideshow and preview gallery do not work.
See also the latest (unstable) version.
This demo uses the following PHP scripts: