Implemented the borders animation