fixing wrong output on newer versions

you can verify the code responsible for this behaviour change in any version > 1.9.0b1
i attached the code sample here

```
index: function(e) {
            return e ? "string" == typeof e ? b.inArray(this[0], b(e)) : b.inArray(e.jquery ? e[0] : e, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
        },
```