added brackets around if statement.
Inlined arrayPrototypeIndexOf() and renamed lib.inArray() to lib.indexOf().