Added guard conditions before manipulating DOM elements.

Added guard conditions to check if the 'floatdivleft' and
'floatdivright' DOM elements exist before trying to add them to
floatingMenu.
Fixed JSHint warning messages about misplaced semicolons