This was bothering me to, so I had to find some fix for this issue, and I did :)
Insert this two lines:
if (!images[setPosition])
{setPosition--;}
between:
image_set = (jQuery(images).size() > 0) ? true : false; // Find out if it's a set
// Hide the next/previous links if on first or last images.
_checkPosition(jQuery(images).size());
Result:
image_set = (jQuery(images).size() > 0) ? true : false; // Find out if it's a set
if (!images[setPosition])
{setPosition--;}
// Hide the next/previous links if on first or last images.
_checkPosition(jQuery(images).size());
Instead i have setted the visibility parameter of the nex button when disabled to hidden into the stylesheet.
But I think it will better to change the markup generated for that elem, for example from anchor to span when disabled.
I got the error "itemSrc is undefined in jquery.prettyPhoto.js Line 534" on a single image. It was stuck in an infinite loop.
I only wanted to display one image in the plug-in.
To make the image display in prettyPhoto I added [gallery] to the rel attribute of the link that points to the full size image. After I added [gallery] the error dissappeared.