resizeing functionality for slideshow