the following shows how you can quickly see what the index of an element is, using the prevAll() method
var index = $(this).prevAll().length;
.prevAll() gets all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.