Modified plugin for prettyphoto