Added two callbacks, onImageSwap() and onImageSwapComplete().