Cooperative Interaction of Anionic Dyes with Imidazole-Containing Polymers