You should start to arrange your mortgage when you get the offer and decide to buy your home. It's at this point that you'll start to become responsible for survey and legal costs.  

Mortgage offers in principle usually last up to 3 months. You may have to restart if you begin arranging your mortgage before you get the offer.