draggable() - preventing draging element outside window
<p>how can you prevent the user to drag the element outside the window?</p>

<pre><code>elm.css({
        top : $(window).scrollTop() + ($(window).height() - elm.height()) / 2+'px',
        left : ($(window).width() - elm.width()) / 2+'px'
    })
    .draggable({
        handle : tr_top
    });
</code></pre>
