Dynamically flipping the CSS box offset if the new slide comes after the current one