Moved closeTip() function so it doesn't get needlessly redefined on every call.