We have each of the cards now randomly assigned to one of the values to be matched, and a comparison once you have selected three to see whether you have won or not.
We also have a reload button so the game can be replayed.
You can see progress so far here: http://imaginationishonesty.co.uk/matching.html
We now need the cards to be hidden when you match three, and for them to flip over when you click on them.
We have found a jQuery plug in which creates the flip effect really nicely: QuickFlip2
I have also tested it on my iPod touch, so we can be sure that it will work on the iPhone, although the first time you run the script (first touch of the card) is a bit lagging.