fix scope bug with jQuery events - now properly scoped to the element.