Israel declares war after surprise Hamas attack