I found a nice extension to the problem. I'll post it as a separate problem.
blackjack
flooble's webmaster puzzle