Fixed target attribute and click events

I had to change from a normal 'click' event to 'mousedown' and 'mouseup' because the click event only bubbles up to the document for the left mouse button.
For reference: http://bugs.jquery.com/ticket/11485