A commutative generalization of the U(1) gauge symmetry group is proposed. The two-parametric family of two-connected abelian Lie groups is obtained. The necessity of existence of so-called imaginary charges and electromagnetic fields with negative energy density (dark photons) is derived. The possibilities when the overall Lagrangian represents a sum or difference of two identical Lagrangians for the visible and hidden sectors (i.e. copies of unbroken U(1)) are ruled out by the extended symmetry. The distinction between the two types of fields resides in the fact that for one of them current and electromagnetic kinetic terms in Lagrangians are identical in sign, whereas for another type these terms are opposite in sign. As a consequence, and in contrast to the common case, like imaginary charges attract and unlike charges repel. Some cosmological issues of the proposed hypothesis are discussed. Particles carrying imaginary charges are proposed as one of the components of dark matter. Such a matter would be imaginarily charged on a large scale for the reason that dark atoms carry non-compensated charges. It leads to important predictions for matter distribution, interaction and other physical properties being different from what is observed in dominant dark matter component in the standard model. These effects of imaginary charges depend on their density and could be distinguished in future observations. Dark electromagnetic fields can play crucial dynamical role in the very early universe as they may dominate in the past and violate weak energy condition which provides physical grounds for bouncing cosmological scenarios pouring a light on the problem of origin of the expanding matter flow.