Updated the page ready javascript code to save the state of the color box.