Temperature surface transitions in nematic liquid crystals. Elastic model