Changed jQuery.ifFunction to jQuery.isFunction