1 document.onreadystatechange = function(){ 2 3 if(document.readyState === 'complete'){ 4 5 (function ($) { 6 7 function customSelect() { 8 9 $('.select-1').selectize({ 10 create: false, 11 sortField: 'text', 12 onChange: function(value) { 13 14 if($('.randomizeData').length){ 15 $('.randomizeData').trigger('click'); 16 } 17 } 18 }); 19 20 $('.select-2').selectize({ 21 plugins: ['remove_button', 'restore_on_backspace'], 22 persist: false, 23 createOnBlur: true, 24 create: true 25 }); 26 27 $('.select-3').selectize({ 28 plugins: ['remove_button', 'restore_on_backspace'], 29 maxItems: null 30 }); 31 32 $('.select-4').selectize({ 33 sortField: 'text' 34 }); 35 36 $('.select-5').selectize({ 37 delimiter: ',', 38 persist: false, 39 plugins: ['remove_button', 'restore_on_backspace'], 40 create: function(input) { 41 return { 42 value: input, 43 text: input 44 } 45 } 46 }); 47 48 49 50 } 51 52 function xmenuHeader(){ 53 54 $('header.header-container div.coh-container .coh-container.menu-container nav ul.menu-level-1-ul li').each(function(){ 55 var text = $(this).find('a.first-level-link').text(); 56 var menuUlWidth = $(this).find('.coh-container .coh-row-inner .coh-container ul').outerWidth(); 57 var menu = $(this).find('.coh-container .coh-row-inner .coh-container.drop-d > ul > li:first-of-type'); 58 menu.prepend('<h2 class="menu-top-title">'+text+' Overview</h2>'); 59 }) 60 61 } 62 63 function dropdownSystem() { 64 65 $('.proto-menu > ul > li').each(function(){ 66 var closeItem = "<span class='closemega'>close</span>" 67 var linkFirst = $(this).find('> a'); 68 69 var closeContainer = $(this).find('> ul > li > a'); 70 71 if ((linkFirst.attr('href') == '#') || (linkFirst.attr('href') == '') ){ 72 73 linkFirst.closest('li').addClass('mega'); 74 linkFirst[0].style.pointerEvents = 'none'; 75 closeContainer.append(closeItem); 76 77 } else { 78 79 linkFirst.closest('li').addClass('drop'); 80 } 81 }); 82 $('.proto-menu > ul > li.mega').on('click', function(e){ 83 //e.preventDefault(); 84 $('.proto-menu > ul > li.mega').removeClass('active'); 85 $(this).addClass('active'); 86 $('html').css('overflow', 'hidden'); 87 }) 88 $(document).on('click', '.closemega', function(){ 89 $(this).closest('.mega').removeClass('active') 90 $('html').css('overflow', 'visible'); 91 }); 92 93 } 94 95 function dropdownSystem2() { 96 97 $('.proto-menu > ul > li').each(function(){ 98 99 var linkFirst = $(this).find('> :first-child'); 100 101 if ( linkFirst.is('span') || linkFirst.data('mega-link') ){ 102 103 //alert('content'); 104 linkFirst.closest('li').addClass('mega'); 105 106 } else if ( linkFirst.is('a') && $(this).children("ul").length ) { 107 108 $(this).addClass('drop'); 109 110 }; 111 112 }); 113 114 $('.proto-menu > ul > li a, .proto-menu > ul > li span').each(function(){ 115 116 117 if ($(this).hasClass('m-width-1')) { 118 119 $(this).parent('li').addClass('m-width-1'); 120 121 } else if ($(this).hasClass('m-width-2')) { 122 123 $(this).parent('li').addClass('m-width-2'); 124 125 } else if ($(this).hasClass('m-width-3')) { 126 127 $(this).parent('li').addClass('m-width-3'); 128 129 } else if ($(this).hasClass('m-width-4')) { 130 131 $(this).parent('li').addClass('m-width-4'); 132 133 } else if ($(this).hasClass('m-width-5')) { 134 135 $(this).parent('li').addClass('m-width-5'); 136 137 }; 138 139 140 }); 141 142 const protoMenuItems = $('.proto-menu > ul > li'); 143 const header = $('.new-header'); 144 const headerContainer = $('.new-header .container'); 145 const htmlElement = $('html'); 146 const bodyElement = $('body'); 147 const windowElement = $(window); 148 149 const adjustHeight = $elements => { 150 let maxHeight = 0; 151 152 $elements.each(function() { 153 const height = $(this).outerHeight(); 154 if (height > maxHeight) { 155 maxHeight = height; 156 } 157 }); 158 159 $elements.each(function() { 160 if ($(this).outerHeight() !== maxHeight) { 161 $(this).css('height', `${maxHeight}px`); 162 } 163 }); 164 }; 165 166 const resetHeight = $elements => { 167 $elements.css('height', ''); 168 }; 169
170 const handleHoverIn = function() { 171 if ( 172 windowElement.innerWidth() + 173 document.documentElement.clientWidth > 174 1280 175 ) { 176 const $window = $(window); 177 const windowWidth = $window.width(); 178 // Apply only for desktop. 179 if (windowWidth > 1280) { 180 const scrollBarSize = 181 window.innerWidth - document.documentElement.clientWidth; 182 const menuHeight = header.height(); 183 184 if ($(this).hasClass('mega')) { 185 $(this) 186 .find('> ul') 187 .css('max-height', windowElement.height() - menuHeight); 188 } 189 protoMenuItems.removeClass('active'); 190 $(this).addClass('active'); 191 192 if ($(this).hasClass('mega')) { 193 protoMenuItems.each(function() { 194 const $this = $(this); 195 const elements = $this.find( 196 '> ul > li > ul > li > .coh-link', 197 ); 198 adjustHeight(elements); 199 }); 200 } 201 202 htmlElement.css('overflow', 'hidden'); 203 bodyElement.css('padding-right', scrollBarSize); 204 headerContainer.css('padding-right', scrollBarSize); 205 } 206 } 207 }; 208 209 const handleHoverOut = function() { 210 const $window = $(window); 211 const windowWidth = $window.width(); 212 // Apply only for desktop. 213 if (windowWidth > 1280) { 214 $(this).removeClass('active'); 215 216 if ($(this).hasClass('mega')) { 217 $(this) 218 .find('> ul') 219 .css('max-height', ''); 220 221 protoMenuItems.each(function() { 222 const $this = $(this); 223 const elements = $this.find( 224 '> ul > li > ul > li > .coh-link', 225 ); 226 resetHeight(elements); 227 }); 228 } 229 230 htmlElement.css('overflow', ''); 231 bodyElement.css('padding-right', ''); 232 headerContainer.css('padding-right', ''); 233 } 234 }; 235 236 const handleResize = () => { 237 protoMenuItems.each(function() { 238 const $this = $(this); 239 if ($this.hasClass('mega')) { 240 const elements = $this.find( 241 '> ul > li > ul > li > .coh-link', 242 ); 243 resetHeight(elements); 244 adjustHeight(elements); 245 } 246 }); 247 }; 248 249 protoMenuItems.hover(handleHoverIn, handleHoverOut); 250 windowElement.resize(handleResize); 251 252 $('.mobile-button').on('click', function(){ 253 254 if($('.search-box').hasClass('search-visible')){ 255 256 $('.search-button-opener').removeClass('search-button-hide'); 257 $('.search-button-closer').removeClass('search-button-show'); 258 $('.search-box').removeClass('search-visible'); 259 260 261 } 262 263 if($(this).hasClass('active')) { 264 265 $(this).removeClass('active'); 266 $('.menu-container').removeClass('active'); 267 $('html').css('overflow', ''); 268 269 } else { 270 271 $(this).addClass('active'); 272 $('.menu-container').addClass('active'); 273 $('html').css('overflow', 'hidden'); 274 }; 275 276 277 278 279 280 }) 281 282 } 283 284 function searchBar() { 285 286 /*search*/ 287 $('.search-box .search-button-opener').on('click', function(){ 288 289 $('.search-box').addClass('search-visible'); 290 $('.search-box .search-button-opener').hide(); 291 $('.search-box .search-button-closer').show(); 292 $('.menu-container').removeClass('active'); 293 $('.mobile-button').removeClass('active'); 294 $('.mega').removeClass('active'); 295 }); 296 $('.search-box .search-button-closer').on('click', function(){ 297 298 $('.search-box').removeClass('search-visible'); 299 $('.search-box .search-button-closer').hide() 300 $('.search-box .search-button-opener').show(); 301 }) 302 303 } 304 305 function clickEvents() { 306 307 $('.path-insights .flip').on('click', function(){ 308 309 310 if($('.content-filters').hasClass('active')) { 311 312 313 $('.path-insights .insights-listing-1').removeClass('active'); 314 $('.content-filters').removeClass('active'); 315 $('.path-insights .flip').text('Hide Filters'); 316 317 318 } else { 319 320 $('.path-insights .insights-listing-1').addClass('active'); 321 $('.content-filters').addClass('active'); 322 $('.path-insights .flip').text('Show Filters'); 323 324 }; 325 326 327 }) 328 329 330 } 331
332 function pardotForm() { 333 334 335 336 337 338 339 } 340 341 $(function () { 342 343 customSelect(); 344 clickEvents(); 345 dropdownSystem2(); 346 searchBar(); 347 pardotForm(); 348 349 iFrameResize({log:false, autoResize: true, scrolling: true, heightCalculationMethod: AUTO}, ".pardot-frame"); 350 $('select').selectize(); 351 352 353 354 /*var seamlessScriptParent = $('<script type="text/javascript" src="none"> </script>') 355 var seamlessScriptChild = $('<script type="text/javascript" src="none"></script>') 356 document.getElementsByTagName("head")[0].appendChild(seamlessScriptParent[0]); 357 document.getElementsByTagName("head")[0].appendChild(seamlessScriptChild[0]);*/ 358 359 360 361 }); 362 363 $('.footnote a:not([class])').attr('target', '_blank'); 364 365 })(jQuery); 366 367 } 368 369}; 370
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.