I’m gonna paste some code here so hopefully it goes through ok. I used your PHP code with some JavaScript. Might be over kill but I get the expected result…
[code] // Initialize prettyPhoto
$(‘.gallery-icon a[href*=”.bmp”], .gallery-icon a[href*=”.gif”], .gallery-icon a[href*=”.jpeg”], .gallery-icon a[href*=”.jpg”], .gallery-icon a[href*=”.png”]’).prettyPhoto({
theme: ‘pp_default’, /* light_rounded / dark_rounded / light_square / dark_square / facebook */
deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
social_tools: false
});[/code]