Having lived through some of this time period, you're wrong. (Well, the 1960s on; it's irrelevant now what party stances before 1900 were.)
First, what's the difference between the parties switching spectrum and the parties changing their stances? There were a lot of conservative southern Democrats in those days, and southern Democrat Johnson was instrumental in pushing civil rights, accepting losing much of the South to Republicans. Civil rights was a primarily Democrat position, and those opposed tended to join the Republicans. Obviously this says nothing about any individual Democrat or Republican, but on the whole the Democrats pushed it and the Republicans dragged their heels.
In the 60s, pretty much everybody was opposed to Communism. The Vietnam War radicalized a lot of people, who reasoned that (a) we shouldn't be involved in Vietnam, and so (b) the North Vietnamese were partly the Good Guys, and (c) Communism really wasn't that bad. It wasn't good reasoning, but the revulsion to the Vietnam War did a lot of unfortunate things. (I consider this largely LBJ's fault.) You're misinterpreting Reagan's role here.
Communism never was the threat it was presented as, and the US allowed its actions to be controlled far too much by opposition to Communism. For example, the US in this period destabilized and overthrew democratic governments because they looked socialist and were talking to Moscow (if the US is strongly against you, who the hell do you talk to?), often replacing them with brutal right-wing dictatorships. Communism was indeed that bad, but the US tended to lump in socialism and simply being left-wing with Communism, and made up what fictions it needed to say that brutal right-wing dictatorships were better than Communist governments.
I've never been sure how many movements moved to Communism just because they were anti-American, and the only source of help for anti-Americans was the overrated Communist bloc (Red China and the Soviet Union were never buddies).