/*! * Nucleus v1.0 * Copyright 2016 unCommons Team * Licensed under the MIT license */ // jQuery CHECK if (typeof jQuery === 'undefined') { throw new Error('Nucleus\'s JavaScript requires jQuery'); } /*********/ /* INDEX */ /*********/ /*------------------------------------------------------------------------------------- A. LOAD COMPONENT B. SPACING SYSTEM b1. Padding b2. Margin b3. Position C. ANIMATION SYSTEM c1. Appearing c2. Animations D. UI COMPONENTS E. EVENTS e1. Clicks e2. Hovers e3. Lightbox Popup e4. Page Loading F. EFFECTS f1. Shadows G. GRID SYSTEM H. HELPERS x1. Clean Array x2. UI Counter WINDOW.EVENTS -------------------------------------------------------------------------------------*/ jQuery(function($){ 'use strict'; var NUCLEUS = window.NUCLEUS || {}; /**********************/ /* A. LOAD COMPONENT */ /**********************/ NUCLEUS.loadComponent = function(fileName) { // Search for the nucleus.j path $('script').each(function() { var src = this.src; var nucleusJSfolder; if (src && src.match('nucleus.js')) { src = src.split("?")[0]; nucleusJSfolder = src.replace('nucleus.js', ''); } // Use the path to inluce other libraries if( nucleusJSfolder ) { $.ajax({ url: nucleusJSfolder + fileName, dataType: 'script', async: false }); } }); } /**********************/ /* B. SPACING SYSTEM */ /**********************/ /* b1. Padding -------------------------------------------------------------------------------------*/ NUCLEUS.paddingSpacing = function() { $('[class^="padd-"], [class*=" padd-"]').each(function() { var $item = $(this); var classes = $(this).attr('class').split(' '); classes = NUCLEUS.cleanArray(classes); $.each(classes, function( index, value ){ if (value.indexOf("padd-") >= 0){ var valLen = value.lenght; value = value.substring(5, valLen); var values = value.split('-'); var style = ''; $.each(values, function( index, value ){ if( $.isNumeric(value) ){ style += value+'px '; return true; } }); $item.css('padding', style); return true; } }); }); } /* b2. Margin -------------------------------------------------------------------------------------*/ NUCLEUS.marginSpacing = function() { // Positive $('[class^="marg-"], [class*=" marg-"]').each(function() { var $item = $(this); var classes = $(this).attr('class').split(' '); classes = NUCLEUS.cleanArray(classes); $.each(classes, function( index, value ){ if (value.indexOf("marg-") >= 0){ var valLen = value.lenght; value = value.substring(5, valLen); var values = value.split('-'); var style = ''; $.each(values, function( index, value ){ if( $.isNumeric(value) ){ style += value+'px '; return true; } }); $item.css('margin', style); return true; } }); }); // Negative $('[class^="-marg-"], [class*=" -marg-"]').each(function() { var $item = $(this); var classes = $(this).attr('class').split(' '); classes = NUCLEUS.cleanArray(classes); $.each(classes, function( index, value ){ if (value.indexOf("-marg-") >= 0){ var valLen = value.lenght; value = value.substring(6, valLen); var values = value.split('-'); var style = ''; $.each(values, function( index, value ){ if( $.isNumeric(value) ){ style += -value+'px '; return true; } }); $item.css('margin', style); return true; } }); }); }; /* b3. Position -------------------------------------------------------------------------------------*/ NUCLEUS.positionSpacing = function() { // Positive $('[class^="top-"], [class^="right-"], [class^="bottom-"], [class^="left-"], [class*=" top-"], [class*=" right-"], [class*=" bottom-"], [class*=" left-"]').each(function() { var $item = $(this); var classes = $(this).attr('class').split(' '); classes = NUCLEUS.cleanArray(classes); $.each(classes, function( index, value ){ if (value.indexOf("top-") >= 0 || value.indexOf("right-") >= 0 || value.indexOf("bottom-") >= 0 || value.indexOf("left-") >= 0){ var num; if( num = value.match(/\d+$/)[0] != null ){ var style = value.match(/\d+$/)[0] + 'px'; } } if (value.indexOf("top-") >= 0){ $item.css('top', style); } if (value.indexOf("right-") >= 0){ $item.css('right', style); } if (value.indexOf("bottom-") >= 0){ $item.css('bottom', style); } if (value.indexOf("left-") >= 0){ $item.css('left', style); } return true; }); }); // Negative $('[class^="-top-"], [class^="-right-"], [class^="-bottom-"], [class^="-left-"], [class*=" -top-"], [class*=" -right-"], [class*=" -bottom-"], [class*=" -left-"]').each(function() { var $item = $(this); var classes = $(this).attr('class').split(' '); classes = NUCLEUS.cleanArray(classes); $.each(classes, function( index, value ){ if (value.indexOf("-top-") >= 0 || value.indexOf("-right-") >= 0 || value.indexOf("-bottom-") >= 0 || value.indexOf("-left-") >= 0){ var num; if( num = value.match(/\d+$/)[0] != null ){ var style = -value.match(/\d+$/)[0] + 'px'; } } if (value.indexOf("-top-") >= 0){ $item.css('top', style); } if (value.indexOf("-right-") >= 0){ $item.css('right', style); } if (value.indexOf("-bottom-") >= 0){ $item.css('bottom', style); } if (value.indexOf("-left-") >= 0){ $item.css('left', style); } return true; }); }); }; /************************/ /* C. ANIMATION SYSTEM */ /************************/ /* c1. Appearing -------------------------------------------------------------------------------------*/ NUCLEUS.appearing = function() { $('.appear-childs > *').each(function() { $(this).addClass('appear').addClass('fade-in'); if($(this).find('.ui-count').length > 0){ $(this).find('.ui-count').addClass('appear').addClass('fade-in'); } }); $('.appear').each(function() { var $target = $(this); var pxTop = $(window).height() / 1.6; var targetH = $target.height(); if( $target.hasClass('fade-in-down') ) { pxTop = pxTop - (targetH/2); } if( $target.hasClass('fade-in-up') ) { pxTop = pxTop + (targetH/2); } if( $target.hasClass('bounce-in') ) { pxTop = pxTop + (targetH/2.5); } var offset = ( pxTop * 100 ) / $(window).height(); var waypoint = new Waypoint({ element: $target, handler: function() { if($target.hasClass('fade-in') && $target.css('opacity') == 0 ){ // Fade In TweenMax.to( $target, 0.5, {opacity:1, ease:Power2.easeOut} ); if($target.hasClass('ui-count')){ setTimeout(function(){ NUCLEUS.uiCount($target); }, 200); } }else if(($target.hasClass('fade-in-up') || $target.hasClass('fade-in-down')) && $target.css('opacity') == 0){ // Fade In Up/Down TweenMax.to( $target, 0.3, {opacity:1, transform: 'none', ease:Power2.easeOut} ); if($target.hasClass('ui-count')){ setTimeout(function(){ NUCLEUS.uiCount($target); }, 200); } }else if(($target.hasClass('fade-in-left') || $target.hasClass('fade-in-right')) && $target.css('opacity') == 0){ // Fade In Left/Right TweenMax.to( $target, 0.3, {opacity:1, transform: 'none', ease:Power2.easeOut} ); if($target.hasClass('ui-count')){ setTimeout(function(){ NUCLEUS.uiCount($target); }, 200); } }else if($target.hasClass('bounce-in') && $target.css('opacity') == 0){ // Bounce In TweenMax.to( $target, 0.4, {opacity:1, transform: 'scale3d(1.1, 1.1, 1.1)', ease:Power2.easeOut} ); TweenMax.to( $target, 0.4, {opacity:1, transform: 'scale3d(1, 1, 1)', ease:Power2.easeOut, delay:0.4} ); if($target.hasClass('ui-count')){ setTimeout(function(){ NUCLEUS.uiCount($target); }, 500); } }else{ // Show TweenMax.to( $target, 0, {opacity:1, ease:Power2.easeOut} ); if($target.hasClass('ui-count')){ setTimeout(function(){ NUCLEUS.uiCount($target); }, 200); } } this.destroy(); }, offset: offset+'%' }); }); } /* c2. Animations -------------------------------------------------------------------------------------*/ NUCLEUS.animations = function() { // Fade In TweenMax.to( $('.fade-in:not(.appear)'), 0.5, {opacity:1, display:'block', ease:Power2.easeOut, delay:0.1} ); $('.h-fade-in').on({ mouseenter: function(){ TweenMax.to( $('.h-target', this), 0.5, {opacity:1, display:'block', ease:Power2.easeOut, delay:0.1} ); }, mouseleave: function(){ TweenMax.to( $('.h-target', this), 0.5, {opacity:0, display:'none', ease:Power2.easeOut, delay:0.1} ); } }); // Fade In Up/Down TweenMax.to( $('.fade-in-down:not(.appear), .fade-in-up:not(.appear)'), 0.3, {opacity:1, display:'block', transform: 'none', ease:Power2.easeOut, delay:0.1} ); $('.h-fade-in-down').on({ mouseenter: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.3, {opacity:1, display:'block', y:'0%', ease:Power2.easeOut, delay:0.1} ); }, mouseleave: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.3, {opacity:0, display:'none', y:'-100%', ease:Power2.easeOut} ); } }); $('.h-fade-in-up').on({ mouseenter: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.3, {opacity:1, display:'block', y:'0%', ease:Power2.easeOut, delay:0.1} ); }, mouseleave: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.3, {opacity:0, display:'none', y:'100%', ease:Power2.easeOut} ); } }); // Fade In Left/Right TweenMax.to( $('.fade-in-left:not(.appear), .fade-in-right:not(.appear)'), 0.5, {opacity:1, display:'block', transform: 'none', ease:Power2.easeOut, delay:0.1} ); $('.h-fade-in-right').on({ mouseenter: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.5, {opacity:1, display:'block', x:'0%', ease:Power2.easeOut, delay:0.1} ); }, mouseleave: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.5, {opacity:0, display:'none', x:'-100%', ease:Power2.easeOut} ); } }); $('.h-fade-in-left').on({ mouseenter: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.5, {opacity:1, display:'block', x:'0%', ease:Power2.easeOut, delay:0.1} ); }, mouseleave: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.5, {opacity:0, display:'none', x:'100%', ease:Power2.easeOut} ); } }); // Bounce In TweenMax.to( $('.bounce-in:not(.appear)'), 0.4, {opacity:1, display:'block', transform: 'scale3d(1.1, 1.1, 1.1)', ease:Power2.easeOut, delay:0.1} ); TweenMax.to( $('.bounce-in:not(.appear)'), 0.4, {opacity:1, display:'block', transform: 'scale3d(1, 1, 1)', ease:Power2.easeOut, delay:0.5} ); $('.h-bounce-in').on({ mouseenter: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.4, {opacity:1, display:'block', transform: 'scale3d(1.1, 1.1, 1.1)', ease:Power2.easeOut, delay:0.1} ); TweenMax.to( $('.h-target', this), 0.4, {opacity:1, display:'block', transform: 'scale3d(1, 1, 1)', ease:Power2.easeOut, delay:0.5} ); }, mouseleave: function(){ TweenMax.killTweensOf($('.h-target', this)); TweenMax.to( $('.h-target', this), 0.4, {opacity:0, display:'none', transform: 'scale3d(0.3, 0.3, 0.3)', ease:Power2.easeOut, delay:0.1} ); } }); } /*********************/ /* D. UI COMPONENTS */ /*********************/ /* Init -------------------------------------------------------------------------------------*/ NUCLEUS.ui = function() { // Accordion $( '.ui-accordion' ).accordion(); // Tabs $( '.ui-tabs' ).tabs(); // Button $( '.ui-button, .ui-checkbox' ).button(); // Buttonset (radio) $( '.ui-buttonset' ).buttonset(); // Select $( '.ui-select' ).selectmenu(); // Datepicker $( '.ui-date' ).datepicker(); // Spinner $( '.ui-spinner' ).spinner(); // Progressbar $( '.ui-progressbar' ).each(function() { $(this).progressbar({ value: 1, }); // Slide if( $('body').hasClass('loading') ){ TweenMax.to( $('.ui-progressbar-value', this), 0.5, { width:$(this).data('value')+'%', ease:Power2.easeInOut, delay:2 } ); }else{ TweenMax.to( $('.ui-progressbar-value', this), 0.5, { width:$(this).data('value')+'%', ease:Power2.easeInOut, delay:0.3 } ); } var bgValue = $(this).data('bg-value'); $('.ui-progressbar-value').css('background', bgValue); }); // Tooltip $( '.ui-tool').each(function(){ var ttClass = $(this).data('class'); if( typeof ttClass != 'undefined' ){ $(this).tooltip({ tooltipClass: ttClass }); }else{ $(this).tooltip(); } }); // Standard Checkbox $('input[type="checkbox"]:not(.ui-helper-hidden-accessible)').after(''); // Standard Radio $('input[type="radio"]:not(.ui-helper-hidden-accessible)').after(''); // Carousel $(".ui-carousel").slick({ responsive: [ { breakpoint: 1200, settings: { slidesToShow: 3, } }, { breakpoint: 992, settings: { slidesToShow: 2, } }, { breakpoint: 768, settings: { slidesToShow: 1, } } ] }); // Counter $( '.ui-count:not(".appear")' ).each(function() { NUCLEUS.uiCount($(this)); }); } /**************/ /* E. EVENTS */ /**************/ /* e1. Click Events -------------------------------------------------------------------------------------*/ NUCLEUS.clickEvents = function() { // Go To Top $('.go-to-top').on('click', function(e){ e.preventDefault(); var distance = $(this).offset().top; var timeSec = distance / 2000; TweenMax.to(window, timeSec, {scrollTo:{y:0}, ease:Power2.easeOut}); }); // Go To ID $('.go-to').on('click', function(e) { e.preventDefault(); var $target, targetPos; if (typeof $(this).data('goto') === 'undefined') { $target = $($(this).attr('href')); } else { $target = $($(this).data('goto')); } targetPos = $target.offset(); if (targetPos) { if (typeof $(this).data('offset') === 'undefined') { targetPos = targetPos.top - 100; } else { targetPos = targetPos.top - $(this).data('offset'); } var timeSec = targetPos / 2000; TweenMax.to(window, timeSec, {scrollTo: {y: targetPos}, ease: Power2.easeOut}); } }); // Go To # (automatic) if(window.location.hash) { $(window).scrollTop(0); var $target = $(window.location.hash); $(window).load(function(){ if( $target.length > 0 ){ var timeout = 100; if($('body').hasClass('loading')){ timeout = 1500; } var targetPos = $target.offset(); targetPos = targetPos.top -100; var timeSec = targetPos / 2000; setTimeout(function(){ TweenMax.to(window, timeSec, {scrollTo:{y:targetPos}, ease:Power2.easeOut}); }, timeout); } }); } } /* e2. Hover Events -------------------------------------------------------------------------------------*/ NUCLEUS.hoverEvents = function() { // Sub Menu - No Animation $( '.main-menu li.menu-item-has-children' ).on({ mouseenter: function(){ if($(this).closest( '.main-menu' ).hasClass('menu-fade-in')){ TweenMax.to($('> .sub-menu', this), 0.3, { display:'block', opacity: 1, ease: Power2.easeOut }); }else if($(this).closest( '.main-menu' ).hasClass('menu-fade-in-top')){ TweenMax.to($('> .sub-menu', this), 0.3, { display:'block', opacity: 1, marginTop:0, ease: Power2.easeOut }); }else if($(this).closest( '.main-menu' ).hasClass('menu-fade-in-left')){ TweenMax.to($('> .sub-menu', this), 0.3, { display:'block', opacity: 1, marginLeft:0, ease: Power2.easeOut }); }else{ TweenMax.to($('> .sub-menu', this), 0, { display:'block', opacity: 1, ease: Power2.easeOut }); } }, mouseleave: function(){ if($(this).closest( '.main-menu' ).hasClass('menu-fade-in')){ TweenMax.to($('> .sub-menu', this), 0.3, { display:'none', opacity: 0, ease: Power2.easeOut }); }else if($(this).closest( '.main-menu' ).hasClass('menu-fade-in-top')){ TweenMax.to($('> .sub-menu', this), 0.3, { display:'none', opacity: 0, marginTop:20, ease: Power2.easeOut }); }else if($(this).closest( '.main-menu' ).hasClass('menu-fade-in-left')){ TweenMax.to($('> .sub-menu', this), 0.3, { display:'none', opacity: 0, marginLeft:20, ease: Power2.easeOut }); }else{ TweenMax.to($('> .sub-menu', this), 0, { display:'none', opacity: 0, ease: Power2.easeOut }); } } }); } /* e3. Lightbox Popup -------------------------------------------------------------------------------------*/ NUCLEUS.popup = function() { // Single Image $('a.popup-image').each(function() { var zoom = {}; if( $(this).hasClass('zoom') ){ zoom = { enabled: true, duration: 300, easing: 'ease-in-out', opener: function(openerElement) { return openerElement.is('img') ? openerElement : openerElement.find('img'); } }; } $(this).magnificPopup({ type: 'image', showCloseBtn: false, midClick: true, mainClass: 'mfp-fade', closeOnContentClick: true, disableOn: function() { if( $(window).width() < 600 ) { return false; } return true; }, zoom: zoom, }); }); // Single Iframe $('a.popup-iframe').each(function() { $(this).magnificPopup({ type: 'iframe', showCloseBtn: false, midClick: true, mainClass: 'mfp-fade', closeOnContentClick: true, disableOn: function() { if( $(window).width() < 600 ) { return false; } return true; } }); }); // Mixed Gallery $('.popup-gallery').each(function() { var zoom = {}; if( $(this).hasClass('zoom') ){ zoom = { enabled: true, duration: 300, easing: 'ease-in-out', opener: function(openerElement) { return openerElement.is('img') ? openerElement : openerElement.find('img'); } }; } $(this).magnificPopup({ delegate: 'a', type: 'image', showCloseBtn: false, midClick: true, mainClass: 'mfp-fade', gallery:{ enabled: true, arrowMarkup: '', tPrev: 'Previous Item', tNext: 'Next Item', preload: [1,3], }, callbacks: { lazyLoad: function(item) {} }, disableOn: function() { if( $(window).width() < 600 ) { return false; } return true; }, zoom: zoom, }); }); } /* e4. Page Loading -------------------------------------------------------------------------------------*/ NUCLEUS.pageLoading = function() { if($('body').hasClass('loading')){ // Remove all once loaded $(window).load(function(){ setTimeout(function(){ $('.load-item, .load-item-custom').animate({ opacity: 0, }, 300, function() { }); }, 300); setTimeout(function(){ $('.load-wrap').animate({ opacity: 0, display: 'none', }, 300, function() { }); }, 600); setTimeout(function(){ //$('.load-wrap').remove(); }, 1500); }); } } /***************/ /* F. EFFECTS */ /***************/ /* f1. Shadows -------------------------------------------------------------------------------------*/ NUCLEUS.shadows = function() { $('[class^="shad-"], [class*="shad-"]').each(function() { var $item = $(this); var classes = $(this).attr('class').split(' '); classes = NUCLEUS.cleanArray(classes); $.each(classes, function( index, value ){ if (value.indexOf("shad-") >= 0){ var valLen = value.lenght; value = value.substring(5, valLen); var values = value.split('-'); var opacity = values[2] / 100; var style = '0 0 ' + values[0] + 'px ' + values[1] + 'px rgba(0,0,0,' + opacity + ')'; $item.css('box-shadow', style); return true; } }); }); } /*******************/ /* G. GRID SYSTEM */ /*******************/ NUCLEUS.gridSystem = function() { $('.grid-wrap').each(function() { // Grid Init var $grid = $('.grid-items', this).isotope({ itemSelector: '.grid-item', layoutMode: 'packery', packery: { columnWidth: '.grid-sizer', gutter: 0, }, }); // Layout Isotope after each image loads $grid.imagesLoaded().progress( function() { $grid.isotope({filter: '.grid-item:not(.paged)'}); $grid.isotope('layout'); TweenMax.to($grid, 0.3, {opacity:1, ease:Power2.easeOut}); }); // Filtering $('.grid-filter', this).on( 'click', function() { var filterValue = $(this).data('filter')+':not(.paged)'; $grid.isotope({ filter: filterValue }); }); // Load More $('.grid-items .grid-item', $(this)).each(function(index){ index++; var limit = $(this).parent().data('limit'); if(index > limit){ $(this).addClass('paged'); } }); $('.filters-wrap .grid-filter', $(this)).each(function(){ var wrapper = $(this).parent().parent(); var filterClass = $(this).data('filter'); filterClass = filterClass.substring(1); var ok = false; $('.grid-items .grid-item:not(.paged)', wrapper).each(function(){ if( $(this).hasClass(filterClass) ){ ok = true; } }); if( ok == false && $(this).data('filter') != '*' ){ TweenMax.set( $(this), {display:'none', opacity:0}); }else{ TweenMax.set( $(this), {display:'inline-block', opacity:1}); } }); $('.grid-loadmore', $(this)).on('click', function(){ var wrapper = $(this).parent().parent(); if( $('.grid-items .grid-item.paged', wrapper).length > 0 ) { $('.grid-items .grid-item.paged', wrapper).each(function (index) { index++; var limit = $(this).parent().data('limit'); if (index <= limit) { $(this).removeClass('paged'); $('.grid-items').isotope({filter: '.grid-item:not(.paged)'}); $('.grid-items').isotope('layout'); } }); if( $('.grid-items .grid-item.paged', wrapper).length == 0 ) { TweenMax.to( $(this), 0.3, {display:'none', opacity:0, ease:Power2.easeOut} ); } }else{ TweenMax.to( $(this), 0.3, {display:'none', opacity:0, ease:Power2.easeOut} ); } $('.filters-wrap .grid-filter', wrapper).each(function(){ var filterClass = $(this).data('filter'); filterClass = filterClass.substring(1); var ok = false; $('.grid-items .grid-item:not(.paged)', wrapper).each(function(){ if( $(this).hasClass(filterClass) ){ ok = true; } }); if( ok == false && $(this).data('filter') != '*' ){ TweenMax.set( $(this), {display:'none', opacity:0}); }else{ TweenMax.set( $(this), {display:'inline-block', opacity:1}); } }); }); }); } /***************/ /* H. HELPERS */ /***************/ /* h1. Clean Array -------------------------------------------------------------------------------------*/ NUCLEUS.cleanArray = function(arr) { var i, len = arr.length, out = [], obj = { }; for (i = 0; i < len; i++) { obj[arr[i]] = 0; } for (i in obj) { if( i != '' ){ out.push(i); } } return out; }; /* h2. Ui Counter -------------------------------------------------------------------------------------*/ NUCLEUS.uiCount = function($target){ var count = {val:0}; var end = $target.data('count'); TweenMax.to(count, 3, {val:'+=' + end, roundProps:'val', onUpdate:function(){ $target.text(count.val); }, ease:Power3.easeInOut}); } /*********************/ /* WINDOW.EVENTS */ /*********************/ // READY EVENT // $(document).ready(function(){ // Load Components NUCLEUS.loadComponent('TweenMax.min.js'); // A // Page Loading NUCLEUS.pageLoading(); // e4 NUCLEUS.loadComponent('imagesloaded.pkgd.min.js'); // A NUCLEUS.loadComponent('jquery.waypoints.min.js'); // A NUCLEUS.loadComponent('jquery.magnific-popup.min.js'); // A NUCLEUS.loadComponent('jquery-ui.min.js'); // A NUCLEUS.loadComponent('slick.min.js'); // A NUCLEUS.loadComponent('isotope.pkgd.min.js'); // A NUCLEUS.loadComponent('packery-mode.pkgd.min.js'); // A // Spacing System NUCLEUS.paddingSpacing(); // b1 NUCLEUS.marginSpacing(); // b2 NUCLEUS.positionSpacing(); // b3 // Effects NUCLEUS.shadows(); // f1 // Events NUCLEUS.clickEvents(); // e1 NUCLEUS.hoverEvents(); // e2 NUCLEUS.popup(); // e3 // Grid System NUCLEUS.gridSystem() // G }); // END READY EVENT // LOAD EVENT // $(window).load(function(){ // Appearing var loadingDelay = 500; if( $('body').hasClass('loading') ){ loadingDelay = 1500; } setTimeout(function(){ NUCLEUS.appearing(); // c1 }, loadingDelay); // UI Components NUCLEUS.ui(); // D // Animations NUCLEUS.animations(); // c2 }); // SCROLL EVENT // $(window).scroll(function(){ }); }); // End of jQuery