  We discuss an extended version of electromagnetism in which the usual gauge
fixing term is promoted into a physical contribution that introduces a new
scalar state in the theory. This new state can be generated from vacuum quantum
fluctuations during an inflationary era and, on super-Hubble scales, gives rise
to an effective cosmological constant. The value of such a cosmological
constant coincides with the one inferred from observations as long as inflation
took place at the electroweak scale. On the other hand, the new state also
generates an effective electric charge density on sub-Hubble scales that
produces both vorticity and magnetic fields with coherent lengths as large as
the present Hubble horizon.
