Use in onBeforePageDisplay same logic as in onSkinTemplateNavigation (so JS is not loaded when VE is not enabled)
Break logic for determining of VE is enabled into a function.
Cache variable locally
Merge pull request #1622 from Wikia/VE-345

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