Fixed OldIE compatibility by changing references to
Array.prototype.indexOf to jQuery's $.inArray function.