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 jQuery('.toggle-map-info').on('click', function(e) { 91 e.preventDefault(); 92 jQuery('.business-info-wrapper').toggleClass('minimize'); 93 }); 94 95 96 /* ------------------------------------------------------------------------ 97 VIDEO MODAL 98 ------------------------------------------------------------------------*/ 99 100 function autoPlayYouTubeModal() { 101 var trigger = $("body").find('.video-container [data-toggle="modal"]'); 102 trigger.click(function() { 103 var theModal = $(this).data("target"); 104 videoSRC = $(this).data("src"); 105 videoSRCauto = videoSRC + "?autoplay=1"; 106 $(theModal + ' iframe').attr('src', videoSRCauto); 107 $(theModal + ' button.close').click(function() { 108 $(theModal + ' iframe').attr('src', videoSRC); 109 }); 110 $('.modal').click(function() { 111 $(theModal + ' iframe').attr('src', videoSRC); 112 }); 113 }); 114 } 115 autoPlayYouTubeModal(); 116 117 function autoPlayVideoModal() { 118 var trigger = $("body").find('.video-container [data-toggle="modal"]'); 119 trigger.click(function() { 120 var theModal = $(this).data("target"); 121 if ($(theModal + ' .video-modal-local').length) { 122 $(theModal + ' .video-modal-local')[0].play(); 123 } 124 }); 125 } 126 autoPlayVideoModal(); 127 128 129 $('body').on('hidden.bs.modal', '.modal', function () { 130 $('video').trigger('pause'); 131 }); 132 133 if (jQuery(".modal.video-modal").length > 0) { 134 jQuery(".video-modal").each(function() { 135 jQuery(this).insertAfter("#footer"); 136 }); 137 } 138 139 /* ------------------------------------------------------------------------ 140 FEATURE SECTIONS 141 ------------------------------------------------------------------------*/ 142 if (jQuery(".feature-sections-wrapper").length > 0) { 143 jQuery('body').scrollspy({ 144 offset: 180, 145 target: '.kd-feature-tabs' 146 }); 147 } 148 149 150}); 151 152 153jQuery(window).load(function() { 154 155 /* ------------------------------------------------------------------------ 156 TEXT ROTATOR 157 ------------------------------------------------------------------------*/ 158 159 jQuery(".kd-text-rotator").each(function(index, value) { 160 jQuery(this).appear(function() { 161 jQuery(this).addClass("start-rotator"); 162 }); 163 }); 164 165 /*jQuery(".kd-animated, .portfolio-item, .play-video, .toggle-map").inViewport(function(px) { 166 if (px) jQuery(this).addClass("kd-animate"); 167 });*/ 168 169 /* ------------------------------------------------------------------------ 170 STICKY NAVIGATION ELEMENT 171 ------------------------------------------------------------------------*/ 172 173 174 if (jQuery(".feature-sections-wrapper").length > 0) { 175 jQuery(".feature-sections-wrapper").each(function() { 176 jQuery("li.nav-label", this).appendTo(jQuery(".sticky-tabs", this)); 177 }); 178 179 jQuery('.sticky-tabs li a[href*=#]').bind('click', function(e) { 180 e.preventDefault(); 181 var target = jQuery(this).attr("href"); 182 jQuery('html, body').stop().animate({ 183 scrollTop: jQuery(target).offset().top - 176 184 }, 1000, 'easeOutCubic'); 185 return false;
186 }); 187 188 var feature_container = jQuery(".feature-sections-wrapper"); 189 var feature_nav = jQuery(".feature-sections-tabs"); 190 var offset = feature_container.offset().top; 191 192 jQuery(window).scroll(function(event) { 193 var scroll = jQuery(window).scrollTop(); 194 var total = feature_container.height() + offset - 200; 195 if (scroll > total) { 196 feature_nav.addClass('sticky-hide') 197 } 198 if (scroll < total) { 199 feature_nav.removeClass('sticky-hide') 200 } 201 }); 202 } 203 204 jQuery('.features-tabs').easytabs({ 205 updateHash: false, 206 animationSpeed: 'fast', 207 transitionIn: 'fadeIn' 208 }); 209 210 /* ------------------------------------------------------------------------ 211 MASONRY GALLERY ELEMENT 212 ------------------------------------------------------------------------*/ 213 214 if (jQuery('.mg-gallery').length > 0) { 215 jQuery('.mg-gallery').each(function() { 216 var msnry = new Masonry(this, { 217 itemSelector: '.mg-single-img', 218 columnWidth: '.mg-sizer', 219 percentPosition: true, 220 gutter: 30 221 }); 222 }); 223 var classes = '.vc_tta-tabs-list .vc_tta-tab,' + '.vc_pagination .vc_pagination-item'; 224 jQuery('body').on('click', classes, 225 function() { 226 setInterval(function(){ 227 var reloadMasonry = jQuery('.vc_active .mg-gallery').masonry({ 228 itemSelector: '.mg-single-img', 229 columnWidth: '.mg-sizer', 230 percentPosition: true, 231 gutter: 30 232 }); 233 reloadMasonry.masonry("reloadItems"); 234 reloadMasonry.masonry('layout'); 235 },200); 236 }); 237 } 238 239 /* ------------------------------------------------------------------------ 240 ALERT BOX ELEMENT 241 ------------------------------------------------------------------------*/ 242 243 jQuery('.kd-alertbox .ab-close').on('click', function(e) { 244 e.preventDefault(); 245 jQuery(this).closest('.kd-alertbox').hide(200); 246 }); 247 248 /* ------------------------------------------------------------------------ 249 LOGIN FORM 250------------------------------------------------------------------------*/ 251 jQuery('#user_login').attr('placeholder', 'Username'); 252 jQuery('#user_pass').attr('placeholder', 'Password'); 253 254});
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.