Added background image loading effect using JS and CSS transition