in the process of replacing getElementsByClass() by jQuery each()