Initial revision.
Use a cookie to remember which tab we switched to most recently.
Include jquery cookie code.