Server IP : 103.53.40.154 / Your IP : 3.144.25.248 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/aircraftelevators.in/../fozan.in/../vermaborewell.co.in/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
var THEMEMASCOT = THEMEMASCOT || {}; (function($) { "use strict"; THEMEMASCOT.isMobile = { Android: function() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function() { return navigator.userAgent.match(/IEMobile/i); }, any: function() { return (THEMEMASCOT.isMobile.Android() || THEMEMASCOT.isMobile.BlackBerry() || THEMEMASCOT.isMobile.iOS() || THEMEMASCOT.isMobile.Opera() || THEMEMASCOT.isMobile.Windows()); } }; THEMEMASCOT.isRTL = { check: function() { if( $( "html" ).attr("dir") == "rtl" ) { return true; } else { return false; } } }; THEMEMASCOT.initialize = { init: function() { THEMEMASCOT.initialize.TM_datePicker(); THEMEMASCOT.initialize.TM_onLoadModal(); THEMEMASCOT.initialize.TM_demoSwitcher(); THEMEMASCOT.initialize.TM_platformDetect(); THEMEMASCOT.initialize.TM_customDataAttributes(); THEMEMASCOT.initialize.TM_parallaxBgInit(); THEMEMASCOT.initialize.TM_resizeFullscreen(); THEMEMASCOT.initialize.TM_magnificPopup_lightbox(); THEMEMASCOT.initialize.TM_prettyPhoto_lightbox(); THEMEMASCOT.initialize.TM_nivolightbox(); THEMEMASCOT.initialize.TM_wow(); THEMEMASCOT.initialize.TM_fitVids(); THEMEMASCOT.initialize.TM_YTPlayer(); THEMEMASCOT.initialize.TM_equalHeightDivs(); }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Hash Forwarding ---------------------- */ /* ---------------------------------------------------------------------- */ TM_datePicker: function() { $( ".date-picker" ).datepicker(); }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Hash Forwarding ---------------------- */ /* ---------------------------------------------------------------------- */ TM_onLoadModal: function() { var $modal = $('.modal-on-load'); if( $modal.length > 0 ) { $modal.each( function(){ var element = $(this), elementTarget = element.attr('data-target'), elementTargetValue = elementTarget.split('#')[1], elementDelay = element.attr('data-delay'), elementTimeout = element.attr('data-timeout'), elementAnimateIn = element.attr('data-animate-in'), elementAnimateOut = element.attr('data-animate-out'); if( !element.hasClass('enable-cookie') ) { $.removeCookie( elementTargetValue ); } if( element.hasClass('enable-cookie') ) { var elementCookie = $.cookie( elementTargetValue ); if( typeof elementCookie !== 'undefined' && elementCookie == '0' ) { return true; } } if( !elementDelay ) { elementDelay = 1500; } else { elementDelay = Number(elementDelay) + 1500; } var t = setTimeout(function() { $.magnificPopup.open({ items: { src: elementTarget }, type: 'inline', mainClass: 'mfp-no-margins mfp-fade', closeBtnInside: false, fixedContentPos: true, removalDelay: 500, callbacks: { open: function(){ if( elementAnimateIn != '' ) { $(elementTarget).addClass( elementAnimateIn + ' animated' ); } }, beforeClose: function(){ if( elementAnimateOut != '' ) { $(elementTarget).removeClass( elementAnimateIn ).addClass( elementAnimateOut ); } }, afterClose: function() { if( elementAnimateIn != '' || elementAnimateOut != '' ) { $(elementTarget).removeClass( elementAnimateIn + ' ' + elementAnimateOut + ' animated' ); } if( element.hasClass('enable-cookie') ) { $.cookie( elementTargetValue, '0' ); } } } }, 0); }, Number(elementDelay) ); if( elementTimeout != '' ) { var to = setTimeout(function() { $.magnificPopup.close(); }, Number(elementDelay) + Number(elementTimeout) ); } }); } }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Hash Forwarding ---------------------- */ /* ---------------------------------------------------------------------- */ TM_demoSwitcher: function() { var showSwitcher = true; if( showSwitcher ) { $.ajax({ url: "color-switcher/style-switcher.html", success: function (data) { $('body').append(data); }, dataType: 'html' }); } }, /* ---------------------------------------------------------------------- */ /* ------------------------------ preloader ---------------------------- */ /* ---------------------------------------------------------------------- */ TM_preLoaderClickDisable: function() { var $preloader = $('#preloader'); $preloader.children('#disable-preloader').on('click', function(e) { $preloader.fadeOut(); return false; }); }, TM_preLoaderOnLoad: function() { var $preloader = $('#preloader'); $preloader.delay(200).fadeOut('slow'); }, /* ---------------------------------------------------------------------- */ /* ------------------------------- Platform detect --------------------- */ /* ---------------------------------------------------------------------- */ TM_platformDetect: function() { if (THEMEMASCOT.isMobile.any()) { $html.addClass("mobile"); } else { $html.addClass("no-mobile"); } }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Hash Forwarding ---------------------- */ /* ---------------------------------------------------------------------- */ TM_hashForwarding: function() { if (window.location.hash) { var hash_offset = $(window.location.hash).offset().top; $("html, body").animate({ scrollTop: hash_offset }); } }, /* ---------------------------------------------------------------------- */ /* ----------------------- Background image, color ---------------------- */ /* ---------------------------------------------------------------------- */ TM_customDataAttributes: function() { $('[data-bg-color]').each(function() { $(this).css("cssText", "background: " + $(this).data("bg-color") + " !important;"); }); $('[data-bg-img]').each(function() { $(this).css('background-image', 'url(' + $(this).data("bg-img") + ')'); }); $('[data-text-color]').each(function() { $(this).css('color', $(this).data("text-color")); }); $('[data-font-size]').each(function() { $(this).css('font-size', $(this).data("font-size")); }); $('[data-height]').each(function() { $(this).css('height', $(this).data("height")); }); $('[data-border]').each(function() { $(this).css('border', $(this).data("border")); }); $('[data-margin-top]').each(function() { $(this).css('margin-top', $(this).data("margin-top")); }); $('[data-margin-right]').each(function() { $(this).css('margin-right', $(this).data("margin-right")); }); $('[data-margin-bottom]').each(function() { $(this).css('margin-bottom', $(this).data("margin-bottom")); }); $('[data-margin-left]').each(function() { $(this).css('margin-left', $(this).data("margin-left")); }); }, /* ---------------------------------------------------------------------- */ /* -------------------------- Background Parallax ----------------------- */ /* ---------------------------------------------------------------------- */ TM_parallaxBgInit: function() { if (!THEMEMASCOT.isMobile.any()) { $.stellar({ horizontalScrolling: false, verticalOffset: 150, horizontalOffset: 0, responsive: true }); } else { $('.parallax').addClass("mobile-parallax"); } }, /* ---------------------------------------------------------------------- */ /* --------------------------- Home Resize Fullscreen ------------------- */ /* ---------------------------------------------------------------------- */ TM_resizeFullscreen: function() { var windowHeight = $window.height(); $('.fullscreen, .revslider-fullscreen').height(windowHeight); }, /* ---------------------------------------------------------------------- */ /* ----------------------------- Magnific Popup ------------------------- */ /* ---------------------------------------------------------------------- */ TM_magnificPopup_lightbox: function() { $('.image-popup-lightbox').magnificPopup({ type: 'image', closeOnContentClick: true, closeBtnInside: false, fixedContentPos: true, mainClass: 'mfp-no-margins mfp-fade', // class to remove default margin from left and right side image: { verticalFit: true } }); $('.image-popup-vertical-fit').magnificPopup({ type: 'image', closeOnContentClick: true, mainClass: 'mfp-img-mobile', image: { verticalFit: true } }); $('.image-popup-fit-width').magnificPopup({ type: 'image', closeOnContentClick: true, image: { verticalFit: false } }); $('.image-popup-no-margins').magnificPopup({ type: 'image', closeOnContentClick: true, closeBtnInside: false, fixedContentPos: true, mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side image: { verticalFit: true }, zoom: { enabled: true, duration: 300 // don't foget to change the duration also in CSS } }); $('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', titleSrc: function(item) { return item.el.attr('title') + '<small>by Marsel Van Oosten</small>'; } } }); $('.zoom-gallery').magnificPopup({ delegate: 'a', type: 'image', closeOnContentClick: false, closeBtnInside: false, mainClass: 'mfp-with-zoom mfp-img-mobile', image: { verticalFit: true, titleSrc: function(item) { return item.el.attr('title') + ' · <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>'; } }, gallery: { enabled: true }, zoom: { enabled: true, duration: 300, // don't foget to change the duration also in CSS opener: function(element) { return element.find('img'); } } }); $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); $('.popup-with-zoom-anim').magnificPopup({ type: 'inline', fixedContentPos: false, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-zoom-in' }); $('.popup-with-move-anim').magnificPopup({ type: 'inline', fixedContentPos: false, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-slide-bottom' }); /*================================ portfolio magnificPopup ================================*/ var $lightboxImage = $('[data-lightbox="image"]'), $lightboxGallery = $('[data-lightbox="gallery"]'), $lightboxIframe = $('[data-lightbox="iframe"]'), $lightboxInline = $('[data-lightbox="inline"]'); //lightbox image if( $lightboxImage.length > 0 ) { $lightboxImage.magnificPopup({ type: 'image', closeOnContentClick: true, closeBtnInside: false, fixedContentPos: true, mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side image: { verticalFit: true } }); } //lightbox gallery if( $lightboxGallery.length > 0 ) { $lightboxGallery.each(function() { var element = $(this); element.magnificPopup({ delegate: 'a[data-lightbox="gallery-item"]', type: 'image', closeOnContentClick: true, closeBtnInside: false, fixedContentPos: true, mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side image: { verticalFit: true }, gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, zoom: { enabled: true, duration: 300, // don't foget to change the duration also in CSS opener: function(element) { return element.find('img'); } } }); }); } //lightbox iframe if( $lightboxIframe.length > 0 ) { $lightboxIframe.magnificPopup({ disableOn: 600, type: 'iframe', removalDelay: 160, preloader: false, fixedContentPos: false }); } //lightbox inline if( $lightboxInline.length > 0 ) { $lightboxInline.magnificPopup({ type: 'inline', mainClass: 'mfp-no-margins mfp-zoom-in', closeBtnInside: false, fixedContentPos: true }); } }, /* ---------------------------------------------------------------------- */ /* ----------------------------- lightbox popup ------------------------- */ /* ---------------------------------------------------------------------- */ TM_prettyPhoto_lightbox: function() { //prettyPhoto lightbox $("a[data-rel^='prettyPhoto']").prettyPhoto({ hook: 'data-rel', animation_speed:'normal', theme:'light_square', slideshow:3000, autoplay_slideshow: false, social_tools: false }); }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Nivo Lightbox ------------------------- */ /* ---------------------------------------------------------------------- */ TM_nivolightbox: function() { $('a[data-lightbox-gallery]').nivoLightbox({ effect: 'fadeScale' }); }, /* ---------------------------------------------------------------------- */ /* ---------------------------- Wow initialize ------------------------- */ /* ---------------------------------------------------------------------- */ TM_wow: function() { var wow = new WOW({ mobile: false // trigger animations on mobile devices (default is true) }); wow.init(); }, /* ---------------------------------------------------------------------- */ /* ----------------------------- Fit Vids ------------------------------- */ /* ---------------------------------------------------------------------- */ TM_fitVids: function() { $body.fitVids(); }, /* ---------------------------------------------------------------------- */ /* ----------------------------- YT Player for Video -------------------- */ /* ---------------------------------------------------------------------- */ TM_YTPlayer: function() { $(".player").mb_YTPlayer(); }, /* ---------------------------------------------------------------------- */ /* ---------------------------- equalHeights ---------------------------- */ /* ---------------------------------------------------------------------- */ TM_equalHeightDivs: function() { /* equal heigh */ $('.equal-height > div').css('min-height', 'auto'); $('.equal-height').equalHeights(); /* equal heigh inner div */ $('.equal-height-inner > div > div').css('min-height', 'auto'); $('.equal-height-inner > div').equalHeights(); /* pricing-table equal heigh*/ $('.equal-height-pricing-table > div').css('min-height', 'auto'); $('.equal-height-pricing-table').equalHeights(); $('.equal-height-pricing-table > div > div').css('min-height', $('.equal-height-pricing-table > div').css('min-height')); } }; THEMEMASCOT.header = { init: function() { var t = setTimeout(function() { THEMEMASCOT.header.TM_fullscreenMenu(); THEMEMASCOT.header.TM_sidePanelReveal(); THEMEMASCOT.header.TM_scroolToTopOnClick(); THEMEMASCOT.header.TM_scrollToFixed(); THEMEMASCOT.header.TM_topnavAnimate(); THEMEMASCOT.header.TM_scrolltoTarget(); THEMEMASCOT.header.TM_menuzord(); THEMEMASCOT.header.TM_navLocalScorll(); THEMEMASCOT.header.TM_menuCollapseOnClick(); THEMEMASCOT.header.TM_homeParallaxFadeEffect(); THEMEMASCOT.header.TM_topsearch_toggle(); }, 0); }, /* ---------------------------------------------------------------------- */ /* ------------------------- menufullpage ---------------------------- */ /* ---------------------------------------------------------------------- */ TM_fullscreenMenu: function() { var $menufullpage = $('.menu-full-page .fullpage-nav-toggle'); $menufullpage.menufullpage(); }, /* ---------------------------------------------------------------------- */ /* ------------------------- Side Push Panel ---------------------------- */ /* ---------------------------------------------------------------------- */ TM_sidePanelReveal: function() { $(".side-panel-trigger").click(function(){ $body.toggleClass("side-panel-open"); if( $body.hasClass('device-touch') ) { $body.toggleClass("ohidden"); } return false; }); $(".has-side-panel .body-overlay").click(function(){ $body.toggleClass("side-panel-open"); return false; }); //sitebar tree $('.side-panel-nav .nav .tree-toggler').click(function () { $(this).parent().children('ul.tree').toggle(300); }); }, /* ---------------------------------------------------------------------- */ /* ------------------------------- scrollToTop ------------------------- */ /* ---------------------------------------------------------------------- */ TM_scroolToTop: function() { if ($window.scrollTop() > 600) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }, TM_scroolToTopOnClick: function() { $(document.body).on('click', '.scrollToTop', function(e) { $('html, body').animate({ scrollTop: 0 }, 800); return false; }); }, /* ---------------------------------------------------------------------------- */ /* --------------------------- One Page Nav close on click -------------------- */ /* ---------------------------------------------------------------------------- */ TM_menuCollapseOnClick: function() { $(document).on('click', '.onepage-nav a', function(e) { $('.showhide').trigger('click'); return false; }); }, /* ---------------------------------------------------------------------- */ /* ----------- Active Menu Item on Reaching Different Sections ---------- */ /* ---------------------------------------------------------------------- */ TM_activateMenuItemOnReach: function() { var $onepage_nav = $('.onepage-nav'); var cur_pos = $window.scrollTop() + 2; var nav_height = $onepage_nav.outerHeight(); $sections.each(function() { var top = $(this).offset().top - nav_height - 80, bottom = top + $(this).outerHeight(); if (cur_pos >= top && cur_pos <= bottom) { $onepage_nav.find('a').parent().removeClass('current').removeClass('active'); $sections.removeClass('current').removeClass('active'); //$(this).addClass('current').addClass('active'); $onepage_nav.find('a[href="#' + $(this).attr('id') + '"]').parent().addClass('current').addClass('active'); } }); }, /* ---------------------------------------------------------------------- */ /* ------------------- on click scrool to target with smoothness -------- */ /* ---------------------------------------------------------------------- */ TM_scrolltoTarget: function() { //jQuery for page scrolling feature - requires jQuery Easing plugin $('.smooth-scroll-to-target, .fullscreen-onepage-nav a').on('click', function(e) { e.preventDefault(); var $anchor = $(this); var $hearder_top = $('.header .header-nav'); var hearder_top_offset = 0; if ($hearder_top[0]){ hearder_top_offset = $('.header .header-nav').outerHeight(true) } else { hearder_top_offset = 0; } var top = $($anchor.attr('href')).offset().top - hearder_top_offset; $('html, body').stop().animate({ scrollTop: top }, 1500, 'easeInOutExpo'); }); }, /* ---------------------------------------------------------------------- */ /* -------------------------- Scroll navigation ------------------------- */ /* ---------------------------------------------------------------------- */ TM_navLocalScorll: function() { var data_offset = -60; $("#menuzord .menuzord-menu, #menuzord-right .menuzord-menu").localScroll({ target: "body", duration: 800, offset: data_offset, easing: "easeInOutExpo" }); $("#menuzord-side-panel .menuzord-menu, #menuzord-verticalnav .menuzord-menu").localScroll({ target: "body", duration: 800, offset: 0, easing: "easeInOutExpo" }); }, /* ---------------------------------------------------------------------------- */ /* --------------------------- collapsed menu close on click ------------------ */ /* ---------------------------------------------------------------------------- */ TM_scrollToFixed: function() { $('.navbar-scrolltofixed').scrollToFixed(); $('.scrolltofixed').scrollToFixed({ marginTop: $('.header .header-nav').outerHeight(true) + 10, limit: function() { var limit = $('.footer').offset().top - $(this).outerHeight(true) - 10; return limit; } }); }, /* ----------------------------------------------------------------------------- */ /* --------------------------- Menuzord - Responsive Megamenu ------------------ */ /* ----------------------------------------------------------------------------- */ TM_menuzord: function() { $("#menuzord").menuzord({ align: "left", effect: "slide", animation: "none", indicatorFirstLevel: "<i class='fa fa-angle-down'></i>", indicatorSecondLevel: "<i class='fa fa-angle-right'></i>" }); $("#menuzord-right").menuzord({ align: "right", effect: "slide", animation: "none", indicatorFirstLevel: "<i class='fa fa-angle-down'></i>", indicatorSecondLevel: "<i class='fa fa-angle-right'></i>" }); $("#menuzord-side-panel").menuzord({ align: "right", effect: "slide", animation: "none", indicatorFirstLevel: "<i class='fa fa-angle-right'></i>", indicatorSecondLevel: "<i class='fa fa-angle-right'></i>" }); $("#menuzord-verticalnav").menuzord({ align: "right", effect: "slide", animation: "none", indicatorFirstLevel: "<i class='fa fa-angle-right'></i>", indicatorSecondLevel: "<i class='fa fa-angle-right'></i>" }); }, /* ---------------------------------------------------------------------- */ /* --------------------------- Waypoint Top Nav Sticky ------------------ */ /* ---------------------------------------------------------------------- */ TM_topnavAnimate: function() { if ($window.scrollTop() > (50)) { $(".navbar-sticky-animated").removeClass("animated-active"); } else { $(".navbar-sticky-animated").addClass("animated-active"); } if ($window.scrollTop() > (50)) { $(".navbar-sticky-animated .header-nav-wrapper .container").removeClass("pt-10").removeClass("pb-10"); } else { $(".navbar-sticky-animated .header-nav-wrapper .container").addClass("pt-10").addClass("pb-10"); } }, /* ---------------------------------------------------------------------- */ /* ---------------- home section on scroll parallax & fade -------------- */ /* ---------------------------------------------------------------------- */ TM_homeParallaxFadeEffect: function() { if ($window.width() >= 1200) { var scrolled = $window.scrollTop(); $('.content-fade-effect .home-content .home-text').css('padding-top', (scrolled * 0.0610) + '%').css('opacity', 1 - (scrolled * 0.00120)); } }, /* ---------------------------------------------------------------------- */ /* --------------------------- Top search toggle ----------------------- */ /* ---------------------------------------------------------------------- */ TM_topsearch_toggle: function() { $(document.body).on('click', '#top-search-toggle', function(e) { e.preventDefault(); $('.search-form-wrapper.toggle').toggleClass('active'); return false; }); } }; THEMEMASCOT.widget = { init: function() { var t = setTimeout(function() { THEMEMASCOT.widget.TM_shopClickEvents(); THEMEMASCOT.widget.TM_fcCalender(); THEMEMASCOT.widget.TM_verticalTimeline(); THEMEMASCOT.widget.TM_verticalMasonryTimeline(); THEMEMASCOT.widget.TM_masonryIsotop(); THEMEMASCOT.widget.TM_pieChart(); THEMEMASCOT.widget.TM_progressBar(); THEMEMASCOT.widget.TM_funfact(); THEMEMASCOT.widget.TM_instagramFeed(); THEMEMASCOT.widget.TM_jflickrfeed(); THEMEMASCOT.widget.TM_accordion_toggles(); THEMEMASCOT.widget.TM_tooltip(); THEMEMASCOT.widget.TM_twittie(); //THEMEMASCOT.widget.TM_countDownTimer(); }, 0); }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Shop Plus Minus ----------------------- */ /* ---------------------------------------------------------------------- */ TM_shopClickEvents: function() { $(document.body).on('click', '.quantity .plus', function(e) { var currentVal = parseInt($(this).parent().children(".qty").val(), 10); if (!isNaN(currentVal)) { $(this).parent().children(".qty").val(currentVal + 1); } return false; }); $(document.body).on('click', '.quantity .minus', function(e) { var currentVal = parseInt($(this).parent().children(".qty").val(), 10); if (!isNaN(currentVal) && currentVal > 0) { $(this).parent().children(".qty").val(currentVal - 1); } return false; }); $(document.body).on('click', '#checkbox-ship-to-different-address', function(e) { $("#checkout-shipping-address").toggle(this.checked); }); }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Event Calendar ------------------------ */ /* ---------------------------------------------------------------------- */ TM_fcCalender: function() { if (typeof calendarEvents !== "undefined" ) { $('#full-event-calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, defaultDate: '2016-01-12', selectable: true, selectHelper: true, select: function(start, end) { var title = prompt('Event Title:'); var eventData; if (title) { eventData = { title: title, start: start, end: end }; $('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true } $('#calendar').fullCalendar('unselect'); }, editable: true, eventLimit: true, // allow "more" link when too many events events: calendarEvents }); } }, /* ---------------------------------------------------------------------- */ /* ------------------------------ Timeline Block ------------------------ */ /* ---------------------------------------------------------------------- */ TM_verticalTimeline: function() { var timelineBlocks = $('.cd-timeline-block'), offset = 0.8; //hide timeline blocks which are outside the viewport hideBlocks(timelineBlocks, offset); //on scolling, show/animate timeline blocks when enter the viewport $(window).on('scroll', function(){ (!window.requestAnimationFrame) ? setTimeout(function(){ showBlocks(timelineBlocks, offset); }, 100) : window.requestAnimationFrame(function(){ showBlocks(timelineBlocks, offset); }); }); function hideBlocks(blocks, offset) { blocks.each(function(){ ( $(this).offset().top > $(window).scrollTop()+$(window).height()*offset ) && $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden'); }); } function showBlocks(blocks, offset) { blocks.each(function(){ ( $(this).offset().top <= $(window).scrollTop()+$(window).height()*offset && $(this).find('.cd-timeline-img').hasClass('is-hidden') ) && $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in'); }); } }, /* ---------------------------------------------------------------------- */ /* ----------------------- Vertical Masonry Timeline -------------------- */ /* ---------------------------------------------------------------------- */ TM_verticalMasonryTimeline: function() { var $masonry_timeline = $('.vertical-masonry-timeline'); $masonry_timeline.isotope({ itemSelector : '.each-masonry-item', sortBy: 'original-order', layoutMode: 'masonry', resizable: false }); //=====> Timeline Positions function timeline_on_left_and_right(){ $masonry_timeline.children('.each-masonry-item').each(function(index, element) { var last_child = $(this); var prev_last = $(this).prev(); var last_child_offset = parseInt(last_child.css('top')); var prev_last_offset = parseInt(prev_last.css('top')); var offset_icon = last_child_offset - prev_last_offset; var go_top_to = 0; if(offset_icon){ if ( offset_icon <= 87 ){ go_top_to = 87 - offset_icon; last_child.find('.timeline-post-format').animate({ top: go_top_to, }, 300); } } if( $(this).position().left === 0 ){ $(this).removeClass('item-right'); $(this).addClass('item-left'); }else{ $(this).removeClass('item-left'); $(this).addClass('item-right'); } }); } timeline_on_left_and_right(); $(window).resize(function() { timeline_on_left_and_right(); }); }, /* ---------------------------------------------------------------------- */ /* ----------------------------- Masonry Isotope ------------------------ */ /* ---------------------------------------------------------------------- */ TM_masonryIsotop: function() { var isotope_mode; if ($portfolio_gallery.hasClass("masonry")){ isotope_mode = "masonry"; } else{ isotope_mode = "fitRows" } //isotope firsttime loading $portfolio_gallery.imagesLoaded(function(){ $portfolio_gallery.isotope({ itemSelector: '.portfolio-item', layoutMode: isotope_mode, filter: "*" }); }); //isotope filter $portfolio_filter.click(function(){ $portfolio_filter.removeClass("active"); $(this).addClass("active"); var fselector = $(this).data('filter'); $portfolio_gallery.isotope({ itemSelector: '.portfolio-item', layoutMode: isotope_mode, filter: fselector }); return false; }); THEMEMASCOT.slider.TM_flexslider(); }, TM_portfolioFlexSliderGalleryPopUpInit: function() { var $flexSliders = $portfolio_gallery.find('.slides'); $flexSliders.each(function () { var _items = $(this).find("li > a"); var items = []; for (var i = 0; i < _items.length; i++) { items.push({src: $(_items[i]).attr("href"), title: $(_items[i]).attr("title")}); } $(this).parent().parent().parent().find(".icons-holder").magnificPopup({ items: items, type: 'image', gallery: { enabled: true } }); }); }, TM_isotopeGridRearrange: function() { var isotope_mode; if ($portfolio_gallery.hasClass("masonry")){ isotope_mode = "masonry"; } else{ isotope_mode = "fitRows" } $portfolio_gallery.isotope({ itemSelector: '.portfolio-item', layoutMode: isotope_mode }); }, TM_isotopeGridShuffle: function() { $portfolio_gallery.isotope('shuffle'); }, /* ---------------------------------------------------------------------- */ /* ----------------------------- CountDown ------------------------------ */ /* ---------------------------------------------------------------------- */ TM_countDownTimer: function() { var $clock = $('#clock-count-down'); var endingdate = $clock.data("endingdate"); $clock.countdown(endingdate, function(event) { var countdown_text = '' + '<ul class="countdown-timer">' + '<li>%D <span>Days</span></li>' + '<li>%H <span>Hours</span></li>' + '<li>%M <span>Minutes</span></li>' + '<li>%S <span>Seconds</span></li>' + '</ul>'; $(this).html(event.strftime(countdown_text)); }); }, /* ---------------------------------------------------------------------- */ /* ----------------------- pie chart / circle skill bar ----------------- */ /* ---------------------------------------------------------------------- */ TM_pieChart: function() { var $piechart = $('.piechart'); $piechart.appear(); $(document.body).on('appear', '.piechart', function() { var current_item = $(this); if (!current_item.hasClass('appeared')) { var barcolor = current_item.data('barcolor'); var trackcolor = current_item.data('trackcolor'); var linewidth = current_item.data('linewidth'); var boxwidth = current_item.data('boxwidth'); current_item.css("width", boxwidth); current_item.easyPieChart({ animate: 3000, barColor: barcolor, trackColor: trackcolor, easing: 'easeOutBounce', lineWidth: linewidth, size: boxwidth, lineCap: 'square', scaleColor: false, onStep: function(from, to, percent) { $(this.el).find('span').text(Math.round(percent)); } }); current_item.addClass('appeared'); } }); }, /* ---------------------------------------------------------------------- */ /* ------------------- progress bar / horizontal skill bar -------------- */ /* ---------------------------------------------------------------------- */ TM_progressBar: function() { var $progress_bar = $('.progress-bar'); $progress_bar.appear(); $(document.body).on('appear', '.progress-bar', function() { var current_item = $(this); if (!current_item.hasClass('appeared')) { var percent = current_item.data('percent'); var barcolor = current_item.data('barcolor'); current_item.append('<span class="percent">' + percent + '%' + '</span>').css('background-color', barcolor).css('width', percent + '%').addClass('appeared'); } }); }, /* ---------------------------------------------------------------------- */ /* ------------------------ Funfact Number Counter ---------------------- */ /* ---------------------------------------------------------------------- */ TM_funfact: function() { var $animate_number = $('.animate-number'); $animate_number.appear(); $(document.body).on('appear', '.animate-number', function() { $animate_number.each(function() { var current_item = $(this); if (!current_item.hasClass('appeared')) { current_item.animateNumbers(current_item.attr("data-value"), true, parseInt(current_item.attr("data-animation-duration"), 10)).addClass('appeared'); } }); }); }, /* ---------------------------------------------------------------------- */ /* ----------------------------- Flickr Feed ---------------------------- */ /* ---------------------------------------------------------------------- */ TM_instagramFeed: function() { $('.instagram-feed-carousel').each(function() { var current_div = $(this); var instagramFeed = new Instafeed({ target: current_div.attr('id'), get: 'user', userId: current_div.data('userid'), accessToken: '1215763826.467ede5.aa54392aa9eb46f0b9e7191f7211ec3a', resolution: 'low_resolution', limit: 9, template: '<div class="item"><figure><img src="{{image}}" /><a href="{{link}}" class="link-out" target="_blank"><i class="fa fa-link"></i></a></figure></div>', after: function() { current_div.owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: true, nav: false, responsive: { 0: { items: 2 }, 768: { items: 4 }, 1000: { items: 5 } } }); } }); instagramFeed.run(); }); $('.instagram-feed').each(function() { var current_div = $(this); var instagramFeed = new Instafeed({ target: current_div.attr('id'), get: 'user', userId: current_div.data('userid'), accessToken: '1215763826.467ede5.aa54392aa9eb46f0b9e7191f7211ec3a', resolution: 'low_resolution', limit: 9, template: '<div class="item"><figure><img src="{{image}}" /><a href="{{link}}" class="link-out" target="_blank"><i class="fa fa-link"></i></a></figure></div>', after: function() { } }); instagramFeed.run(); }); }, /* ---------------------------------------------------------------------- */ /* ---------------------------- Flickr Feed ----------------------------- */ /* ---------------------------------------------------------------------- */ TM_jflickrfeed: function() { $(".flickr-widget .flickr-feed").jflickrfeed({ limit: 9, qstrings: { id: "64742456@N00" }, itemTemplate: '<a href="{{link}}" title="{{title}}" target="_blank"><img src="{{image_m}}" alt="{{title}}"> </a>' }); }, /* ---------------------------------------------------------------------- */ /* ------------------------- accordion & toggles ------------------------ */ /* ---------------------------------------------------------------------- */ TM_accordion_toggles: function() { var $panel_group_collapse = $('.panel-group .collapse'); $panel_group_collapse.on("show.bs.collapse", function(e) { $(this).closest(".panel-group").find("[href='#" + $(this).attr("id") + "']").addClass("active"); }); $panel_group_collapse.on("hide.bs.collapse", function(e) { $(this).closest(".panel-group").find("[href='#" + $(this).attr("id") + "']").removeClass("active"); }); }, /* ---------------------------------------------------------------------- */ /* ------------------------------- tooltip ----------------------------- */ /* ---------------------------------------------------------------------- */ TM_tooltip: function() { $('[data-toggle="tooltip"]').tooltip(); }, /* ---------------------------------------------------------------------- */ /* ---------------------------- Twitter Feed --------------------------- */ /* ---------------------------------------------------------------------- */ TM_twittie: function() { var $twitter_feed = $('.twitter-feed'); var $twitter_feed_carousel = $('.twitter-feed-carousel'); $twitter_feed.twittie({ username: $twitter_feed.data('username'), dateFormat: '%b. %d, %Y', template: '{{tweet}} <div class="date">{{date}}</div>', count: 2, loadingText: 'Loading!' }); $twitter_feed_carousel.twittie({ username: $twitter_feed_carousel.data('username'), dateFormat: '%b. %d, %Y', template: '{{tweet}} <div class="date">{{date}}</div>', count: 4, loadingText: 'Loading!' }, function() { $twitter_feed_carousel.find('ul').owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 2000, loop: true, items: 1, dots: true, nav: false }); }); } }; THEMEMASCOT.slider = { init: function() { var t = setTimeout(function() { THEMEMASCOT.slider.TM_typedAnimation(); THEMEMASCOT.slider.TM_flexslider(); THEMEMASCOT.slider.TM_owlCarousel(); THEMEMASCOT.slider.TM_maximageSlider(); }, 0); }, /* ---------------------------------------------------------------------- */ /* -------------------------- Typed Text Carousel ---------------------- */ /* ---------------------------------------------------------------------- */ TM_typedAnimation: function() { if ($('.typed-text-carousel').length) { $('.typed-text-carousel').each(function() { var string_1 = $(this).find('span:first-child').text(); var string_2 = $(this).find('span:nth-child(2)').text(); var string_3 = $(this).find('span:nth-child(3)').text(); var str = ''; var $this = $(this); if (!string_2.trim() || !string_3.trim()) { str = [string_1] } if (!string_3.trim() && string_2.length) { str = [string_1, string_2] } if (string_1.length && string_2.length && string_3.length) { str = [string_1, string_2, string_3] } var speed = $(this).data('speed'); var back_delay = $(this).data('back_delay'); var loop = $(this).data('loop'); $(this).typed({ strings: str, typeSpeed: speed, backSpeed: 0, backDelay: back_delay, cursorChar: "|", loop: loop, contentType: 'text', loopCount: false }) }) } }, /* ---------------------------------------------------------------------- */ /* -------------------------------- flexslider ------------------------- */ /* ---------------------------------------------------------------------- */ TM_flexslider: function() { var $flexSlider = $('.flexslider-wrapper').find('.flexslider'); if( $flexSlider.length > 0 ){ $flexSlider.each(function() { THEMEMASCOT.widget.TM_portfolioFlexSliderGalleryPopUpInit(); var $flexsSlider = $(this), flexsAnimation = $flexsSlider.parent('.fslider').attr('data-animation'), flexsEasing = $flexsSlider.parent('.fslider').attr('data-easing'), flexsDirection = $flexsSlider.parent('.fslider').attr('data-direction'), flexsSlideshow = $flexsSlider.parent('.fslider').attr('data-slideshow'), flexsSlideShowSpeed = $flexsSlider.parent('.fslider').attr('data-slidespeed'), flexsAnimationSpeed = $flexsSlider.parent('.fslider').attr('data-animationspeed'), flexsControlNav = $flexsSlider.parent('.fslider').attr('data-controlnav'), flexsArrows = $flexsSlider.parent('.fslider').attr('data-arrows'), flexsThumbnails = $flexsSlider.parent('.fslider').attr('data-thumbnails'), flexsPauseHover = $flexsSlider.parent('.fslider').attr('data-pausehover'); if( !flexsAnimation ) { flexsAnimation = 'slide'; } if( !flexsEasing || flexsEasing == 'swing' ) { flexsEasing = 'swing'; } if( !flexsDirection ) { flexsDirection = 'horizontal'; } if( !flexsSlideshow ) { flexsSlideshow = true; } else { flexsSlideshow = false; } if( !flexsSlideShowSpeed ) { flexsSlideShowSpeed = 5000; } if( !flexsAnimationSpeed ) { flexsAnimationSpeed = 600; } if( flexsControlNav == 'false' ) { flexsControlNav = false; } else { flexsControlNav = true; } if( flexsThumbnails == 'true' ) { flexsControlNav = 'thumbnails'; } if( flexsArrows == 'false' ) { flexsArrows = false; } else { flexsArrows = true; } if( flexsPauseHover == 'false' ) { flexsPauseHover = false; } else { flexsPauseHover = true; } $flexsSlider.flexslider({ selector: ".slides > li", animation: flexsAnimation, easing: flexsEasing, direction: flexsDirection, slideshow: flexsSlideshow, slideshowSpeed: Number(flexsSlideShowSpeed), animationSpeed: Number(flexsAnimationSpeed), pauseOnHover: flexsPauseHover, controlNav: flexsControlNav, directionNav: flexsArrows, start: function(slider){ imagesLoaded($portfolio_gallery, function(){ setTimeout(function(){ $portfolio_filter_first_child.trigger("click"); },500); }); //var t = setTimeout( function(){ $('#portfolio.portfolio-masonry,#portfolio.portfolio-full,#posts.post-masonry').isotope('layout'); }, 1200 ); THEMEMASCOT.initialize.TM_magnificPopup_lightbox(); THEMEMASCOT.initialize.TM_prettyPhoto_lightbox(); THEMEMASCOT.initialize.TM_nivolightbox(); }, after: function(){ } }); }); } }, /* ---------------------------------------------------------------------- */ /* -------------------------------- Owl Carousel ----------------------- */ /* ---------------------------------------------------------------------- */ TM_owlCarousel: function() { $(".text-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 2000, loop: true, items: 1, dots: true, nav: false, navText: [ '<i class="pe-7s-angle-left"></i>', '<i class="pe-7s-angle-right"></i>' ] }); $(".product-details-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 2000, loop: true, items: 1, dots: false, nav: true, navText: [ '<i class="pe-7s-angle-left"></i>', '<i class="pe-7s-angle-right"></i>' ] }); $(".widget-video-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 4000, smartSpeed: 500, items: 1, loop: true, dots: true, nav: false }); $(".widget-image-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 2000, smartSpeed: 400, items: 1, loop: true, dots: true, nav: false }); $(".attorney-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: false, nav: true, navText: [ '<i class="pe-7s-angle-left"></i>', '<i class="pe-7s-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 2, center: false }, 960: { items: 3 }, 1170: { items: 3 }, 1300: { items: 4 } } }); $(".gallery-list-carosel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: false, nav: true, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 2, center: false }, 600: { items: 4, center: false }, 960: { items: 6 }, 1170: { items: 6 }, 1300: { items: 6 } } }); $(".testimonial-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: true, nav: false, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 1, center: false }, 960: { items: 1 }, 1170: { items: 1 }, 1300: { items: 1 } } }); $(".widget-testimonial-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 2000, smartSpeed: 400, items: 1, loop: true, dots: true, nav: false }); $('.news-carousel').each(function() { var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots"); var data_nav = ( $(this).data("nav") === undefined ) ? false: $(this).data("nav"); $(this).owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: data_dots, nav: data_nav, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 1, center: false }, 750: { items: 3, center: false }, 960: { items: 3 }, 1170: { items: 3 }, 1300: { items: 3 } } }); }); $('.news-carousel-2column').each(function() { var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots"); var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav"); $(this).owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: data_dots, nav: data_nav, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 1, center: false }, 750: { items: 2, center: false }, 960: { items: 2 }, 1170: { items: 2 }, 1300: { items: 2 } } }); }); $(".clients-logo.carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 2000, items: 5, dots: false, nav: false, responsive: { 0: { items: 3, center: false }, 600: { items: 3, center: false }, 960: { items: 4 }, 1170: { items: 6 }, 1300: { items: 6 } } }); $('.recent-project').each(function() { var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots"); var data_nav = ( $(this).data("nav") === undefined ) ? false: $(this).data("nav"); $(this).owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 4000, loop: true, margin: 15, dots: false, nav: true, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 2, center: false }, 750: { items: 4, center: false }, 960: { items: 4 }, 1170: { items: 4 }, 1300: { items: 4 } } }); }); $(".featured-project-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: false, autoplayTimeout: 4000, loop: true, margin: 15, dots: false, nav: true, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 1, center: false }, 960: { items: 1 }, 1170: { items: 1 }, 1300: { items: 1 } } }); $('.practice-area-carousel').each(function() { var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots"); var data_nav = ( $(this).data("nav") === undefined ) ? false: $(this).data("nav"); $(this).owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 4000, loop: true, margin: 15, dots: false, nav: true, navText: [ '<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>' ], responsive: { 0: { items: 1, center: false }, 600: { items: 2, center: false }, 750: { items: 3, center: false }, 960: { items: 4 }, 1170: { items: 4 }, 1300: { items: 5 } } }); }); $(".fullwidth-carousel").owlCarousel({ rtl: THEMEMASCOT.isRTL.check(), autoplay: true, autoplayTimeout: 5000, loop: true, items: 1, dots: false, nav: true, navText: [ '<i class="pe-7s-angle-left"></i>', '<i class="pe-7s-angle-right"></i>' ] }); }, /* ---------------------------------------------------------------------- */ /* ---------- maximage Fullscreen Parallax Background Slider ----------- */ /* ---------------------------------------------------------------------- */ TM_maximageSlider: function() { $('#maximage').maximage({ cycleOptions: { fx: 'fade', speed: 1500, prev: '.img-prev', next: '.img-next' } }); } }; THEMEMASCOT.documentOnResize = { init: function() { var t = setTimeout(function() { THEMEMASCOT.initialize.TM_equalHeightDivs(); THEMEMASCOT.initialize.TM_resizeFullscreen(); }, 0); } }; THEMEMASCOT.documentOnLoad = { init: function() { var t = setTimeout(function() { THEMEMASCOT.initialize.TM_preLoaderOnLoad(); THEMEMASCOT.initialize.TM_hashForwarding(); THEMEMASCOT.initialize.TM_parallaxBgInit(); }, 0); $window.trigger("scroll"); $window.trigger("resize"); } }; //document ready THEMEMASCOT.documentOnReady = { init: function() { THEMEMASCOT.initialize.init(); THEMEMASCOT.header.init(); THEMEMASCOT.slider.init(); THEMEMASCOT.widget.init(); THEMEMASCOT.documentOnReady.windowscroll(); }, windowscroll: function(){ $window.on( 'scroll', function(){ THEMEMASCOT.header.TM_scroolToTop(); THEMEMASCOT.header.TM_activateMenuItemOnReach(); THEMEMASCOT.header.TM_topnavAnimate(); }); } }; /* ---------------------------------------------------------------------- */ /* -------------------------- Declare Variables ------------------------- */ /* ---------------------------------------------------------------------- */ var $window = $(window), $html = $('html'), $body = $('body'), $wrapper = $('#wrapper'), $header = $('#header'), $footer = $('#footer'), $sections = $('section'), $portfolio_gallery = $(".portfolio-gallery"), $portfolio_filter = $(".portfolio-filter a"), $portfolio_filter_first_child = $(".portfolio-filter a:eq(0)"), $portfolio_flex_slider = $(".portfolio-slider"); /* ---------------------------------------------------------------------- */ /* ---------------------------- Call Functions -------------------------- */ /* ---------------------------------------------------------------------- */ THEMEMASCOT.initialize.TM_preLoaderClickDisable(); $(document).ready(THEMEMASCOT.documentOnReady.init); $window.load(THEMEMASCOT.documentOnLoad.init); $window.on('resize', THEMEMASCOT.documentOnResize.init); })(jQuery);