Intramolecular interactions in photochromic spiropyran-merocyanine polymers