randomized prev and next positions
removed test media query for portrait orientation; will work only on ipad now