Propagation of the electromagnetic waves through non-homogeneous media