I'd take the logic out of the elements...
put an id on your image, like 'closeImg'
then your js can be like this:
$('#closeImg').click( function() {
$('#btnCancel').click();
});
$('#btnCancel').click( function() {
//whatever you want to have happen
});
an example: http://jsfiddle.net/vgDPd/
make sure to put this in a $(document).ready() so the dom is loaded for it