Violence rises ahead of Afghan elections