use a safer check for current selection
further refactoring of shadow rendering to fix tooltips & simplify
initialise initial week-view x offset as well as y offset

This was causing a problem on Chrome because the uninitialised CSS "left"
property was defaulting to "auto" rather than "0px" and consequent mouse
pointer offset calculations were always returning NaN.