Added utility function strHasWord used in new hasClass for better performance.