Gas free expansion 
It is found that all known
gases cool slightly on undergoing a free expansion. This is consistent with the
kinetic theory idea that temperature is associated with the kinetic energy of
the molecules.
If the gas expands, then the intermolecular attraction potential
energy goes up as the molecules get further apart. - Finn thermal

See the quotation above. I am not sure how does the statement in italic implies the "fact" in bold, that is, why the expansion of a gas increase the potential energy.
Shouldn't the expansion implies the opposite? That is, the molecules gets further apart, and as all potential decrease with distance, shouldn't the potential goes down?
 A: "...as all potential decrease with distance..." This is just wrong – sorry.
Imagine that you are pulling further apart the two ends of a rubber band. You have to do work against the tension force and you are thereby transferring energy from your muscles to the rubber band. [The transfer is this way round because the forces you are exerting are in the same direction as the directions in which the forces are moving.]
The situation would be similar if you could pull molecules apart from each other against the attractive Van der Waals (using nano tweezers?) Extra potential energy would be stored in the system of two molecules when pulled apart. In a gas at an ordinary temperature the molecules get further apart in a bigger container because of their random motion – and without the need for tweezers! The extra potential energy comes at the expense of kinetic energy, so in a free expansion the gas cools.
A: A little more information at the macroscopic level. For free expansion of an ideal gas there is no change in temperature; for an ideal gas internal energy and enthalpy are functions of temperature only.  This is called Joule expansion because of the 1834 experiment by Joule in which he could detect no change in temperature for free expansion of air.
We now know that a small drop in temperature does occur for free expansion; the internal energy of a real gas is a function of both temperature and pressure.  The effect of pressure and the resulting drop in temperature is of little importance in most engineering applications.
