replace array.indexOf with $.inArray to support IE8
Merge pull request #127 from Leonidaz/master

replace array.indexOf with $.inArray to support IE8