In Mathematica 7, if I input Sqrt[2/7], Mathematica outputs $\sqrt{\frac{2}{7}}$, but I want it to output $\frac{\sqrt{14}}{7}$ instead. How do I make Mathematica output values without radicals in the denominator by default? I already tried this solution without success:
rat[p_] := If[FreeQ[Denominator[p], Power[_, Rational[_, _]]], 0, 1]
FullSimplify[Sqrt[2/7], ComplexityFunction -> rat]
I guess I need a better ComplexityFunction, and some way to have Mathematica output the rationalized form by default, instead of having to explicitly use FullSimplify every time.
edit: It would be great if the solution also worked for more complex expressions. For example: $\frac{1}{\sqrt{2}}\rightarrow\frac{\sqrt{2}}{2}$ and $\frac{1}{5-2\sqrt{3}}\rightarrow\frac{5}{13}+\frac{2\sqrt{3}}{13}$

