How to use Javascript or Ajax for thumbnails navigation.The thumbnails have been genereted by PHP.