fix: indexOf is not avaible in ie8 thus breaks script

using $.inArray instead of indexOf