IE8 fix: use jQuery.isFunction() to ensure that supplied callback is a function before calling it.