If Iran can hit Israeli nuclear facilities, it doesn't really matter if they have a nuke or not.
I think Iran got bold because they face a no-win situation. They saw us do the Taliban, and Saddam, and know they are next. They are already setting up to ration gasoline, and there is a UNSC Resolution pending that could easily block imports of refined distillates, as well as seize foreign assets.
When you look at it from the position that the Mullahs think they have little to lose, all of this makes a lot more sense.