added hooks to leaf images in js