add callback on changing images

could be used to show and hide previous- and next buttons