Here's a picture of the PCB i made for the 16 pot multiplexer, before the IC's were put in the sockets, pin 1 on each 4051 is in the upper right corner of the sockets.
http://www.mikmo.dk/misc/mux-pcb.jpgIt's hard to see what is connected to what in the picture so:
4051 (1)
pins 6, 7, 8 to GND
pin 16 to 5V
pin 3 to Arduino analog input pin 0
pin 11 to Arduino digital pin 2
pin 10 to Arduino digital pin 3
pin 9 to Arduino digital pin 4
pot 1- 8 wiper to pins 13, 14, 15, 12, 1, 5, 2, 4
4051 (2)
pins 6, 7, 8 to GND
pin 16 to 5V
pin 3 to Arduino analog input pin 1
pin 11 to Arduino digital pin 2
pin 10 to Arduino digital pin 3
pin 9 to Arduino digital pin 4
pot 9 - 16 wiper to pins 13, 14, 15, 12, 1, 5, 2, 4
The code i use is based on the 4051 sample in the playground, i just changed variable names because i found those in the sample code sligthly confusing, and i changed it to work with two 4051 IC's