Only show main elements in desktop sizes
Fixes for Safari 7.

Browser tested in IE/Firefox/Safari/Chrome Windows/OS X/Linux.
Remove debug code.
JS events for entering and leaving desktop/mobile mode.