I have client site with a few different books in it. There are also some basic pages and other nodes that are not within the books. When you are in the first book the sidebar is blue, when you are in the second book the sidebar is green and the the third has an orange sidebar. This is controlled by a class that is applied to the body from a field in the book module.
Currently, when you access a global page (meaning a page or view outside a book) the sidebar color is a default color. But the client wants these global pages' sidebar color to stay the same as the last viewed book and not switch to a different color until a new book is viewed.
I am not even sure how to begin to go about doing this and am looking for ideas.