Yahoo will buy the remainder of online advertising exchange Right Media for $680 million in stock and cash, Yahoo said today.

The portal giant bought a 20 percent stake of Right Media in October for $45 million and now plans to acquire the remaining 80 percent, it said.

Right Media offers advertisers and sellers of ad space a real-time marketplace to buy and sell display advertising on websites. The move expands Yahoo's advertising reach beyond its own network of sites.

It comes on the heels of Google's planned $3.1 billion acquisition of DoubleClick, announced this month as consolidation in the online advertising segment continues.

New York-based Right Media was founded in 2003 with investment from Yahoo and others.