Added code to determine the sidebar class to use