modal close on outside click + cart / version

Replaced current handler for close on click outside of modal to use
jquery ui built in function.
Also added same function to cart modal