public/assets/js/script.js
/**
		 * @desc Initialize owl carousel plugin
		 * @param {object} c - carousel jQuery object
		 */
@desc Initialize owl carousel plugin
@param {object} c - carousel jQuery object
@desc Initialize owl carousel plugin @param { object } c - carousel jQuery object
function initOwlCarousel(c) {
			var aliaces = ["-", "-sm-", "-md-", "-lg-", "-xl-", "-xxl-"],
					values = [0, 576, 768, 992, 1200, 1600],
					responsive = {};
			for (var j = 0; j < values.length; j++) {
				responsive[values[j]] = {};
				for (var k = j; k >= -1; k--) {
					if (!responsive[values[j]]["items"] && c.attr("data" + aliaces[k] + "items")) {
						responsive[values[j]]["items"] = k < 0 ? 1 : parseInt(c.attr("data" + aliaces[k] + "items"), 10);
					}
					if (!responsive[values[j]]["stagePadding"] && responsive[values[j]]["stagePadding"] !== 0 && c.attr("data" + aliaces[k] + "stage-padding")) {
						responsive[values[j]]["stagePadding"] = k < 0 ? 0 : parseInt(c.attr("data" + aliaces[k] + "stage-padding"), 10);
					}
					if (!responsive[values[j]]["margin"] && responsive[values[j]]["margin"] !== 0 && c.attr("data" + aliaces[k] + "margin")) {
						responsive[values[j]]["margin"] = k < 0 ? 30 : parseInt(c.attr("data" + aliaces[k] + "margin"), 10);
					}
				}
			}
			if (c.attr('data-dots-custom')) {
				c.on("initialized.owl.carousel", function (event) {
					var carousel = $(event.currentTarget),
							customPag = $(carousel.attr("data-dots-custom")),
							active = 0;
					if (carousel.attr('data-active')) {
						active = parseInt(carousel.attr('data-active'), 10);
					}
					carousel.trigger('to.owl.carousel', [active, 300, true]);
					customPag.find("[data-owl-item='" + active + "']").addClass("active");
					customPag.find("[data-owl-item]").on('click', function (e) {
						e.preventDefault();
						carousel.trigger('to.owl.carousel', [parseInt(this.getAttribute("data-owl-item"), 10), 300, true]);
					});
					carousel.on("translate.owl.carousel", function (event) {
						customPag.find(".active").removeClass("active");
						customPag.find("[data-owl-item='" + event.item.index + "']").addClass("active")
					});
				});
			}
			c.on("initialized.owl.carousel", function () {
				initLightGalleryItem(c.find('[data-lightgallery="item"]'), 'lightGallery-in-carousel');
			});
			c.owlCarousel({
				autoplay: isNoviBuilder ? false : c.attr("data-autoplay") === "true",
				loop: isNoviBuilder ? false : c.attr("data-loop") !== "false",
				items: 1,
				center: c.attr("data-center") === "true",
				dotsContainer: c.attr("data-pagination-class") || false,
				navContainer: c.attr("data-navigation-class") || false,
				mouseDrag: isNoviBuilder ? false : c.attr("data-mouse-drag") !== "false",
				nav: c.attr("data-nav") === "true",
				dots: c.attr("data-dots") === "true",
				dotsEach: c.attr("data-dots-each") ? parseInt(c.attr("data-dots-each"), 10) : false,
				animateIn: c.attr('data-animation-in') ? c.attr('data-animation-in') : false,
				animateOut: c.attr('data-animation-out') ? c.attr('data-animation-out') : false,
				responsive: responsive,
				navText: c.attr("data-nav-text") ? $.parseJSON(c.attr("data-nav-text")) : [],
				navClass: c.attr("data-nav-class") ? $.parseJSON(c.attr("data-nav-class")) : ['owl-prev', 'owl-next']
			});
		}
