demos/demos/mediaelement/assets/jquery.colorbox.js
function getIndex(increment) {
		var 
		max = $related.length, 
		newIndex = (index + increment) % max;
		
		return (newIndex < 0) ? max + newIndex : newIndex;
	}
function getIndex(increment) {
		var 
		max = $related.length, 
		newIndex = (index + increment) % max;
		
		return (newIndex < 0) ? max + newIndex : newIndex;
	}
function getIndex ( increment ) { var max = $related . length , newIndex = ( index + increment ) % max ; return ( newIndex < 0 ) ? max + newIndex : newIndex ; }
Determine the next and previous members in a group.
Determine the next and previous members in a group .