public static function frontend($force = false) { static $once; if ($once != null && !$force) { return; } $once = true; N2AssetsManager::getInstance(); N2JS::addInline('window.N2PRO=' . N2PRO . ';', true); N2JS::addInline('window.N2GSAP=' . N2GSAP . ';', true); N2JS::addInline('window.N2PLATFORM="' . N2Platform::getPlatform() . '";', true); N2JS::addInline('window.nextend={localization: {}, deferreds:[], loadScript: function(url){n2jQuery.ready(function () {nextend.deferreds.push(n2.ajax({url:url,dataType:"script",cache:true,error:function(){console.log(arguments)}}))})}, ready: function(cb){n2.when.apply(n2, nextend.deferreds).done(function(){cb.call(window,n2)})}};', true); N2JS::jQuery($force); N2JS::addFiles(N2LIBRARYASSETS . "/js", array('consts.js', 'class.js', 'base64.js', 'mobile-detect.js'), 'nextend-frontend'); N2JS::addFiles(N2LIBRARYASSETS . "/js/core/jquery", array("jquery.imagesloaded.js", "litebox.js", "jquery.universalpointer.js", "jquery.mousewheel.js", "EventBurrito.js"), "nextend-frontend"); N2JS::modernizr(); N2CSS::addFiles(N2LIBRARYASSETS . "/css", array('litebox.css'), 'nextend-frontend'); self::animation($force); N2Loader::import('libraries.fonts.fonts'); N2Plugin::callPlugin('fontservices', 'onFontManagerLoad', array($force)); }