jquery core: closes #2771
$.inArray now makes a === check because of IE.
$.inArray is used in $.fn.index, this is shorter, and breaks the loop when possible.
$.fn.index can receive a jquery object, and the first element is used