1$ = jQuery.noConflict(); 2 3(function($) { 4 $.fn.onEnter = function(func) { 5 this.bind('keypress', function(e) { 6 if (e.keyCode == 13) func.apply(this, [e]); 7 }); 8 return this; 9 }; 10})(jQuery); 11 12function history_scroll(side){ 13 var base = $('.times').scrollLeft(); 14 var amount = 200; 15 if (side == 'left'){ 16 base -= amount; 17 }else{ 18 base += amount; 19 } 20 $('.times').scrollLeft(base); 21} 22 23$(document).ready(function(){ 24 25 $('.big-arrow.left').click(function(){ 26 history_scroll('left'); 27 }); 28 29 $('.big-arrow.right').click(function(){ 30 history_scroll('right'); 31 }); 32 33 // Check if IE10, IE9< does not support CSS3DTRANSFORMS 34 // if (Modernizr.csstransforms3d){ 35 var IE = (!! window.ActiveXObject && +(/msie\s(\d+)/i.exec(navigator.userAgent)[1])) || NaN; 36 $.reject({ 37 header: 'Your browser is out of date', 38 reject: { 39 all: false, 40 msie: 9 41 }, // Reject all renderers for demo 42 close: false, 43 paragraph1: 'For a better experience please update your browser by clicking on the next link.', 44 paragraph2: '<a class="more reject-btn" href="https://updatemybrowser.org/">Update my browser</a>' 45 }); 46 if (IE < 10) { 47 }else{ 48 $('#main-container-wrapper')[0].className = ''; 49 } 50 51 function clean_form(){ 52 $('#career-form').trigger("reset"); 53 $('#contact-us-form').trigger("reset"); 54 } 55 56 $('.timeline-item').hover(function(){ 57 if (!$(this).hasClass('active')){ 58 $('.timeline-item').removeClass('active'); 59 $(this).addClass('active'); 60 $('.time-item').removeClass('active'); 61 $('.time-item').hide(); 62 $($(this).data('href') + ' .time-item:first-child').addClass('active'); 63 $($(this).data('href') + ' .time-item:first-child').show(); 64 check_swipe_controls(); 65 } 66 }); 67 68 $('.overlay-link').click(function(){ 69 $('#item-title').attr('value',$(this).data('company')); 70 }) 71 72 $('.overlay-close').click(function(){ 73 clean_form(); 74 }); 75 76 function validate_filesize(input,max_size){ 77 if (!window.FileReader) { 78 cl("The file API isn't supported on this browser yet."); 79 } 80 if (!input[0]) { 81 cl("Um, couldn't find the fileinput element."); 82 }else if (!input[0].files) { 83 cl("This browser doesn't seem to support the 'files' property of file inputs."); 84 }else if (!input[0].files[0]) { 85 cl("Please select a file before clicking 'Load'"); 86 }else { 87 file = input[0].files[0]; 88 if (file.size / 1024 <= max_size){ 89 input.parent().children('.error').remove(); 90 return true; 91 }else{ 92 input.parent().append('<p class="error">File size is greater than allowed 2 MB.</p>') 93 return false; 94 } 95 } 96 // Validation not suppoerted by the browser 97 } 98 99 // Filesize validation for CV 100 $('#cv').change(function(){ 101 var file = $(this); 102 var max_size = 2048; 103 if (!validate_filesize(file,max_size)) 104 $('#cv').val(''); 105 }); 106 107 // Better way 108 $.validator.addMethod("maxsize", function(value, element) { 109 return validate_filesize(element,value); 110 }, "The max filesize is 2MB"); 111 112 $("#career-form").validate({ 113 errorPlacement: function(error, element) { 114 if (element.attr("name") == "terms-conditions" ) 115 error.insertAfter("#label-for-terms-conditions"); 116 else 117 error.insertAfter(element); 118 } 119 }); 120 $("#contact-us-form").validate({ 121 errorPlacement: function(error, element) { 122 if (element.attr("name") == "terms-conditions" ) 123 error.insertAfter("#label-for-terms-conditions"); 124 else 125 error.insertAfter(element); 126 } 127 }); 128 129 if (document.settings != undefined){ 130 sweetAlert("Thank you", "We have received your request, we will contact you soon.", "success"); 131 } 132 133 $('#desktop-search-input,#search-input-mobile').keypress(function(e) { 134 var key = e.which || e.keyCode || 0; 135 if(key == 13 || key == '13') { 136 var val = $.trim($(this).val()); 137 if (val.length > 2){ 138 window.location = drupalSettings.path.baseUrl+drupalSettings.path.pathPrefix+'search/results?keys='+val;; 139 } 140 } 141 }); 142 143 // Remove special characters 144 $('textarea,input[name="name"],input[name="company"],input[name="subject"]').blur(function(){ 145 $(this).val($(this).val().replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, '')); 146 }); 147 148 // Close submenu links en small-medium when clicking outside 149 $(document).click(function(event) { 150 $('.submenu-links-medium').each(function(){ 151 if ($(this).css("opacity") == 1) { 152 $(this).removeClass('show'); 153 } 154 }); 155 }); 156 157 $('.mobile-categories').each(function(){ 158 var left = $(this).children('a.active')[0].offsetLeft - 30; 159 $(this).scrollLeft(left); 160 }); 161 162 // First timeline adjustment
163 check_timeline_size(); 164 on_resize(); 165}); 166 167$(window).load(function() { 168 on_resize(); 169 check_section_overflow(); 170 171 // Scroll to element 172 if (window.location.hash.substring(1) != ''){ 173 var hash = window.location.hash.substring(1); 174 var hash = hash.split('-'); 175 if (hash.length > 1){ 176 var offset = $('#header').outerHeight(); 177 if ($('#'+hash[1]).length > 0){ 178 var newPos = $('#'+hash[1])[0].offsetTop; 179 $(document).scrollTop(newPos); 180 } 181 } 182 } 183});
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.