try to use load event for adding gallery images