Swapped use of .indexOf on arrays to $.inArray()

`.indexOf` isn't supported on arrays for Internet Explorer 8 or less. I swapped it out for jQuery's own `$.inArray()` which returns the same result as `.indexOf()` would, in a browser which supports it.

Not possible to write a test for this.