Why would there by a focused item when the document becomes ready?
if the previous line worked, $currLI is the single element that corresponds to the currently focused item. There is no ‘next’ in this context; you’ve selected a single item, so the set of matched elements contains exactly 1 thing.
Paul’s correct, you want to use index; probably with a modulo, which will solve all your wrapping-around needs…