Critical behaviour of the anchoring energy of the director at the free surface of a nematic liquid crystal