Sounds like spark plugs or leads. Posibly a sensor.but start with good set of plugs,make sure the holes where the leads go isnt full of water this could also be cause,quite common to find water from washer jets leeking threw holes in bonnet.pop jets out and seal them back down.dont let water in plug holes...
Steven,s, January 2012