Attraction-repulsion transition between abrikosov vortices and Josephson vortices in the strongly layered superconductor Bi2Sr2CaCu2O8