use local indexOf instead of Array indexOf (missing in ie)

ie8 causes problems with the missing Array indexOf