Fixed for IE7 and IE8

I made some changes if the browser is IE8 or below to handle correctly attaching the mouse events and identifying the correct mouse button clicked.