Added auto-rotate function to pagination

Add's an auto rotate feature