1jQuery(document).ready(function($) { 2 3 (function($, win) { 4 $.fn.inViewport = function(cb) { 5 return this.each(function(i, el) { 6 function visPx() { 7 var H = $(this).height(), 8 r = el.getBoundingClientRect(), 9 t = r.top, 10 b = r.bottom; 11 return cb.call(el, Math.max(0, t > 0 ? H - t : (b < H ? b : H))); 12 } 13 visPx(); 14 $(win).on("resize scroll", visPx); 15 }); 16 }; 17 }(jQuery, window)); 18 19 20 21 /* ------------------------------------------------------------------------ 22 COUNTDOWN 23 ------------------------------------------------------------------------*/ 24 $('.kd-countdown').each(function(index, value) { 25 var text_days = $(this).attr("data-text-days"); 26 var text_hours = $(this).attr("data-text-hours"); 27 var text_minutes = $(this).attr("data-text-minutes"); 28 var text_seconds = $(this).attr("data-text-seconds"); 29 30 var count_year = $(this).attr("data-count-year"); 31 var count_month = $(this).attr("data-count-month"); 32 var count_day = $(this).attr("data-count-day"); 33 var count_date = count_year + '/' + count_month + '/' + count_day; 34 $(this).countdown(count_date, function(event) { 35 $(this).html( 36 event.strftime('<span class="CountdownContent">%D<span class="CountdownLabel">' + text_days + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%H <span class="CountdownLabel">' + text_hours + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%M <span class="CountdownLabel">' + text_minutes + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%S <span class="CountdownLabel">' + text_seconds + '</span></span>') 37 ); 38 }); 39 }); 40 41 42 /* ------------------------------------------------------------------------ 43 PIE CHART 44 ------------------------------------------------------------------------*/ 45 46 jQuery(".kd_pie_chart .kd_chart").each(function(index, value) { 47 jQuery(this).appear(function() { 48 jQuery(this).easyPieChart({ 49 easing: "easeInQuad", 50 barColor: "#000", 51 trackColor: "rgba(210, 210, 210, 0.2)", 52 animate: 2000, 53 size: "160", 54 lineCap: 'square', 55 lineWidth: "2", 56 scaleColor: false, 57 onStep: function(from, to, percent) { 58 jQuery(this.el).find(".pc_percent").text(Math.round(percent)); 59 } 60 }); 61 }); 62 var chart = window.chart = jQuery("kd_pie_chart .kd_chart").data("easyPieChart"); 63 }); 64 65 /* ------------------------------------------------------------------------ 66 COUNTERS 67 ------------------------------------------------------------------------*/ 68 69 jQuery(".kd_number_string").each(function(index, value) { 70 jQuery(this).appear(function() { 71 jQuery(this).countTo(); 72 }); 73 }); 74 75 76 77 78 79 /* ------------------------------------------------------------------------ 80 REFRESH GOOGLE MAP WITH THE ACTIVE TAB 81 ------------------------------------------------------------------------*/ 82 if (jQuery(".contact-map-container").length) { 83 jQuery('.vc_tta-tabs a').on('show.vc.tab', function() { 84 setTimeout(function() { 85 google.maps.event.trigger(window, 'resize', {}); 86 }, 500) 87 }); 88 } 89 90 91 /* ------------------------------------------------------------------------ 92 VIDEO MODAL 93 ------------------------------------------------------------------------*/ 94 95 function autoPlayYouTubeModal() { 96 var trigger = $("body").find('.video-container [data-toggle="modal"]'); 97 trigger.click(function() { 98 var theModal = $(this).data("target"); 99 videoSRC = $(this).data("src"); 100 videoSRCauto = videoSRC + "?autoplay=1"; 101 $(theModal + ' iframe').attr('src', videoSRCauto); 102 $(theModal + ' button.close').click(function() { 103 $(theModal + ' iframe').attr('src', videoSRC); 104 }); 105 $('.modal').click(function() { 106 $(theModal + ' iframe').attr('src', videoSRC); 107 }); 108 }); 109 } 110 autoPlayYouTubeModal(); 111 112 function autoPlayVideoModal() { 113 var trigger = $("body").find('.video-container [data-toggle="modal"]'); 114 trigger.click(function() { 115 var theModal = $(this).data("target"); 116 if ($(theModal + ' .video-modal-local').length) { 117 $(theModal + ' .video-modal-local')[0].play(); 118 } 119 }); 120 } 121 autoPlayVideoModal(); 122 123 124 $('body').on('hidden.bs.modal', '.modal', function () { 125 $('video').trigger('pause'); 126 }); 127 128 if (jQuery(".modal.video-modal").length > 0) { 129 jQuery(".video-modal").each(function() { 130 jQuery(this).insertAfter("#footer"); 131 }); 132 } 133 134 /* ------------------------------------------------------------------------ 135 FEATURE SECTIONS 136 ------------------------------------------------------------------------*/ 137 if (jQuery(".feature-sections-wrapper").length > 0) { 138 jQuery('body').scrollspy({ 139 offset: 140, 140 target: '.kd-feature-tabs' 141 }); 142 } 143 144 145}); 146 147 148jQuery(window).load(function() { 149 150 /* ------------------------------------------------------------------------ 151 TEXT ROTATOR 152 ------------------------------------------------------------------------*/ 153 154 jQuery(".kd-text-rotator").each(function(index, value) { 155 jQuery(this).appear(function() { 156 jQuery(this).addClass("start-rotator"); 157 }); 158 }); 159 160 jQuery(".kd-animated, .portfolio-item, .play-video, .toggle-map").inViewport(function(px) { 161 if (px) jQuery(this).addClass("kd-animate"); 162 }); 163 164 165 if (jQuery(".feature-sections-wrapper").length > 0) { 166 jQuery(".feature-sections-wrapper").each(function() { 167 jQuery("li.nav-label", this).appendTo(jQuery(".sticky-tabs", this)); 168 }); 169 170 jQuery('.sticky-tabs li a[href*=#]').bind('click', function(e) { 171 e.preventDefault(); 172 var target = jQuery(this).attr("href"); 173 jQuery('html, body').stop().animate({ 174 scrollTop: jQuery(target).offset().top - 136 175 }, 1000, 'easeOutCubic'); 176 return false;
177 }); 178 179 var feature_container = jQuery(".feature-sections-wrapper"); 180 var feature_nav = jQuery(".feature-sections-tabs"); 181 var offset = feature_container.offset().top; 182 183 jQuery(window).scroll(function(event) { 184 var scroll = jQuery(window).scrollTop(); 185 var total = feature_container.height() + offset - 200; 186 if (scroll > total) { 187 feature_nav.addClass('sticky-hide') 188 } 189 if (scroll < total) { 190 feature_nav.removeClass('sticky-hide') 191 } 192 }); 193 } 194 195 if (jQuery(".features-tabs").length) { 196 jQuery('.features-tabs').easytabs({ 197 updateHash: false, 198 animationSpeed: 'fast', 199 transitionIn: 'fadeIn' 200 }); 201 } 202 203 /* ------------------------------------------------------------------------ 204 MASONRY GALLERY ELEMENT 205 ------------------------------------------------------------------------*/ 206 207 if (jQuery('.mg-gallery').length > 0) { 208 jQuery('.mg-gallery').each(function() { 209 var msnry = new Masonry(this, { 210 itemSelector: '.mg-single-img', 211 columnWidth: '.mg-sizer', 212 percentPosition: true, 213 gutter: 15 214 }); 215 }); 216 var classes = '.vc_tta-tabs-list .vc_tta-tab,' + '.vc_pagination .vc_pagination-item'; 217 jQuery('body').on('click', classes, 218 function() { 219 setInterval(function(){ 220 var reloadMasonry = jQuery('.vc_active .mg-gallery').masonry({ 221 itemSelector: '.mg-single-img', 222 columnWidth: '.mg-sizer', 223 percentPosition: true, 224 gutter: 15 225 }); 226 reloadMasonry.masonry("reloadItems"); 227 reloadMasonry.masonry('layout'); 228 },200); 229 }); 230 } 231 232 /* ------------------------------------------------------------------------ 233 ALERT BOX ELEMENT 234 ------------------------------------------------------------------------*/ 235 236 jQuery('.kd-alertbox .ab-close').on('click', function(e) { 237 e.preventDefault(); 238 jQuery(this).closest('.kd-alertbox').hide(200); 239 }); 240 241 /* ------------------------------------------------------------------------ 242 LOGIN FORM 243------------------------------------------------------------------------*/ 244 jQuery('#user_login').attr('placeholder', 'Username'); 245 jQuery('#user_pass').attr('placeholder', 'Password'); 246 247});
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.