Direction of torque due to magnetic moment I have a problem with determining the direction of torque due to magnetic moment on a current loop. Since the torque is defined as 
$$ \tau = p_m \times B $$
so I guess the direction of the torque should be perpendicular to both $p_m$ and $B$.
And yet, take this problem. If a current is flowing through a rectangle loop, as in the following picture, the torque should be directed parallel to the horizontal, and not have any effect in oscillating the loop around it's position of stable equilibrium. (Right?)
The axis of rotation is the horizontal line passing through the center, parallel to the sides

But if we sum up the Ampere forces, we find that this torque indeed induces the oscillation of the loop.
I am very confused with the magnetic moment, as it is explained for now. Whenever I come across a problem involving it, there is no picture describing that vector, just the calculation part. I need to know not only it's intensity, but also direction, to fully understand it.
 A: With a constant current, the magnetic (dipole) moment is simply
$\bf{m} = \it{I}\bf{a}$ where $\bf{a}$ is the vector area
$\bf{a} = \oint\bf{r} \times d\bf{l}$ where $d\bf{l}$ is the differential element around the boundary of the area. 
Where the torque 
$\bf{\tau} = \bf{m} \times \bf{B} $
So for example if the loop is flat like yours above, the direction will be normal to area as per the standard right hand rule. If it is some other shape then the direction will be given by the integral.
This is discussed nicely in Griffiths' E/M
A: For anyone still having the same problem:
The error here is in fact very fundamental.
What I was doing, was taking the torque $M$ from the picture, and comparing it to the force of gravity - not it's appropriate torque.
In fact, what should be done is to find all the torques as vectors, add them up to get a resultant torque. The motion is then described by applying the right hand rule to the overall torque.
It's a bit counter-intuitive but the torque due to force $F$ at length $r$ from the axis of rotation has the direction $r \times F$. Look it up on Wikipedia. Big thanks to the user @bremsstrahlung for clearing up the matter!
