Intermolecular Potential and Ferroelectric Transitions in Hydrogen Halides