function initOwlCarousel ( c ) { var aliaces = [ "-" , "-sm-" , "-md-" , "-lg-" , "-xl-" , "-xxl-" ] , values = [ 0 , 576 , 768 , 992 , 1200 , 1600 ] , responsive = { } ; for ( var j = 0 ; j < values . length ; j ++ ) { responsive [ values [ j ] ] = { } ; for ( var k = j ; k >= - 1 ; k -- ) { if ( ! responsive [ values [ j ] ] [ "items" ] && c . attr ( "data" + aliaces [ k ] + "items" ) ) { responsive [ values [ j ] ] [ "items" ] = k < 0 ? 1 : parseInt ( c . attr ( "data" + aliaces [ k ] + "items" ) , 10 ) ; } if ( ! responsive [ values [ j ] ] [ "stagePadding" ] && responsive [ values [ j ] ] [ "stagePadding" ] !== 0 && c . attr ( "data" + aliaces [ k ] + "stage-padding" ) ) { responsive [ values [ j ] ] [ "stagePadding" ] = k < 0 ? 0 : parseInt ( c . attr ( "data" + aliaces [ k ] + "stage-padding" ) , 10 ) ; } if ( ! responsive [ values [ j ] ] [ "margin" ] && responsive [ values [ j ] ] [ "margin" ] !== 0 && c . attr ( "data" + aliaces [ k ] + "margin" ) ) { responsive [ values [ j ] ] [ "margin" ] = k < 0 ? 30 : parseInt ( c . attr ( "data" + aliaces [ k ] + "margin" ) , 10 ) ; } } } if ( c . attr ( 'data-dots-custom' ) ) { c . on ( "initialized.owl.carousel" , function ( event ) { var carousel = $ ( event . currentTarget ) , customPag = $ ( carousel . attr ( "data-dots-custom" ) ) , active = 0 ; if ( carousel . attr ( 'data-active' ) ) { active = parseInt ( carousel . attr ( 'data-active' ) , 10 ) ; } carousel . trigger ( 'to.owl.carousel' , [ active , 300 , true ] ) ; customPag . find ( "[data-owl-item='" + active + "']" ) . addClass ( "active" ) ; customPag . find ( "[data-owl-item]" ) . on ( 'click' , function ( e ) { e . preventDefault ( ) ; carousel . trigger ( 'to.owl.carousel' , [ parseInt ( this . getAttribute ( "data-owl-item" ) , 10 ) , 300 , true ] ) ; } ) ; carousel . on ( "translate.owl.carousel" , function ( event ) { customPag . find ( ".active" ) . removeClass ( "active" ) ; customPag . find ( "[data-owl-item='" + event . item . index + "']" ) . addClass ( "active" ) } ) ; } ) ; } c . on ( "initialized.owl.carousel" , function ( ) { initLightGalleryItem ( c . find ( '[data-lightgallery="item"]' ) , 'lightGallery-in-carousel' ) ; } ) ; c . owlCarousel ( { autoplay : isNoviBuilder ? false : c . attr ( "data-autoplay" ) === "true" , loop : isNoviBuilder ? false : c . attr ( "data-loop" ) !== "false" , items : 1 , center : c . attr ( "data-center" ) === "true" , dotsContainer : c . attr ( "data-pagination-class" ) || false , navContainer : c . attr ( "data-navigation-class" ) || false , mouseDrag : isNoviBuilder ? false : c . attr ( "data-mouse-drag" ) !== "false" , nav : c . attr ( "data-nav" ) === "true" , dots : c . attr ( "data-dots" ) === "true" , dotsEach : c . attr ( "data-dots-each" ) ? parseInt ( c . attr ( "data-dots-each" ) , 10 ) : false , animateIn : c . attr ( 'data-animation-in' ) ? c . attr ( 'data-animation-in' ) : false , animateOut : c . attr ( 'data-animation-out' ) ? c . attr ( 'data-animation-out' ) : false , responsive : responsive , navText : c . attr ( "data-nav-text" ) ? $ . parseJSON ( c . attr ( "data-nav-text" ) ) : [ ] , navClass : c . attr ( "data-nav-class" ) ? $ . parseJSON ( c . attr ( "data-nav-class" ) ) : [ 'owl-prev' , 'owl-next' ] } ) ; }
@desc Initialize owl carousel plugin
 @param {object} c - carousel jQuery object
@desc Initialize owl carousel plugin @param { object } c - carousel jQuery object
// Enable custom pagination