Use in onBeforePageDisplay same logic as in onSkinTemplateNavigation (so...

... JS is not loaded when VE is not enabled)