Bring to front with draggable.

Bring to front with draggable.

Is there a way to bring a draggable box to the front and make it stay in front until another box is clicked? I have it set to where the box is in front when I drag it, but it goes back to its original z-index afterwards.

Here's the code I'm using right now:
  1.     $(function() {
  2.     var dragOpts = {
  3.          cursor: 'move',
  4.         zIndex: 1000 };
  5.     $('.drag').draggable(dragOpts);
  6. })    

Thanks