Slider: calculating it's position depending on images count