Endogenous changes in public opinion dynamics