(function($, window, document, undefined) { 'use strict'; // init cubeportfolio setTimeout(function(){ $('#js-grid-masonry-projects').cubeportfolio({ filters: '#js-filters-masonry-projects', loadMore: '#js-loadMore-masonry-projects', loadMoreAction: 'click', layoutMode: 'grid', defaultFilter: '*', animationType: 'quicksand', gapHorizontal: 60, gapVertical: 30, gridAdjustment: 'responsive', mediaQueries: [{ width: 1500, cols: 5 }, { width: 1130, cols: 5 },{ width: 1024, cols: 5 }, { width: 768, cols: 3 }, { width: 480, cols: 2, options: { caption: '' } }, { width: 320, cols: 1, options: { caption: '' } }], caption: 'zoom', displayType: 'fadeIn', displayTypeSpeed: 100, // lightbox lightboxDelegate: '.cbp-lightbox', lightboxGallery: true, lightboxTitleSrc: 'data-title', lightboxCounter: '
{{current}} of {{total}}
', // singlePage popup singlePageDelegate: '.cbp-singlePage', singlePageDeeplinking: true, singlePageStickyNavigation: true, singlePageCounter: '
{{current}} of {{total}}
', singlePageCallback: function(url, element) { // to update singlePage content use the following method: this.updateSinglePage(yourContent) var t = this; $.ajax({ url: url, type: 'GET', dataType: 'html', timeout: 30000 }) .done(function(result) { t.updateSinglePage(result); }) .fail(function() { t.updateSinglePage('AJAX Error! Please refresh the page!'); }); }, }); },500); })(jQuery, window, document);