title: jQuery collision detection during animation
body: <p>I wanted the black box to detect if it is going to collide on the bordered box.
  If the black box detected a collision it will move around and go to the position clicked by the user.</p>
  
  <p>How to do this with jquery?</p>