Use jQuery inArray over indexOf for IE support

IE 8 doesn't support indexOf on arrays. Using the jQuery inArray lets us
have a cross browser way of doing this.

https://www.pivotaltracker.com/story/show/52907471