made blog animation work on any number of pages