Replace Array.indexOf with jQuery.inArray