Parliamentary behaviour with two principals: preferences, parties, and voting in the European parliament