Time-dependent galactic winds - I. Structure and evolution of galactic outflows accompanied by cosmic ray acceleration