fix to no-jQuery themes, and added window-onload for dom not ready for some reason