Synthesis and optical properties of linear and branched styrylpyridinium dyes in different environments