jquery for treatments page now waits until all images have loaded