The Iranian election (in 8 months) has been, and will continue to be, overshadowed by the American and Israeli elections. Ahmadinejad is up for re-election then (after a 4-year term); his election will be (in part) a referendum for his very brinksman-style policies on Israel, the West, the US, and nuclear "power." It looks like things are not going to go his way.
First, religious conservatives in Iran don't really like him. They're relatively insular, and more concerned with Islam and the Shia Ummah than with regional power-grabbing and conflict. He's faced pressure from the unelected religious leadership to tone down and look inward. International sanctions have hurt him with these groups.
Parliament has started targeting his allies. A cabinet member was dismissed for having faked his educational credentials, by large margin in parliament.
Finally, and perhaps most importantly: Ahmadinejad has depended in large part on the fact that the US is seen as an enemy, as unreasonable, as controlled by war-corporations. Whether merited or not, the election of Obama has changed the perspective of many Iranians about the US attitude, its democracy, etc. This is in large part due to the fact that Obama's black--if a black man can win, then the democracy must be real. The results are undermining years of messages by Tehran state media, trying to reinforce beliefs of US corruption, capitalism-evil, white dominance, etc etc. Tehran's anti-Westerners are going to struggle in the next election as people catch onto the fact that state media has been lying.
From the LA Times: "“Let me tell you that now I believe in American democracy,” [a man in Tehran] said excitedly. “Honestly, I did not think that Obama would be president. I thought that the invisible hands of the big trusts and cartels would not allow a black man to be president of the United States.”" Iranians tuned into Voice of America to hear Persian translations of Mr. Obama's victory speech.
Even Obama's reaching-out to Tehran might undermine Ahmadinejad. If the US appears to be open-minded and diplomatic in the Middle East, moderate, pro-West parties will begin to look more attractive (because warming up to the West will have fewer cons than previously thought).
All this means that Ahmadinejad has a tough 8 months in front of him. Expect a moderate alternative to start looking popular in the next few months in Iran.