The Hart-Cellar Act of 1965 lead to a drastic increase in immigration into the US . This expanded the labor force, which will tend to decrease the price of labor. Immigrants can't compete for jobs which require years of experience, or the right social connections, so not all parts of the labor force are equally affected.
The 1970s also saw a surge of women into the work force. The late 70s saw the peak of the baby boom entering the job market. Given all these pressures on the labor force, it is perhaps not surprising that median wages stagnated.
After 1977 America's trade deficit exploded. In 2010 it accounted for about 3.5% of GDP. However, the real impact on the economy is greater than that figure suggests. Every factory job lost overseas means one less customer for service industries. This leads to additional economic shrinkage. Also, the industries that go overseas tend to be the labor intensive ones, which increases the impact on the labor force. Trade is definitely part of the reason for the stagnation in median wages. However it seems to be too small in relation to GDP to account for the whole problem.