if (options.hovertype != 'undefined') { options.hovertype = hoverType(); // Check if hoverIntent is available } function hoverType() { // Helper function, finds out if hoverIntent exists if (typeof $.fn.hoverIntent != 'undefined') { var htype = 'hoverIntent'; } else { var htype = 'hover'; } return htype; }