update:

Actually, both your codes work! However there is something weird. Both behave identical after the chip has first been programed, plugged into the circuit and powered on: the side with PB1/LED1&2 comes on and the other side does not come on(only LED1 comes on with Ace's code, but this is to be expected). The push buttons do nothing. But if I remove the 10k pull up resistor from the switching circuit and put it back, the circuit comes to life and the program behaves the way you would expect it to.

Very odd...

Any ideas as to why this happens?