Israel attacking Iran prior to our election would be a huge mistake. First of all, Israel would not get a full force commitment by the U.S. during a strike (and possibly resistance from the U.S.). Secondly, 0bama could gain in his re-election bid which would be disastrous in the long term for Israel.
If that were true, Obama would want them to attack.