Add classes to body before document.write