shortened IE code to fire a custom event, no need to shadow a variable (Andrea Giammarchi)