Implementing a CMOS TriState Inverter
I don't think it matters, the order of the transistors is arbitrary since they're wired in series. You can find examples of both.

This series of lecture notes shows an example that is the same as (1): http://www-inst.eecs.berkeley.edu/~cs150/sp10/Lecture/lec08-cmos.pdf

That said, they prefer a transmission-gate approach which looks like this:







simulate this circuit &ndash; Schematic created using CircuitLab