//Get next image, when it reaches the end, rotate it back to the first image
var next = ((current.next().length) ? ((current.next().hasClass(‘show’)) ? $(‘div.rotator ul li:first’) :current.next()) : $(‘div.rotator ul li:first’));