fix for jquery v 1.10+

changed to document on click calls.