Motherwell consolidated second spot in the Scottish Premiership with a 5-1 victory over Partick Thistle at Firhill.