// Animation js start (function() { var Util, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; Util = (function() { function Util() {} Util.prototype.extend = function(custom, defaults) { var key, value; for (key in custom) { value = custom[key]; if (value != null) { defaults[key] = value; } } return defaults; }; Util.prototype.isMobile = function(agent) { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent); }; return Util; })(); this.WOW = (function() { WOW.prototype.defaults = { boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: true }; function WOW(options) { if (options == null) { options = {}; } this.scrollCallback = __bind(this.scrollCallback, this); this.scrollHandler = __bind(this.scrollHandler, this); this.start = __bind(this.start, this); this.scrolled = true; this.config = this.util().extend(options, this.defaults); } WOW.prototype.init = function() { var _ref; this.element = window.document.documentElement; if ((_ref = document.readyState) === "interactive" || _ref === "complete") { return this.start(); } else { return document.addEventListener('DOMContentLoaded', this.start); } }; WOW.prototype.start = function() { var box, _i, _len, _ref; this.boxes = this.element.getElementsByClassName(this.config.boxClass); if (this.boxes.length) { if (this.disabled()) { return this.resetStyle(); } else { _ref = this.boxes; for (_i = 0, _len = _ref.length; _i < _len; _i++) { box = _ref[_i]; this.applyStyle(box, true); } window.addEventListener('scroll', this.scrollHandler, false); window.addEventListener('resize', this.scrollHandler, false); return this.interval = setInterval(this.scrollCallback, 50); } } }; WOW.prototype.stop = function() { window.removeEventListener('scroll', this.scrollHandler, false); window.removeEventListener('resize', this.scrollHandler, false); if (this.interval != null) { return clearInterval(this.interval); } }; WOW.prototype.show = function(box) { this.applyStyle(box); return box.className = "" + box.className + " " + this.config.animateClass; }; WOW.prototype.applyStyle = function(box, hidden) { var delay, duration, iteration; duration = box.getAttribute('data-wow-duration'); delay = box.getAttribute('data-wow-delay'); iteration = box.getAttribute('data-wow-iteration'); return box.setAttribute('style', this.customStyle(hidden, duration, delay, iteration)); }; WOW.prototype.resetStyle = function() { var box, _i, _len, _ref, _results; _ref = this.boxes; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { box = _ref[_i]; _results.push(box.setAttribute('style', 'visibility: visible;')); } return _results; }; WOW.prototype.customStyle = function(hidden, duration, delay, iteration) { var style; style = hidden ? "visibility: hidden; -webkit-animation-name: none; -moz-animation-name: none; animation-name: none;" : "visibility: visible;"; if (duration) { style += "-webkit-animation-duration: " + duration + "; -moz-animation-duration: " + duration + "; animation-duration: " + duration + ";"; } if (delay) { style += "-webkit-animation-delay: " + delay + "; -moz-animation-delay: " + delay + "; animation-delay: " + delay + ";"; } if (iteration) { style += "-webkit-animation-iteration-count: " + iteration + "; -moz-animation-iteration-count: " + iteration + "; animation-iteration-count: " + iteration + ";"; } return style; }; WOW.prototype.scrollHandler = function() { return this.scrolled = true; }; WOW.prototype.scrollCallback = function() { var box; if (this.scrolled) { this.scrolled = false; this.boxes = (function() { var _i, _len, _ref, _results; _ref = this.boxes; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { box = _ref[_i]; if (!(box)) { continue; } if (this.isVisible(box)) { this.show(box); continue; } _results.push(box); } return _results; }).call(this); if (!this.boxes.length) { return this.stop(); } } }; WOW.prototype.offsetTop = function(element) { var top; top = element.offsetTop; while (element = element.offsetParent) { top += element.offsetTop; } return top; }; WOW.prototype.isVisible = function(box) { var bottom, offset, top, viewBottom, viewTop; offset = box.getAttribute('data-wow-offset') || this.config.offset; viewTop = window.pageYOffset; viewBottom = viewTop + this.element.clientHeight - offset; top = this.offsetTop(box); bottom = top + box.clientHeight; return top <= viewBottom && bottom >= viewTop; }; WOW.prototype.util = function() { return this._util || (this._util = new Util()); }; WOW.prototype.disabled = function() { return !this.config.mobile && this.util().isMobile(navigator.userAgent); }; return WOW; })(); }).call(this); wow = new WOW( { animateClass: 'animated', offset: 100, } ); jQuery(document).ready(function($) { wow.init(); var $row_service = $('.servicesSection > .row'); $row_service.children('div:first').addClass('fadeInLeft'); $row_service.children('div:eq(1)').addClass('fadeInRight'); $('.teamsSection .row:first-child .col-md-6:first').addClass('rotateLeftToNormal'); $('.teamsSection .row:nth-child(2) .col-md-6:first').addClass('rotateRightToNormal'); $('.teamsSection .row:nth-child(3) .col-md-6:first').addClass('fadeInZoom'); }); jQuery(document).ready(function($) { var scrollThreshold = 0.5; $(window).on('scroll', function() { var section = $('.on-scroll-animation '); // Ensure the section exists before accessing its offset if (section.length) { var scrollPosition = $(window).scrollTop(); var windowHeight = $(window).height(); var sectionOffsetTop = section.offset().top; var sectionHeight = section.height(); if (scrollPosition + windowHeight >= sectionOffsetTop + (sectionHeight * scrollThreshold)) { section.addClass('in-view'); } } }); var headingText = $('.sub-title-wrapper h6,.sub-title-wrapper p').text(); $('.sub-title-wrapper h6,.sub-title-wrapper p').attr('data-heading', headingText); }); // Animation js end jQuery(document).ready(function () { if (jQuery(window).width() > 576) { jQuery('.equal_container').each(function () { var highestBox = 0; jQuery('.equal_height', this).each(function () { if (jQuery(this).height() > highestBox) { highestBox = jQuery(this).height(); } }); jQuery('.equal_height', this).height(highestBox); }); } jQuery('.news-slider').slick({ dots: false, infinite: false, speed: 300, slidesToShow: 3, slidesToScroll: 1, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 2, slidesToScroll: 1 } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); jQuery('.spec-slider').slick({ dots: false, infinite: false, speed: 300, slidesToShow: 4, slidesToScroll: 1, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 2, slidesToScroll: 1 } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); }); jQuery(document).ready(function(){ jQuery('.team-inner-btn').click(function(){ jQuery(this).parents('.teambox').addClass('popup_open'); jQuery('html').addClass('overflow-hidden'); // jQuery('html, body').animate({ // scrollTop: jQuery("#header").offset().top // }, 0); }); jQuery('.popup-close').click(function(){ jQuery(this).parents('.teambox').addClass('popup_open'); jQuery('.teambox').removeClass('popup_open'); jQuery('html').removeClass('overflow-hidden'); // jQuery('html, body').animate({ // scrollTop: jQuery(this).parents('.teambox').offset().top // }, 0); }); }); jQuery(document).ready(function() { // Listen for file input changes on Contact Form 7 field jQuery('#file-input').on('change', function(event) { if (event.target.files.length > 0) { var fileName = event.target.files[0].name; // Get the selected file name jQuery('#file-placeholder').text(fileName); // Update the text inside the p tag } else { jQuery('#file-placeholder').text('DROP FILES/CV TO ATTACH, OR BROWSE'); // Reset if no file is selected } }); }); jQuery(window).scroll(function() { var scroll = jQuery(window).scrollTop(); if (scroll >= 10) { jQuery(".top_header").addClass("sticky-header") } else { jQuery(".top_header").removeClass("sticky-header") } });