1 2$( document ).ready(function () { 3 $('html').removeClass('no-js'); 4 // Accordion Fix Start 5 var accordions = $('div.auto-close'); 6 var counter = 1; 7 var currentId = ""; 8 accordions.each(function() { 9 currentId = "accordion" + counter; 10 $(this).attr('id', currentId); 11 $(this).find('[data-parent="#accordion"]').each(function() { 12 $(this).attr('data-parent', "#" + currentId); 13 }); 14 counter++; 15 }); 16 //Accordion Fix End 17 var topnavHeight = $('#topnav').outerHeight(); 18 var headerHeight = 0; 19 var combinedHeight = 0; 20 21 $('#header').imagesLoaded( function() { 22 headerHeight = $('#header').outerHeight(); 23 combinedHeight = (topnavHeight + headerHeight); 24 }); 25 26 $(window).scroll(function () { 27 if ($(this).scrollTop() > 100) { 28 $('.scrollup').fadeIn(); 29 } else { 30 $('.scrollup').fadeOut(); 31 } 32 if ($(this).scrollTop() > combinedHeight + 40) { 33 $('#nav-container').addClass('scrolled'); 34 } else { 35 $('#nav-container').removeClass('scrolled'); 36 } 37 }); 38 39 $('.scrollup').click(function () { 40 $("html, body").animate({ 41 scrollTop: 0 42 }, 600); 43 return false; 44 }); 45 46 $('ol.breadcrumb li:first-of-type > a').removeAttr('href').click(function(event) { 47 event.preventDefault(); 48 event.stopPropagation(); 49 }); 50 51 // Content Sliders 52 var $slider = $('.content-slider'); 53 $slider.each(function() { 54 $(this).slick({ 55 arrows: true, 56 dots: true, 57 infinite: true, 58 centerMode: false, 59 slidesToShow: 1, 60 slidesToScroll: 1, 61 centerPadding: "0px", 62 adaptiveHeight: true, 63 autoplay: false, 64 speed: 1000, 65 customPagingADALabel: function(slider, i) { 66 return 'Slide ' + i; 67 }, 68 nextArrow: $(this).parent().find('.custom-next'), 69 prevArrow: $(this).parent().find('.custom-prev'), 70 responsive: [{ 71 breakpoint: 992, 72 settings: { 73 arrows: false, 74 centerPadding: "0px" 75 } 76 },{ 77 breakpoint: 480, 78 settings: { 79 centerPadding: "0px" 80 } 81 }] 82 }); 83 }); 84 // universal block slider tab control 85 $('#block-slider .slide-item a').focusin(function() { 86 $('.background-img').removeClass('active'); 87 $('.slide-item').removeClass('active'); 88 var backgroundID = $(this).closest('.slide-item').data("background"); 89 $('#' + backgroundID).addClass('active'); 90 $('.slide-item').addClass('fade-out'); 91 $(this).closest('.slide-item').addClass('active'); 92 }).focusout(function() { 93 var backgroundID = $(this).closest('.slide-item').data("background"); 94 $('#' + backgroundID).removeClass('active'); 95 $('.slide-item').removeClass('fade-out'); 96 $(this).closest('.slide-item').removeClass('active'); 97 }); 98 if ($(window).width() > 1200) { 99 // specific block slider hover control if greater than 1200 else click control 100 $('#block-slider .slide-item').hover( 101 function() { 102 $('.background-img').removeClass('active'); 103 $('.slide-item').removeClass('active'); 104 var backgroundID = $(this).data("background"); 105 $('#' + backgroundID).addClass('active'); 106 $('.slide-item').addClass('fade-out'); 107 $(this).addClass('active'); 108 }, 109 function() { 110 var backgroundID = $(this).data("background"); 111 $('#' + backgroundID).removeClass('active'); 112 $('.slide-item').removeClass('fade-out'); 113 $(this).removeClass('active'); 114 } 115 ); 116 } else if ($(window).width() <= 1200) { 117 $('#block-slider .slide-item').click(function() { 118 $('.background-img').removeClass('active'); 119 var backgroundID = $(this).data("background"); 120 $('#' + backgroundID).addClass('active'); 121 $('.slide-item').addClass('fade-out'); 122 $('.slide-item').removeClass('active'); 123 $(this).addClass('active'); 124 }); 125 } 126}); 127 128var fixDivHeightByClassInRow = function(rowClass, area) { 129 var rows = area.find(rowClass); 130 rows.each(function() { 131 var flexDivs = $(this).prevUntil('.flex-row', '.flex-object'); 132 var contentHeight = 0; 133 flexDivs.each(function() { 134 contentHeight = contentHeight > $(this).find('.flex-content-height').outerHeight(true) ? contentHeight : $(this).find('.flex-content-height').outerHeight(true); 135 }); 136 137 flexDivs.each(function() { 138 $(this).find('.flex-content-height').height(contentHeight); 139 }); 140 }); 141 142 rows.each(function() { 143 var flexDivs = $(this).prevUntil('.flex-row', '.flex-object'); 144 var maxHeight = 0; 145 flexDivs.each(function() { 146 maxHeight = maxHeight > $(this).find('.flex-height').outerHeight(true) ? maxHeight : $(this).find('.flex-height').outerHeight(true); 147 }); 148 149 flexDivs.each(function() { 150 $(this).find('.flex-height').height(maxHeight); 151 }); 152 }); 153}; 154 155var resetHeightByClassInArea = function(classID, area) { 156 var divs = area.find(classID); 157 divs.each(function() { 158 $(this).height('initial'); 159 }); 160}; 161 162$(window).on('resize', function() { 163 if ($(window).width() < 768) { 164 $('#content').find('.flex-content-height').height('auto'); 165 $('#content').find('.flex-height').height('auto'); 166 } 167 else { 168 resetHeightByClassInArea('.flex-content-height', $('#content')); 169 resetHeightByClassInArea('.flex-height', $('#content')); 170 fixDivHeightByClassInRow('.flex-row', $('#content')); 171 } 172}); 173 174$(window).on('load', function () { 175 $(window).resize(); 176 var hash = window.location.hash; 177 if(hash) {
178 $(hash).find("a.accordion-toggle").click(); 179 var scrollLocation = ($(hash).offset().top -170); 180 $("html, body").animate({ 181 scrollTop: scrollLocation 182 }, 300); 183 } 184 });
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.