1"use strict"; 2var lastScroll = 0; 3 4//check for browser os 5var isMobile = false; 6var isiPhoneiPad = false; 7if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 8 isMobile = true; 9} 10 11if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) { 12 isiPhoneiPad = true; 13} 14 15function SetMegamenuPosition() { 16 if ($(window).width() > 991) { 17 setTimeout(function () { 18 var totalHeight = $('nav.navbar').outerHeight(); 19 $('.mega-menu').css({top: totalHeight}); 20 if ($('.navbar-brand-top').length === 0) 21 $('.dropdown.simple-dropdown > .dropdown-menu').css({top: totalHeight}); 22 }, 200); 23 } else { 24 $('.mega-menu').css('top', ''); 25 $('.dropdown.simple-dropdown > .dropdown-menu').css('top', ''); 26 } 27} 28 29function pad(d) { 30 return (d < 10) ? '0' + d.toString() : d.toString(); 31} 32 33function isIE() { 34 var ua = window.navigator.userAgent; 35 var msie = ua.indexOf("MSIE "); 36 if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet Explorer, return version number 37 { 38 return true; 39 } else // If another browser, return 0 40 { 41 return false; 42 } 43} 44 45//page title space 46function setPageTitleSpace() { 47 if ($('.navbar').hasClass('navbar-top') || $('nav').hasClass('navbar-fixed-top')) { 48 if ($('.top-space').length > 0) { 49 var top_space_height = $('.navbar').outerHeight(); 50 if ($('.top-header-area').length > 0) { 51 top_space_height = top_space_height + $('.top-header-area').outerHeight(); 52 } 53 $('.top-space').css('margin-top', top_space_height + "px"); 54 } 55 } 56} 57 58//swiper button position in auto height slider 59function setButtonPosition() { 60 if ($(window).width() > 767 && $(".swiper-auto-height-container").length > 0) { 61 var leftPosition = parseInt($('.swiper-auto-height-container .swiper-slide').css('padding-left')); 62 var bottomPosition = parseInt($('.swiper-auto-height-container .swiper-slide').css('padding-bottom')); 63 var bannerWidth = parseInt($('.swiper-auto-height-container .slide-banner').outerWidth()); 64 $('.navigation-area').css({'left': bannerWidth + leftPosition + 'px', 'bottom': bottomPosition + 'px'}); 65 } else if ($(".swiper-auto-height-container").length > 0) { 66 $('.navigation-area').css({'left': '', 'bottom': ''}); 67 } 68} 69 70$(window).on("scroll", init_scroll_navigate); 71function init_scroll_navigate() { 72 /*============================================================== 73 One Page Main JS - START CODE 74 =============================================================*/ 75 var menu_links = $(".navbar-nav li a"); 76 var scrollPos = $(document).scrollTop(); 77 scrollPos = scrollPos + 60; 78 menu_links.each(function () { 79 var currLink = $(this); 80 var hasPos = currLink.attr("href").indexOf("#"); 81 if (hasPos > -1) { 82 var res = currLink.attr("href").substring(hasPos); 83 if ($(res).length > 0) { 84 var refElement = $(res); 85 if (refElement.offset().top <= scrollPos && refElement.offset().top + refElement.height() > scrollPos) { 86 menu_links.not(currLink).removeClass("active"); 87 currLink.addClass("active"); 88 } else { 89 currLink.removeClass("active"); 90 } 91 } 92 } 93 }); 94 /*============================================================== 95 One Page Main JS - END CODE 96 =============================================================*/ 97 98 /*==============================================================*/ 99 //background color slider Start 100 /*==============================================================*/ 101 var $window = $(window), 102 $body = $('.bg-background-fade'), 103 $panel = $('.color-code'); 104 var scroll = $window.scrollTop() + ($window.height() / 2); 105 $panel.each(function () { 106 var $this = $(this); 107 if ($this.position().top <= scroll && $this.position().top + $this.height() > scroll) { 108 $body.removeClass(function (index, css) { 109 return (css.match(/(^|\s)color-\S+/g) || []).join(' '); 110 }); 111 $body.addClass('color-' + $(this).data('color')); 112 } 113 }); 114 /*==============================================================*/ 115 //background color slider End 116 /*==============================================================*/ 117 118 /* =================================== 119 sticky nav Start 120 ====================================== */ 121 var headerHeight = $('nav').outerHeight(); 122 if (!$('header').hasClass('no-sticky')) { 123 if ($(document).scrollTop() >= headerHeight) { 124 $('header').addClass('sticky'); 125 126 } else if ($(document).scrollTop() <= headerHeight) { 127 $('header').removeClass('sticky'); 128 setTimeout(function () { 129 setPageTitleSpace(); 130 }, 500); 131 } 132 SetMegamenuPosition(); 133 } 134 135 /* =================================== 136 header appear on scroll up 137 ====================================== */ 138 var st = $(this).scrollTop(); 139 if (st > lastScroll) { 140 $('.sticky').removeClass('header-appear'); 141// $('.dropdown.on').removeClass('on').removeClass('open').find('.dropdown-menu').fadeOut(100); 142 } else 143 $('.sticky').addClass('header-appear'); 144 lastScroll = st; 145 if (lastScroll <= headerHeight) 146 $('header').removeClass('header-appear'); 147 /* =================================== 148 sticky nav End 149 ====================================== */ 150} 151 152/*============================================================== 153 parallax text - START CODE 154 ==============================================================*/ 155function parallax_text() { 156 var window_width = $(window).width(); 157 if (window_width > 1024) { 158 if ($('.swiper-auto-slide .swiper-slide').length !== 0) { 159 $(document).on("mousemove", ".swiper-auto-slide .swiper-slide", function (e) { 160 var positionX = e.clientX; 161 var positionY = e.clientY; 162 positionX = Math.round(positionX / 10) - 80; 163 positionY = Math.round(positionY / 10) - 40; 164 $(this).find('.parallax-text').css({'transform': 'translate(' + positionX + 'px,' + positionY + 'px)', 'transition-duration': '0s'}); 165 }); 166 167 $(document).on("mouseout", ".swiper-auto-slide .swiper-slide", function (e) { 168 $('.parallax-text').css({'transform': 'translate(0,0)', 'transition-duration': '0.5s'}); 169 }); 170 } 171 } 172} 173/*==============================================================*/ 174//parallax text - END CODE 175/*==============================================================*/ 176 177/*==============================================================*/ 178//Search - START CODE 179/*==============================================================*/ 180function ScrollStop() { 181 return false;
182} 183function ScrollStart() { 184 return true; 185} 186function validationSearchForm() { 187 var error = true; 188 $('#search-header input[type=text]').each(function (index) { 189 if (index === 0) { 190 if ($(this).val() === null || $(this).val() === "") { 191 $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid red"}); 192 error = false; 193 } else { 194 $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid #000"}); 195 } 196 } 197 }); 198 return error; 199} 200/*============================================================== 201 Search - END CODE 202 ==============================================================*/ 203 204/*============================================================== 205 equalize - START CODE 206 ==============================================================*/ 207function equalizeHeight() { 208 $(document).imagesLoaded(function () { 209 if ($(window).width() < 768) { 210 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 211 $('.equalize.md-equalize-auto').children().css("height", ""); 212 $('.equalize.sm-equalize-auto').children().css("height", ""); 213 $('.equalize.xs-equalize-auto').children().css("height", ""); 214 return false; 215 } else if ($(window).width() < 992) { 216 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 217 $('.equalize.md-equalize-auto').children().css("height", ""); 218 $('.equalize.sm-equalize-auto').children().css("height", ""); 219 return false; 220 } else if ($(window).width() < 1199) { 221 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 222 $('.equalize.md-equalize-auto').children().css("height", ""); 223 return false; 224 } else { 225 $('.equalize').equalize({equalize: 'outerHeight', reset: true}); 226 } 227 }); 228} 229/*============================================================== 230 equalize - END CODE 231 ==============================================================*/ 232 233/*============================================================== 234 dynamic font size START CODE 235 ==============================================================*/ 236function feature_dynamic_font_line_height() { 237 if ($('.dynamic-font-size').length > 0) { 238 var site_width = 1100; 239 var window_width = $(window).width(); 240 if (window_width < site_width) { 241 var window_site_width_ratio = window_width / site_width; 242 $('.dynamic-font-size').each(function () { 243 var font_size = $(this).attr('data-fontsize'); 244 var line_height = $(this).attr('data-lineheight'); 245 if (font_size != '' && font_size != undefined) { 246 var new_font_size = Math.round(font_size * window_site_width_ratio * 1000) / 1000; 247 $(this).css('font-size', new_font_size + 'px'); 248 } 249 if (line_height !== '' && line_height !== undefined) { 250 var new_line_height = Math.round(line_height * window_site_width_ratio * 1000) / 1000; 251 $(this).css('line-height', new_line_height + 'px'); 252 } 253 }); 254 } else { 255 $('.dynamic-font-size').each(function () { 256 var font_size = $(this).attr('data-fontsize'); 257 var line_height = $(this).attr('data-lineheight'); 258 if (font_size !== '' && font_size !== undefined) { 259 $(this).css('font-size', font_size + 'px'); 260 } 261 if (line_height !== '' && line_height !== undefined) { 262 $(this).css('line-height', line_height + 'px'); 263 } 264 }); 265 } 266 } 267} 268/*============================================================== 269 dynamic font size END CODE 270 ==============================================================*/ 271 272/*============================================================== 273 set parallax 274 ==============================================================*/ 275function stellarParallax() { 276 if ($(window).width() > 1024) { 277 $.stellar(); 278 } else { 279 $.stellar('destroy'); 280 $('.parallax').css('background-position', ''); 281 } 282} 283 284/*============================================================== 285 full screen START CODE 286 ==============================================================*/ 287function fullScreenHeight() { 288 var element = $(".full-screen"); 289 var $minheight = $(window).height(); 290 element.parents('section').imagesLoaded(function () { 291 if ($(".top-space .full-screen").length > 0) { 292 var $headerheight = $("header nav.navbar").outerHeight(); 293 $(".top-space .full-screen").css('min-height', $minheight - $headerheight); 294 } else { 295 element.css('min-height', $minheight); 296 } 297 }); 298 299 var minwidth = $(window).width(); 300 $(".full-screen-width").css('min-width', minwidth); 301 302 var sidebarNavHeight = $('.sidebar-nav-style-1').height() - $('.logo-holder').parent().height() - $('.footer-holder').parent().height() - 10; 303 $(".sidebar-nav-style-1 .nav").css('height', (sidebarNavHeight)); 304 var style2NavHeight = parseInt($('.sidebar-part2').height() - parseInt($('.sidebar-part2 .sidebar-middle').
304css('padding-top')) - parseInt($('.sidebar-part2 .sidebar-middle').css('padding-bottom')) - parseInt($(".sidebar-part2 .sidebar-middle .sidebar-middle-menu .nav").css('margin-bottom'))); 305 $(".sidebar-part2 .sidebar-middle .sidebar-middle-menu .nav").css('height', (style2NavHeight)); 306 307 308} 309/*============================================================== 310 full screen END CODE 311 ==============================================================*/ 312function SetResizeContent() { 313 // all function call 314 feature_dynamic_font_line_height(); 315 SetMegamenuPosition(); 316 setPageTitleSpace(); 317 setButtonPosition(); 318 parallax_text(); 319 stellarParallax(); 320 fullScreenHeight(); 321 equalizeHeight(); 322} 323 324/* =================================== 325 START RESIZE 326 ====================================== */ 327$(window).resize(function (event) { 328 // Bootsnav menu work with eualize height 329 $("nav.navbar.bootsnav ul.nav").each(function () { 330 $("li.dropdown", this).on("mouseenter", function (e) { 331 if ($(window).width() > 991) { 332 $(this).find('.equalize').equalize({equalize: 'outerHeight', reset: true}); 333 return false; 334 } 335 }); 336 }); 337 338 setTimeout(function () { 339 SetResizeContent(); 340 }, 500); 341 342 event.preventDefault(); 343}); 344/* =================================== 345 END RESIZE 346 ====================================== */ 347 348/* =================================== 349 START READY 350 ====================================== */ 351$(document).ready(function () { 352 "use strict"; 353 354 // Bootsnav menu work with eualize height 355 $("nav.navbar.bootsnav ul.nav").each(function () { 356 $("li.dropdown", this).on("mouseenter", function () { 357 if ($(window).width() > 991) { 358 $(this).find('.equalize').equalize({equalize: 'outerHeight', reset: true}); 359 return false; 360 } 361 }); 362 }); 363 // Bootsnav tab work with eualize height 364 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 365 var target = $(e.target).attr("href"); 366 if ($(window).width() > 991) { 367 $(target).find('.equalize').equalize({equalize: 'outerHeight', reset: true}); 368 return false; 369 } 370 }); 371 372 // Active class to current menu for only html 373 var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1); 374 var $hash = window.location.hash.substring(1); 375 376 if ($hash) { 377 $hash = "#" + $hash; 378 pgurl = pgurl.replace($hash, ""); 379 } else { 380 pgurl = pgurl.replace("#", ""); 381 } 382 383 $(".nav li a").each(function () { 384 if ($(this).attr("href") == pgurl || $(this).attr("href") == pgurl + '.html') { 385 $(this).parent().addClass("active"); 386 $(this).parents('li.dropdown').addClass("active"); 387 } 388 }); 389 $(window).scroll(function () { 390 if ($(this).scrollTop() > 150) 391 $('.scroll-top-arrow').fadeIn('slow'); 392 else 393 $('.scroll-top-arrow').fadeOut('slow'); 394 }); 395 //Click event to scroll to top 396 $(document).on('click', '.scroll-top-arrow', function () { 397 $('html, body').animate({scrollTop: 0}, 800); 398 return false; 399 }); 400 401 /* =================================== 402 swiper slider 403 ====================================== */ 404 var swiperFull = new Swiper('.swiper-full-screen', { 405 loop: true, 406 slidesPerView: 1, 407 preventClicks: false, 408 allowTouchMove: true, 409 pagination: { 410 el: '.swiper-full-screen-pagination', 411 clickable: true 412 }, 413 autoplay: { 414 delay: 5000 415 }, 416 keyboard: { 417 enabled: true 418 }, 419 navigation: { 420 nextEl: '.swiper-button-next', 421 prevEl: '.swiper-button-prev' 422 }, 423 on: { 424 resize: function () { 425 swiperFull.update(); 426 } 427 } 428 }); 429 430 var swiperAutoFade = new Swiper('.swiper-auto-fade', { 431 allowTouchMove: true, 432 loop: true, 433 slidesPerView: 1, 434 preventClicks: false, 435 effect: 'fade', 436 autoplay: { 437 delay: 5000 438 }, 439 keyboard: { 440 enabled: true 441 }, 442 navigation: { 443 nextEl: '.swiper-button-next', 444 prevEl: '.swiper-button-prev' 445 }, 446 pagination: { 447 el: '.swiper-auto-pagination', 448 clickable: true 449 }, 450 on: { 451 resize: function () {
452 swiperAutoFade.update(); 453 } 454 } 455 }); 456 457 var swiperSecond = new Swiper('.swiper-slider-second', { 458 allowTouchMove: true, 459 slidesPerView: 1, 460 preventClicks: false, 461 keyboard: { 462 enabled: true 463 }, 464 navigation: { 465 nextEl: '.swiper-button-next', 466 prevEl: '.swiper-button-prev' 467 }, 468 pagination: { 469 el: '.swiper-pagination-second', 470 clickable: true 471 }, 472 on: { 473 resize: function () { 474 swiperSecond.update(); 475 } 476 } 477 }); 478 479 var swiperThird = new Swiper('.swiper-slider-third', { 480 allowTouchMove: true, 481 slidesPerView: 1, 482 preventClicks: false, 483 keyboard: { 484 enabled: true 485 }, 486 navigation: { 487 nextEl: '.swiper-button-next', 488 prevEl: '.swiper-button-prev' 489 }, 490 pagination: { 491 el: '.swiper-pagination-third', 492 clickable: true 493 }, 494 on: { 495 resize: function () { 496 swiperThird.update(); 497 } 498 } 499 }); 500 501 var swiperNumber = new Swiper('.swiper-number-pagination', { 502 allowTouchMove: true, 503 preventClicks: false, 504 autoplay: { 505 delay: 4000, 506 disableOnInteraction: true 507 }, 508 pagination: { 509 el: '.swiper-number', 510 clickable: true, 511 renderBullet: function (index, className) { 512 return '<span class="' + className + '">' + pad((index + 1)) + '</span>'; 513 } 514 }, 515 on: { 516 resize: function () {
517 swiperNumber.update(); 518 } 519 } 520 }); 521 522 var swiperVerticalPagination = new Swiper('.swiper-vertical-pagination', { 523 allowTouchMove: true, 524 direction: 'vertical', 525 slidesPerView: 1, 526 spaceBetween: 0, 527 preventClicks: false, 528 mousewheel: { 529 mousewheel: true, 530 sensitivity: 1, 531 releaseOnEdges: true 532 }, 533 navigation: { 534 nextEl: '.swiper-button-next', 535 prevEl: '.swiper-button-prev' 536 }, 537 pagination: { 538 el: '.swiper-pagination-vertical', 539 clickable: true 540 }, 541 on: { 542 resize: function () { 543 swiperVerticalPagination.update(); 544 } 545 } 546 }); 547 548 var swiperClients = new Swiper('.swiper-slider-clients', { 549 allowTouchMove: true, 550 slidesPerView: 4, 551 paginationClickable: true, 552 preventClicks: true, 553 autoplay: { 554 delay: 3000, 555 disableOnInteraction: true 556 }, 557 pagination: { 558 el: null 559 }, 560 breakpoints: { 561 1199: { 562 slidesPerView: 3 563 }, 564 991: { 565 slidesPerView: 2 566 }, 567 767: { 568 slidesPerView: 1 569 } 570 }, 571 on: { 572 resize: function () { 573 swiperClients.update(); 574 } 575 } 576 }); 577 578 var swiperClients2 = new Swiper('.swiper-slider-clients-second', { 579 allowTouchMove: true, 580 slidesPerView: 4, 581 paginationClickable: true, 582 preventClicks: true, 583 autoplay: { 584 delay: 3000, 585 disableOnInteraction: true 586 }, 587 pagination: { 588 el: null 589 }, 590 breakpoints: { 591 1199: { 592 slidesPerView: 3 593 }, 594 991: { 595 slidesPerView: 2 596 }, 597 767: { 598 slidesPerView: 1 599 } 600 }, 601 on: { 602 resize: function () { 603 swiperClients2.update(); 604 } 605 } 606 }); 607 608 var swiperThreeSlides = new Swiper('.swiper-three-slides', { 609 allowTouchMove: true, 610 slidesPerView: 3, 611 preventClicks: false, 612 pagination: { 613 el: '.swiper-pagination-three-slides', 614 clickable: true 615 }, 616 autoplay: { 617 delay: 3000 618 }, 619 keyboard: { 620 enabled: true 621 }, 622 navigation: { 623 nextEl: '.swiper-three-slide-next', 624 prevEl: '.swiper-three-slide-prev' 625 }, 626 breakpoints: { 627 991: { 628 slidesPerView: 2 629 }, 630 767: { 631 slidesPerView: 1 632 } 633 }, 634 on: { 635 resize: function () { 636 swiperThreeSlides.update(); 637 } 638 } 639 }); 640 641 var swiperFourSlides = new Swiper('.swiper-four-slides', { 642 allowTouchMove: true, 643 slidesPerView: 4, 644 preventClicks: false, 645 pagination: { 646 el: '.swiper-pagination-four-slides', 647 clickable: true 648 }, 649 autoplay: { 650 delay: 3000 651 }, 652 keyboard: { 653 enabled: true 654 }, 655 navigation: { 656 nextEl: '.swiper-button-next', 657 prevEl: '.swiper-button-prev' 658 }, 659 breakpoints: { 660 1199: { 661 slidesPerView: 3 662 }, 663 991: { 664 slidesPerView: 2 665 }, 666 767: { 667 slidesPerView: 1 668 } 669 }, 670 on: { 671 resize: function () { 672 swiperFourSlides.update(); 673 } 674 } 675 }); 676 677 var swiperDemoHeaderStyle = new Swiper('.swiper-demo-header-style', { 678 allowTouchMove: true, 679 loop: true, 680 slidesPerView: 4, 681 preventClicks: true, 682 slidesPerGroup: 4, 683 pagination: { 684 el: '.swiper-pagination-demo-header-style', 685 clickable: true 686 }, 687 autoplay: { 688 delay: 3000 689 }, 690 keyboard: { 691 enabled: true 692 }, 693 navigation: { 694 nextEl: '.swiper-button-next', 695 prevEl: '.swiper-button-prev' 696 }, 697 breakpoints: { 698 1199: { 699 slidesPerGroup: 2, 700 slidesPerView: 2 701 }, 702 767: { 703 slidesPerGroup: 1, 704 slidesPerView: 1 705 } 706 }, 707 on: { 708 resize: function () {
709 swiperDemoHeaderStyle.update(); 710 } 711 } 712 }); 713 714 var $swiperAutoSlideIndex = 0; 715 var swiperAutoSlide = new Swiper('.swiper-auto-slide', { 716 allowTouchMove: true, 717 slidesPerView: 'auto', 718 centeredSlides: true, 719 spaceBetween: 80, 720 preventClicks: false, 721 observer: true, 722 speed: 1000, 723 pagination: { 724 el: null 725 }, 726 scrollbar: { 727 el: '.swiper-scrollbar', 728 draggable: true, 729 hide: false, 730 snapOnRelease: true 731 }, 732 autoplay: { 733 delay: 3000 734 }, 735 mousewheel: { 736 invert: false 737 }, 738 keyboard: { 739 enabled: true 740 }, 741 navigation: { 742 nextEl: '.swiper-next-style2', 743 prevEl: '.swiper-prev-style2' 744 }, 745 breakpoints: { 746 1199: { 747 spaceBetween: 60 748 }, 749 960: { 750 spaceBetween: 30 751 }, 752 767: { 753 spaceBetween: 15 754 } 755 }, 756 on: { 757 resize: function () { 758 swiperAutoSlide.update(); 759 } 760 } 761 }); 762 763 if ($(window).width() > 767) { 764 var swiperBottomScrollbarFull = new Swiper('.swiper-bottom-scrollbar-full', { 765 allowTouchMove: true, 766 slidesPerView: 'auto', 767 grabCursor: true, 768 preventClicks: false, 769 spaceBetween: 30, 770 keyboardControl: true, 771 speed: 1000, 772 pagination: { 773 el: null 774 }, 775 scrollbar: { 776 el: '.swiper-scrollbar', 777 draggable: true, 778 hide: false, 779 snapOnRelease: true 780 }, 781 mousewheel: { 782 enable: true 783 }, 784 keyboard: { 785 enabled: true 786 }, 787 navigation: { 788 nextEl: '.swiper-button-next', 789 prevEl: '.swiper-button-prev' 790 } 791 }); 792 } 793 794 var swiperAutoHieght = new Swiper('.swiper-auto-height-container', { 795 allowTouchMove: true, 796 effect: 'fade', 797 loop: true, 798 autoHeight: true, 799 pagination: { 800 el: '.swiper-auto-height-pagination', 801 clickable: true 802 }, 803 autoplay: { 804 delay: 3000 805 }, 806 navigation: { 807 nextEl: '.swiper-button-next', 808 prevEl: '.swiper-button-prev' 809 }, 810 on: { 811 resize: function () { 812 swiperAutoHieght.update(); 813 } 814 } 815 }); 816 817 var swiperMultyRow = new Swiper('.swiper-multy-row-container', { 818 allowTouchMove: true, 819 slidesPerView: 4, 820 spaceBetween: 15, 821 pagination: { 822 el: '.swiper-multy-row-pagination', 823 clickable: true 824 }, 825 autoplay: { 826 delay: 3000, 827 disableOnInteraction: true 828 }, 829 navigation: { 830 nextEl: '.swiper-portfolio-next', 831 prevEl: '.swiper-portfolio-prev' 832 }, 833 breakpoints: { 834 991: { 835 slidesPerView: 2 836 }, 837 767: { 838 slidesPerView: 1 839 } 840 }, 841 on: { 842 resize: function () { 843 swiperMultyRow.update(); 844 } 845 } 846 }); 847 848 var swiperBlog = new Swiper('.swiper-blog', { 849 allowTouchMove: true, 850 slidesPerView: "auto", 851 centeredSlides: true, 852 spaceBetween: 15, 853 preventClicks: false, 854 loop: true, 855 loopedSlides: 3, 856 pagination: { 857 el: '.swiper-blog-pagination', 858 clickable: true 859 }, 860 autoplay: { 861 delay: 5000, 862 disableOnInteraction: true 863 }, 864 navigation: { 865 nextEl: '.swiper-button-next', 866 prevEl: '.swiper-button-prev' 867 }, 868 on: { 869 resize: function () { 870 swiperBlog.update(); 871 } 872 } 873 }); 874 875 var swiperPresentation = new Swiper('.swiper-presentation', { 876 allowTouchMove: true, 877 slidesPerView: 4, 878 centeredSlides: true, 879 spaceBetween: 30, 880 preventClicks: true, 881 loop: true, 882 loopedSlides: 6, 883 pagination: { 884 el: '.swiper-presentation-pagination', 885 clickable: true 886 }, 887 autoplay: { 888 delay: 3000, 889 disableOnInteraction: true 890 }, 891 keyboard: { 892 enabled: true 893 }, 894 navigation: { 895 nextEl: '.swiper-button-next', 896 prevEl: '.swiper-button-prev' 897 }, 898 breakpoints: { 899 991: { 900 spaceBetween: 15, 901 slidesPerView: 2 902 }, 903 767: { 904 slidesPerView: 1 905 } 906 }, 907 on: { 908 resize: function () { 909 swiperPresentation.update(); 910 } 911 } 912 }); 913 914 var resizeId; 915 916 $(window).resize(function () { 917 if ($(".swiper-auto-slide").length > 0 && swiperAutoSlide) { 918 $swiperAutoSlideIndex = swiperAutoSlide.activeIndex; 919 swiperAutoSlide.detachEvents(); 920 swiperAutoSlide.destroy(true, false); 921 swiperAutoSlide = undefined; 922 $(".swiper-auto-slide .swiper-wrapper").css("transform", "").css("transition-duration", ""); 923 $(".swiper-auto-slide .swiper-slide").css("margin-right", ""); 924 925 setTimeout(function () { 926 swiperAutoSlide = new Swiper('.swiper-auto-slide', { 927 allowTouchMove: true, 928 slidesPerView: 'auto', 929 centeredSlides: true, 930 spaceBetween: 80, 931 preventClicks: false, 932 mousewheelControl: true, 933 observer: true, 934 speed: 1000, 935 pagination: { 936 el: null 937 }, 938 scrollbar: { 939 el: '.swiper-scrollbar', 940 draggable: true, 941 hide: false, 942 snapOnRelease: true 943 }, 944 autoplay: { 945 delay: 3000 946 }, 947 keyboard: { 948 enabled: true 949 }, 950 navigation: { 951 nextEl: '.swiper-next-style2', 952 prevEl: '.swiper-prev-style2' 953 }, 954 breakpoints: { 955 1199: { 956 spaceBetween: 60 957 }, 958 960: { 959 spaceBetween: 30 960 }, 961 767: { 962 spaceBetween: 15 963 } 964 }, 965 on: { 966 resize: function () {
967 swiperAutoSlide.update(); 968 } 969 } 970 }); 971 972 swiperAutoSlide.slideTo($swiperAutoSlideIndex, 1000, false); 973 }, 1000); 974 } 975 976 if ($(".swiper-bottom-scrollbar-full").length > 0) { 977 clearTimeout(resizeId); 978 resizeId = setTimeout(doneResizing, 1000); 979 } 980 981 /* update all swiper on window resize */ 982 983 setTimeout(function () { 984 if ($('.swiper-full-screen').length > 0 && swiperFull) 985 { 986 swiperFull.update(); 987 } 988 989 if ($('.swiper-auto-fade').length > 0 && swiperAutoFade) 990 { 991 swiperAutoFade.update(); 992 } 993 994 if ($('.swiper-slider-second').length > 0 && swiperSecond) 995 { 996 swiperSecond.update(); 997 } 998 999 if ($('.swiper-slider-third').length > 0 && swiperThird) 1000 { 1001 swiperThird.update(); 1002 } 1003 1004 if ($('.swiper-number-pagination').length > 0 && swiperNumber) 1005 {
1006 swiperNumber.update(); 1007 } 1008 1009 if ($('.swiper-vertical-pagination').length > 0 && swiperVerticalPagination) 1010 { 1011 swiperVerticalPagination.update(); 1012 } 1013 1014 if ($('.swiper-slider-clients').length > 0 && swiperClients) 1015 { 1016 swiperClients.update(); 1017 } 1018 1019 if ($('.swiper-slider-clients-second').length > 0 && swiperClients2) 1020 { 1021 swiperClients2.update(); 1022 } 1023 1024 if ($('.swiper-three-slides').length > 0 && swiperThreeSlides) 1025 { 1026 swiperThreeSlides.update(); 1027 } 1028 1029 if ($('.swiper-four-slides').length > 0 && swiperFourSlides) 1030 { 1031 swiperFourSlides.update(); 1032 } 1033 1034 if ($('.swiper-demo-header-style').length > 0 && swiperDemoHeaderStyle) 1035 { 1036 swiperDemoHeaderStyle.update(); 1037 } 1038 1039 if ($('.swiper-auto-slide').length > 0 && swiperAutoSlide) 1040 { 1041 swiperAutoSlide.update(); 1042 } 1043 1044 if ($('.swiper-auto-height-container').length > 0 && swiperAutoHieght) 1045 { 1046 swiperAutoHieght.update(); 1047 } 1048 1049 if ($('.swiper-multy-row-container').length > 0 && swiperMultyRow) 1050 { 1051 swiperMultyRow.update(); 1052 } 1053 1054 if ($('.swiper-blog').length > 0 && swiperBlog) 1055 { 1056 swiperBlog.update(); 1057 } 1058 1059 if ($('.swiper-presentation').length > 0 && swiperPresentation) 1060 { 1061 swiperPresentation.update(); 1062 } 1063 1064 }, 500); 1065 if (isIE()) { 1066 setTimeout(function () { 1067 if ($('.swiper-full-screen').length > 0 && swiperFull) 1068 { 1069 swiperFull.update(); 1070 } 1071 1072 if ($('.swiper-auto-fade').length > 0 && swiperAutoFade) 1073 { 1074 swiperAutoFade.update(); 1075 } 1076 1077 if ($('.swiper-slider-second').length > 0 && swiperSecond) 1078 { 1079 swiperSecond.update(); 1080 } 1081 1082 if ($('.swiper-slider-third').length > 0 && swiperThird) 1083 { 1084 swiperThird.update(); 1085 } 1086 1087 if ($('.swiper-number-pagination').length > 0 && swiperNumber) 1088 {
1089 swiperNumber.update(); 1090 } 1091 1092 if ($('.swiper-vertical-pagination').length > 0 && swiperVerticalPagination) 1093 { 1094 swiperVerticalPagination.update(); 1095 } 1096 1097 if ($('.swiper-slider-clients').length > 0 && swiperClients) 1098 { 1099 swiperClients.update(); 1100 } 1101 1102 if ($('.swiper-slider-clients-second').length > 0 && swiperClients2) 1103 { 1104 swiperClients2.update(); 1105 } 1106 1107 if ($('.swiper-three-slides').length > 0 && swiperThreeSlides) 1108 { 1109 swiperThreeSlides.update(); 1110 } 1111 1112 if ($('.swiper-four-slides').length > 0 && swiperFourSlides) 1113 { 1114 swiperFourSlides.update(); 1115 } 1116 1117 if ($('.swiper-demo-header-style').length > 0 && swiperDemoHeaderStyle) 1118 { 1119 swiperDemoHeaderStyle.update(); 1120 } 1121 1122 if ($('.swiper-auto-slide').length > 0 && swiperAutoSlide) 1123 { 1124 swiperAutoSlide.update(); 1125 } 1126 1127 if ($('.swiper-auto-height-container').length > 0 && swiperAutoHieght) 1128 { 1129 swiperAutoHieght.update(); 1130 } 1131 1132 if ($('.swiper-multy-row-container').length > 0 && swiperMultyRow) 1133 { 1134 swiperMultyRow.update(); 1135 } 1136 1137 if ($('.swiper-blog').length > 0 && swiperBlog) 1138 { 1139 swiperBlog.update(); 1140 } 1141 1142 if ($('.swiper-presentation').length > 0 && swiperPresentation) 1143 { 1144 swiperPresentation.update(); 1145 } 1146 1147 }, 500); 1148 } 1149 1150 }); 1151 1152 function doneResizing() { 1153 if (swiperBottomScrollbarFull) { 1154 swiperBottomScrollbarFull.detachEvents(); 1155 swiperBottomScrollbarFull.destroy(true, true); 1156 swiperBottomScrollbarFull = undefined; 1157 } 1158 1159 $(".swiper-bottom-scrollbar-full .swiper-wrapper").css("transform", "").css("transition-duration", ""); 1160 $(".swiper-bottom-scrollbar-full .swiper-slide").css("margin-right", ""); 1161 $('.swiper-bottom-scrollbar-full .swiper-wrapper').removeAttr('style'); 1162 $('.swiper-bottom-scrollbar-full .swiper-slide').removeAttr('style'); 1163 1164 if ($(window).width() > 767) { 1165 setTimeout(function () { 1166 swiperBottomScrollbarFull = new Swiper('.swiper-bottom-scrollbar-full', { 1167 allowTouchMove: true, 1168 slidesPerView: 'auto', 1169 grabCursor: true, 1170 preventClicks: false, 1171 spaceBetween: 30, 1172 keyboardControl: true, 1173 speed: 1000, 1174 pagination: { 1175 el: null 1176 }, 1177 scrollbar: { 1178 el: '.swiper-scrollbar', 1179 draggable: true, 1180 hide: false, 1181 snapOnRelease: true 1182 }, 1183 mousewheel: { 1184 enable: true 1185 }, 1186 keyboard: { 1187 enabled: true 1188 }, 1189 navigation: { 1190 nextEl: '.swiper-button-next', 1191 prevEl: '.swiper-button-prev' 1192 } 1193 }); 1194 }, 500); 1195 } 1196 } 1197 1198 /*============================================================== 1199 smooth scroll 1200 ==============================================================*/ 1201 1202 var scrollAnimationTime = 1200, scrollAnimation = 'easeInOutExpo'; 1203 $(document).on('click.smoothscroll', 'a.scrollto', function (event) { 1204 event.preventDefault(); 1205 var target = this.hash; 1206 if ($(target).length != 0) { 1207 $('html, body').stop() 1208 .animate({ 1209 'scrollTop': $(target) 1210 .offset() 1211 .top 1212 }, scrollAnimationTime, scrollAnimation, function () { 1213 window.location.hash = target; 1214 }); 1215 } 1216 }); 1217 1218 /*============================================================== 1219 humburger menu one page navigation 1220 ==============================================================*/ 1221 1222 if ($('.full-width-pull-menu').length > 0) { 1223 $(document).on('click', '.full-width-pull-menu .inner-link', function (e) { 1224 //$('body').removeClass('overflow-hidden position-fixed'); 1225 $(".full-width-pull-menu .close-button-menu").trigger("click"); 1226 var _this = $(this); 1227 setTimeout(function () { 1228 var target = _this.attr("href"); 1229 if ($(target).length > 0) { 1230 $('html, body').stop() 1231 .animate({ 1232 'scrollTop': $(target).offset().top 1233 }); 1234 } 1235 }, 500); 1236 }); 1237 } 1238 1239 // Inner links 1240 if ($('.navbar-top').length > 0 || $('.navbar-scroll-top').length > 0 || $('.nav-top-scroll').length > 0) { 1241 $('.inner-link').smoothScroll({ 1242 speed: 900, 1243 offset: 0 1244 }); 1245 } else { 1246 $('.inner-link').smoothScroll({ 1247 speed: 900, 1248 offset: -59 1249 }); 1250 } 1251 1252 $('.section-link').smoothScroll({ 1253 speed: 900, 1254 offset: 1 1255 }); 1256 1257 /*==============================================================*/ 1258 //PieChart For Onepage - START CODE 1259 /*==============================================================*/ 1260 if ($('.chart1').length > 0) { 1261 $('.chart1').appear(); 1262 $('.chart1').easyPieChart({ 1263 barColor: '#929292', 1264 trackColor: '#d9d9d9', 1265 scaleColor: false, 1266 easing: 'easeOutBounce', 1267 scaleLength: 1, 1268 lineCap: 'round', 1269 lineWidth: 3, //12 1270 size: 150, //110 1271 animate: { 1272 duration: 2000,
1273 enabled: true 1274 }, 1275 onStep: function (from, to, percent) { 1276 $(this.el).find('.percent').text(Math.round(percent)); 1277 } 1278 }); 1279 $(document.body).on('appear', '.chart1', function (e) { 1280 // this code is executed for each appeared element 1281 if (!$(this).hasClass('appear')) { 1282 $(this).addClass('appear'); 1283 $(this).data('easyPieChart').update(0).update($(this).data('percent')); 1284 } 1285 }); 1286 } 1287 1288 if ($('.chart2').length > 0) { 1289 $('.chart2').appear(); 1290 $('.chart2').easyPieChart({ 1291 easing: 'easeOutCirc', 1292 barColor: '#ff214f', 1293 trackColor: '#c7c7c7', 1294 scaleColor: false, 1295 scaleLength: 1, 1296 lineCap: 'round', 1297 lineWidth: 2, //12 1298 size: 120, //110 1299 animate: { 1300 duration: 2000, 1301 enabled: true 1302 }, 1303 onStep: function (from, to, percent) { 1304 $(this.el).find('.percent').text(Math.round(percent)); 1305 } 1306 }); 1307 $(document.body).on('appear', '.chart2', function (e) { 1308 // this code is executed for each appeared element 1309 if (!$(this).hasClass('appear')) { 1310 $(this).addClass('appear'); 1311 $(this).data('easyPieChart').update(0).update($(this).data('percent')); 1312 } 1313 }); 1314 } 1315 1316 if ($('.chart3').length > 0) { 1317 $('.chart3').appear(); 1318 $('.chart3').easyPieChart({ 1319 easing: 'easeOutCirc', 1320 barColor: '#ff214f', 1321 trackColor: '', 1322 scaleColor: false, 1323 scaleLength: 1, 1324 lineCap: 'round', 1325 lineWidth: 3, //12 1326 size: 140, //110 1327 animate: { 1328 duration: 2000, 1329 enabled: true 1330 }, 1331 onStep: function (from, to, percent) { 1332 $(this.el).find('.percent').text(Math.round(percent)); 1333 } 1334 }); 1335 $(document.body).on('appear', '.chart3', function (e) { 1336 // this code is executed for each appeared element 1337 if (!$(this).hasClass('appear')) { 1338 $(this).addClass('appear'); 1339 $(this).data('easyPieChart').update(0).update($(this).data('percent')); 1340 } 1341 }); 1342 } 1343 /*==============================================================*/ 1344 //PieChart For Onepage - END CODE 1345 /*==============================================================*/ 1346 1347 /*============================================================== 1348 portfolio filter 1349 ==============================================================*/ 1350 var $portfolio_filter = $('.portfolio-grid'); 1351 $portfolio_filter.imagesLoaded(function () { 1352 $portfolio_filter.isotope({ 1353 layoutMode: 'masonry', 1354 itemSelector: '.grid-item', 1355 percentPosition: true, 1356 masonry: { 1357 columnWidth: '.grid-sizer' 1358 } 1359 }); 1360 $portfolio_filter.isotope(); 1361 }); 1362 var $grid_selectors = $('.portfolio-filter > li > a'); 1363 $grid_selectors.on('click', function () { 1364 $grid_selectors.parent().removeClass('active'); 1365 $(this).parent().addClass('active'); 1366 var selector = $(this).attr('data-filter'); 1367 $portfolio_filter.find('.grid-item').removeClass('animated').css("visibility", ""); // avoid problem to filter after sorting 1368 $portfolio_filter.find('.grid-item').each(function () { 1369 /* remove perticular element from WOW array when you don't want animation on element after DOM lead */ 1370 wow.removeBox(this); 1371 $(this).css("-webkit-animation", "none"); 1372 $(this).css("-moz-animation", "none"); 1373 $(this).css("-ms-animation", "none"); 1374 $(this).css("animation", "none"); 1375 }); 1376 $portfolio_filter.isotope({filter: selector}); 1377 return false; 1378 }); 1379 $(window).resize(function () { 1380 if (!isMobile && !isiPhoneiPad) { 1381 $portfolio_filter.imagesLoaded(function () { 1382 setTimeout(function () { 1383 $portfolio_filter.find('.grid-item').removeClass('wow').removeClass('animated'); // avoid problem to filter after window resize 1384 $portfolio_filter.isotope('layout'); 1385 }, 300); 1386 }); 1387 } 1388 }); 1389 var $blog_filter = $('.blog-grid'); 1390 $blog_filter.imagesLoaded(function () { 1391 $blog_filter.isotope({ 1392 layoutMode: 'masonry', 1393 itemSelector: '.grid-item', 1394 percentPosition: true, 1395 masonry: { 1396 columnWidth: '.grid-sizer' 1397 } 1398 }); 1399 }); 1400 $(window).resize(function () { 1401 setTimeout(function () { 1402 $blog_filter.find('.grid-item').removeClass('wow').removeClass('animated'); // avoid problem to filter after window resize 1403 $blog_filter.isotope('layout'); 1404 }, 300); 1405 }); 1406 1407 /*============================================================== 1408 lightbox gallery 1409 ==============================================================*/ 1410 $('.lightbox-gallery').magnificPopup({ 1411 delegate: 'a', 1412 type: 'image', 1413 tLoading: 'Loading image #%curr%...', 1414 mainClass: 'mfp-fade', 1415 fixedContentPos: true, 1416 closeBtnInside: false, 1417 gallery: { 1418 enabled: true, 1419 navigateByImgClick: true, 1420 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 1421 } 1422 }); 1423 /* for group gallery */ 1424 var lightboxgallerygroups = {}; 1425 $('.lightbox-group-gallery-item').each(function () { 1426 var id = $(this).attr('data-group'); 1427 if (!lightboxgallerygroups[id]) { 1428 lightboxgallerygroups[id] = []; 1429 } 1430 lightboxgallerygroups[id].push(this); 1431 }); 1432 $.each(lightboxgallerygroups, function () { 1433 $(this).magnificPopup({ 1434 type: 'image', 1435 closeOnContentClick: true, 1436 closeBtnInside: false, 1437 gallery: {enabled: true} 1438 }); 1439 }); 1440 1441 $('.lightbox-portfolio').magnificPopup({ 1442 delegate: '.gallery-link', 1443 type: 'image', 1444 tLoading: 'Loading image #%curr%...', 1445 mainClass: 'mfp-fade', 1446 fixedContentPos: true, 1447 closeBtnInside: false, 1448 gallery: { 1449 enabled: true, 1450 navigateByImgClick: false, 1451 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 1452 } 1453 }); 1454 /*============================================================== 1455 single image lightbox - zoom animation 1456 ==============================================================*/ 1457 $('.single-image-lightbox').magnificPopup({ 1458 type: 'image', 1459 closeOnContentClick: true, 1460 fixedContentPos: true, 1461 closeBtnInside: false, 1462 mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side 1463 image: { 1464 verticalFit: true 1465 }, 1466 zoom: { 1467 enabled: true, 1468 duration: 300 // don't foget to change the duration also in CSS 1469 } 1470 }); 1471 /*============================================================== 1472 zoom gallery 1473 ==============================================================*/ 1474 $('.zoom-gallery').magnificPopup({ 1475 delegate: 'a', 1476 type: 'image', 1477 mainClass: 'mfp-with-zoom mfp-img-mobile', 1478 fixedContentPos: true, 1479 closeBtnInside: false, 1480 image: { 1481 verticalFit: true, 1482 titleSrc: function (item) { 1483 return item.el.attr('title'); 1484 } 1485 }, 1486 gallery: { 1487 enabled: true 1488 }, 1489 zoom: { 1490 enabled: true, 1491 duration: 300, // don't foget to change the duration also in CSS 1492 opener: function (element) { 1493 return element.find('img'); 1494 } 1495 } 1496 }); 1497 /*==============================================================*/ 1498 //Modal popup - START CODE 1499 /*==============================================================*/ 1500 $('.modal-popup').magnificPopup({ 1501 type: 'inline', 1502 preloader: false, 1503 // modal: true, 1504 blackbg: true, 1505 callbacks: { 1506 open: function () { 1507 $('html').css('margin-right', 0); 1508 } 1509 } 1510 }); 1511 $(document).on('click', '.popup-modal-dismiss', function (e) { 1512 e.preventDefault(); 1513 $.magnificPopup.close(); 1514 }); 1515 /*==============================================================*/ 1516 //Modal popup - END CODE 1517 /*==============================================================*/ 1518 1519 /*==============================================================*/ 1520 //Modal popup - zoom animation - START CODE 1521 /*==============================================================*/ 1522 $('.popup-with-zoom-anim').magnificPopup({ 1523 type: 'inline',
1524 fixedContentPos: false, 1525 fixedBgPos: true, 1526 overflowY: 'auto', 1527 closeBtnInside: true, 1528 preloader: false, 1529 midClick: true, 1530 removalDelay: 300, 1531 blackbg: true, 1532 mainClass: 'my-mfp-zoom-in' 1533 }); 1534 1535 $('.popup-with-move-anim').magnificPopup({ 1536 type: 'inline', 1537 fixedContentPos: false, 1538 fixedBgPos: true, 1539 overflowY: 'auto', 1540 closeBtnInside: true, 1541 preloader: false, 1542 midClick: true, 1543 removalDelay: 300, 1544 blackbg: true, 1545 mainClass: 'my-mfp-slide-bottom' 1546 }); 1547 /*==============================================================*/ 1548 //Modal popup - zoom animation - END CODE 1549 /*==============================================================*/ 1550 1551 /*============================================================== 1552 popup with form 1553 ==============================================================*/ 1554 $('.popup-with-form').magnificPopup({ 1555 type: 'inline', 1556 preloader: false, 1557 closeBtnInside: false, 1558 fixedContentPos: true, 1559 focus: '#name', 1560 callbacks: { 1561 beforeOpen: function () { 1562 if ($(window).width() < 700) { 1563 this.st.focus = false; 1564 } else { 1565 this.st.focus = '#name'; 1566 } 1567 } 1568 } 1569 }); 1570 /*============================================================== 1571 video magnific popup 1572 ==============================================================*/ 1573 1574 $('.popup-youtube, .popup-vimeo, .popup-googlemap').magnificPopup({ 1575 disableOn: 700, 1576 type: 'iframe', 1577 mainClass: 'mfp-fade', 1578 removalDelay: 160, 1579 preloader: false, 1580 fixedContentPos: "auto", 1581 closeBtnInside: false 1582 }); 1583 /*============================================================== 1584 ajax magnific popup for onepage portfolio 1585 ==============================================================*/ 1586 $('.ajax-popup').magnificPopup({ 1587 type: 'ajax', 1588 alignTop: true, 1589 fixedContentPos: true, 1590 overflowY: 'scroll', // as we know that popup content is tall we set scroll overflow by default to avoid jump 1591 callbacks: { 1592 open: function () { 1593 $('.navbar .collapse').removeClass('in'); 1594 $('.navbar a.dropdown-toggle').addClass('collapsed'); 1595 } 1596 } 1597 }); 1598 1599 /*============================================================== 1600 mega menu width 1601 ===============================================================*/ 1602 $("ul.mega-menu-full").each(function (idx, elm) { 1603 var megaMenuWidth = 0; 1604 $(this).children('li').each(function (idx, elm) { 1605 var LIheight = 0; 1606 megaMenuWidth += $(this).outerWidth(); 1607 }); 1608 $(this).width(megaMenuWidth + 95); 1609 megaMenuWidth = 0; 1610 }); 1611 /*============================================================== 1612 fit videos 1613 ==============================================================*/ 1614 $(".fit-videos").fitVids(); 1615 1616 /*============================================================== 1617 form to email 1618 ==============================================================*/ 1619 $("#success-subscribe-newsletter").hide(); 1620 $("#success-subscribe-newsletter2").hide(); 1621 $("#success-contact-form").hide(); 1622 $("#success-project-contact-form").hide(); 1623 $("#success-contact-form-2").hide(); 1624 $("#success-contact-form-3").hide(); 1625 $("#success-project-contact-form-4").hide(); 1626 1627 //Subscribe newsletter form 1628 $(document).on("click", '#button-subscribe-newsletter', function () { 1629 var error = ValidationsubscribenewsletterForm(); 1630 if (error) { 1631 $.ajax({ 1632 type: "POST", 1633 url: "email-templates/subscribe-newsletter.php", 1634 data: $("#subscribenewsletterform").serialize(), 1635 success: function (result) { 1636 // Un-comment below code to redirect user to thank you page. 1637 //window.location.href="thank-you.html"; 1638 1639 $('input[type=text],textarea').each(function () { 1640 $(this).val(''); 1641 }); 1642 $("#success-subscribe-newsletter").html(result); 1643 $("#success-subscribe-newsletter").fadeIn("slow"); 1644 $('#success-subscribe-newsletter').delay(4000).fadeOut("slow"); 1645 } 1646 }); 1647 } 1648 }); 1649 1650 function ValidationsubscribenewsletterForm() { 1651 var error = true; 1652 $('#subscribenewsletterform input[type=text]').each(function (index) { 1653 if (index == 0) { 1654 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1655 $("#subscribenewsletterform").find("input:eq(" + index + ")").addClass("required-error"); 1656 error = false;
1657 } else { 1658 $("#subscribenewsletterform").find("input:eq(" + index + ")").removeClass("required-error"); 1659 } 1660 } 1661 1662 }); 1663 return error; 1664 } 1665 1666 $(document).on("click", '#button-subscribe-newsletter2', function () { 1667 var error = ValidationsubscribenewsletterForm2(); 1668 if (error) { 1669 $.ajax({ 1670 type: "POST", 1671 url: "email-templates/subscribe-newsletter.php", 1672 data: $("#subscribenewsletterform2").serialize(), 1673 success: function (result) { 1674 // Un-comment below code to redirect user to thank you page. 1675 //window.location.href="thank-you.html"; 1676 1677 $('input[type=text],textarea').each(function () { 1678 $(this).val(''); 1679 }); 1680 $("#success-subscribe-newsletter2").html(result); 1681 $("#success-subscribe-newsletter2").fadeIn("slow"); 1682 $('#success-subscribe-newsletter2').delay(4000).fadeOut("slow"); 1683 1684 1685 } 1686 }); 1687 } 1688 }); 1689 1690 function ValidationsubscribenewsletterForm2() { 1691 var error = true; 1692 $('#subscribenewsletterform2 input[type=text]').each(function (index) { 1693 if (index == 0) { 1694 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1695 $("#subscribenewsletterform2").find("input:eq(" + index + ")").addClass("required-error"); 1696 error = false; 1697 } else { 1698 $("#subscribenewsletterform2").find("input:eq(" + index + ")").removeClass("required-error"); 1699 } 1700 } 1701 }); 1702 return error; 1703 } 1704 1705 //Contact us form 1706 $(document).on("click", '#contact-us-button', function () { 1707 var error = ValidationContactForm(); 1708 if (error) { 1709 $.ajax({ 1710 type: "POST", 1711 url: "email-templates/contact.php", 1712 data: $("#contact-form").serialize(), 1713 success: function (result) { 1714 // Un-comment below code to redirect user to thank you page. 1715 //window.location.href="thank-you.html"; 1716 1717 $('input[type=text],textarea').each(function () { 1718 $(this).val(''); 1719 }); 1720 $("#success-contact-form").html(result); 1721 $("#success-contact-form").fadeIn("slow"); 1722 $('#success-contact-form').delay(4000).fadeOut("slow"); 1723 } 1724 }); 1725 } 1726 }); 1727 function ValidationContactForm() { 1728 var error = true; 1729 $('#contact-form input[type=text]').each(function (index) { 1730 if (index == 0) { 1731 if ($(this).val() == null || $(this).val() == "") { 1732 $("#contact-form").find("input:eq(" + index + ")").addClass("required-error"); 1733 error = false; 1734 } else { 1735 $("#contact-form").find("input:eq(" + index + ")").removeClass("required-error"); 1736 } 1737 } else if (index == 1) { 1738 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1739 $("#contact-form").find("input:eq(" + index + ")").addClass("required-error"); 1740 error = false; 1741 } else { 1742 $("#contact-form").find("input:eq(" + index + ")").removeClass("required-error"); 1743 } 1744 } 1745 1746 }); 1747 return error; 1748 } 1749 1750 //Contact us form 2 1751 $('#contact-us-button-2').on("click", function () { 1752 var error = ValidationContactForm2(); 1753 if (error) { 1754 $.ajax({ 1755 type: "POST", 1756 url: "email-templates/contact.php", 1757 data: $("#contact-form-2").serialize(), 1758 success: function (result) { 1759 // Un-comment below code to redirect user to thank you page. 1760 //window.location.href="thank-you.html"; 1761 1762 $('input[type=text],textarea').each(function () { 1763 $(this).val(''); 1764 }); 1765 $("#success-contact-form-2").html(result); 1766 $("#success-contact-form-2").fadeIn("slow"); 1767 $('#success-contact-form-2').delay(4000).fadeOut("slow"); 1768 } 1769 }); 1770 } 1771 }); 1772 function ValidationContactForm2() { 1773 var error = true; 1774 $('#contact-form-2 input[type=text]').each(function (index) { 1775 if (index == 0) { 1776 if ($(this).val() == null || $(this).val() == "") { 1777 $("#contact-form-2").find("input:eq(" + index + ")").addClass("required-error"); 1778 error = false;
1779 } else { 1780 $("#contact-form-2").find("input:eq(" + index + ")").removeClass("required-error"); 1781 } 1782 } else if (index == 1) { 1783 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1784 $("#contact-form-2").find("input:eq(" + index + ")").addClass("required-error"); 1785 error = false; 1786 } else { 1787 $("#contact-form-2").find("input:eq(" + index + ")").removeClass("required-error"); 1788 } 1789 } 1790 }); 1791 return error; 1792 } 1793 1794 //Contact us form 3 1795 1796 $(document).on("click", '#contact-us-button-3', function () { 1797 var error = ValidationContactForm3(); 1798 if (error) { 1799 $.ajax({ 1800 type: "POST", 1801 url: "email-templates/contact.php", 1802 data: $("#contact-form-3").serialize(), 1803 success: function (result) { 1804 // Un-comment below code to redirect user to thank you page. 1805 //window.location.href="thank-you.html"; 1806 $('input[type=text],textarea').each(function () { 1807 $(this).val(''); 1808 }); 1809 $("#success-contact-form-3").html(result); 1810 $("#success-contact-form-3").fadeIn("slow"); 1811 $('#success-contact-form-3').delay(4000).fadeOut("slow"); 1812 } 1813 }); 1814 } 1815 }); 1816 function ValidationContactForm3() { 1817 var error = true; 1818 $('#contact-form-3 input[type=text]').each(function (index) { 1819 if (index == 0) { 1820 if ($(this).val() == null || $(this).val() == "") { 1821 $("#contact-form-3").find("input:eq(" + index + ")").addClass("required-error"); 1822 error = false; 1823 } else { 1824 $("#contact-form-3").find("input:eq(" + index + ")").removeClass("required-error"); 1825 } 1826 } else if (index == 1) { 1827 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1828 $("#contact-form-3").find("input:eq(" + index + ")").addClass("required-error"); 1829 error = false; 1830 } else { 1831 $("#contact-form-3").find("input:eq(" + index + ")").removeClass("required-error"); 1832 } 1833 } 1834 1835 }); 1836 return error; 1837 } 1838 1839 //Project Contact us form 1840 $(document).on("click", '#project-contact-us-button', function () { 1841 var error = ValidationProjectContactForm(); 1842 if (error) { 1843 $.ajax({ 1844 type: "POST", 1845 url: "email-templates/project-contact.php", 1846 data: $("#project-contact-form").serialize(), 1847 success: function (result) { 1848 // Un-comment below code to redirect user to thank you page. 1849 //window.location.href="thank-you.html"; 1850 1851 $('input[type=text],textarea').each(function () { 1852 $(this).val(''); 1853 }); 1854 $("#success-project-contact-form").html(result); 1855 $("#success-project-contact-form").fadeIn("slow"); 1856 $('#success-project-contact-form').delay(4000).fadeOut("slow"); 1857 } 1858 }); 1859 } 1860 }); 1861 function ValidationProjectContactForm() { 1862 var error = true; 1863 $('#project-contact-form input[type=text]').each(function (index) { 1864 if (index == 0) { 1865 if ($(this).val() == null || $(this).val() == "") { 1866 $("#project-contact-form").find("input:eq(" + index + ")").addClass("required-error"); 1867 error = false; 1868 } else { 1869 $("#project-contact-form").find("input:eq(" + index + ")").removeClass("required-error"); 1870 } 1871 } else if (index == 2) { 1872 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1873 $("#project-contact-form").find("input:eq(" + index + ")").addClass("required-error"); 1874 error = false;
1875 } else { 1876 $("#project-contact-form").find("input:eq(" + index + ")").removeClass("required-error"); 1877 } 1878 } 1879 1880 }); 1881 return error; 1882 } 1883 1884 //Project Contact us form 2 1885 $(document).on("click", '#project-contact-us-4-button', function () { 1886 var error = ValidationProjectContactForm4(); 1887 if (error) { 1888 $.ajax({ 1889 type: "POST", 1890 url: "email-templates/project-contact.php", 1891 data: $("#project-contact-form-4").serialize(), 1892 success: function (result) { 1893 // Un-comment below code to redirect user to thank you page. 1894 //window.location.href="thank-you.html"; 1895 1896 $('input[type=text],textarea').each(function () { 1897 $(this).val(''); 1898 }); 1899 $("#success-project-contact-form-4").html(result); 1900 $("#success-project-contact-form-4").fadeIn("slow"); 1901 $('#success-project-contact-form-4').delay(4000).fadeOut("slow"); 1902 } 1903 }); 1904 } 1905 }); 1906 function ValidationProjectContactForm4() { 1907 var error = true; 1908 $('#project-contact-form-4 input[type=text]').each(function (index) { 1909 if (index == 0) { 1910 if ($(this).val() == null || $(this).val() == "") { 1911 $("#project-contact-form-4").find("input:eq(" + index + ")").addClass("required-error"); 1912 error = false; 1913 } else { 1914 $("#project-contact-form-4").find("input:eq(" + index + ")").removeClass("required-error"); 1915 } 1916 } else if (index == 2) { 1917 if (!(/(.+)@(.+){2,}\.(.+){2,}/.test($(this).val()))) { 1918 $("#project-contact-form-4").find("input:eq(" + index + ")").addClass("required-error"); 1919 error = false; 1920 } else { 1921 $("#project-contact-form-4").find("input:eq(" + index + ")").removeClass("required-error"); 1922 } 1923 } 1924 }); 1925 return error; 1926 } 1927 1928 /*============================================================== 1929 End form to email 1930 ==============================================================*/ 1931 1932 /*============================================================== 1933 wow animation - on scroll 1934 ==============================================================*/ 1935 var wow = new WOW({ 1936 boxClass: 'wow', 1937 animateClass: 'animated', 1938 offset: 0, 1939 mobile: false, 1940 live: true 1941 }); 1942 $(window).imagesLoaded(function () { 1943 wow.init(); 1944 }); 1945 /*============================================================== 1946 counter 1947 ==============================================================*/ 1948 $(function ($) { 1949 animatecounters(); 1950 }); 1951 function animatecounters() { 1952 $('.timer').each(count); 1953 function count(options) { 1954 var $this = $(this); 1955 options = $.extend({}, options || {}, $this.data('countToOptions') || {}); 1956 $this.countTo(options); 1957 } 1958 } 1959 /* =================================== 1960 counter number reset while scrolling 1961 ====================================== */ 1962 $('.timer').appear(); 1963 $(document.body).on('appear', '.timer', function (e) { 1964 // this code is executed for each appeared element 1965 if (!$(this).hasClass('appear')) { 1966 animatecounters(); 1967 $(this).addClass('appear'); 1968 } 1969 }); 1970 $('.countdown').countdown($('.countdown').attr("data-enddate")).on('update.countdown', function (event) { 1971 $(this).html(event.strftime('' + '<div class="counter-container"><div class="counter-box first"><div class="number">%-D</div><span>Day%!d</span></div>' + '<div class="counter-box"><div class="number">%H</div><span>Hours</span></div>' + '<div class="counter-box"><div class="number">%M</div><span>Minutes</span></div>' + '<div class="counter-box last"><div class="number">%S</div><span>Seconds</span></div></div>')); 1972 }); 1973 1974 /* =================================== 1975 left nav 1976 ====================================== */ 1977 $(document).on('click', '.right-menu-button', function (e) { 1978 $('body').toggleClass('left-nav-on'); 1979 }); 1980 1981 /*==============================================================*/ 1982 // hamburger menu 1983 /*==============================================================*/ 1984 $(document).on('click', '.btn-hamburger', function () { 1985 $('.hamburger-menu').toggleClass('show-menu'); 1986 $('body').removeClass('show-menu'); 1987 }); 1988 1989 /*==============================================================*/ 1990 //sidebar nav open 1991 /*==============================================================*/ 1992 $(document).on('click', '#mobileToggleSidenav', function () { 1993 $(this).closest('nav').toggleClass('sidemenu-open'); 1994 }); 1995 1996 /*================================= 1997 //justified Gallery 1998 =================================*/ 1999 $(document).imagesLoaded(function () { 2000 if ($(".justified-gallery").length > 0) { 2001 $(".justified-gallery").justifiedGallery({ 2002 rowHeight: 400, 2003 maxRowHeight: false, 2004 captions: true, 2005 margins: 10, 2006 waitThumbnailsLoad: true 2007 }); 2008 } 2009 }); 2010 2011 $('.atr-nav').on("click", function () { 2012 $(".atr-div").append("<a class='close-cross' href='#'>X</a>"); 2013 $(".atr-div").animate({ 2014 width: "toggle" 2015 }); 2016 }); 2017 2018 $('.close-cross').on("click", function () { 2019 $(".atr-div").hide(); 2020 }); 2021 2022 var menuRight = document.getElementById('cbp-spmenu-s2'), 2023 showRightPush = document.getElementById('showRightPush'), 2024 body = document.body; 2025 if (showRightPush) { 2026 showRightPush.onclick = function () { 2027 classie.toggle(this, 'active'); 2028 if (menuRight) 2029 classie.toggle(menuRight, 'cbp-spmenu-open'); 2030 }; 2031 } 2032 2033 var test = document.getElementById('close-pushmenu'); 2034 if (test) { 2035 test.onclick = function () { 2036 classie.toggle(this, 'active'); 2037 if (menuRight) 2038 classie.toggle(menuRight, 'cbp-spmenu-open'); 2039 }; 2040 } 2041 2042 //blog page header animation 2043 $(".blog-header-style1 li").hover(function () { 2044 $('.blog-header-style1 li.blog-column-active').removeClass('blog-column-active'); 2045 $(this).addClass('blog-column-active'); 2046 }, function () { 2047 $(this).removeClass('blog-column-active'); 2048 $('.blog-header-style1 li:first-child').addClass('blog-column-active'); 2049 }); 2050 2051 /*==============================================================*/ 2052 //big menu open close start 2053 /*==============================================================*/ 2054 $('.big-menu-open').on("click", function () { 2055 $('.big-menu-right').addClass("open"); 2056 }); 2057 2058 $('.big-menu-close').on("click", function () { 2059 $('.big-menu-right').removeClass("open"); 2060 }); 2061 /*==============================================================*/ 2062 //big menu open close end 2063 /*==============================================================*/ 2064 2065 /*============================================================== 2066 instagramfeed 2067 ==============================================================*/ 2068 if ($('#instaFeed-style1').length != 0) { 2069 var instaFeedStyle1 = new Instafeed({ 2070 target: 'instaFeed-style1', 2071 get: 'user', 2072 userId: 5640046896, 2073 limit: '8', 2074 accessToken: '5640046896.1677ed0.f7cd85767e124a9f9f8d698cb33252a0', 2075 resolution: "low_resolution", 2076 error: { 2077 template: '<div class="col-md-12 col-sm-12 col-xs-12"><span class=text-center>No Images Found</span></div>' 2078 }, 2079 template: '<div class="col-md-3 col-sm-6 col-xs-12 instafeed-style1"><a class="insta-link" href="{{link}}" target="_blank"><img src="{{image}}" class="insta-image" /><div class="insta-counts"><span><i class="ti-heart"></i> <span class="count-number">{{likes}}</span></span><span><i class="ti-comment"></i> <span class="count-number">{{comments}}</span></span></div></a></div>' 2080 }); 2081 instaFeedStyle1.run(); 2082 } 2083 2084 if ($('#instaFeed-aside').length != 0) { 2085 var instaFeedAside = new Instafeed({ 2086 target: 'instaFeed-aside', 2087 get: 'user', 2088 userId: 5640046896, 2089 limit: '6', 2090 accessToken: '5640046896.1677ed0.f7cd85767e124a9f9f8d698cb33252a0', 2091 resolution: "low_resolution", 2092 after: function () { 2093 equalizeHeight(); 2094 }, 2095 error: { 2096 template: '<div class="col-md-12 col-sm-12 col-xs-12"><span class=text-center>No Images Found</span></div>' 2097 }, 2098 template: '<li><figure><a href="{{link}}" target="_blank"><img src="{{image}}" class="insta-image" /><span class="insta-counts"><i class="ti-heart"></i>
2098{{likes}}</span></a></figure></li>' 2099 }); 2100 instaFeedAside.run(); 2101 } 2102 2103 if ($('#instaFeed-footer').length != 0) { 2104 var instaFeedFooter = new Instafeed({ 2105 target: 'instaFeed-footer', 2106 get: 'user', 2107 userId: 5640046896, 2108 limit: '6', 2109 accessToken: '5640046896.1677ed0.f7cd85767e124a9f9f8d698cb33252a0', 2110 resolution: "low_resolution", 2111 after: function () { 2112 equalizeHeight(); 2113 }, 2114 error: { 2115 template: '<div class="col-md-12 col-sm-12 col-xs-12"><span class=text-center>No Images Found</span></div>' 2116 }, 2117 template: '<li><figure><a href="{{link}}" target="_blank"><img src="{{image}}" class="insta-image" /><span class="insta-counts"><i class="ti-heart"></i><span>{{likes}}</span></span></a></figure></li>' 2118 }); 2119 instaFeedFooter.run(); 2120 } 2121 /*============================================================== 2122 instagramfeed end 2123 ==============================================================*/ 2124 2125 /*==============================================================*/ 2126 //revolution Start 2127 /*==============================================================*/ 2128 /* ================================ 2129 home-creative-studio 2130 ================================*/ 2131 if ($("#rev_slider_151_1").revolution == undefined) { 2132 revslider_showDoubleJqueryError("#rev_slider_151_1"); 2133 } else { 2134 $("#rev_slider_151_1").show().revolution({ 2135 sliderType: "standard", 2136 jsFileLocation: "revolution/js/", 2137 sliderLayout: "fullscreen", 2138 dottedOverlay: "none", 2139 delay: 9000, 2140 navigation: { 2141 keyboardNavigation: "off", 2142 keyboard_direction: "vertical", 2143 mouseScrollNavigation: "off", 2144 mouseScrollReverse: "default", 2145 onHoverStop: "off", 2146 touch: { 2147 touchenabled: "on", 2148 swipe_threshold: 75, 2149 swipe_min_touches: 1, 2150 swipe_direction: "horizontal", 2151 drag_block_vertical: false 2152 }, 2153 arrows: { 2154 style: "uranus", 2155 enable: true, 2156 hide_onmobile: false, 2157 hide_over: 479, 2158 hide_onleave: false, 2159 tmp: '', 2160 left: { 2161 h_align: "left", 2162 v_align: "center", 2163 h_offset: 0, 2164 v_offset: 0 2165 }, 2166 right: { 2167 h_align: "right", 2168 v_align: "center", 2169 h_offset: 0, 2170 v_offset: 0 2171 } 2172 } 2173 }, 2174 responsiveLevels: [1240, 1024, 778, 480], 2175 visibilityLevels: [1240, 1024, 778, 480], 2176 gridwidth: [1240, 1024, 778, 480], 2177 gridheight: [868, 768, 960, 720], 2178 lazyType: "none", 2179 scrolleffect: { 2180 blur: "on", 2181 maxblur: "20", 2182 on_slidebg: "on", 2183 direction: "top", 2184 multiplicator: "2", 2185 multiplicator_layers: "2", 2186 tilt: "10", 2187 disable_on_mobile: "off" 2188 }, 2189 parallax: { 2190 type: "scroll", 2191 origo: "slidercenter", 2192 speed: 400, 2193 levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 55] 2194 }, 2195 shadow: 0, 2196 spinner: "spinner3", 2197 stopLoop: "off", 2198 stopAfterLoops: -1, 2199 stopAtSlide: -1, 2200 shuffle: "off", 2201 autoHeight: "off", 2202 fullScreenAutoWidth: "off", 2203 fullScreenAlignForce: "off", 2204 fullScreenOffsetContainer: "", 2205 fullScreenOffset: "0px", 2206 hideThumbsOnMobile: "off", 2207 hideSliderAtLimit: 0, 2208 hideCaptionAtLimit: 0, 2209 hideAllCaptionAtLilmit: 0, 2210 debugMode: false, 2211 fallbacks: { 2212 simplifyAll: "off", 2213 nextSlideOnWindowFocus: "off", 2214 disableFocusListener: false 2215 } 2216 }); 2217 } 2218 2219 /* ================================ 2220 home-classic-web-agency 2221 ================================*/ 2222 if ($("#rev_slider_1174_1").revolution == undefined) { 2223 revslider_showDoubleJqueryError("#rev_slider_1174_1"); 2224 } else { 2225 $("#rev_slider_1174_1").show().revolution({ 2226 sliderType: "hero", 2227 jsFileLocation: "revolution/js/", 2228 sliderLayout: "fullscreen", 2229 dottedOverlay: "none", 2230 delay: 9000, 2231 navigation: { 2232 }, 2233 responsiveLevels: [1240, 1024, 778, 480], 2234 visibilityLevels: [1240, 1024, 778, 480], 2235 gridwidth: [1240, 1024, 778, 480], 2236 gridheight: [868, 768, 960, 720], 2237 lazyType: "none", 2238 parallax: { 2239 type: "scroll", 2240 origo: "slidercenter", 2241 speed: 400, 2242 levels: [10, 15, 20, 25, 30, 35, 40, -10, -15, -20, -25, -30, -35, -40, -45, 55] 2243 }, 2244 shadow: 0, 2245 spinner: "off", 2246 autoHeight: "off", 2247 fullScreenAutoWidth: "off", 2248 fullScreenAlignForce: "off", 2249 fullScreenOffsetContainer: "", 2250 disableProgressBar: "on", 2251 hideThumbsOnMobile: "off", 2252 hideSliderAtLimit: 0, 2253 hideCaptionAtLimit: 0, 2254 hideAllCaptionAtLilmit: 0, 2255 debugMode: false, 2256 fallbacks: { 2257 simplifyAll: "off", 2258 disableFocusListener: false 2259 } 2260 }); 2261 } 2262 2263 /* ================================ 2264 home-classic-corporate 2265 ================================*/ 2266 if ($("#rev_slider_1078_1").revolution == undefined) { 2267 revslider_showDoubleJqueryError("#rev_slider_1078_1"); 2268 } else { 2269 $("#rev_slider_1078_1").show().revolution({ 2270 sliderType: "standard", 2271 jsFileLocation: "revolution/js/", 2272 sliderLayout: "fullscreen", 2273 dottedOverlay: "none", 2274 delay: 9000, 2275 navigation: { 2276 keyboardNavigation: "on", 2277 keyboard_direction: "horizontal", 2278 mouseScrollNavigation: "off", 2279 mouseScrollReverse: "default", 2280 onHoverStop: "off", 2281 touch: { 2282 touchenabled: "on", 2283 swipe_threshold: 75, 2284 swipe_min_touches: 1, 2285 swipe_direction: "horizontal", 2286 drag_block_vertical: false 2287 } 2288 , 2289 arrows: { 2290 style: "zeus", 2291 enable: true, 2292 hide_onmobile: true, 2293 hide_under: 600, 2294 hide_onleave: true, 2295 hide_delay: 200, 2296 hide_delay_mobile: 1200, 2297 tmp: '<div class="tp-title-wrap"> <div class="tp-arr-imgholder"></div> </div>', 2298 left: { 2299 h_align: "left", 2300 v_align: "center", 2301 h_offset: 30, 2302 v_offset: 0 2303 }, 2304 right: { 2305 h_align: "right", 2306 v_align: "center", 2307 h_offset: 30, 2308 v_offset: 0 2309 } 2310 } 2311 , 2312 bullets: { 2313 enable: true, 2314 hide_onmobile: false, 2315 hide_under: 300, 2316 style: "hermes", 2317 hide_onleave: false, 2318 hide_delay: 200, 2319 hide_delay_mobile: 1200, 2320 direction: "horizontal", 2321 h_align: "center", 2322 v_align: "bottom", 2323 h_offset: 0, 2324 v_offset: 30, 2325 space: 8, 2326 tmp: '<span class="tp-bullet-img-wrap"> <span class="tp-bullet-image"></span></span><span class="tp-bullet-title">{{title}}</span>' 2327 } 2328 }, 2329 viewPort: { 2330 enable: true, 2331 outof: "pause", 2332 visible_area: "80%", 2333 presize: false 2334 }, 2335 responsiveLevels: [1240, 1024, 778, 480], 2336 visibilityLevels: [1240, 1024, 778, 480], 2337 gridwidth: [1240, 1024, 778, 480], 2338 gridheight: [600, 600, 500, 400], 2339 lazyType: "none", 2340 parallax: { 2341 type: "mouse", 2342 origo: "slidercenter", 2343 speed: 2000,
2344 levels: [2, 3, 4, 5, 6, 7, 12, 16, 10, 50, 46, 47, 48, 49, 50, 55] 2345 }, 2346 shadow: 0, 2347 spinner: "off", 2348 stopLoop: "off", 2349 stopAfterLoops: -1, 2350 stopAtSlide: -1, 2351 shuffle: "off", 2352 autoHeight: "off", 2353 hideThumbsOnMobile: "off", 2354 hideSliderAtLimit: 0, 2355 hideCaptionAtLimit: 0, 2356 hideAllCaptionAtLilmit: 0, 2357 debugMode: false, 2358 fallbacks: { 2359 simplifyAll: "off", 2360 nextSlideOnWindowFocus: "off", 2361 disableFocusListener: false 2362 } 2363 }); 2364 } 2365 /*==============================================================*/ 2366 //revolution End 2367 /*==============================================================*/ 2368 2369 /*==============================================================*/ 2370 //magnificPopup Start 2371 /*==============================================================*/ 2372 $('.header-search-form').magnificPopup({ 2373 mainClass: 'mfp-fade', 2374 closeOnBgClick: true, 2375 preloader: false, 2376 // for white backgriund 2377 fixedContentPos: false, 2378 closeBtnInside: false, 2379 callbacks: { 2380 open: function () { 2381 setTimeout(function () { 2382 $('.search-input').focus(); 2383 }, 500); 2384 $('#search-header').parent().addClass('search-popup'); 2385 if (!isMobile) { 2386 $('body').addClass('overflow-hidden'); 2387 //$('body').addClass('position-fixed'); 2388 $('body').addClass('width-100'); 2389 document.onmousewheel = ScrollStop; 2390 } else { 2391 $('body, html').on('touchmove', function (e) { 2392 e.preventDefault(); 2393 }); 2394 } 2395 }, 2396 close: function () { 2397 if (!isMobile) { 2398 $('body').removeClass('overflow-hidden'); 2399 //$('body').removeClass('position-fixed'); 2400 $('body').removeClass('width-100'); 2401 $('#search-header input[type=text]').each(function (index) { 2402 if (index == 0) { 2403 $(this).val(''); 2404 $("#search-header").find("input:eq(" + index + ")").css({"border": "none", "border-bottom": "2px solid rgba(255,255,255,0.5)"}); 2405 } 2406 }); 2407 document.onmousewheel = ScrollStart; 2408 } else { 2409 $('body, html').unbind('touchmove'); 2410 } 2411 } 2412 } 2413 }); 2414 2415 /*==============================================================*/ 2416 //magnificPopup End 2417 /*==============================================================*/ 2418 $("input.search-input").on("keypress", function (event) { 2419 if (event.which == 13 && !isMobile) { 2420 $("button.search-button").trigger("click"); 2421 event.preventDefault(); 2422 } 2423 }); 2424 2425 $("input.search-input").on("keyup", function (event) { 2426 if ($(this).val() == null || $(this).val() == "") { 2427 $(this).css({"border": "none", "border-bottom": "2px solid red"}); 2428 } else { 2429 $(this).css({"border": "none", "border-bottom": "2px solid rgba(255,255,255,0.5)"}); 2430 } 2431 }); 2432 2433 $("form.search-form, form.search-form-result").submit(function (event) { 2434 var error = validationSearchForm(); 2435 if (error) { 2436 var action = $(this).attr('action'); 2437 action = action == '#' || action == '' ? 'blog-grid-3columns.html' : action; 2438 action = action + '?' + $(this).serialize(); 2439 window.location = action; 2440 } 2441 2442 event.preventDefault(); 2443 }); 2444 2445 $(document).on("click", '.navbar .navbar-collapse a.dropdown-toggle, .accordion-style1 .panel-heading a, .accordion-style2 .panel-heading a, .accordion-style3 .panel-heading a, .toggles .panel-heading a, .toggles-style2 .panel-heading a, .toggles-style3 .panel-heading a, a.carousel-control, .nav-tabs a[data-toggle="tab"], a.shopping-cart', function (e) { 2446 e.preventDefault(); 2447 }); 2448 2449 $(document).on('touchstart click', 'body', function (e) { 2450 if ($(window).width() < 992) { 2451 if (!$('.navbar-collapse').has(e.target).is('.navbar-collapse') && $('.navbar-collapse').hasClass('in') && !$(e.target).hasClass('navbar-toggle')) { 2452 $('.navbar-collapse').collapse('hide'); 2453 } 2454 } else { 2455 if (!$('.navbar-collapse').has(e.target).is('.navbar-collapse') && $('.navbar-collapse ul').hasClass('in')) { 2456 $('.navbar-collapse').find('a.dropdown-toggle').addClass('collapsed'); 2457 $('.navbar-collapse').find('ul.dropdown-menu').removeClass('in'); 2458 $('.navbar-collapse a.dropdown-toggle').removeClass('active'); 2459 } 2460 } 2461 }); 2462 2463 $('.navbar-collapse a.dropdown-toggle').on('touchstart', function (e) { 2464 $('.navbar-collapse a.dropdown-toggle').not(this).removeClass('active'); 2465 if ($(this).hasClass('active')) 2466 $(this).removeClass('active'); 2467 else 2468 $(this).addClass('active'); 2469 }); 2470 2471 $('button.navbar-toggle').on("click", function (e) { 2472 if (isMobile) { 2473 $(".cart-content").css('opacity', '0'); 2474 $(".cart-content").css('visibility', 'hidden'); 2475 } 2476 }); 2477 2478 $('a.dropdown-toggle').on("click", function (e) { 2479 if (isMobile) { 2480 $(".cart-content").css('opacity', '0'); 2481 $(".cart-content").css('visibility', 'hidden'); 2482 } 2483 }); 2484 2485 $(document).on('touchstart click', '.navbar-collapse [data-toggle="dropdown"]', function (event) { 2486 2487 var $innerLinkLI = $(this).parents('ul.navbar-nav').find('li.dropdown a.inner
2487-link').parent('li.dropdown'); 2488 if (!$(this).hasClass('inner-link') && !$(this).hasClass('dropdown-toggle') && $innerLinkLI.hasClass('open')) { 2489 $innerLinkLI.removeClass('open'); 2490 } 2491 var target = $(this).attr('target'); 2492 if ($(window).width() <= 991 && $(this).attr('href') && $(this).attr('href').indexOf("#") <= -1 && !$(event.target).is('i')) { 2493 if (event.ctrlKey || event.metaKey) { 2494 window.open($(this).attr('href'), "_blank"); 2495 return false; 2496 } else if (!target) 2497 window.location = $(this).attr('href'); 2498 else 2499 window.open($(this).attr('href'), target); 2500 2501 } else if ($(window).width() > 991 && $(this).attr('href').indexOf("#") <= -1) { 2502 if (event.ctrlKey || event.metaKey) { 2503 window.open($(this).attr('href'), "_blank"); 2504 return false; 2505 } else if (!target) 2506 window.location = $(this).attr('href'); 2507 else 2508 window.open($(this).attr('href'), target); 2509 2510 } else if ($(window).width() <= 991 && $(this).attr('href') && $(this).attr('href').length > 1 && $(this).attr('href').indexOf("#") >= 0 && $(this).hasClass('inner-link')) { 2511 $(this).parents('ul.navbar-nav').find('li.dropdown').not($(this).parent('.dropdown')).removeClass('open'); 2512 if ($(this).parent('.dropdown').hasClass('open')) { 2513 $(this).parent('.dropdown').removeClass('open'); 2514 } else { 2515 $(this).parent('.dropdown').addClass('open'); 2516 } 2517 $(this).toggleClass('active'); 2518 } 2519 }); 2520 2521 /* =================================== 2522 skillbar 2523 ====================================== */ 2524 $('.skillbar').appear(); 2525 $('.skillbar').skillBars({ 2526 from: 0, 2527 speed: 4000, 2528 interval: 100, 2529 decimals: 0 2530 }); 2531 2532 $(document.body).on('appear', '.skillbar', function (e) { 2533 // this code is executed for each appeared element 2534 if (!$(this).hasClass('appear')) { 2535 $(this).addClass('appear'); 2536 $(this).find('.skillbar-bar').css("width", "0%"); 2537 $(this).skillBars({ 2538 from: 0, 2539 speed: 4000, 2540 interval: 100, 2541 decimals: 0 2542 }); 2543 } 2544 }); 2545 2546 /* =================================== 2547 touchstart click 2548 ====================================== */ 2549 $('body').on('touchstart click', function (e) { 2550 if ($(window).width() < 992) { 2551 } 2552 }); 2553 2554 /*==============================================================*/ 2555 //Set Resize Header Menu - START CODE 2556 /*==============================================================*/ 2557 $('nav.full-width-pull-menu ul.panel-group li.dropdown a.dropdown-toggle').on("click", function (e) { 2558 if ($(this).parent('li').find('ul.dropdown-menu').length > 0) { 2559 if ($(this).parent('li').hasClass('open')) { 2560 $(this).parent('li').removeClass('open'); 2561 } else { 2562 $(this).parent('li').addClass('open'); 2563 } 2564 } 2565 }); 2566 2567 /*==============================================================*/ 2568 //accordion - START CODE 2569 /*==============================================================*/ 2570 $('.accordion-style1 .collapse').on('show.bs.collapse', function () { 2571 var id = $(this).attr('id'); 2572 $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion'); 2573 $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-minus"></i>'); 2574 }); 2575 2576 $('.accordion-style1 .collapse').on('hide.bs.collapse', function () { 2577 var id = $(this).attr('id'); 2578 $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion'); 2579 $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-plus"></i>'); 2580 }); 2581 2582 $('.nav.navbar-nav a.inner-link').on("click", function (e) { 2583 $(this).parents('ul.navbar-nav').find('a.inner-link').removeClass('active'); 2584 var $this = $(this); 2585 if ($('.nav-header-container .navbar-toggle').is(':visible')) 2586 $(this).parents('.navbar-collapse').collapse('hide'); 2587 setTimeout(function () { 2588 $this.addClass('active'); 2589 }, 1000); 2590 2591 }); 2592 2593 $('.accordion-style2 .collapse').on('show.bs.collapse', function () { 2594 var id = $(this).attr('id'); 2595 $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion'); 2596 $('a[href="#' + id + '"] .panel-title').find('i').addClass('fa-angle-up').removeClass('fa-angle-down'); 2597 }); 2598 2599 $('.accordion-style2 .collapse').on('hide.bs.collapse', function () { 2600 var id = $(this).attr('id'); 2601 $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion'); 2602 $('a[href="#' + id + '"] .panel-title').find('i').removeClass('fa-angle-up').addClass('fa-angle-down'); 2603 }); 2604 2605 $('.accordion-style3 .collapse').on('show.bs.collapse', function () { 2606 var id = $(this).attr('id'); 2607 $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion'); 2608 $('a[href="#' + id + '"] .panel-title').find('i').addClass('fa-angle-up').removeClass('fa-angle-down'); 2609 }); 2610 2611 $('.accordion-style3 .collapse').on('hide.bs.collapse', function () { 2612 var id = $(this).attr('id'); 2613 $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion'); 2614 $('a[href="#' + id + '"] .panel-title').find('i').removeClass('fa-angle-up').addClass('fa-angle-down'); 2615 }); 2616 /*==============================================================*/ 2617 //accordion - END CODE 2618 /*==============================================================*/ 2619 2620 /*==============================================================*/ 2621 //toggles - START CODE 2622 /*==============================================================*/ 2623 $('.toggles .collapse').on('show.bs.collapse', function () { 2624 var id = $(this).attr('id'); 2625 $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion'); 2626 $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-minus"></i>'); 2627 }); 2628 2629 $('.toggles .collapse').on('hide.bs.collapse', function () { 2630 var id = $(this).attr('id'); 2631 $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion'); 2632 $('a[href="#' + id + '"] .panel-title span').html('<i class="ti-plus"></i>'); 2633 }); 2634 2635 $('.toggles-style2 .collapse').on('show.bs.collapse', function () { 2636 var id = $(this).attr('id'); 2637 $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-accordion'); 2638 $('a[href="#' + id + '"] .panel-title span').html('<i class="fa fa-angle-up"></i>'); 2639 }); 2640 2641 $('.toggles-style2 .collapse').on('hide.bs.collapse', function () { 2642 var id = $(this).attr('id'); 2643 $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-accordion'); 2644 $('a[href="#' + id + '"] .panel-title span').html('<i class="fas fa-angle-down"></i>'); 2645 }); 2646 /*==============================================================*/ 2647 //toggles - END CODE 2648 /*==============================================================*/ 2649 2650 /* =================================== 2651 blog hover box 2652 ====================================== */ 2653 $(document).on("mouseenter", ".blog-post-style4 .grid-item", function (e) { 2654 $(this).find("figcaption .blog-hover-text").slideDown(300); 2655 }); 2656 $(document).on("mouseleave", ".blog-post-style4 .grid-item", function (e) { 2657 $(this).find("figcaption .blog-hover-text").slideUp(300); 2658 }); 2659 /* =================================== 2660 End blog hover box 2661 ====================================== */ 2662 SetResizeContent(); 2663 2664 var $allNonRatinaImages = $("img:not([data-rjs])"); 2665 $allNonRatinaImages.attr('data-no-retina', ''); 2666 2667 /*==============================================================*/ 2668 //demo button - START CODE 2669 /*==============================================================*/ 2670 2671 /* var $buythemediv = '<div class="buy-theme alt-font sm-display-none">
2671<a href="https://themeforest.net/item/pofo-creative-agency-corporate-and-portfolio-multipurpose-template/20645944?ref=themezaa" target="_blank"><i class="ti-shopping-cart"></i><span>Buy Theme</span></a></div><div class="all-demo alt-font sm-display-none"><a href="mailto:[email protected]?subject=POFO - Creative Agency, Corporate and Portfolio Multi-purpose Template - Quick Question"><i class="ti-email"></i><span>Quick Question?</span></a></div>'; 2672 $('body').append($buythemediv); */ 2673 2674 /*==============================================================*/ 2675 //demo button - END CODE 2676 /*==============================================================*/ 2677 2678 $(document).on("touchstart", ".sidebar-wrapper", function () { 2679 clearOpen(); 2680 }); 2681 2682 var getNav = $("nav.navbar.bootsnav"), getIn = getNav.find("ul.nav").data("in"), getOut = getNav.find("ul.nav").data("out"); 2683 // Hidden dropdown 2684 function clearOpen() { 2685 $('li.dropdown').removeClass("on").removeClass("open"); 2686 $(".dropdown-menu").stop().fadeOut('fast'); 2687 $(".dropdown-menu").removeClass(getIn); 2688 $(".dropdown-menu").addClass(getOut); 2689 } 2690 2691}); 2692/* =================================== 2693 END READY 2694 ====================================== */ 2695 2696 2697/* =================================== 2698 START Page Load 2699 ====================================== */ 2700$(window).load(function () { 2701 var hash = window.location.hash.substr(1); 2702 if (hash != "") { 2703 setTimeout(function () { 2704 $(window).imagesLoaded(function () { 2705 var scrollAnimationTime = 1200, 2706 scrollAnimation = 'easeInOutExpo'; 2707 var target = '#' + hash; 2708 if ($(target).length > 0) { 2709 2710 $('html, body').stop() 2711 .animate({ 2712 'scrollTop': $(target).offset().top 2713 }, scrollAnimationTime, scrollAnimation, function () { 2714 window.location.hash = target; 2715 }); 2716 } 2717 }); 2718 }, 500); 2719 } 2720 2721 fullScreenHeight(); 2722}); 2723/* =================================== 2724 END Page Load 2725 ====================================== */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.