// $('a[href^=\\#]').on('click', function(event){
// event.preventDefault();
// $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
// });
(function($) {
$.fn.countTo = function(options) {
// merge the default plugin settings with the custom options
options = $.extend({}, $.fn.countTo.defaults, options || {});
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(options.speed / options.refreshInterval),
increment = (options.to - options.from) / loops;
return $(this).each(function() {
var _this = this,
loopCount = 0,
value = options.from,
interval = setInterval(updateTimer, options.refreshInterval);
function updateTimer() {
value += increment;
loopCount++;
$(_this).html(value.toFixed(options.decimals));
if (typeof(options.onUpdate) == 'function') {
options.onUpdate.call(_this, value);
}
if (loopCount >= loops) {
clearInterval(interval);
value = options.to;
if (typeof(options.onComplete) == 'function') {
options.onComplete.call(_this, value);
}
}
}
});
};
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 100, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 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
};
})(jQuery);
jQuery(function($) {
$('.timer1').countTo({
from: 0, // the number you want to start
to: 8, // the number you want to reach
speed: 4000,
refreshInterval: 100
});
// second timer
$('.timer2').countTo({
from: 0,// the number you want to start
to: 200,// the number you want to reach
speed: 2500,
refreshInterval: 50
});
// third timer
$('.timer3').countTo({
from: 0,// the number you want to start
to: 10,// the number you want to reach
speed: 2500,
refreshInterval: 10
});
});
$(document).on('ready', function() {
// $(".center").slick({
$(".center").not('.slick-initialized').slick({
dots: false,
centerMode: false,
autoplay: true,
autoplaySpeed: 4000,
arrow:true,
infinite: true,
centerMode: false,
slidesToShow: 3,
variableWidth: false,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1200,
settings: {
centerMode: false,
}
},
{
breakpoint:991,
settings: {
}
},
{
breakpoint:768,
settings: {
}
},
{
breakpoint:580,
settings: {
// centerPadding: '60px',
stagePadding:'20px',
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: false,
}
}
]
});
$(".testimonials").slick({
dots: false,
arrow:true,
infinite: true,
slidesToShow: 2,
slidesToScroll: 2,
responsive: [
{
breakpoint: 767,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}
]
});
$(".lazy").slick({
lazyLoad: 'ondemand',
infinite: true
});
$(".featured").slick({
dots: false,
arrow:true,
infinite: true,
slidesToShow: 1,
slidesToScroll: 3,
responsive: [
{
breakpoint: 479,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}
]
});
$(".insight").slick({
dots: false,
arrow:true,
infinite: true,
slidesToShow: 2,
slidesToScroll: 3,
responsive: [
{
breakpoint: 479,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}
]
});
$(".lazy").slick({
lazyLoad: 'ondemand',
infinite: true
});
});
//nav
$(document).ready(function(){
$(".toggleBtn button").click(function(){
$(".overlay").fadeToggle(200);
$(this).toggleClass('btn-open').toggleClass('btn-close');
});
});
$('.overlay1').on('click', function(){
$(".overlay1").fadeToggle(200);
$(".toggleBtn button").toggleClass('btn-open').toggleClass('btn-close');
open = false;
});
$(document).ready(function () {
$(document).on('click', '.accordian .item .toggleService', function () {
$(this).siblings('.list').stop().slideToggle();
$(this).closest('.item').siblings('.item').find('.list').stop().slideUp();
});
});
/*$(function () {
$('.drop-down').on('click',function () {
$('#sub-menu').toggleClass('show-megamenu');
});
});
*/
//
$(document).ready(function () {
// custom accordion
$(function () {
if ($('.accordion-list').length) {
$('.accordion-list').on('click', '.accordion-title', function (e) {
e.preventDefault();
// remove siblings activities
$(this).closest('.accordion-list-item').siblings().removeClass('open').find('.accordion-desc').slideUp();
$(this).closest('.accordion-list-item').siblings().find('.fa').addClass('fa-plus').removeClass('fa-minus');
// add slideToggle into this
$(this).closest('.accordion-list-item').toggleClass('open').find('.accordion-desc').slideToggle();
$(this).find('.fa').toggleClass('fa-plus fa-minus');
});
}
});
});
// tab
$('#tabs-nav li:first-child').addClass('active');
$('.tab-content').hide();
$('.tab-content:first').show();
// Click function
$('#tabs-nav li').click(function(){
$('#tabs-nav li').removeClass('active');
$(this).addClass('active');
$('.tab-content').hide();
var activeTab = $(this).find('a').attr('href');
$(activeTab).fadeIn();
return false;
});
jQuery(document).ready(function () {
//Pagination JS
//how much items per page to show
var show_per_page = 1;
//getting the amount of elements inside pagingBox div
var number_of_items = $('#pagingBox').children().size();
//calculate the number of pages we are going to have
var number_of_pages = Math.ceil(number_of_items/show_per_page);
//set the value of our hidden input fields
$('#current_page').val(0);
$('#show_per_page').val(show_per_page);
//now when we got all we need for the navigation let's make it '
/*
what are we going to have in the navigation?
- link to previous page
- links to specific pages
- link to next page
*/
var navigation_html = '<';
var current_link = 0;
while(number_of_pages > current_link){
navigation_html += ''+ (current_link + 1) +'';
current_link++;
}
navigation_html += '>';
$('#page_navigation').html(navigation_html);
//add active_page class to the first page link
$('#page_navigation .page_link:first').addClass('active_page');
//hide all the elements inside pagingBox div
$('#pagingBox').children().css('display', 'none');
//and show the first n (show_per_page) elements
$('#pagingBox').children().slice(0, show_per_page).css('display', 'block');
});
//Pagination JS
function previous(){
new_page = parseInt($('#current_page').val()) - 1;
//if there is an item before the current active link run the function
if($('.active_page').prev('.page_link').length==true){
go_to_page(new_page);
}
}
function next(){
new_page = parseInt($('#current_page').val()) + 1;
//if there is an item after the current active link run the function
if($('.active_page').next('.page_link').length==true){
go_to_page(new_page);
}
}
function go_to_page(page_num){
//get the number of items shown per page
var show_per_page = parseInt($('#show_per_page').val());
//get the element number where to start the slice from
start_from = page_num * show_per_page;
//get the element number where to end the slice
end_on = start_from + show_per_page;
//hide all children elements of pagingBox div, get specific items and show them
$('#pagingBox').children().css('display', 'none').slice(start_from, end_on).css('display', 'block');
/*get the page link that has longdesc attribute of the current page and add active_page class to it
and remove that class from previously active page link*/
$('.page_link[longdesc=' + page_num +']').addClass('active_page').siblings('.active_page').removeClass('active_page');
//update the current page input field
$('#current_page').val(page_num);
$('html, body').animate({ scrollTop: $('#projects.heading').offset().top }, 'fast');
}
jQuery.event.special.touchstart = {
setup: function( _, ns, handle ){
if ( ns.includes("noPreventDefault") ) {
this.addEventListener("touchstart", handle, { passive: false });
} else {
this.addEventListener("touchstart", handle, { passive: true });
}
}
};
jQuery.event.special.touchmove = {
setup: function( _, ns, handle ){
if ( ns.includes("noPreventDefault") ) {
this.addEventListener("touchmove", handle, { passive: false });
} else {
this.addEventListener("touchmove", handle, { passive: true });
}
}
};
/*CHATCODE*/
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src="proxy.php?url=https%3A%2F%2Fembed.tawk.to%2F6626228ba0c6737bd12ee62f%2F1hs2fdssg";
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
//New Accordian
$(document).ready(function() {
$(".accordion-list-item2 > .accordion-title2").on("click", function() {
if ($(this).hasClass("active")) {
$(this).removeClass("active");
$(this)
.siblings(".accordion-desc2")
.slideUp(200);
$(".accordion-list-item2 > .accordion-title2 span")
.removeClass("fa-minus")
.addClass("fa-plus");
} else {
$(".accordion-list-item2 > .accordion-title2 span")
.removeClass("fa-minus")
.addClass("fa-plus");
$(this)
.find("span")
.removeClass("fa-plus")
.addClass("fa-minus");
$(".accordion-list-item2 > .accordion-title2").removeClass("active");
$(this).addClass("active");
$(".accordion-desc2").slideUp(200);
$(this)
.siblings(".accordion-desc2")
.slideDown(200);
}
});
});