1/* 2 * 3 * CUSTOM.JS 4 * 5 */ 6 7(function($){ 8 9 "use strict"; 10 11 // DETECT TOUCH DEVICE // 12 function is_touch_device() { 13 return !!('ontouchstart' in window) || ( !! ('onmsgesturechange' in window) && !! window.navigator.maxTouchPoints); 14 } 15 16 17 // PAGE LOADER // 18 function page_loader() { 19 20 var hash = window.location.hash; 21 22 $(".loader-img").delay(500).fadeOut(); 23 $("#page-loader").delay(1000).fadeOut("slow"); 24 25 if(!hash) { 26 27 } else { 28 $(document).scrollTop( $(hash).offset().top -56); 29 } 30 } 31 32 33 // SHOW/HIDE MOBILE MENU // 34 function show_hide_mobile_menu() { 35 36 $("#mobile-menu-button").on("click", function(e) { 37 38 e.preventDefault(); 39 40 $("#mobile-menu").slideToggle(300); 41 42 }); 43 44 } 45 46 47 // MOBILE MENU // 48 function mobile_menu() { 49 50 if ($(window).width() < 992) { 51 52 if ($("#menu").length > 0) { 53 54 if ($("#mobile-menu").length < 1) { 55 56 $("#menu").clone().attr({ 57 id: "mobile-menu", 58 class: "" 59 }).insertAfter("#header"); 60 61 $("#mobile-menu .megamenu > a").on("click", function(e) { 62 63 e.preventDefault(); 64 65 $(this).toggleClass("open").next("div").slideToggle(300); 66 67 }); 68 69 $("#mobile-menu .dropdown > a").on("click", function(e) { 70 71 e.preventDefault(); 72 73 $(this).toggleClass("open").next("ul").slideToggle(300); 74 75 }); 76 77 } 78 79 } 80 81 } else { 82 83 $("#mobile-menu").hide(); 84 85 } 86 87 } 88 89 90 // HEADER SEARCH // 91 function header_search() { 92 93 $(".menu li.search a").on("click", function(e) { 94 95 e.preventDefault(); 96 97 if(!$(".menu li.search a").hasClass("open")) { 98 99 $("#search-form").fadeIn().addClass("open"); 100 101 $("#search-form").append('<a class="close" href="#">x</a>'); 102 103 } 104 105 $("#search-form a.close").on("click", function(e) { 106 107 e.preventDefault(); 108 $("#search-form").fadeOut().removeClass("open"); 109 $(this).remove(); 110 111 }); 112 113 }); 114 115 $(window).scroll(function(){ 116 117 $("#search-form").fadeOut(300); 118 119 }); 120 121 } 122 123 124 // STICKY // 125 function sticky() { 126 127 var sticky_point = $("#header-container").innerHeight() + 100; 128 129 $("#header").clone().attr({ 130 id: "header-sticky", 131 class: "" 132 }).insertAfter("header"); 133 134 $(window).scroll(function(){ 135 136 if ($(window).scrollTop() > sticky_point) { 137 $("#header-sticky").slideDown(300).addClass("header-sticky"); 138 $("#header .menu ul, #header .menu .megamenu-container").css({"visibility": "hidden"}); 139 } else { 140 $("#header-sticky").slideUp(100).removeClass("header-sticky"); 141 $("#header .menu ul, #header .menu .megamenu-container").css({"visibility": "visible"}); 142 } 143 144 }); 145 146 $("#header-sticky .menu li.search a").on("click", function(e) { 147 148 e.preventDefault(); 149 150 if(!$("#header-sticky .menu li.search a").hasClass("open")) { 151 152 $("#header-sticky #search-form").fadeIn().addClass("open"); 153 154 $("#header-sticky #search-form").append('<a class="close" href="#">x</a>'); 155 156 } 157 158 $("#search-form a.close").on("click", function(e) { 159 160 e.preventDefault(); 161 $("#header-sticky #search-form").fadeOut().removeClass("open"); 162 $(this).remove(); 163 164 }); 165 166 }); 167 168 $(window).scroll(function(){ 169 170 $("#header-sticky #search-form").fadeOut(300); 171 172 }); 173 174 } 175 176 177 // FOOTER PARALLAX // 178 function footer_parallax() { 179 180 if ($(window).width() > 767 ) { 181 $("#main-container").css("margin-bottom", $("#footer-container").height()); 182 } 183 184 } 185 186 187 // PROGRESS BARS // 188 function progress_bars() { 189 190 $(".progress .progress-bar:in-viewport").each(function() { 191 192 if (!$(this).hasClass("animated")) { 193 $(this).addClass("animated"); 194 $(this).animate({ 195 width: $(this).attr("data-width") + "%" 196 }, 2000); 197 } 198 199 }); 200 201 } 202 203 204 // CHARTS // 205 function pie_chart() { 206 207 if (typeof $.fn.easyPieChart !== 'undefined') { 208 209 $(".pie-chart:in-viewport").each(function() { 210 211 $(this).easyPieChart({ 212 animate: 1500, 213 lineCap: "square", 214 lineWidth: $(this).attr("data-line-width"), 215 size: $(this).attr("data-size"), 216 barColor: $(this).attr("data-bar-color"), 217 trackColor: $(this).attr("data-track-color"), 218 scaleColor: "transparent", 219 onStep: function(from, to, percent) { 220 $(this.el).find(".pie-chart-percent .value").text(Math.round(percent)); 221 } 222 }); 223 224 }); 225 226 } 227 228 } 229 230 // COUNTER // 231 function counter() { 232 233 if (typeof $.fn.jQuerySimpleCounter !== 'undefined') { 234 235 $(".counter .counter-value:in-viewport").each(function() { 236 237 if (!$(this).hasClass("animated")) { 238 $(this).addClass("animated"); 239 $(this).jQuerySimpleCounter({ 240 start: 0, 241 end: $(this).attr("data-value"), 242 duration: 2000 243 }); 244 } 245 246 }); 247 248 } 249 } 250 251 252 // STATISTICS // 253 function statistics() { 254 255 if (typeof Chart !== 'undefined') { 256 257 $(".statistics-container .animate-chart:in-viewport").each(function() { 258 259 if(!$(this).hasClass("animated")) { 260 261 $(this).addClass("animated"); 262 263 // LINE CHART // 264 var data1 = { 265 labels : ["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100", "150", "200", "250", "300"], 266 datasets : [ 267 { 268 fill: "true", 269 label: "Profit", 270 backgroundColor: "transparent", 271 borderWidth: 1, 272 borderColor: "#72d3d5", 273 pointBorderColor: "#72d3d5",
274 pointBackgroundColor: "#fff", 275 pointHoverBackgroundColor: "#fff", 276 pointHoverBorderColor: "#72d3d5", 277 pointBorderWidth: 1, 278 pointHoverBorderWidth: 1, 279 tension: 0, 280 stacked: false, 281 data : ["35", "25", "40", "35", "50", "45", "65", "70", "85", "75", "70", "73", "55", "40", "55"] 282 }, 283 { 284 fill: "true", 285 label: "Revenue", 286 backgroundColor: "transparent", 287 borderWidth: 1, 288 borderColor: "#5967d6", 289 pointBorderColor: "#5967d6", 290 pointBackgroundColor: "#fff", 291 pointHoverBackgroundColor: "#fff", 292 pointHoverBorderColor: "#5967d6", 293 pointBorderWidth: 1, 294 pointHoverBorderWidth: 1, 295 tension: 0, 296 stacked: false, 297 data : ["30", "40", "33", "50", "43", "30", "60", "50", "70", "30", "50", "45", "65", "50", "70"] 298 } 299 ] 300 } 301 302 if ($("#line-chart").length > 0) { 303 304 var line_chart = new Chart(document.getElementById("line-chart").getContext("2d"), { 305 type: 'line', 306 data: data1, 307 options: { 308 responsive: true, 309 legend: { 310 display: true, 311 labels: { 312 boxWidth: 12, 313 fontColor: "#838383", 314 fontFamily: "Roboto", 315 fontSize: 12, 316 padding: 20 317 } 318 }, 319 tooltips: { 320 enabled: false 321 }, 322 scales: { 323 xAxes: [{ 324 display: true, 325 }], 326 yAxes: [{ 327 display: true, 328 ticks: { 329 suggestedMin: 0, 330 suggestedMax: 100, 331 } 332 }] 333 } 334 } 335 }); 336 337 } 338 339 340 // DOUGHNUT CHART // 341 var data2 = { 342 labels: [ 343 "Power", 344 "Gas", 345 "Oil" 346 ], 347 datasets: [ 348 { 349 data: [20, 10, 70], 350 borderWidth: 0, 351 backgroundColor: [ 352 "#4c3e99", 353 "#72d3d5", 354 "#ffffff" 355 ], 356 hoverBackgroundColor: [ 357 "#4c3e99", 358 "#72d3d5", 359 "#ffffff" 360 ] 361 }] 362 }; 363 364 if ($("#doughnut-chart").length > 0) { 365 366 var doughnut_chart = new Chart(document.getElementById("doughnut-chart").getContext("2d"), { 367 type: 'doughnut', 368 data: data2, 369 options: { 370 cutoutPercentage: 80, 371 responsive: true, 372 legend: { 373 display: true, 374 position: "bottom", 375 labels: { 376 boxWidth: 12, 377 fontColor: "#fff", 378 fontFamily: "Roboto", 379 fontSize: 12, 380 padding: 20 381 } 382 }, 383 tooltips: { 384 enabled: false 385 }, 386 scales: { 387 xAxes: [{ 388 display: false 389 }], 390 yAxes: [{ 391 display: false, 392 }] 393 } 394 } 395 }); 396 397 } 398 399 400 // PIE CHART // 401 var data3 = { 402 labels: [ 403 "Credibility", 404 "Sustenability", 405 "Economy" 406 ], 407 datasets: [ 408 { 409 data: [60, 25, 15], 410 borderWidth: 0, 411 backgroundColor: [ 412 "#4c3e99", 413 "#a3d39c", 414 "#6dcff6" 415 ], 416 hoverBackgroundColor: [ 417 "#4c3e99", 418 "#a3d39c", 419 "#6dcff6" 420 ] 421 }] 422 }; 423 424 if ($("#pie-chart").length > 0) { 425 426 var pie_chart = new Chart(document.getElementById("pie-chart").getContext("2d"), { 427 type: 'pie', 428 data: data3, 429 options: { 430 responsive: true, 431 legend: { 432 display: true, 433 position: "bottom", 434 labels: { 435 boxWidth: 12, 436 fontColor: "#838383", 437 fontFamily: "Roboto", 438 fontSize: 12, 439 padding: 20 440 } 441 }, 442 tooltips: { 443 enabled: false 444 }, 445 scales: { 446 xAxes: [{ 447 display: false 448 }], 449 yAxes: [{ 450 display: false, 451 }] 452 } 453 } 454 }); 455 456 } 457 458 459 // BAR CHART // 460 var data4 = { 461 labels : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 462 datasets : [ 463 { 464 label: "Profit", 465 backgroundColor: "#5967d6", 466 borderColor: "#fff", 467 borderWidth: 3, 468 hoverBorderWidth: 3,
469 hoverBackgroundColor: "#5967d6", 470 hoverBorderColor: "#fff", 471 data : [80, 70, 60, 50, 80, 60, 55, 45, 35, 45, 50, 40] 472 }, 473 { 474 label: "Revenue", 475 backgroundColor: "#72d3d5", 476 borderColor: "#fff", 477 borderWidth: 3, 478 hoverBorderWidth: 3, 479 hoverBackgroundColor: "#72d3d5", 480 hoverBorderColor: "#fff", 481 data : [70, 60, 55, 40, 100, 85, 75, 60, 50, 65, 70, 60] 482 } 483 ] 484 } 485 486 if ($("#bar-chart").length > 0) { 487 488 var bar_chart = new Chart(document.getElementById("bar-chart").getContext("2d"), { 489 type: 'bar', 490 data: data4, 491 options: { 492 responsive: true, 493 legend: { 494 display: true, 495 labels: { 496 boxWidth: 12, 497 fontColor: "#838383", 498 fontFamily: "Roboto", 499 fontSize: 12, 500 padding: 20 501 } 502 }, 503 tooltips: { 504 enabled: true, 505 xPadding: 15 506 }, 507 scales: { 508 xAxes: [{ 509 display: false 510 }], 511 yAxes: [{ 512 display: false, 513 ticks: { 514 suggestedMin: 0, 515 suggestedMax: 100, 516 } 517 }] 518 } 519 } 520 }); 521 522 } 523 524 525 // AREA CHART // 526 var data5 = { 527 labels : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 528 datasets : [ 529 { 530 fill: "true", 531 label: "Profit", 532 backgroundColor: "rgba(89, 103, 214, 0.2)", 533 borderWidth: 1, 534 borderColor: "#5967d6", 535 pointBorderColor: "#5967d6",
536 pointBackgroundColor: "#fff", 537 pointHoverBackgroundColor: "#fff", 538 pointHoverBorderColor: "#5967d6", 539 pointBorderWidth: 1, 540 pointHoverBorderWidth: 1, 541 tension: 0.4, 542 stacked: false, 543 data : [55, 85, 65, 70, 40, 65, 75, 55, 70, 40, 65, 45] 544 }, 545 { 546 fill: "true", 547 label: "Revenue", 548 backgroundColor: "transparent", 549 borderWidth: 1, 550 borderColor: "#72d3d5", 551 pointBorderColor: "#72d3d5", 552 pointBackgroundColor: "#fff", 553 pointHoverBackgroundColor: "#fff", 554 pointHoverBorderColor: "#72d3d5", 555 pointBorderWidth: 1, 556 pointHoverBorderWidth: 1, 557 tension: 0.4, 558 stacked: false, 559 data : [65, 75, 55, 65, 50, 75, 90, 80, 60, 50, 55, 70] 560 } 561 ] 562 } 563 564 if ($("#area-chart").length > 0) { 565 566 var area_chart = new Chart(document.getElementById("area-chart").getContext("2d"), { 567 type: 'line', 568 data: data5, 569 options: { 570 responsive: true, 571 legend: { 572 display: true, 573 labels: { 574 boxWidth: 12, 575 fontColor: "#838383", 576 fontFamily: "Roboto", 577 fontSize: 12, 578 padding: 20 579 } 580 }, 581 tooltips: { 582 enabled: false 583 }, 584 scales: { 585 xAxes: [{ 586 display: true 587 }], 588 yAxes: [{ 589 display: true, 590 ticks: { 591 suggestedMin: 0, 592 suggestedMax: 100, 593 } 594 }] 595 } 596 } 597 }); 598 599 } 600 601 } 602 603 }); 604 605 } 606 607 } 608 609 610 // LOAD MORE PROJECTS // 611 function load_more_projects() { 612 613 var number_clicks = 0; 614 615 $(".load-more").on("click", function(e) { 616 617 e.preventDefault(); 618 619 if (number_clicks == 0) { 620 $.ajax({
621 type: "POST", 622 url: $(".load-more").attr("href"), 623 dataType: "html", 624 cache: false, 625 msg : '', 626 success: function(msg) { 627 $(".isotope").append(msg); 628 $(".isotope").imagesLoaded(function() { 629 $(".isotope").isotope("reloadItems").isotope(); 630 $(".fancybox").fancybox({ 631 prevEffect: 'none', 632 nextEffect: 'none', 633 padding: 0 634 }); 635 }); 636 number_clicks++; 637 $(".load-more").html("Nothing to load"); 638 } 639 }); 640 } 641 642 }); 643 644 } 645 646 647 // SHOW/HIDE SCROLL UP // 648 function show_hide_scroll_top() { 649 650 if ($(window).scrollTop() > $(window).height()/2) { 651 $("#scroll-up").fadeIn(300); 652 } else { 653 $("#scroll-up").fadeOut(300); 654 } 655 656 } 657 658 659 // SCROLL UP // 660 function scroll_up() { 661 662 $("#scroll-up").on("click", function() { 663 $("html, body").animate({ 664 scrollTop: 0 665 }, 800); 666 return false; 667 }); 668 669 } 670 671 672 // INSTAGRAM FEED // 673 function instagram_feed() { 674 675 if ($("#instafeed").length > 0 ) { 676 677 var nr = $("#instafeed").data('number'); 678 var userid = $("#instafeed").data('user'); 679 var accesstoken = $("#instafeed").data('accesstoken'); 680 681 var feed = new Instafeed({ 682 target: 'instafeed', 683 get: 'user', 684 userId: userid, 685 accessToken: accesstoken, 686 limit: nr, 687 resolution: 'thumbnail', 688 sortBy: 'most-recent' 689 }); 690 691 feed.run(); 692 693 } 694 695 } 696 697 698 // ANIMATIONS // 699 function animations() { 700 701 if (typeof WOW !== 'undefined') { 702 703 animations = new WOW({ 704 boxClass: 'wow', 705 animateClass: 'animated', 706 offset: 100, 707 mobile: false, 708 live: true 709 }); 710 711 animations.init(); 712 713 } 714 715 } 716 717 718 // EQUAL HEIGHT // 719 function equal_height() { 720 721 $(".text-boxes-list").each(function(){ 722 723 var x = 0; 724 725 $(".text-boxes-list li").each(function() { 726 727 if($(this).height() > x) { 728 x = $(this).height(); 729 } 730 731 }); 732 733 $(".text-boxes-list li .text-box").css("height", x + "px"); 734 735 }); 736 737 } 738 739 740 // IMAGES BOXES // 741 function images_boxes() { 742 743 $(".image-box.style-2 .image-box-content").append('<a class="close-image-box-content" href="#">x</a>'); 744 745 $(".image-box.style-2 > h4").on("click", function() { 746 $(this).fadeOut(300).next(".image-box.style-2 .image-box-content").addClass("slideup"); 747 }); 748 749 $(".close-image-box-content").on("click", function(e) { 750 e.preventDefault(); 751 $(this).parents("div").removeClass("slideup"); 752 $(this).parents("div").prev("h4").fadeIn(300); 753 }); 754 755 } 756 757 758 // CALLOUT // 759 function callout() { 760 761 $(".callout").each(function() { 762 763 var x = 0; 764 765 $(this).find("li").each(function() { 766 767 if($(this).height() > x) { 768 x = $(this).height(); 769 } 770 771 }); 772 773 $(this).find("li").css("height", x + "px"); 774 775 }); 776 777 $(".callout").on("click", function() { 778 window.location = $(this).find("a").attr("href"); 779 return false; 780 }); 781 782 } 783 784 785 // FULL SCREEN // 786 function full_screen() { 787 788 if ($(window).width() > 767) { 789 $(".full-screen").css("height", $(window).height() + "px"); 790 } else { 791 $(".full-screen").css("height", "auto"); 792 } 793 794 } 795 796 797 // DOCUMENT READY // 798 $(document).ready(function(){ 799 800 // STICKY // 801 if ($("body").hasClass("sticky-header")) { 802 sticky(); 803 } 804 805 806 // MENU // 807 if (typeof $.fn.superfish !== 'undefined') { 808 809 $(".menu").superfish({ 810 delay: 500, 811 animation: { 812 opacity: 'show', 813 height: 'show' 814 }, 815 speed: 'fast', 816 autoArrows: true 817 }); 818 819 } 820 821 822 // SHOW/HIDE MOBILE MENU // 823 show_hide_mobile_menu(); 824 825 826 // MOBILE MENU // 827 mobile_menu(); 828 829 830 // HEADER SEARCH // 831 header_search(); 832 833 834 // FOOTER PARALLAX // 835 if ($("body").hasClass("footer-parallax")) { 836 footer_parallax(); 837 } 838 839 840 // FANCYBOX // 841 if (typeof $.fn.fancybox !== 'undefined') { 842 843 $(".fancybox").fancybox({ 844 prevEffect: 'none', 845 nextEffect: 'none', 846 padding: 0 847 }); 848 849 $(".sign-in .btn").fancybox({ 850 maxWidth: 450, 851 maxHeight: 380, 852 fitToView: false, 853 width: '90%', 854 height: '90%', 855 autoSize: false, 856 closeClick: false, 857 openEffect: 'fade', 858 closeEffect: 'fade' 859 }); 860 861 } 862 863 // REVOLUTION SLIDER // 864 if (typeof $.fn.revolution !== 'undefined') { 865 866 $(".rev_slider").revolution({ 867 sliderType: "standard", 868 sliderLayout: "auto", 869 delay: 9000, 870 navigation: { 871 arrows:{
872 style: "zeus", 873 enable: true, 874 hide_onmobile: true, 875 hide_onleave: false, 876 hide_delay: 200, 877 hide_delay_mobile: 1200, 878 hide_under: 0, 879 hide_over: 9999, 880 tmp:'<div class="tp-title-wrap"><div class="tp-arr-imgholder"></div> </div>', 881 left: { 882 h_align: "left", 883 v_align: "center", 884 h_offset: 20, 885 v_offset: 0 886 }, 887 right: { 888 h_align: "right", 889 v_align: "center", 890 h_offset: 20, 891 v_offset: 0 892 } 893 }, 894 bullets:{ 895 style: "custom", 896 enable: true, 897 hide_onmobile: false, 898 hide_onleave: false, 899 hide_delay: 200, 900 hide_delay_mobile: 1200, 901 hide_under: 0, 902 hide_over: 9999, 903 tmp: '', 904 direction: "horizontal", 905 space: 10, 906 h_align: "center", 907 v_align: "bottom", 908 h_offset: 0, 909 v_offset: 40 910 }, 911 touch:{ 912 touchenabled: "on", 913 swipe_treshold: 75, 914 swipe_min_touches: 1, 915 drag_block_vertical: false, 916 swipe_direction: "horizontal" 917 } 918 }, 919 gridwidth: 1170, 920 gridheight: 530 921 }); 922 923 } 924 925 926 // OWL Carousel // 927 if (typeof $.fn.owlCarousel !== 'undefined') { 928 929 // IMAGES SLIDER HORIZONTAL // 930 $(".owl-carousel.images-slider-horizontal").owlCarousel({ 931 items: 1, 932 autoplay: true, 933 autoplayTimeout: 3000, 934 autoplayHoverPause: true, 935 smartSpeed: 1200, 936 loop: true, 937 nav: false, 938 navText: false, 939 dots: true, 940 mouseDrag: true, 941 touchDrag: true, 942 animateIn: 'fadeIn', 943 animateOut: 'fadeOut' 944 }); 945 946 947 // IMAGES SLIDER VERTICAL // 948 $(".owl-carousel.images-slider-vertical").owlCarousel({ 949 items: 1, 950 autoplay: true, 951 autoplayTimeout: 3000, 952 autoplayHoverPause: true, 953 smartSpeed: 1200, 954 loop: true, 955 nav: false, 956 navText: false, 957 dots: true, 958 mouseDrag: true, 959 touchDrag: true, 960 animateIn: 'slideInDown', 961 animateOut: 'slideOutDown' 962 }); 963 964 965 // TESTIMONIALS SLIDER STYLE 1 // 966 $(".owl-carousel.testimonials-slider.style-1").owlCarousel({ 967 items: 1, 968 autoplay: true, 969 autoplayTimeout: 3000, 970 autoplayHoverPause: true, 971 smartSpeed: 1200, 972 loop: true, 973 nav: false, 974 navText: false, 975 dots: true, 976 mouseDrag: true, 977 touchDrag: true, 978 animateIn: 'fadeIn', 979 animateOut: 'fadeOut' 980 }); 981 982 983 // TESTIMONIALS SLIDER STYLE 2 // 984 $(".owl-carousel.testimonials-slider.style-2").owlCarousel({ 985 autoplay: true, 986 autoplayTimeout: 3000, 987 autoplayHoverPause: true, 988 smartSpeed: 500, 989 loop: true, 990 nav: false, 991 navText: false, 992 dots: true, 993 mouseDrag: true, 994 touchDrag: true, 995 margin: 30, 996 responsive: { 997 0:{ 998 items: 1 999 }, 1000 768:{ 1001 items: 2 1002 }, 1003 992:{ 1004 items: 3 1005 } 1006 } 1007 }); 1008 1009 1010 // TESTIMONIALS SLIDER STYLE 3 // 1011 var $testimonial_author_image = $(".testimonial-author-image"), 1012 $testimonials = $(".testimonials"), 1013 flag = false, 1014 duration = 500; 1015 1016 $testimonial_author_image.owlCarousel({ 1017 items: 1, 1018 autoplay: true, 1019 autoplayTimeout: 3000, 1020 autoplayHoverPause: true, 1021 smartSpeed: 1200, 1022 loop: true, 1023 nav: false, 1024 navText: false, 1025 dots: false, 1026 mouseDrag: true, 1027 touchDrag: true, 1028 animateIn: 'fadeIn', 1029 animateOut: 'fadeOut' 1030 }) 1031 1032 1033 $testimonials.owlCarousel({ 1034 items: 1, 1035 autoplay: true, 1036 autoplayTimeout: 3000, 1037 autoplayHoverPause: true, 1038 smartSpeed: 1200, 1039 loop: true, 1040 nav: false, 1041 navText: false, 1042 dots: false, 1043 mouseDrag: true, 1044 touchDrag: true, 1045 animateIn: 'fadeIn', 1046 animateOut: 'fadeOut' 1047 }) 1048 1049 1050 1051 // LOGOS SLIDER // 1052 $(".owl-carousel.logos-slider").owlCarousel({ 1053 autoplay: true, 1054 autoplayTimeout: 3000, 1055 autoplayHoverPause: true, 1056 smartSpeed: 1200, 1057 loop: true, 1058 nav: true, 1059 navText: false, 1060 dots: false, 1061 mouseDrag: true, 1062 touchDrag: true, 1063 responsive: { 1064 0:{ 1065 items: 1 1066 }, 1067 480:{ 1068 items: 2 1069 }, 1070 768:{ 1071 items: 3 1072 }, 1073 992:{ 1074 items: 4 1075 }, 1076 1200:{ 1077 items: 5 1078 } 1079 } 1080 }); 1081 1082 1083 /* TIMELINE SLIDER */ 1084 var timeline_slider = $(".owl-carousel.timeline-slider").owlCarousel({ 1085 items: 1, 1086 autoplay: false, 1087 smartSpeed: 200, 1088 loop: true, 1089 nav: false, 1090 navText: false, 1091 dots: false, 1092 mouseDrag: false, 1093 touchDrag: false, 1094 animateIn: 'fadeIn', 1095 animateOut: 'fadeOut' 1096 }); 1097
1098 $(".timeline-slider-controls li").on("click", function() { 1099 timeline_slider.trigger('to.owl.carousel',[$(this).index(), 300, true]); 1100 }); 1101 1102 1103 /* TIMELINE SLIDER 2 */ 1104 var timeline_slider_2 = $(".owl-carousel.timeline-slider-2").owlCarousel({ 1105 items: 1, 1106 autoplay: false, 1107 smartSpeed: 200, 1108 loop: true, 1109 nav: false, 1110 navText: false, 1111 dots: false, 1112 mouseDrag: false, 1113 touchDrag: false, 1114 animateIn: 'fadeIn', 1115 animateOut: 'fadeOut' 1116 }); 1117 1118 $(".timeline-slider-2-controls li").on("click", function() { 1119 $(".timeline-slider-2-controls li").removeClass("active"); 1120 $(this).addClass("active"); 1121 timeline_slider_2.trigger('to.owl.carousel',[$(this).index(), 300, true]); 1122 }); 1123 1124 } 1125 1126 1127 // GOOGLE MAPS // 1128 if (typeof $.fn.gmap3 !== 'undefined') { 1129 1130 $(".map").each(function() { 1131 1132 var data_zoom = 15, 1133 data_height, 1134 data_popup = false; 1135 1136 if ($(this).attr("data-zoom") !== undefined) { 1137 data_zoom = parseInt($(this).attr("data-zoom"),10); 1138 } 1139 1140 if ($(this).attr("data-height") !== undefined) { 1141 data_height = parseInt($(this).attr("data-height"),10); 1142 } 1143 1144 if ($(this).attr("data-address-details") !== undefined) { 1145 1146 data_popup = true; 1147 1148 var infowindow = new google.maps.InfoWindow({ 1149 content: $(this).attr("data-address-details") 1150 }); 1151 1152 } 1153 1154 1155 $(this) 1156 .gmap3({ 1157 address: $(this).attr("data-address"), 1158 zoom: data_zoom, 1159 mapTypeId: google.maps.MapTypeId.ROADMAP, 1160 scrollwheel: false 1161 }) 1162 .marker([ 1163 {address: $(this).attr("data-address")} 1164 ]) 1165 .on({ 1166 click: function(marker, event){ 1167 if (data_popup) { 1168 infowindow.open(marker.get('map'), marker); 1169 } 1170 } 1171 }); 1172 1173 $(this).css("height", data_height + "px"); 1174 1175 }); 1176 1177 } 1178 1179 1180 // ISOTOPE // 1181 if ((typeof $.fn.imagesLoaded !== 'undefined') && (typeof $.fn.isotope !== 'undefined')) { 1182 1183 $(".isotope").imagesLoaded( function() { 1184 1185 var container = $(".isotope"); 1186 1187 container.isotope({ 1188 itemSelector: '.isotope-item', 1189 layoutMode: 'masonry', 1190 transitionDuration: '0.8s' 1191 }); 1192 1193 $(".filter li a").on("click", function() { 1194 $(".filter li a").removeClass("active"); 1195 $(this).addClass("active"); 1196 1197 var selector = $(this).attr("data-filter"); 1198 container.isotope({ 1199 filter: selector 1200 }); 1201 1202 return false; 1203 }); 1204 1205 $(window).resize(function() { 1206 container.isotope(); 1207 }); 1208 1209 }); 1210 1211 } 1212 1213 1214 // LOAD MORE PORTFOLIO ITEMS // 1215 load_more_projects(); 1216 1217 1218 // PLACEHOLDER // 1219 if (typeof $.fn.placeholder !== 'undefined') { 1220 1221 $("input, textarea").placeholder(); 1222 1223 } 1224 1225 1226 // CONTACT FORM VALIDATE & SUBMIT // 1227 // VALIDATE // 1228 if (typeof $.fn.validate !== 'undefined') { 1229 1230 $("#contact-form").validate({ 1231 rules: { 1232 name: { 1233 required: true 1234 }, 1235 email: { 1236 required: true, 1237 email: true 1238 }, 1239 subject: { 1240 required: true 1241 }, 1242 message: { 1243 required: true, 1244 minlength: 10 1245 } 1246 }, 1247 messages: { 1248 name: { 1249 required: "Please enter your name!" 1250 }, 1251 email: { 1252 required: "Please enter your email!", 1253 email: "Please enter a valid email address" 1254 }, 1255 subject: { 1256 required: "Please enter the subject!" 1257 }, 1258 message: { 1259 required: "Please enter your message!" 1260 } 1261 }, 1262 1263 // SUBMIT // 1264 submitHandler: function(form) { 1265 var result; 1266 $(form).ajaxSubmit({ 1267 type: "POST", 1268 data: $(form).serialize(), 1269 url: "assets/php/send.php", 1270 success: function(msg) { 1271 1272 if (msg == 'OK') { 1273 result = '<div class="alert alert-success">Your message was successfully sent!</div>'; 1274 $("#contact-form").clearForm(); 1275 } else { 1276 result = msg; 1277 } 1278 1279 $("#alert-area").html(result); 1280 1281 }, 1282 error: function() { 1283 1284 result = '<div class="alert alert-danger">There was an error sending the message!</div>'; 1285 $("#alert-area").html(result); 1286 1287 } 1288 });
1289 } 1290 }); 1291 1292 } 1293 1294 1295 // PARALLAX // 1296 if (typeof $.fn.stellar !== 'undefined') { 1297 1298 if (!is_touch_device()) { 1299 1300 $(window).stellar({ 1301 horizontalScrolling: false, 1302 verticalScrolling: true, 1303 responsive: true 1304 }); 1305 1306 } else { 1307 1308 $(".parallax").addClass("parallax-disable"); 1309 1310 } 1311 1312 } 1313 1314 1315 // SHOW/HIDE SCROLL UP 1316 show_hide_scroll_top(); 1317 1318 1319 // SCROLL UP // 1320 scroll_up(); 1321 1322 1323 // PROGRESS BARS // 1324 progress_bars(); 1325 1326 1327 // PIE CHARTS // 1328 pie_chart(); 1329 1330 1331 // COUNTER // 1332 counter(); 1333 1334 1335 // STATISTICS // 1336 statistics(); 1337 1338 1339 // YOUTUBE PLAYER // 1340 if (typeof $.fn.mb_YTPlayer !== 'undefined') { 1341 1342 $(".youtube-player").mb_YTPlayer(); 1343 1344 } 1345 1346 1347 // INSTAGRAM FEED // 1348 instagram_feed(); 1349 1350 1351 // TWITTER // 1352 if(typeof twitterFetcher !== 'undefined' && ($('.widget-twitter').length > 0)) { 1353 1354 $('.widget-twitter').each(function(index){ 1355 1356 var account_id = $('.tweets-list', this).attr('data-account-id'), 1357 items = $('.tweets-list', this).attr('data-items'), 1358 newID = 'tweets-list-' + index; 1359 1360 $('.tweets-list', this).attr('id', newID); 1361 1362 var config = { 1363 "profile": {"screenName": account_id}, 1364 "domId": newID, 1365 "maxTweets": items, 1366 "showRetweet": false, 1367 "showTime": false, 1368 "showUser": false, 1369 "showInteraction": false 1370 }; 1371 1372 twitterFetcher.fetch(config); 1373 }); 1374 1375 } 1376 1377 1378 // COUNTDOWN // 1379 if (typeof $.fn.countdown !== 'undefined') { 1380 1381 $(".countdown").countdown('2020/1/31 00:00', function(event) { 1382 $(this).html(event.strftime( 1383 '<div><div class="count">%-D</div> <span>Days</span></div>' + 1384 '<div><div class="count">%-H</div> <span>Hours</span></div>' + 1385 '<div><div class="count">%-M</div> <span>Minutes</span></div>' + 1386 '<div><div class="count">%S</div> <span>Seconds</span></div>' 1387 )); 1388 }); 1389 1390 } 1391 1392 1393 // ANIMATIONS // 1394 animations(); 1395 1396 1397 // EQUAL HEIGHT // 1398 equal_height(); 1399 1400 1401 // IMAGES BOXES // 1402 images_boxes(); 1403 1404 1405 // CALLOUT // 1406 callout(); 1407 1408 1409 // FULL SCREEN // 1410 full_screen(); 1411 1412 }); 1413 1414 1415 // WINDOW SCROLL // 1416 $(window).scroll(function() { 1417 1418 progress_bars(); 1419 pie_chart(); 1420 counter(); 1421 statistics() 1422 show_hide_scroll_top(); 1423 1424 }); 1425 1426 1427 // WINDOW RESIZE // 1428 $(window).resize(function() { 1429 1430 mobile_menu(); 1431 equal_height(); 1432 callout(); 1433 full_screen(); 1434 1435 if ($("body").hasClass("footer-parallax")) { 1436 footer_parallax(); 1437 } 1438 1439 }); 1440 1441 1442 // WINDOW LOAD // 1443 $(window).load(function() { 1444 1445 page_loader(); 1446 1447 }); 1448 1449})(window.jQuery);
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.