added conditional statement to prev/next fn

Prevent carousel controls from navigating past valid item range which would "break" navigation in the other direction.