1 // 2 // ========================================================= 3 // * Material Kit - v2.0.6 4 // ========================================================= 5 // 6 // * Product Page: https://www.creative-tim.com/product/material-kit 7 // * Copyright 2019 Creative Tim (http://www.creative-tim.com) 8 // Licensed under MIT (https://github.com/creativetimofficial/material-kit/blob/master/LICENSE.md) 9 // 10 // 11 // ========================================================= 12 // 13 // * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 15 var big_image; 16 17 $(document).ready(function () { 18 BrowserDetect.init(); 19 20 // Init Material scripts for buttons ripples, inputs animations etc, more info on the next link https://github.com/FezVrasta/bootstrap-material-design#materialjs 21 $('body').bootstrapMaterialDesign(); 22 23 window_width = $(window).width(); 24 25 $navbar = $('.navbar[color-on-scroll]'); 26 scroll_distance = $navbar.attr('color-on-scroll') || 500; 27 28 $navbar_collapse = $('.navbar').find('.navbar-collapse'); 29 30 // Activate the Tooltips 31 $('[data-toggle="tooltip"], [rel="tooltip"]').tooltip(); 32 33 // Activate Popovers 34 $('[data-toggle="popover"]').popover(); 35 36 if ($('.navbar-color-on-scroll').length != 0) { 37 $(window).on('scroll', materialKit.checkScrollForTransparentNavbar); 38 } 39 40 materialKit.checkScrollForTransparentNavbar(); 41 42 if (window_width >= 768) { 43 big_image = $('.page-header[data-parallax="true"]'); 44 if (big_image.length != 0) { 45 $(window).on('scroll', materialKit.checkScrollForParallax); 46 } 47 48 } 49 50 51 }); 52 53 $(document).on('click', '.navbar-toggler', function () { 54 $toggle = $(this); 55 56 if (materialKit.misc.navbar_menu_visible == 1) { 57 $('html').removeClass('nav-open'); 58 materialKit.misc.navbar_menu_visible = 0; 59 $('#bodyClick').remove(); 60 setTimeout(function () { 61 $toggle.removeClass('toggled'); 62 }, 550); 63 64 $('html').removeClass('nav-open-absolute'); 65 } else { 66 setTimeout(function () { 67 $toggle.addClass('toggled'); 68 }, 580); 69 70 71 div = '<div id="bodyClick"></div>'; 72 $(div).appendTo("body").click(function () { 73 $('html').removeClass('nav-open'); 74 75 if ($('nav').hasClass('navbar-absolute')) { 76 $('html').removeClass('nav-open-absolute'); 77 } 78 materialKit.misc.navbar_menu_visible = 0; 79 $('#bodyClick').remove(); 80 setTimeout(function () { 81 $toggle.removeClass('toggled'); 82 }, 550); 83 }); 84 85 if ($('nav').hasClass('navbar-absolute')) { 86 $('html').addClass('nav-open-absolute'); 87 } 88 89 $('html').addClass('nav-open'); 90 materialKit.misc.navbar_menu_visible = 1; 91 } 92 }); 93 94 materialKit = { 95 misc: { 96 navbar_menu_visible: 0, 97 window_width: 0, 98 transparent: true, 99 fixedTop: false, 100 navbar_initialized: false, 101 isWindow: document.documentMode || /Edge/.test(navigator.userAgent) 102 }, 103 104 initFormExtendedDatetimepickers: function () { 105 $('.datetimepicker').datetimepicker({ 106 icons: { 107 time: "fa fa-clock-o", 108 date: "fa fa-calendar", 109 up: "fa fa-chevron-up", 110 down: "fa fa-chevron-down", 111 previous: 'fa fa-chevron-left', 112 next: 'fa fa-chevron-right', 113 today: 'fa fa-screenshot', 114 clear: 'fa fa-trash', 115 close: 'fa fa-remove' 116 } 117 }); 118 119 $('.datepicker').datetimepicker({ 120 format: 'L', 121 icons: { 122 time: "fa fa-clock-o", 123 date: "fa fa-calendar", 124 up: "fa fa-chevron-up", 125 down: "fa fa-chevron-down", 126 previous: 'fa fa-chevron-left', 127 next: 'fa fa-chevron-right', 128 today: 'fa fa-screenshot', 129 clear: 'fa fa-trash', 130 close: 'fa fa-remove' 131 } 132 }); 133 }, 134 135 initSliders: function () { 136 // Sliders for demo purpose 137 var slider = document.getElementById('sliderRegular'); 138 139 noUiSlider.create(slider, { 140 start: 40, 141 connect: [true, false], 142 range: { 143 min: 0, 144 max: 100 145 } 146 }); 147 148 var slider2 = document.getElementById('sliderDouble'); 149 150 noUiSlider.create(slider2, { 151 start: [20, 60], 152 connect: true, 153 range: { 154 min: 0, 155 max: 100 156 } 157 }); 158 }, 159 160 checkScrollForParallax: function () { 161 oVal = ($(window).scrollTop() / 3); 162 big_image.css({ 163 'transform': 'translate3d(0,' + oVal + 'px,0)', 164 '-webkit-transform': 'translate3d(0,' + oVal + 'px,0)', 165 '-ms-transform': 'translate3d(0,' + oVal + 'px,0)', 166 '-o-transform': 'translate3d(0,' + oVal + 'px,0)' 167 }); 168 }, 169 170 checkScrollForTransparentNavbar: debounce(function () { 171 if ($(document).scrollTop() > scroll_distance) { 172 if (materialKit.misc.transparent) { 173 materialKit.misc.transparent = false; 174 $('.navbar-color-on-scroll').removeClass('navbar-transparent'); 175 } 176 } else { 177 if (!materialKit.misc.transparent) { 178 materialKit.misc.transparent = true; 179 $('.navbar-color-on-scroll').addClass('navbar-transparent'); 180 } 181 } 182 }, 17) 183 }; 184 185 // Returns a function, that, as long as it continues to be invoked, will not 186 // be triggered. The function will be called after it stops being called for 187 // N milliseconds. If `immediate` is passed, trigger the function on the 188 // leading edge, instead of the trailing. 189 190 function debounce(func, wait, immediate) { 191 var timeout; 192 return function () { 193 var context = this, 194 args = arguments; 195 clearTimeout(timeout); 196 timeout = setTimeout(function () { 197 timeout = null;
198 if (!immediate) func.apply(context, args); 199 }, wait); 200 if (immediate && !timeout) func.apply(context, args); 201 }; 202 }; 203 204 var BrowserDetect = { 205 init: function () { 206 this.browser = this.searchString(this.dataBrowser) || "Other"; 207 this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown"; 208 }, 209 searchString: function (data) { 210 for (var i = 0; i < data.length; i++) { 211 var dataString = data[i].string; 212 this.versionSearchString = data[i].subString; 213 214 if (dataString.indexOf(data[i].subString) !== -1) { 215 return data[i].identity; 216 } 217 } 218 }, 219 searchVersion: function (dataString) { 220 var index = dataString.indexOf(this.versionSearchString); 221 if (index === -1) { 222 return; 223 } 224 225 var rv = dataString.indexOf("rv:"); 226 if (this.versionSearchString === "Trident" && rv !== -1) { 227 return parseFloat(dataString.substring(rv + 3)); 228 } else { 229 return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); 230 } 231 }, 232 233 dataBrowser: [{ 234 string: navigator.userAgent, 235 subString: "Chrome", 236 identity: "Chrome" 237 }, 238 { 239 string: navigator.userAgent, 240 subString: "MSIE", 241 identity: "Explorer" 242 }, 243 { 244 string: navigator.userAgent, 245 subString: "Trident", 246 identity: "Explorer" 247 }, 248 { 249 string: navigator.userAgent, 250 subString: "Firefox", 251 identity: "Firefox" 252 }, 253 { 254 string: navigator.userAgent, 255 subString: "Safari", 256 identity: "Safari" 257 }, 258 { 259 string: navigator.userAgent, 260 subString: "Opera", 261 identity: "Opera" 262 } 263 ] 264 265 }; 266 267 var better_browser = '<div class="container"><div class="better-browser row"><div class="col-md-2"></div><div class="col-md-8"><h3>We are sorry but it looks like your Browser doesn\'t support our website Features. In order to get the full experience please download a new version of your favourite browser.</h3></div><div class="col-md-2"></div><br><div class="col-md-4"><a href="https://www.mozilla.org/ro/firefox/new/" class="btn btn-warning">Mozilla</a><br></div><div class="col-md-4"><a href="https://www.google.com/chrome/browser/desktop/index.html" class="btn ">Chrome</a><br></div><div class="col-md-4"><a href="http://windows.microsoft.com/en-us/internet-explorer/ie-11-worldwide-languages" class="btn">Internet Explorer</a><br></div><br><br><h4>Thank you!</h4></div></div>';
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.