1( function($) { 2 'use strict'; 3 4 5 /* Window Load */ 6 $(window).on('load',function(){ 7 $('.loader').fadeOut(200); 8 }); 9 10 11 /* Parallax */ 12 $('.jarallax').jarallax({ 13 speed: 0.75 14 }); 15 16 17 /* Aos */ 18 AOS.init({ 19 easing: 'ease-in-out-sine', 20 duration: 700, 21 }); 22 23 24 /* Navbar Fixed */ 25 var navbarDesctop = $('.navbar-desctop'); 26 var origOffsetY = navbarDesctop.offset().top; 27 28 $(window).on('scroll',function(){ 29 if ($(window).scrollTop() > origOffsetY) { 30 navbarDesctop.addClass('fixed'); 31 } else { 32 navbarDesctop.removeClass('fixed'); 33 } 34 }); 35 36 37 /* Navbar scroll*/ 38 $('body:not(.fullpage) .navbar ul li a').on('click', function() { 39 var target = $(this.hash); 40 if (target.length) { 41 $('html,body').animate({ 42 scrollTop: (target.offset().top) 43 }, 1000); 44 $('body').removeClass('menu-is-opened').addClass('menu-is-closed'); 45 return false; 46 } 47 }); 48 49 /* Scrollspy*/ 50 $('body:not(.fullpage)').scrollspy({ target: '#scrollspy' }); 51 52 /* Full page scroll*/ 53 if ($('#pagepiling').length > 0){ 54 55 $('#pagepiling').pagepiling({ 56 scrollingSpeed: 280, 57 58 menu: '.navbar-nav', 59 anchors: ['home', 'about', 'video', 'experience', 'specialization', 'projects', 'partners', 'news'], 60 afterRender: function(anchorLink, index){ 61 NavbarColor(); 62 }, 63 afterLoad: function(anchorLink, index){ 64 $('.pp-section .intro').removeClass('animate'); 65 $('.active .intro').addClass('animate'); 66 NavbarColor(); 67 68 } 69 }); 70 71 $( ".pp-scrollable .intro" ).wrapInner( "<div class='scroll-wrap'>"); 72 73 function NavbarColor(){ 74 if ($('.pp-section.active').hasClass('navbar-is-white')){ 75 $('.navbar-desctop').addClass('navbar-white'); 76 $('#pp-nav').addClass('pp-nav-white'); 77 } 78 else{ 79 $('.navbar-desctop').removeClass('navbar-white'); 80 $('#pp-nav').removeClass('pp-nav-white'); 81 } 82 } 83 } 84 85 86 /* Navbar toggler */ 87 $('.toggler').on('click',function(){ 88 $('body').addClass('menu-is-open'); 89 }); 90 91 $('.close, .click-capture').on('click',function(){ 92 $('body').removeClass('menu-is-open'); 93 }); 94 95 96 /* Navbar mobile */ 97 $('.navbar-nav-mobile li a').on('click', function(){ 98 $('body').removeClass('menu-is-open'); 99 $('.navbar-nav-mobile li a').removeClass('active'); 100 $(this).addClass('active'); 101 }); 102 103 /* Pop up*/ 104 $('.popup-with-zoom-anim').magnificPopup({ 105 type: 'inline', 106 fixedBgPos: true, 107 overflowY: 'auto', 108 closeBtnInside: true, 109 preloader: false, 110 midClick: true, 111 fixedContentPos: true, 112 removalDelay: 0, 113 mainClass: 'my-mfp-zoom-in' 114 }); 115 116 /* Pop up Youtube*/ 117 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 118 disableOn: 700, 119 type: 'iframe', 120 mainClass: 'mfp-fade', 121 removalDelay: 160, 122 preloader: false, 123 fixedContentPos: false 124 }); 125 126 127 /* Carousel project */ 128 $('.carousel-project').owlCarousel({ 129 loop:true, 130 margin:10, 131 nav:true, 132 dots:true, 133 items:1 134 }); 135 136 /* Carousel project2 */ 137 $('.carousel-project-2').owlCarousel({ 138 loop:true, 139 margin:0, 140 nav:true, 141 dots:true, 142 responsive:{ 143 0:{ 144 items:1, 145 margin:0, 146 dots:true 147 }, 148 992:{ 149 items:2, 150 margin:0, 151 dots:true 152 } 153 } 154 }); 155 156 /* Carousel testimonials */ 157 $('.carousel-testimonials').owlCarousel({ 158 loop:true, 159 margin:10, 160 dots:true, 161 responsive:{ 162 0:{ 163 items:1 164 }, 165 992:{ 166 items:2, 167 margin:20, 168 dots:true 169 } 170 } 171 }); 172 173 /* Carousel testimonials */ 174 $('.carousel-testimonials-2').owlCarousel({ 175 loop:true, 176 margin:10, 177 dots:true, 178 responsive:{ 179 0:{ 180 items:1 181 } 182 } 183 });
184 185 /* Subscribe Form */ 186 $('.js-subscribe-form').ajaxChimp({ 187 language: 'cm', 188 url: 'http://csmthemes.us3.list-manage.com/subscribe/post?u=9666c25a337f497687875a388&id=5b881a50fb' 189 //http://xxx.xxx.list-manage.com/subscribe/post?u=xxx&id=xxx 190 }); 191 $.ajaxChimp.translations.cm = { 192 'submit': 'Submitting...', 193 0: 'Awesome! We have sent you a confirmation email', 194 1: 'Please enter a value', 195 2: 'An email address must contain a single @', 196 3: 'The domain portion of the email address is invalid (the portion after the @: )', 197 4: 'The username portion of the email address is invalid (the portion before the @: )', 198 5: 'This email address looks fake or invalid. Please enter a real email address' 199 }; 200 201 /* Send form */ 202 if ($('.js-ajax-form').length) { 203 $('.js-ajax-form').each(function(){ 204 $(this).validate({ 205 errorClass: 'error', 206 submitHandler: function(form){ 207 $.ajax({ 208 type: "POST", 209 url:"mail.php", 210 data: $(form).serialize(), 211 success: function() { 212 $('#success-message').show(); 213 }, 214 215 error: function(){ 216 $('#error-message').show(); 217 } 218 }); 219 } 220 }); 221 }); 222 } 223 224})(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.