Yeah it is a very smart idea for Iran to attack Israel a few days before the American election... It is obviously in Iran's interest to make sure that the US voters elect a president who will have committed to a "super hawk" response to such an Iranian aggression. Further more it is very beneficial for Iran to attack Israel, the fact that Israel likely has second strike ability and that the US surely would retaliate most severely are small details that nobody really would pay any attention to...
Report: China silences human rights criticism through intimidation at UN (Reuters)
from the article: Iran: We will continue to enrich uranium despite receiving Russian fuel