Fix bounded to element position calculation.

Use offset() instead of position(). 
Also check that the bounding element exists before using it's offset (to avoid undefined
exception)
Fix original position of the dragged element
Optimize calculation of the boundary of the movement
Rewrite horizontal movement calculation.

The increase and decrease of the horizontal level is now based on dragged element
left position.
Each level is specified by a spacing distance (in pixel, customizable as "data-spacing"). A
spacing threshold is computed based on this spacing (spacing / 4).
Now, when the left position of the dragged element is around the parent position +- 
the spacing +- the spacing threshold, it's level is increased/decreased.

You just have to specify the spacing parameter according to your tree style (so that the
visual is approaching the calculation).
Remove an useless variable
Improve vertical placement calculation.

The vertical position is now determined based on the dragged element position
compared to the other element position.
If the top of the dragged element is below next element middle position, then the
dragged element is positionned after it.
If the top of the dragged element is above previous element middle position, then the
dragged element is positionned before it.