Pendulum with mouse interaction [F8]

i´d like to make a pendulum effect, with the interaction with the mouse. the pendulum does not need to be swinging. Just hanging form the top of the screen. when the mouse passes over it, would make it swing accordingly to it. the cord should make natural movements too. Does anybody has any idea on how to do it or has any link with tutorials.

thanks for any help