"use strict"; function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } (function ($) { "use strict"; /*-------------------------------------------------------------- [Table of contents] LONYO PRELOADER JS INIT LONYO HEADER TRIGER JS INIT LONYO STICKY MENU JS INIT LONYO MENU SIDEBAR JS INIT LONYO PROGRES CIRCLE JS INIT LONYO MAGNIFIC PUPOP JS INIT LONYO BRAND SLIDER INIT LONYO COUNTER JS INIT LONYO TSTIMONIAL SLIDER INIT LONYO SKILLBAR JS INIT LONYO CURRENT YEAR JS INIT LONYO AOS ANIMATION JS INIT LONYO MAP JS INIT LONYO VERTICAL SLIDER JS INIT LONYO TOOGLE BUTTON JS INIT LONYO PORTFOLIO MASONAY FILTER JS LONYO TOGGLE PASSOWRD JS INIT -------------------------------------------------------------------*/ /*-------------------------------------------------------------- CUSTOM PRE DEFINE FUNCTION ------------------------------------------------------------*/ /* is_exist() */ jQuery.fn.is_exist = function () { return this.length; }; $(function () { /*-------------------------------------------------------------- LONYO PRELOADER JS INIT --------------------------------------------------------------*/ // $(".lonyo-preloader-wrap").fadeOut(500); /*-------------------------------------------------------------- LONYO STICKY MENU JS INIT --------------------------------------------------------------*/ $(window).on('scroll', function () { if ($(window).scrollTop() > 50) { $('#sticky-menu').addClass('sticky-menu'); } else { $('#sticky-menu').removeClass('sticky-menu'); } }); /*-------------------------------------------------------------- LONYO MENU SIDEBAR JS INIT --------------------------------------------------------------*/ $(".lonyo-header-triger").on("click", function (e) { $(".lonyo-sidemenu-column, .offcanvas-overlay").addClass("active"); event.preventDefault(e); }); $(".lonyo-sidemenu-close, .offcanvas-overlay").on("click", function () { $(".lonyo-sidemenu-column, .offcanvas-overlay").removeClass("active"); }); /*-------------------------------------------------------------- LONYO PROGRES CIRCLE JS INIT --------------------------------------------------------------*/ var progressPath = document.querySelector('.progress-wrap path'); var pathLength = progressPath.getTotalLength(); progressPath.style.transition = progressPath.style.WebkitTransition = 'none'; progressPath.style.strokeDasharray = pathLength + ' ' + pathLength; progressPath.style.strokeDashoffset = pathLength; progressPath.getBoundingClientRect(); progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear'; var updateProgress = function updateProgress() { var scroll = $(window).scrollTop(); var height = $(document).height() - $(window).height(); var progress = pathLength - scroll * pathLength / height; progressPath.style.strokeDashoffset = progress; }; updateProgress(); $(window).scroll(updateProgress); var offset = 50; var duration = 550; jQuery(window).on('scroll', function () { if (jQuery(this).scrollTop() > offset) { jQuery('.progress-wrap').addClass('active-progress'); } else { jQuery('.progress-wrap').removeClass('active-progress'); } }); jQuery('.progress-wrap').on('click', function (event) { event.preventDefault(); jQuery('html, body').animate({ scrollTop: 0 }, duration); return false; }); /*-------------------------------------------------------------- LONYO MAGNIFIC PUPOP JS INIT --------------------------------------------------------------*/ var popup_youtube = $('.video-init'); if (popup_youtube.is_exist()) { popup_youtube.magnificPopup({ type: 'iframe', mainClass: 'mfp-fade' }); } /*-------------------------------------------------------------- LONYO BRAND SLIDER INIT --------------------------------------------------------------*/ var brand_slider = $('.brand-slider-js-init'); if (brand_slider.is_exist()) { brand_slider.slick({ slidesToShow: 7, slidesToScroll: 1, autoplay: true, autoplaySpeed: 0, speed: 5000, arrows: false, pauseOnHover: false, cssEase: 'linear', responsive: [{ breakpoint: 1699, settings: { slidesToShow: 5 } }, { breakpoint: 1399, settings: { slidesToShow: 3 } }, { breakpoint: 767, settings: { slidesToShow: 2 } }] }); } /*-------------------------------------------------------------- LONYO COUNTER JS INIT --------------------------------------------------------------*/ var stats = document.querySelectorAll(".lonyo-counter-data"); stats.forEach(function (stat) { // pattern used to seperate input number from html into an array of numbers and non numbers. EX $65.3M -> ["$65.3M", "$", "65", ".", "3", "M"] var patt = /(\D+)?(\d+)(\D+)?(\d+)?(\D+)?/; var time = 1000; var result = _toConsumableArray(patt.exec(stat.textContent)); var fresh = true; var ticks; // Remove first full match from result array (we dont need the full match, just the individual match groups). result.shift(); // Remove undefined values from result array where they didnt have a match in one of the optional regex groups result = result.filter(function (res) { return res != null; }); while (stat.firstChild) { stat.removeChild(stat.firstChild); } var _iterator = _createForOfIteratorHelper(result), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var res = _step.value; if (isNaN(res)) { stat.insertAdjacentHTML("beforeend", "".concat(res, "")); } else { for (var i = 0; i < res.length; i++) { stat.insertAdjacentHTML("beforeend", "\n\t\t\t\t\t\t\n\t\t\t\t\t\t").concat(Array(parseInt(res[i]) + 1).join(0).split(0).map(function (x, j) { return "\n\t\t\t\t\t\t\t".concat(j, "\n\t\t\t\t\t\t"); }).join(""), "\n\t\t\t\t\t")); } } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } ticks = _toConsumableArray(stat.querySelectorAll("span[data-value]")); var activate = function activate() { var top = stat.getBoundingClientRect().top; var offset = window.innerHeight * 0.8; setTimeout(function () { fresh = false; }, time); if (top < offset) { setTimeout(function () { var _iterator2 = _createForOfIteratorHelper(ticks), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var tick = _step2.value; var dist = parseInt(tick.getAttribute("data-value")) + 1; tick.style.transform = "translateY(-".concat(dist * 100, "%)"); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } }, fresh ? time : 0); window.removeEventListener("scroll", activate); } }; window.addEventListener("scroll", activate); activate(); }); /*-------------------------------------------------------------- LONYO TESTIMONIAL SLIDER JS INIT --------------------------------------------------------------*/ var t_slider = $('.lonyo-testimonial-slider-init'); if (t_slider.is_exist()) { t_slider.slick({ slidesToShow: 4, slidesToScroll: 1, dots: false, autoplay: true, autoplaySpeed: 0, speed: 6000, arrows: false, pauseOnHover: false, cssEase: 'linear', centerPadding: '180px', lazyLoad: 'progressive', responsive: [{ breakpoint: 1199, settings: { slidesToShow: 2 } }, { breakpoint: 767, settings: { slidesToShow: 1, centerPadding: '100px' } }, { breakpoint: 575, settings: { slidesToShow: 1, centerPadding: '0px' } }] }); } var testimonial_slider_data = $('.lonyo-slider-icon-data'); if (testimonial_slider_data.is_exist()) { testimonial_slider_data.slick({ slidesToShow: 6, slidesToScroll: 1, autoplay: true, autoplaySpeed: 0, speed: 5000, arrows: false, pauseOnHover: false, cssEase: 'linear', responsive: [{ breakpoint: 1399, settings: { slidesToShow: 5 } }, { breakpoint: 1199, settings: { slidesToShow: 4 } }, { breakpoint: 991, settings: { slidesToShow: 3 } }, { breakpoint: 767, settings: { slidesToShow: 2 } }] }); } var testimonial_slider_data_wrap = $('.lonyo-slider-icon-data2'); if (testimonial_slider_data_wrap.is_exist()) { testimonial_slider_data_wrap.slick({ slidesToShow: 6, slidesToScroll: 1, autoplay: true, autoplaySpeed: 0, speed: 5000, arrows: false, pauseOnHover: false, cssEase: 'linear', rtl: true, responsive: [{ breakpoint: 1399, settings: { slidesToShow: 5 } }, { breakpoint: 1199, settings: { slidesToShow: 4 } }, { breakpoint: 991, settings: { slidesToShow: 3 } }, { breakpoint: 767, settings: { slidesToShow: 2 } }] }); } /*-------------------------------------------------------------- LONYO SKILLBAR JS INIT --------------------------------------------------------------*/ (function ($) { $.fn.skillBars = function (options) { var settings = $.extend({ from: 0, // number start to: false, // number end speed: 1000, // how long it should take to count between the target numbers interval: 100, // how often the element should be updated decimals: 0, // the number of decimal places to show onUpdate: null, // callback method for every time the element is updated, onComplete: null, // callback method for when the element finishes updating /*onComplete: function(from) { console.debug(this); }*/ classes: { skillBarBar: '.skillbar-bar', skillBarPercent: '.skill-bar-percent' } }, options); return this.each(function () { var obj = $(this), to = settings.to != false ? settings.to : parseInt(obj.attr('data-percent')); if (to > 100) { to = 100; } ; var from = settings.from, loops = Math.ceil(settings.speed / settings.interval), increment = (to - from) / loops, loopCount = 0, interval = setInterval(updateValue, settings.interval); obj.find(settings.classes.skillBarBar).animate({ width: parseInt(obj.attr('data-percent')) + '%' }, settings.speed); function updateValue() { from += increment; loopCount++; $(obj).find(settings.classes.skillBarPercent).text(from.toFixed(settings.decimals) + '%'); if (typeof settings.onUpdate == 'function') { settings.onUpdate.call(obj, from); } if (loopCount >= loops) { clearInterval(interval); from = to; if (typeof settings.onComplete == 'function') { settings.onComplete.call(obj, from); } } } }); }; })(jQuery); /*-------------------------------------------------------------- LONYO CURRENT YEAR JS INIT --------------------------------------------------------------*/ var currentYear = new Date().getFullYear(); $('#current-year').text(currentYear); /*-------------------------------------------------------------- LONYO AOS ANIMATION JS INIT --------------------------------------------------------------*/ AOS.init({ once: true // Ensure animations can trigger multiple times }); }); /*End document ready*/ $(window).on("resize", function () {}); // end window resize /*-------------------------------------------------------------- LONYO MAP JS INIT ------------------------------------------------------------*/ var google_map = $('#map'); if (google_map.is_exist()) { var init = function init() { var mapOptions = { zoom: 11, scrollwheel: false, navigationControl: false, mapTypeControl: false, scaleControl: false, draggable: true, disableDefaultUI: true, center: new google.maps.LatLng(40.6700, -73.9400), styles: [{ "featureType": "landscape.man_made", "elementType": "geometry", "stylers": [{ "color": "#f7f1df" }] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [{ "color": "#d0e3b4" }] }, { "featureType": "landscape.natural.terrain", "elementType": "geometry", "stylers": [{ "visibility": "off" }] }, { "featureType": "poi", "elementType": "labels", "stylers": [{ "visibility": "off" }] }, { "featureType": "poi.business", "elementType": "all", "stylers": [{ "visibility": "off" }] }, { "featureType": "poi.medical", "elementType": "geometry", "stylers": [{ "color": "#fbd3da" }] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [{ "color": "#bde6ab" }] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [{ "visibility": "off" }] }, { "featureType": "road", "elementType": "labels", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{ "color": "#ffe15f" }] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{ "color": "#efd151" }] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [{ "color": "#ffffff" }] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [{ "color": "black" }] }, { "featureType": "transit.station.airport", "elementType": "geometry.fill", "stylers": [{ "color": "#cfb2db" }] }, { "featureType": "water", "elementType": "geometry", "stylers": [{ "color": "#a2daf2" }] }] }; var mapElement = document.getElementById('map'); var map = new google.maps.Map(mapElement, mapOptions); var marker = new google.maps.Marker({ position: new google.maps.LatLng(40.6700, -73.9400), map: map, // icon: 'assets/images/all-img/contact/map.png', title: 'lonyo' }); var contentString = '
' + '
' + '

lonyo' + '

'; var infowindow = new google.maps.InfoWindow({ content: contentString, maxWidth: 280 }); marker.setAnimation(google.maps.Animation.BOUNCE); setTimeout(function () { marker.setAnimation(null); }, 750); //time it takes for one bounce google.maps.event.addListener(marker, 'click', function () { infowindow.open(map, marker); }); }; google.maps.event.addDomListener(window, 'load', init); } })(jQuery); $(function () { var activeIndex = $('.active-tab').index(), $contentlis = $('.tabs-content li'), $tabslis = $('.tabs li'); // Show content of active tab on loads $contentlis.eq(activeIndex).show(); $('.tabs').on('click', 'li', function (e) { var $current = $(e.currentTarget), index = $current.index(); $tabslis.removeClass('active-tab'); $current.addClass('active-tab'); $contentlis.hide().eq(index).show(); }); }); /*-------------------------------------------------------------- LONYO VERTICAL SLIDER JS INIT ------------------------------------------------------------*/ $('.lonyo-service-vertical-slider').slick({ dots: false, speed: 5000, slidesToShow: 2, centerMode: true, arrows: false, vertical: true, focusOnSelect: true, slidesToScroll: 1, autoplay: true, autoplaySpeed: 0, pauseOnHover: false, cssEase: 'linear', verticalSwiping: true }); $('.lonyo-service-vertical-slider2').slick(_defineProperty(_defineProperty(_defineProperty({ dots: false, speed: 5000, slidesToShow: 2, centerMode: true, arrows: false, vertical: true, focusOnSelect: true, slidesToScroll: 1, autoplay: true, autoplaySpeed: 0 }, "arrows", false), "pauseOnHover", false), "cssEase", 'linear')); /*-------------------------------------------------------------- TECHIN TOOGLE BUTTON JS INIT --------------------------------------------------------------*/ $(document).ready(function () { $(".toggle-button").change(function () { toggle(this.checked); }); // Uncomment this to disaplay monthly on page load toggle(false); function toggle(checked) { $(".toggle-button").prop('checked', checked); if (checked) { $('.coreMonthlyPrice, .proMonthlyPrice').show(); $('.coreAnnuallyText, .coreAnnuallyPrice, .proAnnuallyPrice').hide(); } else { $('.coreMonthlyPrice,.proMonthlyPrice').hide(); $('.coreAnnuallyText,.coreAnnuallyPrice, .proAnnuallyPrice').show(); } } }); /*-------------------------------------------------------------- LONYO PORTFOLIO MASONAY FILTER JS INIT ------------------------------------------------------------*/ var lonyo_filter_gallery = $('#lonyo-portfolio-grid'); if (lonyo_filter_gallery.is_exist()) { var $container = $(lonyo_filter_gallery), colWidth = function colWidth() { var w = $container.width(), columnNum = 1, columnWidth = 0; if (w > 1200) { columnNum = 2; } else if (w > 900) { columnNum = 2; } else if (w > 600) { columnNum = 2; } else if (w > 450) { columnNum = 1; } else if (w > 385) { columnNum = 1; } columnWidth = Math.floor(w / columnNum); $container.find('.collection-grid-item').each(function () { var $item = $(this), multiplier_w = $item.attr('class').match(/collection-grid-item-w(\d)/), multiplier_h = $item.attr('class').match(/collection-grid-item-h(\d)/), width = multiplier_w ? columnWidth * multiplier_w[1] : columnWidth, height = multiplier_h ? columnWidth * multiplier_h[1] * 0.4 - 12 : columnWidth * 0.5; $item.css({ width: width //height: height }); }); return columnWidth; }, isotope = function isotope() { $container.isotope({ resizable: false, itemSelector: '.collection-grid-item', masonry: { columnWidth: colWidth(), gutterWidth: 0 } }); }; isotope(); $(window).resize(isotope); var $optionSets = $('.lonyo-portfolio-menu .option-set'), $optionLinks = $optionSets.find('li'); $optionLinks.click(function () { var $this = $(this); var $optionSet = $this.parents('.option-set'); $optionSet.find('.active').removeClass('active'); $this.addClass('active'); // make option object dynamically, i.e. { filter: '.my-filter-class' } var options = {}, key = $optionSet.attr('data-option-key'), value = $this.attr('data-option-value'); // parse 'false' as false boolean value = value === 'false' ? false : value; options[key] = value; if (key === 'layoutMode' && typeof changeLayoutMode === 'function') { // changes in layout modes need extra logic changeLayoutMode($this, options); } else { // creativewise, apply new options $container.isotope(options); } return false; }); } /*-------------------------------------------------------------- LONYO TOGGLE PASSOWRD JS INIT ------------------------------------------------------------*/ $(".toggle-password").click(function () { $(this).toggleClass("fa-eye fa-eye-slash"); var input = $($(this).attr("toggle")); if (input.attr("type") == "password") { input.attr("type", "text"); } else { input.attr("type", "password"); } }); $(".toggle-password2").click(function () { $(this).toggleClass("fa-eye fa-eye-slash"); var input = $($(this).attr("toggle")); if (input.attr("type") == "password") { input.attr("type", "text"); } else { input.attr("type", "password"); } }); /*=========================================== = On Load Function = =============================================*/ $(window).on("load", function () { preloader(); wowAnimation(); }); /*=========================================== = Preloader = =============================================*/ function preloader() { $('.preloader').delay(0).fadeOut(); } ; /*=========================================== = Wow Active = =============================================*/ function wowAnimation() { var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); wow.init(); }