1'use strict'; 2 3/* 0. Initialization */ 4// Get height on Window resized 5$(window).on('resize',function(){ 6 var slideHeight = $('.slick-track').innerHeight(); 7 return false; 8}); 9 10 11// Show / hide menu 12var menuItems = $('.header-top'); 13var pagenavItems = $('.page-nav'); 14$('.menu-icon').on('click', function () { 15 if (menuItems.hasClass('menu-visible')) { 16 menuItems.removeClass('menu-visible'); 17 } else { 18 menuItems.addClass('menu-visible'); 19 } 20 if (pagenavItems.hasClass('menu-visible')) { 21 pagenavItems.removeClass('menu-visible'); 22 } else { 23 pagenavItems.addClass('menu-visible'); 24 } 25}); 26// Smooth scroll <a> links 27var $root = $('html, body'); 28$('a.s-scroll').on('click',function() { 29 var href = $.attr(this, 'href'); 30 $root.animate({ 31 scrollTop: $(href).offset().top 32 }, 500, function () { 33 window.location.hash = href; 34 }); 35 return false; 36}); 37 38 39// Scroll t onext/previou section 40$('.p-footer a.down').on('click', function () { 41 $.fn.fullpage.moveSectionDown(); 42}); 43$('.p-footer a.up').on('click', function () { 44 $.fn.fullpage.moveSectionUp(); 45}); 46 47/* 1. Clock attribute */ 48 49var dateReadableText = 'Upcoming date'; 50if($('.site-config').attr('data-date-readable') && ($('.site-config').attr('data-date-readable') != '')){ 51 $('.timeout-day').text(''); 52 dateReadableText = $('.site-config').attr('data-date-readable'); 53 $('.timeout-day').text(dateReadableText); 54} 55try{ 56 // check if clock is initialised 57 $('.clock-countdown').downCount({ 58 date: $('.site-config').attr('data-date'), 59 offset: +10 60 }, function () { 61 //callback here if finished 62 //alert('YES, done!'); 63 var zerodayText = 'An upcoming date'; 64 if($('.site-config').attr('data-zeroday-text') && ($('.site-config').attr('data-zeroday-text') != '')){ 65 $('.timeout-day').text(''); 66 zerodayText = $('.site-config').attr('data-zeroday-text'); 67 } 68 $('.timeout-day').text(zerodayText); 69 }); 70} 71catch(error){ 72 // clockdisabled 73 console.log("clock disabled"); 74} 75 76 77 78/* 2. Background for page / section */ 79 80var background = '#ccc'; 81var backgroundMask = 'rgba(255,255,255,0.92)'; 82var backgroundVideoUrl = 'none'; 83 84/* Background image as data attribut */ 85var list = $('.bg-img'); 86 87for (var i = 0; i < list.length; i++) { 88 var src = list[i].getAttribute('data-image-src'); 89 list[i].style.backgroundImage = "url('" + src + "')"; 90 list[i].style.backgroundRepeat = "no-repeat"; 91 list[i].style.backgroundPosition = "center"; 92 list[i].style.backgroundSize = "cover"; 93} 94 95/* Background color as data attribut */ 96var list = $('.bg-color'); 97for (var i = 0; i < list.length; i++) { 98 var src = list[i].getAttribute('data-bgcolor'); 99 list[i].style.backgroundColor = src; 100} 101 102 103 104 105/* Slide Background variables */ 106var isSlide = false; 107var slideElem = $('.slide'); 108var arrowElem = $('.p-footer .arrow-d'); 109var pageElem = $('.section'); 110 111/* 3. Init all plugin on load */ 112$(document).ready(function() { 113 /* Init console to avoid error */ 114 var method; 115 var noop = function () {}; 116 var methods = [ 117 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 118 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 119 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 120 'timeStamp', 'trace', 'warn' 121 ]; 122 var length = methods.length; 123 var console = (window.console = window.console || {}); 124 125 while (length--) { 126 method = methods[length]; 127 128 // Only stub undefined methods. 129 if (!console[method]) { 130 console[method] = noop; 131 } 132 } 133 134 /* Init Slidesow background */ 135 /* Background slide show Background variables */ 136 var imageList = $('.slide-show .img'); 137 var imageSlides = []; 138 for (var i = 0; i < imageList.length; i++) { 139 var src = imageList[i].getAttribute('data-src'); 140 imageSlides.push({src: src}); 141 } 142 $('.slide-show').vegas({ 143 delay: 5000, 144 shuffle: true, 145 slides: imageSlides, 146 //transition: [ 'zoomOut', 'burn' ], 147 animation: [ 'kenburnsUp', 'kenburnsDown', 'kenburnsLeft', 'kenburnsRight' ] 148 }); 149 // Gallery slideshow 150 var owl = $('.owl-carousel'); 151 owl.owlCarousel({ 152 autoplay: true, 153 autoplayTimeout: 5000, 154 items: 1, 155 loop: true, 156 nav: true, 157 navClass: ['owl-prev','owl-next'], 158 margin: 0, 159 lazyLoad: true, 160 merge: true 161 }); 162 $('.swipe-nav .prev').on('click',function(){ 163 owl.trigger('prev.owl.carousel'); 164 }); 165 166 $('.swipe-nav .next').on('click',function(){ 167 owl.trigger('next.owl.carousel'); 168 }); 169 170 /* Init video background */ 171 $('.video-container video, .video-container object').maximage('maxcover'); 172 173 /* Init youtube video background */ 174 if(backgroundVideoUrl != 'none'){ 175 176 //disable video background for smallscreen 177 if($(window).width() > 640){ 178 $.okvideo({ source: backgroundVideoUrl, 179 adproof: true 180 }); 181 } 182 } 183 var pageSectionDivs = $('.fullpg .section'); 184 var pageSections = []; 185 var pageAnchors = []; 186 for (var i = 0; i < pageSectionDivs.length; i++) { 187 pageSections.push(pageSectionDivs[i]); 188 } 189 window.asyncEach(pageSections, function(pageSection , cb){ 190 var anchor = pageSection.getAttribute('data-section'); 191 pageAnchors.push(anchor + ""); 192 cb(); 193 }, function(err){ 194 195 /** Init fullpage.js */ 196 $('#mainpage').fullpage({ 197 menu: '.qmenu', 198 // anchors: ['home', 'register', 'about-us', 'contact', 'message'], 199 anchors: pageAnchors, 200 verticalCentered: true, 201 responsiveWidth: 481, 202 scrollOverflow: false, 203 css3: false, 204 navigation: true, 205 onLeave: function(index, nextIndex, direction){ 206 arrowElem.addClass('gone'); 207 pageElem.addClass('transition'); 208 // $('.active').removeClass('transition'); 209 slideElem.removeClass('transition');
210 isSlide = false; 211 }, 212 afterLoad: function(anchorLink, index){ 213 arrowElem.removeClass('gone'); 214 pageElem.removeClass('transition'); 215 if(isSlide){ 216 slideElem.removeClass('transition'); 217 } 218 }, 219 220 afterRender: function(){} 221 }); 222 $('#fp-nav').css("margin-top",0); 223 }); 224 225 226}); 227 228 229// Page Loader : hide loader when all are loaded 230$(window).load(function(){ 231 $('#page-loader').addClass('hidden'); 232 $('.section').addClass('anim'); 233}); 234 235// Email validation text, uncomment below to use them 236/* 237// Email registration 238var email_reg_elem = document.getElementById("reg-email"); 239email_reg_elem.oninvalid = function(e) { 240 e.target.setCustomValidity(""); 241 if (!e.target.validity.valid) { 242 e.target.setCustomValidity("This email field cannot be left blank"); 243 } 244}; 245email_reg_elem.oninput = function(e) { 246 e.target.setCustomValidity(""); 247}; 248// email message 249var email_message_elem = document.getElementById("mes-email"); 250email_message_elem.oninvalid = function(e) { 251 e.target.setCustomValidity(""); 252 if (!e.target.validity.valid) { 253 e.target.setCustomValidity("This email field cannot be left blank"); 254 } 255}; 256// name message 257email_message_elem.oninput = function(e) { 258 e.target.setCustomValidity(""); 259}; 260var name_message_elem = document.getElementById("mes-name"); 261name_message_elem.oninvalid = function(e) { 262 e.target.setCustomValidity(""); 263 if (!e.target.validity.valid) { 264 e.target.setCustomValidity("This name field cannot be left blank"); 265 } 266}; 267// text message 268name_message_elem.oninput = function(e) { 269 e.target.setCustomValidity(""); 270}; 271var text_message_elem = document.getElementById("mes-text"); 272text_message_elem.oninvalid = function(e) { 273 e.target.setCustomValidity(""); 274 if (!e.target.validity.valid) { 275 e.target.setCustomValidity("This text field cannot be left blank"); 276 } 277}; 278text_message_elem.oninput = function(e) { 279 e.target.setCustomValidity(""); 280}; 281*/
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.