Javascript function is now case insensitive