I don't think Iran will attack once it gets nuclear weapons.
Arab Sunnis are suicide bombers.
When was the last time anyone heard of a Persian Shi'ite suicide bomber? Arab Sunnis are 10% of the population of Iraq, and fighting a guerilla, even provoking a civil war. Shi'ite Arabs are 75% of the country, and they didn't fight the Sunnis or keep fighting a civil war when Saddam came after them.
I think the Shi'ites, and particularly the Persians, are rational. They have a medieval religion, but they are not suicidal, not like Sunni Arabs are.
I think that the Iranians want the bomb to make a sanctuary out of Iran. From behind that sanctuary, they will continue to support terrorism, and continue to try and build their neo-Persian empire (and I think that Shi'ite Iran, provoked to civil war by the Sunnis, will be quite close to Iran too, giving them a buffer, and frustrating our intentions for the Iraqi future). But I don't think they'll attack Israel with nuclear weapons, nor release any of their nukes to terrorists to attack us or Israel. That would be suicide, and Persians and Shi'ites are not suicidal.
I think the Iranian President is focusing on Israel to rouse the rabble and keep the country focused externally, to avoid the internal threat of unrest. It's probably going to be successful, because the hatred of Israel among committed Muslims is real and sincere. But Iran won't do anything to Israel that will involve the death or Iran itself.
I hope.