3421N/A * This script makes the Sphinx sidebar collapsible. 3421N/A * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds 3421N/A * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton 3421N/A * used to collapse and expand the sidebar. 3421N/A * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden 3421N/A * and the width of the sidebar and the margin-left of the document 3421N/A * are decreased. When the sidebar is expanded the opposite happens. 3421N/A * remember the position of the sidebar among the pages. 3421N/A * Once the browser is closed the cookie is deleted and the position 3421N/A * reset to the default (expanded). 3421N/A * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 3421N/A * :license: BSD, see LICENSE for details. 3421N/A // global elements used by the functions. 3421N/A // the 'sidebarbutton' element is defined as global after its 3421N/A // creation, in the add_sidebar_button function 3421N/A // for some reason, the document has no sidebar; do not run into errors 3421N/A // original margin-left of the bodywrapper and width of the sidebar 3421N/A // with the sidebar expanded 3421N/A // margin-left of the bodywrapper and width of the sidebar 3421N/A // with the sidebar collapsed 3421N/A // colors used by the current theme 3421N/A '<div id="sidebarbutton"><span>«</span></div>' 3421N/A // find the height of the viewport to center the '<<' in the page