1/*! Main.js */ 2 3/******* Main Navigation - START******/ 4window.addEventListener("load", (event) => { 5 6 if ($(window).width() > 992) { 7 8 var mainLi = $('li.dropdown.dropdown-images'); 9 var megaDropdownWrapper = $('.mega-dropdown-container'); 10 var megaBackground = $('.mega-dropdown'); 11 var tagline = $('.mega-dropdown .tagline'); 12 13 14 var imgData = { 15 "pro5" : [{ 16 "logo": "pro5.png", 17 "backgroundImage": "pro5_sim.png", 18 "tagline": "ADVANCED EQUIPMENT SIMULATOR â OPTIMIZED FOR SURFACE MINING", 19 "heading": "PRO5" 20 }], 21 "pro4" : [{ 22 "logo": "pro4-B.png", 23 "backgroundImage": "pro4.jpg", 24 "tagline": "ADVANCED EQUIPMENT SIMULATOR â OPTIMIZED FOR SURFACE MINING", 25 "heading": "PRO4-B" 26 }], 27 28 "im360plus" :[{ 29 "logo": "IM360_plus_logo.svg", 30 "backgroundImage": "im360+.jpg", 31 "tagline": "ADVANCED EQUIPMENT SIMULATOR - OPTIMIZED FOR UNDERGROUND TRAINING", 32 "heading": "IM360+" 33 }], 34 35 "im360" :[{ 36 "logo": "im360-logo.svg", 37 "backgroundImage": "im360.jpg", 38 "tagline": "ADVANCED EQUIPMENT SIMULATOR - OPTIMIZED FOR UNDERGROUND TRAINING", 39 "heading": "IM360" 40 }], 41 42 "lxplusSeries" :[{ 43 "logo": "LX6+_logo.svg", 44 "backgroundImage": "LX6+.png", 45 "tagline": "MEDIUM FIDELITY SIMULATOR", 46 "heading": "LX+_Series" 47 }], 48 49 "lxSeries" :[{ 50 "logo": "LX6_logo.svg", 51 "backgroundImage": "lx6.jpg", 52 "tagline": "MEDIUM FIDELITY SIMULATOR", 53 "heading": "LX-Series" 54 }], 55 56 "lx6" :[{ 57 "logo": "lx6-logo.jpg", 58 "backgroundImage": "lx6.jpg", 59 "tagline": "MEDIUM FIDELITY SIMULATOR", 60 "heading": "LX6" 61 }], 62 63 "lx3" :[{ 64 "logo": "lx3-logo.jpg", 65 "backgroundImage": "lx3.jpg", 66 "tagline": "MEDIUM FIDELITY SIMULATOR", 67 "heading": "LX3" 68 }], 69 70 "surfaceMachines" :[{ 71 "logo": "", 72 "backgroundImage": "surfaceMachines.jpg", 73 "tagline": "INTERCHANGEABLE EQUIPMENT MODULES", 74 "heading": "Surface Machines" 75 }], 76 77 "undegroundMachines" :[{ 78 "logo": "", 79 "backgroundImage": "undergroundMachines.jpg", 80 "tagline": "INTERCHANGEABLE EQUIPMENT MODULES", 81 "heading": "Underground Machines" 82 }], 83 84 "virtualMachine" :[{ 85 "logo": "", 86 "backgroundImage": "virtualMachine.jpg", 87 "tagline": "TARGETED DIGITAL TRAINING", 88 "heading": "Virtual Machine" 89 }], 90 91 "prestartInspection" :[{ 92 "logo": "", 93 "backgroundImage": "prestart.jpg", 94 "tagline": "TRAINING AND ASSESSMENT TOOL", 95 "heading": "Pre-Start Inspection" 96 }], 97 98 "eLearning" :[{ 99 "logo": "", 100 "backgroundImage": "eLearning.png", 101 "tagline": "COMPUTER BASED TRAINING", 102 "heading": "eLearning" 103 }], 104 105 "cms" :[{ 106 "logo": "", 107 "backgroundImage": "custom_mine_sites.png", 108 "tagline": "VIRTUAL MINING TRAINING ENVIRONMENT", 109 "heading": "Custom Mine Sites" 110 }], 111 112 "worksiteVR" :[{ 113 "logo": "", 114 "backgroundImage": "vr.jpg", 115 "tagline": "VIRTUAL REALITY TRAINING", 116 "heading": "WorksiteVR Quest" 117 }], 118 119 "mst" :[{ 120 "logo": "", 121 "backgroundImage": "MST.jpg", 122 "tagline": "REVOLUTIONIZING SUPERVISOR TRAINING", 123 "heading": "Mine Standards Training" 124 }], 125 126 "complementaryProducts" :[{ 127 "logo": "", 128 "backgroundImage": "complimentaryServices.jpg", 129 "tagline": "MORE TOOLS & TECHNOLOGIES", 130 "heading": "Complementary Products" 131 }], 132 133 "collisionAvoidance" :[{ 134 "logo": "", 135 "backgroundImage": "collisionAvoidance.jpg", 136 "tagline": "MAXIMIZE OPERATOR SAFETY", 137 "heading": "Collision Avoidance Systems" 138 }], 139 140 "remoteEquipment" :[{ 141 "logo": "", 142 "backgroundImage": "command_for_underground.png", 143 "tagline": "EFFECTIVE TRAINING SOLUTION", 144 "heading": "Remote Operation Technologies" 145 }], 146 147 /* second column */ 148 149 "ourprocess" :[{ 150 "logo": "", 151 "backgroundImage": "ourProcess.jpg",
152 "tagline": "PEOPLE + PROCESS + TECHNOLOGY", 153 "heading": "Our Process" 154 }], 155 156 "traineradvantage" :[{ 157 "logo": "", 158 "backgroundImage": "trainerAdvantage.jpg", 159 "tagline": "SIMULATOR TRAINER CERTIFICATION PROGRAM", 160 "heading": "TrainerAdvantageâ¢" 161 }], 162 163 "managedServices" :[{ 164 "logo": "", 165 "backgroundImage": "managedServices.jpg", 166 "tagline": "ON-SITE TRAINING SOLUTIONS", 167 "heading": "Managed Services" 168 }], 169 170 "cip" :[{ 171 "logo": "", 172 "backgroundImage": "cip.jpg", 173 "tagline": "TARGETED TRAINING PROGRAM", 174 "heading": "Continuous Improvement Projects" 175 }], 176 177 "tsi" :[{ 178 "logo": "", 179 "backgroundImage": "tsi.jpg", 180 "tagline": "TECHNOLOGY INTEGRATION & OPERATOR TRAINING FRAMEWORK", 181 "heading": "Training System Operators - BL" 182 183 }], 184 185 "opa" :[{ 186 "logo": "", 187 "backgroundImage": "opa.jpg", 188 "tagline": "UNLOCK THE POTENTIAL OF YOUR PEOPLE", 189 "heading": "Operator Performance Analytics" 190 }], 191 192 "trainingcourses" :[{ 193 "logo": "", 194 "backgroundImage": "trainingcourses.jpg", 195 "tagline": "EMPOWERING MINING PROFESSIONALS", 196 "heading": "Training Courses" 197 }], 198 }; 199 200 201 // new mega dropdown script 202 $('li.dropdown.dropdown-images li a').on('mouseenter', function () { 203 204 //specific html elements 205 var wrapper = $(this).parent().parent().parent(); 206 var megacontainer = wrapper.children('.mega-dropdown'); 207 var megataglinecontainer = megacontainer.children('.tagline'); 208 var taglineHeading = megataglinecontainer.children('h4'); 209 var taglineSubheading = megataglinecontainer.children('h6'); 210 var taglineLogo = megataglinecontainer.children('.productLogo'); 211 212 //json elements 213 var currentEl = $(this).attr('data-image'); 214 var currentObject = imgData[currentEl][0]; 215 216 //setting current oobject 217 megacontainer.css("background-image", 'url(/assets/img/navigation/' + currentObject.backgroundImage + ')' ); 218 taglineHeading.text(currentObject.heading); 219 taglineSubheading.text(currentObject.tagline); 220 221 222 if ( currentObject.logo === undefined || currentObject.logo === "" ) { 223 taglineLogo.hide(); 224 taglineHeading.show(); 225 226 } else { 227 taglineLogo.attr('src', '/assets/img/navigation/' + currentObject.logo); 228 taglineLogo.show(); 229 taglineHeading.hide(); 230 } 231 }); 232 } else { 233 // on mobile menu we are preventing default behaviour 234 235 $('li.dropdown > a').on('click', function (e) { 236 237 // if the menu already open go to the link 238 if (!$(this).parent().hasClass('showChild')) { 239 e.preventDefault(); 240 $(this).parent().toggleClass("showChild") 241 } 242 243 }); 244 245 } 246 247 248/******* Main Navigation - END******/ 249 250 /*information request url reader */ 251 $("#input_444").val(getParameterByName('sendMe')); 252 253 function getParameterByName(name) { 254 name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); 255 var regexS = "[\\?&]" + name + "=([^&#]*)"; 256 var regex = new RegExp(regexS); 257 var results = regex.exec(window.location.search); 258 //console.log(results); 259 if (results == null) 260 return ""; 261 262 else { 263 return decodeURIComponent(results[1].replace(/\+/g, " ")); 264 } 265 } 266 267 // jquery tabs 268 $("#tabs").tabs(); 269 $("#tabsMachines").tabs(); 270 var headerNav = $("#mainHeader").height(); 271 var afterNav = $('#afterNav'); 272 $(window).scroll(function () { 273 274 if ($(document).scrollTop() > headerNav) { 275 // afterNav.removeClass('hidden'); 276 afterNav.addClass('show'); 277 } else { 278 // afterNav.addClass('hidden'); 279 afterNav.removeClass('show'); 280 } 281 });
282 283 284 //read more show less toggle 285 286 $(".readmore").on("click", function () { 287 288 $(this).siblings(".learnMore").toggleClass("collapse"); 289 $(this).text(function (i, text) { 290 return text === "Learn More" ? "Show Less" : "Learn More"; 291 }); 292 }); 293 294 //reading modal from url 295 296 var getUrlParameter = function getUrlParameter(sParam) { 297 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 298 sURLVariables = sPageURL.split('&'), 299 sParameterName, 300 i; 301 302 for (i = 0; i < sURLVariables.length; i++) { 303 sParameterName = sURLVariables[i].split('='); 304 305 if (sParameterName[0] === sParam) { 306 return sParameterName[1] === undefined ? true : sParameterName[1]; 307 } 308 } 309 }; 310 function runModal() { 311 //console.log('running modal url read'); 312 var modalId = getUrlParameter('modalId'); 313 // console.log(modalId); 314 315 if (modalId) { 316 $('#' + modalId).modal('show'); 317 } 318 } 319 runModal(); 320 321 322function updateLabel(label, resizeElement, position) { 323 if (position == 'left') { 324 (label.offset().left + label.outerWidth() < resizeElement.offset().left + resizeElement.outerWidth()) ? label.removeClass('is-hidden') : label.addClass('is-hidden'); 325 } else { 326 (label.offset().left > resizeElement.offset().left + resizeElement.outerWidth()) ? label.removeClass('is-hidden') : label.addClass('is-hidden'); 327 } 328} 329 330 331/* adding active class to the a element based on the url */ 332$(function () { 333 var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1); 334 $("#careers-nav li a").each(function () { 335 if ($(this).attr("href") == pgurl || $(this).attr("href") == '') { 336 $(this).parent().addClass("active"); 337 } 338 }); 339}); 340 341/* add 'active' class to nav pills if exist */ 342 343$(function () { 344 var path = location.pathname; 345 var current = path.split("/").pop(); 346 //console.log(current); 347 $('.nav-pills li a').each(function () { 348 var $this = $(this); 349 // if the current path is like this link, make it active 350 if ($this.attr('href').indexOf(current) !== -1) { 351 $this.parent().addClass('active'); 352 } 353 }); 354}); 355 356 357$(function () { 358 $("body").on('hidden.bs.modal', function (e) { 359 var $iframes = $(e.target).find("iframe"); 360 $iframes.each(function (index, iframe) { 361 $(iframe).attr("src", $(iframe).attr("src")); 362 }); 363 }); 364}); 365 366//******************************* Lazy Load - Enbedded Youtube Videos **********************************// 367 368 ( function() { 369 var youtube = document.querySelectorAll( ".youtube" ); 370 371 for (var i = 0; i < youtube.length; i++) { 372 //const source = "https://img.youtube.com/vi/"+ youtube[i].dataset.embed +"/sddefault.jpg"; 373 const source = "https://img.youtube.com/vi/"+ youtube[i].dataset.embed +"/hqdefault.jpg"; 374 const image = new Image(); 375 376 image.src = source; 377 image.class = "img-fluid"; 378 image.alt = "Immersive Technologies videos"; 379 image.addEventListener( "load", function() { 380 youtube[ i ].appendChild( image ); 381 }( i ) ); 382 383 youtube[i].addEventListener( "click", function() { 384 const iframe = document.createElement( "iframe" ); 385 iframe.setAttribute( "frameborder", "0" ); 386 iframe.setAttribute( "allowfullscreen", "" ); 387 iframe.setAttribute( "allow", "autoplay; encrypted-media" ); 388 iframe.setAttribute( "src", "https://www.youtube-nocookie.com/embed/"+ this.dataset.embed +"?autoplay=1&rel=0&showinfo=0&enablejsapi=1" ); 389 iframe.setAttribute( "title", "Immersive Technologies videos"); 390 391 this.innerHTML = ""; 392 this.appendChild( iframe ); 393 } ); 394 } 395 } )(); 396 397 398/******* Map - JS *****/ 399 $("[data-toggle=popover]").popover({ 400 html : true, 401 trigger: 'focus', 402 content: function() { 403 var content = $(this).attr("data-popover-content"); 404 return $(content).children(".popover-body").html(); 405 } 406 });
407 $("[data-toggle=popover]").popover({ 408 html : true, 409 trigger: 'hover', 410 content: function() { 411 var content = $(this).attr("data-popover-content"); 412 return $(content).children(".popover-body").html(); 413 } 414 }); 415 416 $('#siq_searchBox').on('input', function() { 417 if ($(this).val().trim() !== '') { 418 $(this).addClass('has-value').removeClass('empty'); 419 } else { 420 $(this).removeClass('has-value').addClass('empty'); 421 } 422 }); 423 424 425});
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.