Relative strengths of hydrogen bonds Order of hydrogen bond strength:
$\ce{O-H...N}$ &gt; $\ce{O-H...O}$ &gt; $\ce{N-H...N}$ &gt; $\ce{N-H...O}$. Why is that so?

According to me $\ce{O-H...O}$ should have the maximum strength while $\ce{N-H...N}$ should have the weakest hydrogen bonds based on the fact that oxygen is more electronegative than nitrogen. It would develop a higher $\delta^-$ charge and the hydrogen attached to it will have a higher $\delta^+$ charge which would make the hydrogen bonding stronger.
I can't reason out the order given in my textbook. After observing it, all I can guess is that oxygen being highly electronegative leads to higher $\delta^+$ charge on hydrogen while nitrogen being less electronegative easily shares its electron cloud with hydrogen, making the hydrogen bond stronger.
I am not sure about this reason as according to this it is more stable for hydrogen to make a hydrogen bond with a less electronegative element and possibly even an electropositive element, (unless and until the hydrogen is attached to a highly electronegative element), which does not occur in normal circumstances.
It would be great if anybody could help me figure out the reason for the above trend.
As a short answer, Hydrogen bonds (for elementary chemistry) are formed with donation of lone pair of a lewis base into LUMO of H attached to a highly electronegative atom. A better donor makes a better bond and more electronegative atom makes a better bond. From my experience, the second factor overrides the first one in most cases.

N is a better donor than O and H in $\ce{O-H}$ is a better acceptor than H in $\ce{N-H}$.