Draggable special containment

Draggable special containment


I have a div with id="program" and that's my containment box. Inside
this I have a div with id="drag" which is draggable.
The draggable content is larger then the containment box.
I want to constrain the draggable elements movement in such way, that
the draggable can freely move inside the containment, but if the
draggable bounderies reaches the containments bounderies to stop
dragging.
In summary:
If the draggable content moves outside the containment that is a good
behaviour, but when the draggable reaches it bounderies with the
containment, then the draggable shouldn't be allowed to be draged.
Here you can find an example what I'm trying to achieve:
http://www.zingzing.co.uk/
Drag the content area up or down until you cannot drag anymore and
that's the behavior I want to achieve.
Any ideas?
Thanks.