updated loading event + added support for IE8