Relative Jacobians of elliptic fibrations with reducible fibers