fixed $.inArray to check for not -1 instead of === 1