set classnames on prev and next item