PageSourceSearch

https://uscotton.com/sites/default/files/js/js_ssFbGphE9tSlEt8uEAc…kktpru1ohpoShH6d_ElSbtcu1hWgH-PzD1_ECk2SIFg

js uscotton.com collected 2026-10-08 03:11:57 UTC 41,759 bytes, 8 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2if(typeof USCOTTON=='undefined')USCOTTON={};USCOTTON.site=function(){return {init:function(){console.log('JS Working');USCOTTON.site.initEvents();$(window).resize(function(){USCOTTON.site.resizeFunctions();setTimeout(function(){USCOTTON.site.resizeFunctions();},500);});$(window).on('load',function(){USCOTTON.site.resizeFunctions();$('.main-header .menu-base-theme li.menu-item--active-trail.menu-item--expanded a.has-submenu').addClass('highlighted');});},initEvents:function(){$('.animsition').animsition();var hasTouch='ontouchstart' in window;if(hasTouch==true)$('html').addClass('touch');$('.touch .openings-list .animated.no-openings-text').addClass('go');$('.touch .openings-list .animated.no-openings-text').css('opacity','1 !important');$('.touch .openings-list .animated.no-openings-text').css('transform','translateY(0) !important');USCOTTON.site.homepageCarousel();USCOTTON.site.greyCarousel();USCOTTON.site.historyCarousel();USCOTTON.site.centerButtonCarousel();USCOTTON.site.mobileHomeTabCarousel();USCOTTON.site.resizeFunctions();USCOTTON.site.cardCarousel();USCOTTON.site.newsFunctions();USCOTTON.site.locationsFunctions();USCOTTON.site.explodeCottonRound();USCOTTON.site.homepageTabs();if($('.current-openings-container').length>0)USCOTTON.site.careerListings();if($('.blocktabs').length>0){$('.blocktabs .ui-tabs-panel').first().addClass('animated').addClass('fadeInUpShort').addClass('slow');$('.blocktabs .ui-tabs-nav').addClass('animated').addClass('fadeInUpShort');$('.blocktabs .ui-tabs-panel').find('.media-image').addClass('animated').addClass('fadeIn').addClass('slower').addClass('go');$('.blocktabs .ui-tabs-panel').find('.col-md-5').addClass('animated').addClass('fadeInUpShort').addClass('slow').addClass('go');$('.blocktabs').tabs("option","event","click");var hide=$(".blocktabs").tabs("option","hide");$('.blocktabs').tabs("option","hide",{effect:"fadeOut",duration:800});var show=$(".blocktabs").tabs("option","show");$('.blocktabs').tabs("option","show",{effect:"fadeIn",duration:800});$('.blocktabs .ui-tabs-nav li a').click(function(){$('.blocktabs .ui-tabs-panel').first().removeClass('animated').removeClass('fadeInUpShort').removeClass('go');});}if($('.bundle-footer_cta_block').length>0){var backgroundimage=$('.bundle-footer_cta_block .background-image img').attr('src');$('.bundle-footer_cta_block').css('background-image','url('+backgroundimage+')');}if($('.branded-product-tiers').length>0){$('.branded-product-tiers .views-row').each(function(){var thisURL=$(this).find('.views-field-field-image a').attr('href');var newcode="window.location='"+thisURL+"';";if(thisURL===undefined)$(this).wrapInner('<div class="product-wrapper" />');else $(this).wrapInner('<div class="product-wrapper" onclick="'+newcode+'" />');});$('.branded-product-tiers .views-field-field-image').each(function(){$(this).find('a').append('<span>More Product Information <img src="/themes/custom/uscotton/images/icon-button-arrow.png" srcset="/themes/custom/uscotton/images/[email protected] 2x" alt="more info"></span>');});}$('.path-frontpage #wrapper h1, .path-node h1, h2, p, .block-views .pattern-carousel .views-field-body-1 ul').widowFix();$('.block-views-blockhomepage-banner-carousel-block-1 .views-row .banner-text .banner-text-inner h1').widowFix();$('.path-frontpage #wrapper .block-system-main-block .field--name-body .fadeInUpShort').removeClass('go');$('.block-blocktabs .ui-tabs-nav li a.ui-tabs-anchor').wrapInner('<span>');$('.block-views-blockhomepage-banner-carousel-block-1').find('div:first').addClass('banner-block-inner');$('.block-views-blockhomepage-banner-carousel-block-1').append('<div class="down-button"></div>');$('#page-highlight .down-button').click(function(){$('body, html').animate({scrollTop:$('.content_layout').offset().top});});$('body').enllax();$('.card-carousel').css('opacity','');$('#block-ourvisionblock').addClass('animated').addClass('fadeInUpShort');$('.bundle-two_column_content_bucket .float_right').addClass('animated').addClass('fadeInUpShort');$('.bundle-two_column_content_bucket .float_left').addClass('animated').addClass('fadeInUpShort');$('.bundle-two_column_patterned_content_buc.float_left img').addClass('animated').addClass('fadeInUpShort').addClass('slow');$('.bundle-two_column_patterned_content_buc.float_left .body-copy').addClass('animated').addClass('fadeInUpShort').addClass('slower');$('.bundle-two_column_patterned_content_buc.float_left .dot-graphic.bottom').addClass('animated').addClass('slideInLeft');$('.bundle-two_column_patterned_content_buc.float_left .dot-graphic.top').addClass('animated').addClass('slideInRight');$('.bundle-two_column_patterned_content_buc.float_right img').addClass('animated').addClass('fadeInUpShort').addClass('slow');$('.bundle-two_column_patterned_content_buc.float_right .body-copy').addClass('animated').addClass('fadeInUpShort').addClass('slower');$('.bundle-two_column_patterned_content_buc.float_right .dot-graphic.bottom').addClass('animated').addClass('slideInRight');$('.bundle-two_column_patterned_content_buc.float_right .dot-graphic.top').addClass('animated').addClass('slideInLeft');$('.bundle-footer_cta_block').addClass('animated').addClass('fadeInUpShort');if($('.block-webform').length>0){$('.block-webform form').attr('novalidate','novalidate');$('.form-item').addClass('animated').addClass('fadeInUpShort');$('.form-item.form-item-job-location, .form-item.form-item-document-resume-upload').addClass('go');$('.form-actions').addClass('animated').addClass('fadeInRight').addClass('fast');$('.block-webform').append('<div class="dot-graphic animated fadeInRight slowest">');}var maxHeight=-1;$('.branded-product-tiers .views-row').each(function(){$(this).find('.views-field-title, .views-field-field-banner-text-3').wrapAll('<div class="product-text-container"/>');maxHeight=maxHeight>$(this).find('.product-text-container').height()?maxHeight:$(this).find('.product-text-container').height();});$('.branded-product-tiers .views-row').each(function(){$(this).find('.product-text-container').height(maxHeight+20);});if(hasTouch==true)USCOTTON.site.slideInAnimationsTouchScreen();else USCOTTON.site.slideInAnimations();},homepageCarousel:function(){$('.block-views-blockhomepage-banner-carousel-block-1 .views-row').each(function(){$(this).find('.field-wrap').wrapAll('<div class="banner-text" />');$(this).find('.field-wrap').wrapAll('<div class="container" />');$(this).find('.field-wrap').wrapAll('<div class="col-lg-9 col-md-10 col-sm-12 centered banner-text-inner" />');var imagePath=$(this).find('.views-field-field-image-media img').attr('src');$(this).find('.views-field-field-image-media').css('background-image','url('+imagePath+')');});$(".homepage-main-banner-carousel").owlCarousel({singleItem:true,autoPlay:8000,pagination:false,navigation:true,slideSpeed:800,transitionStyle:'fade',addClassActive:true,afterInit:function(){$('.block-views-blockhomepage-banner-carousel-block-1 .views-row .banner-text').css('opacity','0');$('.homepage-main-banner-carousel .owl-buttons .owl-prev, .homepage-main-banner-carousel .owl-buttons .owl-next').addClass('animated').addClass('fadeInUpShort').addClass('slow');setTimeout(function(){$('.homepage-main-banner-carousel .owl-buttons .owl-prev, .homepage-main-banner-carousel .owl-buttons .owl-next').addClass('go');$('.block-views-blockhomepage-banner-carousel-block-1 .owl-item:first-child .views-row .banner-text').animate({'opacity':'1.0'},600);},1500);},afterMove:function(){$('.block-views-blockhomepage-banner-carousel-block-1 .owl-item:not(.active) .views-row .banner-text').css('opacity','0');setTimeout(function(){$('.block-views-blockhomepage-banner-carousel-block-1 .owl-item.active .views-row .banner-text').animate({'opacity':'1.0'},600);},1200);}});var timeClear;$(".homepage-why-carousel").owlCarousel({singleItem:true,autoPlay:10000,pagination:true,slideSpeed:1000,transitionStyle:'fade',addClassActive:true,afterInit:function(){$('.homepage-why-carousel .owl-item:not(.active) .animated').addClass('go');},beforeMove:function(){},afterMove:function(){$('.homepage-why-carousel .owl-item.active .views-field-body .field-content.animated.go').removeClass('go');setTimeout(function(){$('.homepage-why-carousel .owl-item.active .views-field-body .field-content.animated').not('.go').addClass('go');},1500);}});if($(window).width()<768)if($('.homepage-why-carousel').length>0){var owl=$(".homepage-why-carousel").data('owlCarousel');owl.reinit({singleItem:true,autoPlay:5000,pagination:true,slideSpeed:800,transitionStyle:'fade',autoHeight:true,addClassActive:true,afterInit:function(){$('.homepage-why-carousel .owl-item:not(.active) .animated').addClass('go');},afterMove:function(){}});}},homepageTabs:function(){var FADE=400;$('.homepage-tabs-block').each(function(){var $navs=$(this).find('.homepage-tabs-nav-item button');var $panels=$(this).find('.homepage-tabs-panel');function animatePanel(panel){$(panel).find('.animated').each(function(){this.classList.remove('go');void this.offsetWidth;this.classList.add('go');});}function showPanel($next){$next.prop('hidden',false).attr('aria-hidden','false').addClass('is-active').css('opacity',0);animatePanel($next[0]);$next.stop(true).fadeTo(FADE,1,function(){$next.css('opacity','');});}$navs.each(function(index){$(this).on('click',function(){var $current=$panels.filter('.is-active');var $next=$panels.eq(index);if($current.is($next))return;$navs.removeClass('is-active').attr('aria-selected','false');$navs.eq(index).addClass('is-active').attr('aria-selected','true');
2if($current.length)$current.stop(true).fadeTo(FADE,0,function(){$current.removeClass('is-active').prop('hidden',true).attr('aria-hidden','true').css('opacity','');showPanel($next);});else showPanel($next);});});var $initial=$panels.filter('.is-active');if($initial.length)animatePanel($initial[0]);else{if($panels.length)animatePanel($panels[0]);}});},greyCarousel:function(){$(".grey-carousel-view .views-row").wrapAll('<div class="grey-carousel-container">');$(".grey-carousel-view .grey-carousel-container").owlCarousel({singleItem:true,pagination:false,slideSpeed:800,navigation:true,transitionStyle:"fade",addClassActive:true,afterInit:function(){$('.grey-carousel-view .owl-item.active .animated-carousel').not('.go').addClass('go');},afterMove:function(){$('.grey-carousel-view .owl-item:not(.active) .animated-carousel.go').removeClass('go');$('.grey-carousel-view .owl-item.active .animated-carousel').not('.go').addClass('go');}});},cardCarousel:function(){$('.card-carousel:not(.card-carousel-5)').owlCarousel({items:3,itemsDesktop:[1200,3],itemsDesktopSmall:[900,2],itemsTablet:[600,1],itemsMobile:false,loop:true,pagination:false,navigation:true,slideSpeed:800,addClassActive:true,afterInit:function(){setTimeout(function(){var carouselHeight=$('.card-carousel .owl-wrapper').height();$('.card-carousel .owl-item .views-row').css('min-height',carouselHeight+'px');},500);}});$('.card-carousel.card-carousel-5').owlCarousel({items:6,itemsDesktop:[1200,5],itemsDesktopSmall:[900,4],itemsTablet:[600,3],itemsMobile:[400,1],loop:true,pagination:false,navigation:true,slideSpeed:800,addClassActive:true,afterInit:function(){setTimeout(function(){var carouselHeight=$('.card-carousel .owl-wrapper').height();$('.card-carousel.card-carousel-5 .owl-item .views-row').css('min-height','0px');},500);}});$('.card-carousel .views-field-view-node a').each(function(){$(this).attr('rel','card-gallery');var currenthref=$(this).attr('href');$(this).attr('href',currenthref+' #wrapper');});$('.card-carousel .views-field-view-node a').attr('rel','card-gallery');$('.card-carousel .views-field-view-node a').fancybox({type:'ajax',padding:0,parent:'#wrapper',width:'100%',height:'100%',afterLoad:function(){$('body, html').animate({scrollTop:$('.fancybox-overlay').offset().top+'px'});}});},newsFunctions:function(){$('.news-list .views-row').each(function(){$(this).find('.views-field-field-thumbnail, .views-field-field-date, .views-field-title, .views-field-view-node').wrapAll('<div class="news-info-container animated fadeInUpShort">');$(this).find('.news-info-container').wrapAll('<div class="news-outer-container">');});if($('.page-node-type-news .page-banner .news-banner-img').attr('src')=='/'){var imageArray=Array('/themes/custom/uscotton/images/banner-bg.jpg','/themes/custom/uscotton/images/banner-bg.jpg','/themes/custom/uscotton/images/banner-bg.jpg','/themes/custom/uscotton/images/banner-bg.jpg');var image=imageArray[Math.floor(Math.random()*imageArray.length)];$('.page-node-type-news .page-banner .news-banner-img').attr('src',image);}$('.page-node-type-news #block-uscotton-page-title').remove();if($('.news-list .views-row').length<6)$('.news-list footer').hide();},historyCarousel:function(){var numbervisible=11;$('.history.carousel.desktop-only .views-row').wrapAll('<div class="history-carousel-container">');$('.history.carousel.mobile-only .views-row').wrapAll('<div class="history-carousel-container">');$(".history.carousel.desktop-only .history-carousel-container").owlCarousel({singleItem:true,pagination:true,navigation:true,slideSpeed:800,addClassActive:true,transitionStyle:'fade',afterMove:function(data){$('.history.carousel .owl-item:not(.active) .animated.go').removeClass('go');$('.history.carousel .owl-item.active .animated').not('.go').addClass('go');if($(window).width()>1600)numbervisible=11;else if($(window).width()>1460)numbervisible=10;else if($(window).width()>1335)numbervisible=9;else if($(window).width()>1165)numbervisible=8;else if($(window).width()>1035)numbervisible=7;else if($(window).width()>905)numbervisible=6;else if($(window).width()>785)numbervisible=5;else numbervisible=4;if(!$('.history.carousel.desktop-only .owl-pagination .owl-page.active').hasClass('visible')){$('.history.carousel.desktop-only .owl-pagination .owl-page.visible').first().removeClass('visible');$('.history.carousel.desktop-only .owl-pagination .owl-page.active').addClass('visible');}if($('.history.carousel.desktop-only .owl-pagination .owl-page').first().hasClass('active')){$('.history.carousel.desktop-only .owl-pagination .owl-page').removeClass('visible');$('.history.carousel.desktop-only .owl-pagination .owl-page:lt('+numbervisible+')').addClass('visible');}else{if($('.history.carousel.desktop-only .owl-pagination .owl-page').last().hasClass('active')){$('.history.carousel.desktop-only .owl-pagination .owl-page').removeClass('visible');$('.history.carousel.desktop-only .owl-pagination .owl-page:gt(-'+(numbervisible+1)+')').addClass('visible');}}$('.history.carousel.desktop-only .owl-pagination .owl-page.hide-line').removeClass('hide-line');$('.history.carousel.desktop-only .owl-pagination .owl-page.visible').last().addClass('hide-line');},afterInit:function(){if($(window).width()>1600)numbervisible=11;else if($(window).width()>1460)numbervisible=10;else if($(window).width()>1335)numbervisible=9;else if($(window).width()>1165)numbervisible=8;else if($(window).width()>1035)numbervisible=7;else if($(window).width()>905)numbervisible=6;else if($(window).width()>785)numbervisible=5;else numbervisible=4;$('.history.carousel.desktop-only .owl-pagination .owl-page').removeClass('visible');$('.history.carousel.desktop-only .owl-pagination .owl-page:lt('+numbervisible+')').addClass('visible');$('.history.carousel.desktop-only .owl-pagination .owl-page.hide-line').removeClass('hide-line');$('.history.carousel.desktop-only .owl-pagination .owl-page.visible').last().addClass('hide-line');
2$('.history.carousel.desktop-only .owl-controls .owl-pagination').addClass('animated').addClass('fadeInUpShort');},afterUpdate:function(){var owl=$(".history.carousel.desktop-only .history-carousel-container").data('owlCarousel');owl.goTo(0);}});$('.history.carousel.desktop-only .views-row').each(function(index){var thisYear=$(this).find('.views-field-field-year').text();$('.history.carousel.desktop-only .owl-controls .owl-pagination .owl-page').eq(index).find('span').text(thisYear);});$(".history.carousel.mobile-only .history-carousel-container").owlCarousel({singleItem:true,pagination:false,navigation:true,slideSpeed:800,addClassActive:true,afterUpdate:function(){var owl=$(".history.carousel.mobile-only .history-carousel-container").data('owlCarousel');owl.goTo(0);}});},mobileHomeTabCarousel:function(){$(".mobile-tab-carousel").owlCarousel({singleItem:true,pagination:false,navigation:true,slideSpeed:800,transitionStyle:'fade'});},centerButtonCarousel:function(){$(".pattern-carousel").owlCarousel({singleItem:true,pagination:false,slideSpeed:800,navigation:true,transitionStyle:"fade",addClassActive:true,afterInit:function(){$('.pattern-carousel .owl-controls .owl-buttons .owl-prev, .pattern-carousel .owl-controls .owl-buttons .owl-next').addClass('animated').addClass('fadeInUpShort').addClass('slow');$('.pattern-carousel .owl-item:not(.active) .animated').addClass('go');},afterMove:function(){}});},locationsFunctions:function(){$('.locations-view-list .views-row').each(function(index){$('.locations-view-list .views-row:eq('+index+') .views-field-field-location-name-1, .locations-view-list .views-row:eq('+index+') .views-field-body').wrapAll('<div class="location-content">');$(this).append('<div class="map-container"><div id="map'+index+'" class="map-item"></div><div class="close-btn"></div></div>');$('.locations-view-list .views-row:eq('+index+') .location-content, .locations-view-list .views-row:eq('+index+') .views-field-field-latitude, .locations-view-list .views-row:eq('+index+') .views-field-field-longitude, .locations-view-list .views-row:eq('+index+') .map-container').wrapAll('<div class="tab-content-container">');var latitude=Number($(this).find('.views-field-field-latitude').text());var longitude=Number($(this).find('.views-field-field-longitude').text());var mapname='map'+index;var myLatLng=new google.maps.LatLng(latitude,longitude);var mapOptions={zoom:16,center:myLatLng,scrollwheel:false};var map=new google.maps.Map(document.getElementById(mapname),mapOptions);var marker=new google.maps.Marker({position:myLatLng,title:"",icon:'/themes/custom/uscotton/images/map-icon.png'});marker.setMap(map);$(this).find('.tab-content-container').show();var containerHeight=$(this).find('.location-content').outerHeight();$(this).find('.tab-content-container').hide();var buttonHeight=$(this).find('.views-field-field-location-name').height();var newHeight=containerHeight+buttonHeight;$(this).find('.map-container').height(newHeight+128);$('.locations-view-list .views-field-field-location-name').click(function(){setTimeout(function(){google.maps.event.trigger(map,'resize');map.setCenter(myLatLng);},100);});});$('.locations-view-list .views-field-field-location-name').click(function(){google.maps.event.trigger('','resize');if($(this).find('.tab-content-container').not(':visible')){$(this).animate({'opacity':'0'},400);$('.locations-view-list .views-field-field-location-name').not(this).animate({'opacity':'1'},400);$('.locations-view-list .tab-content-container:visible').slideUp();$(this).parents('.views-row').find('.tab-content-container').slideDown();var topOfContainer=$(this).parents('.views-row');setTimeout(function(){$('body, html').animate({'scrollTop':topOfContainer.offset().top});},600);}});$('.locations-view-list .close-btn').click(function(){$(this).parents('.views-row').find('.views-field-field-location-name').animate({'opacity':'1'},400);$(this).parents('.views-row').find('.tab-content-container').slideUp();});$('.location-view-list-careers .views-row').each(function(){var currenturl=$(this).find('.views-field-field-location-name a').attr('href');var locationtext=$(this).find('.views-field-field-location-name a').text();var locationvar='';if(locationtext=='Gastonia, North Carolina')locationvar='gastonia_nc';else if(locationtext=='Rio Rancho, New Mexico')locationvar='riorancho_nm';else if(locationtext=='Belmont, North Carolina')locationvar='belmont_nc';else if(locationtext=='Cleveland, Ohio')locationvar='cleveland_oh';else locationvar='';$(this).find('.views-field-field-location-name a').attr('href',currenturl+'&job_location='+locationvar);});},careerListings:function(){var jqxhr=$.ajax({url:"https://api.indeed.com/ads/apisearch",method:"GET",crossDomain:true,dataType:'jsonp',data:{publisher:"1985661072054319",v:"2",format:"json",q:"company:(us cotton)",l:"us",limit:"25"}}).done(function(data){console.log("success",data);var cont=$('.current-openings-container .openings-list')[0];if(data.results=='')if($('html').hasClass('touch'))$('.current-openings-container .openings-list').append('<div class="animated fadeInUpShort slow go no-openings-text col-md-12 centered"><h3>We currently have no positions available, but we’re always looking for driven & hardworking people. Contact us or visit one of our 5 locations for more information.</h3></div>');else $('.current-openings-container .openings-list').append('<div class="animated fadeInUpShort slow 
2no-openings-text col-md-12 centered"><h3>We currently have no positions available, but we’re always looking for driven & hardworking people. Contact us or visit one of our 5 locations for more information.</h3></div>');data.results.forEach(function(element){console.log(element);$(cont).prepend('<div class="row"><div class="dot-graphic animated fadeInLeft slow"><img src="/themes/custom/uscotton/images/news-bg-dot-graphic.png" alt="job"></div><div class="job-content animated fadeInUpShort"><div class="job-title">'+element.jobtitle+'</div><div class="job-location">'+element.city+', '+element.state+'</div><div class="description">'+element.snippet+'</div><div class="job-learn-more"><a href="'+element.url+'" target="_blank" class="cta-link">Apply Here</a></div></div></div>');},this);}).fail(function(){console.log("error");}).always(function(){console.log("complete");});jqxhr.always(function(){console.log("second complete");});},explodeCottonRound:function(){if($('.parralax-cotton-round').length>0){var windowScrollTop=0;var cottonScrollTop=0;$(window).scroll(function(){windowScrollTop=$(this).scrollTop();cottonScrollTop=$('.parralax-cotton-round').offset().top-150;if($('html').hasClass('touch')){if(windowScrollTop>cottonScrollTop)$('.parralax-cotton-round').addClass('explode');}else if(windowScrollTop>cottonScrollTop)$('.parralax-cotton-round').addClass('explode');else $('.parralax-cotton-round').removeClass('explode');});}},slideInAnimations:function(){var st=$(window).scrollTop();var hOffset=30;var scrolling=false;$(window).scroll(function(){var st=$(window).scrollTop();var currentLength=$('.animated:visible').not('.go').length;if(currentLength>0)scrolling=false;else scrolling=false;var currentLengthSequential=$('.animated-sequential:visible').not('.go').length;if(currentLengthSequential>0)scrolling=false;else scrolling=false;$('.animated:visible').not('.go').each(function(i,val){if($(this).parents('.owl-item:not(.active)').length>0){}else if($(this).parents('.owl-item.active').length>0){scrolling=true;if(($(this).offset().top-st)<($(window).height()+hOffset)){var thisItem=$(this);$(thisItem).addClass('go');}else{if($('html').hasClass('touch')){scrolling=false;$(this).addClass('go');}}}else{scrolling=true;if(($(this).offset().top-st)<($(window).height()+hOffset)){var thisItem=$(this);$(thisItem).addClass('go');}else{if($('html').hasClass('touch')){scrolling=false;$(this).addClass('go');}}}});$('.animated-sequential:visible').not('.go').each(function(i,val){scrolling=true;if(($(this).offset().top-st)<($(window).height()+hOffset)){var thisItem=$(this);setTimeout(function(){$(thisItem).addClass('go');},300*i);}else{if($('html').hasClass('touch')){scrolling=false;$(this).addClass('go');}}});});$(window).scroll();},slideInAnimationsTouchScreen:function(){$('.animated-sequential').not('.go').each(function(i,val){var thisItem=$(this);setTimeout(function(){$(thisItem).addClass('go');},300*i);$(this).addClass('go');});$('.animated').not('.go').each(function(i,val){var thisItem=$(this);setTimeout(function(){$(thisItem).addClass('go');},300*i);$(this).addClass('go');});},resizeFunctions:function(){if($('.homepage-why-carousel').length)$('.path-frontpage .homepage-why-carousel .views-row').each(function(){var thisImageHeight=$(this).find('.views-field-field-image-1 img').height();if($(window).width()<768)$('.homepage-why-carousel .owl-controls').css('top',(thisImageHeight-90)+'px');else $('.homepage-why-carousel .owl-controls').css('top','');});var windowHeight=$(window).height();$('.block-views-blockhomepage-banner-carousel-block-1').height(windowHeight);$('.path-frontpage #wrapper').css('margin-top',windowHeight+'px');$('.homepage-main-banner-carousel .views-row').each(function(){var fullHeight=$(this).height();var textHeight=$(this).find('.banner-text').innerHeight();if($('.region-alert-bar').length)var additionalHeight=$('.region-alert-bar').height();var newPadding=(fullHeight-textHeight)/2;if($('.region-alert-bar').length){var additionalHeight=$('.region-alert-bar').height();$(this).find('.banner-text').css('top',(newPadding+additionalHeight)+'px');}else $(this).find('.banner-text').css('top',newPadding+'px');});if($(window).width()>767){$('.page-banner').css('min-height','500px');var textHeight=$('.page-banner .banner-text').height();var padding=(500-textHeight)/2;$('.page-banner').css('padding-top',(padding+60)+'px');$('.page-banner').css('padding-bottom',(padding)+'px');var maxHeight=-1;$('.branded-product-tiers .views-row').each(function(){var combinedHeight=$(this).find('.product-text-container .views-field-title').outerHeight()+$(this).find('.product-text-container .views-field-field-banner-text-3').outerHeight();maxHeight=maxHeight>combinedHeight?maxHeight:combinedHeight;});$('.branded-product-tiers .views-row').each(function(){$(this).find('.product-text-container').height(maxHeight+50);});}else{$('.page-banner').css('min-height','0');$('.page-banner').css('padding-top','');$('.page-banner').css('padding-bottom','');}var numbervisible;if($(window).width()>1600)numbervisible=11;else if($(window).width()>1460)numbervisible=10;else if($(window).width()>1335)numbervisible=9;else if($(window).width()>1165)numbervisible=8;else if($(window).width()>1030)numbervisible=7;else if($(window).width()>905)numbervisible=6;else if($(window).width()>785)numbervisible=5;else numbervisible=4;if($('.history.carousel').length){$('.history.carousel .owl-pagination .owl-page:lt('+numbervisible+')').addClass('visible');$('.history.carousel .owl-pagination .owl-page.hide-line').removeClass('hide-line');$('.history.carousel .owl-pagination .owl-page.visible').last().addClass('hide-line');$('.history.carousel .views-row').each(function(index){var thisYear=$(this).find('.views-field-field-year').text();
2$('.owl-controls .owl-pagination .owl-page').eq(index).find('span').text(thisYear);});}if($('.homepage-why-carousel').length>0){if($(window).width()<768){var currentImgHeight=$('.homepage-why-carousel .owl-item .views-field-field-image-1.mobile-only img').height();$('.homepage-why-carousel .owl-controls').css('top',(currentImgHeight-100)+'px');}else $('.homepage-why-carousel .owl-controls').css('top','');if($(window).width()>1300)$('.homepage-why-carousel .views-row').each(function(){var WhyImgHeight=$(this).find('.views-field-field-image img').height();$(this).css('min-height',WhyImgHeight+'px');});else $('.homepage-why-carousel .views-row').css('min-height','0px');}if($('.card-carousel').length>0){var cardcarouselHeight=$('.card-carousel .owl-item img').height();$('.card-carousel .owl-item .views-row').css('min-height',(cardcarouselHeight*1.25)+'px');$('#block-views-block-sustainability-carousel-block-1 .dot-graphic.bottom').height(cardcarouselHeight);}if($('.displays-highlight-block').length>0){$('.displays-highlight-block .views-row').each(function(){var thisCurrentHeight=$(this).find('.views-field-field-image img').height();$(this).find('.views-field-title .field-content').css('padding-top',((thisCurrentHeight-50)/2)+'px');});$('.displays-highlight-block.two-displays .views-row').first().addClass('col-sm-offset-2');}if($('.bundle-two_column_content_bucket').length>0)$('.bundle-two_column_content_bucket').each(function(){var bucketHeight=$(this).find('.image-container').height();var textHeight=$(this).find('.body-copy').height();var newPadding=(bucketHeight-textHeight)/2;$(this).find('.body-copy').css('padding',newPadding+'px 0');});}};}();var $=jQuery.noConflict();jQuery(document).ready(function($){USCOTTON.site.init();$('#main-menu').smartmenus();$('.navbar-toggle').click(function(){$('.region-primary-menu').slideToggle();if($('html').hasClass('nav-open')){$('html').removeClass('nav-open');$('body').removeClass('nav-open');}else{$('html').addClass('nav-open');$('body').addClass('nav-open');}});$('.main-header .menu-base-theme li a.has-submenu span.sub-arrow').click(function(){if($('html').hasClass('nav-open')){$('html').removeClass('nav-open');$('body').removeClass('nav-open');}else{$('html').addClass('nav-open');$('body').addClass('nav-open');}});if($(window).width()<768)$(".region-primary-menu li a:not(.has-submenu)").click(function(){$('.region-primary-menu').hide();});});;
3(function($,Drupal,once){var hasLocalStorage=(function(){try{localStorage.setItem('webform','webform');localStorage.removeItem('webform');return true;}catch(e){return false;}}());Drupal.behaviors.webformDetailsSave={attach(context){if(!hasLocalStorage)return;$(once('webform-details-summary-save','details > summary',context)).on('click',function(){var $details=$(this).parent();if($details[0].hasAttribute('data-webform-details-nosave'))return;var name=Drupal.webformDetailsSaveGetName($details);if(!name)return;var open=($details.attr('open')!=='open')?'1':'0';localStorage.setItem(name,open);});$(once('webform-details-save','details',context)).each(function(){var $details=$(this);var name=Drupal.webformDetailsSaveGetName($details);if(!name)return;var open=localStorage.getItem(name);if(open===null)return;if(open==='1')$details.attr('open','open');else $details.removeAttr('open');});}};Drupal.webformDetailsSaveGetName=function($details){if(!hasLocalStorage)return '';if($details.hasClass('vertical-tabs__pane'))return '';var webformId=$details.attr('data-webform-element-id');if(webformId)return 'Drupal.webform.'+webformId.replace('--','.');var detailsId=$details.attr('id');if(!detailsId)return '';var $form=$details.parents('form');if(!$form.length||!$form.attr('id'))return '';var formId=$form.attr('id');if(!formId)return '';formId=formId.replace(/--.+?$/,'').replace(/-/g,'_');detailsId=detailsId.replace(/--.+?$/,'').replace(/-/g,'_');return 'Drupal.webform.'+formId+'.'+detailsId;};})(jQuery,Drupal,once);;
4(function($,Drupal,once){Drupal.webform=Drupal.webform||{};Drupal.webform.detailsToggle=Drupal.webform.detailsToggle||{};Drupal.webform.detailsToggle.options=Drupal.webform.detailsToggle.options||{};Drupal.behaviors.webformDetailsToggle={attach(context){$(once('webform-details-toggle','.js-webform-details-toggle',context)).each(function(){var $form=$(this);var $tabs=$form.find('.webform-tabs');var selector=($tabs.length)?'.webform-tab':'.js-webform-details-toggle, .webform-elements';var $details=$form.find('details').filter(function(){var $parents=$(this).parentsUntil(selector);return ($parents.find('details').length===0);});if($details.length<2)return;var options=$.extend({button:'<button type="button" class="webform-details-toggle-state"></button>'},Drupal.webform.detailsToggle.options);var $toggle=$(options.button).attr('title',Drupal.t('Toggle details widget state.')).on('click',function(e){var $details=$form.find('details:not(.vertical-tabs__pane)');var $summary=$details.find('summary');var open;if(Drupal.webform.detailsToggle.isFormDetailsOpen($form)){$details.removeAttr('open');$summary.attr('aria-expanded','false');open=0;}else{$details.attr('open','open');$summary.attr('aria-expanded','true');open=1;}Drupal.webform.detailsToggle.setDetailsToggleLabel($form);if(Drupal.webformDetailsSaveGetName)$details.each(function(){var name=Drupal.webformDetailsSaveGetName($(this));if(name)localStorage.setItem(name,open);});}).wrap('<div class="webform-details-toggle-state-wrapper"></div>').parent();if($tabs.length)$tabs.find('.item-list:first-child').eq(0).before($toggle);else $details.eq(0).before($toggle);Drupal.webform.detailsToggle.setDetailsToggleLabel($form);});}};Drupal.webform.detailsToggle.isFormDetailsOpen=function($form){return ($form.find('details[open]').length===$form.find('details').length);};Drupal.webform.detailsToggle.setDetailsToggleLabel=function($form){var isOpen=Drupal.webform.detailsToggle.isFormDetailsOpen($form);var label=(isOpen)?Drupal.t('Collapse all'):Drupal.t('Expand all');$form.find('.webform-details-toggle-state').html(label);var text=(isOpen)?Drupal.t('All details have been expanded.'):Drupal.t('All details have been collapsed.');Drupal.announce(text);};})(jQuery,Drupal,once);;
5(function($,Drupal){Drupal.behaviors.fileValidateAutoAttach={attach(context,settings){const $context=$(context);let elements;function initFileValidation(selector){$(once('fileValidate',$context.find(selector))).on('change.fileValidate',{extensions:elements[selector]},Drupal.file.validateExtension);}
5if(settings.file?.elements){elements=settings.file.elements;Object.keys(elements).forEach(initFileValidation);}},detach(context,settings,trigger){const $context=$(context);let elements;function removeFileValidation(selector){$(once.remove('fileValidate',$context.find(selector))).off('change.fileValidate',Drupal.file.validateExtension);}if(trigger==='unload'&&settings.file?.elements){elements=settings.file.elements;Object.keys(elements).forEach(removeFileValidation);}}};Drupal.behaviors.fileAutoUpload={attach(context){$(once('auto-file-upload','input[type="file"]',context)).on('change.autoFileUpload',Drupal.file.triggerUploadButton);},detach(context,settings,trigger){if(trigger==='unload')$(once.remove('auto-file-upload','input[type="file"]',context)).off('.autoFileUpload');}};Drupal.behaviors.fileButtons={attach(context){const $context=$(context);$context.find('.js-form-submit').on('mousedown',Drupal.file.disableFields);$context.find('.js-form-managed-file .js-form-submit').on('mousedown',Drupal.file.progressBar);},detach(context,settings,trigger){if(trigger==='unload'){const $context=$(context);$context.find('.js-form-submit').off('mousedown',Drupal.file.disableFields);$context.find('.js-form-managed-file .js-form-submit').off('mousedown',Drupal.file.progressBar);}}};Drupal.behaviors.filePreviewLinks={attach(context){$(context).find('div.js-form-managed-file .file a').on('click',Drupal.file.openInNewWindow);},detach(context){$(context).find('div.js-form-managed-file .file a').off('click',Drupal.file.openInNewWindow);}};Drupal.file=Drupal.file||{validateExtension(event){event.preventDefault();$('.file-upload-js-error').remove();const extensionPattern=event.data.extensions.replace(/,\s*/g,'|');if(extensionPattern.length>1&&this.value.length>0){const acceptableMatch=new RegExp(`\\.(${extensionPattern})$`,'gi');if(!acceptableMatch.test(this.value)){const error=Drupal.t('The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.',{'%filename':this.value.replace('C:\\fakepath\\',''),'%extensions':extensionPattern.replace(/\|/g,', ')});$(this).closest('div.js-form-managed-file').prepend(`<div class="messages messages--error file-upload-js-error" aria-live="polite">${error}</div>`);this.value='';event.stopImmediatePropagation();}}},triggerUploadButton(event){$(event.target).closest('.js-form-managed-file').find('.js-form-submit[data-drupal-selector$="upload-button"]').trigger('mousedown');},disableFields(event){const $clickedButton=$(this);$clickedButton.trigger('formUpdated');let $enabledFields=[];if($clickedButton.closest('div.js-form-managed-file').length>0)$enabledFields=$clickedButton.closest('div.js-form-managed-file').find('input.js-form-file');const $fieldsToTemporarilyDisable=$('div.js-form-managed-file input.js-form-file').not($enabledFields).not(':disabled');$fieldsToTemporarilyDisable.prop('disabled',true);setTimeout(()=>{$fieldsToTemporarilyDisable.prop('disabled',false);},1000);},progressBar(event){const $clickedButton=$(this);const $progressId=$clickedButton.closest('div.js-form-managed-file').find('input.file-progress');if($progressId.length){const originalName=$progressId.attr('name');$progressId.attr('name',originalName.match(/APC_UPLOAD_PROGRESS|UPLOAD_IDENTIFIER/)[0]);setTimeout(()=>{$progressId.attr('name',originalName);},1000);}setTimeout(()=>{$clickedButton.closest('div.js-form-managed-file').find('div.ajax-progress-bar').slideDown();},500);$clickedButton.trigger('fileUpload');},openInNewWindow(event){event.preventDefault();$(this).attr('target','_blank');window.open(this.href,'filePreview','toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=500,height=550');}};})(jQuery,Drupal);;
6(function($,Drupal,once){Drupal.behaviors.webformManagedFileAutoUpload={attach:function attach(context){$(once('webform-auto-file-upload','form',context)).on('submit',function(event){var $form=$(this);if($form.data('webform-auto-file-uploads')>0&&Drupal.webformManagedFileBlockSubmit($form)){event.preventDefault();return false;}return true;});if(typeof Drupal.Ajax!=='undefined'&&typeof Drupal.Ajax.prototype.beforeSubmitWebformManagedFileAutoUploadOriginal==='undefined'){Drupal.Ajax.prototype.beforeSubmitWebformManagedFileAutoUploadOriginal=Drupal.Ajax.prototype.beforeSubmit;Drupal.Ajax.prototype.beforeSubmit=function(form_values,element_settings,options){var $form=this.$form;var $element=$(this.element);var isFormActions=$element.closest('.form-actions').length;var isMultipleUpload=$element.parents('.js-form-type-webform-multiple, .js-form-type-webform-custom-composite').find('.js-form-managed-file').length;var isManagedUploadButton=$element.parents('.js-form-managed-file').length;if($form.data('webform-auto-file-uploads')>0&&(isFormActions||(isMultipleUpload&&!isManagedUploadButton))&&Drupal.webformManagedFileBlockSubmit($form)){this.ajaxing=false;return false;}return this.beforeSubmitWebformManagedFileAutoUploadOriginal.apply(this,arguments);};}$(once('webform-auto-file-upload','input[type="file"]',context)).on('change',function(){$(this).data('webform-auto-file-upload',true);var $form=$(this.form);var fileUploads=($form.data('webform-auto-file-uploads')||0);$form.data('webform-auto-file-uploads',fileUploads+1);});},detach:function detach(context,settings,trigger){if(trigger==='unload'){const removedElements=once.remove('webform-auto-file-upload','input[type="file"]',context);$(removedElements).each(function(){if($(this).data('webform-auto-file-upload')){$(this).removeData('webform-auto-file-upload');var $form=$(this.form);var fileUploads=($form.data('webform-auto-file-uploads')||0);$form.data('webform-auto-file-uploads',fileUploads-1);}});}}};Drupal.webformManagedFileBlockSubmit=function(form){if($(form).data('webform-auto-file-uploads')<0)return false;var message=Drupal.t('File upload in progress. Uploaded file may be lost.')+'\n'+Drupal.t('Click OK to submit the form without finishing the file upload or cancel to return to form.');var result=!window.confirm(message);if(result&&Drupal.behaviors.webformSubmitOnce)setTimeout(function(){Drupal.behaviors.webformSubmitOnce.clear();});return result;};})(jQuery,Drupal,once);;
7(function($,Drupal,once){var hasLocalStorage=(function(){try{localStorage.setItem('webform','webform');localStorage.removeItem('webform');return true;}catch(e){return false;}}());
7var hasSessionStorage=(function(){try{sessionStorage.setItem('webform','webform');sessionStorage.removeItem('webform');return true;}catch(e){return false;}}());Drupal.behaviors.webformMessageClose={attach(context){$(once('webform-message--close','.js-webform-message--close',context)).each(function(){var $element=$(this);var id=$element.attr('data-message-id');var storage=$element.attr('data-message-storage');var effect=$element.attr('data-message-close-effect')||'hide';switch(effect){case 'slide':effect='slideUp';break;case 'fade':effect='fadeOut';break;}if(isClosed($element,storage,id))return;if($element.attr('style')!=='display: none;'&&!$element.hasClass('js-webform-states-hidden'))$element.show();$element.find('.js-webform-message__link').on('click',function(event){$element[effect]();setClosed($element,storage,id);$element.trigger('close');event.preventDefault();});});}};function isClosed($element,storage,id){if(!id||!storage)return false;switch(storage){case 'local':if(hasLocalStorage)return localStorage.getItem('Drupal.webform.message.'+id)||false;return false;case 'session':if(hasSessionStorage)return sessionStorage.getItem('Drupal.webform.message.'+id)||false;return false;default:return false;}}function setClosed($element,storage,id){if(!id||!storage)return;switch(storage){case 'local':if(hasLocalStorage)localStorage.setItem('Drupal.webform.message.'+id,true);break;case 'session':if(hasSessionStorage)sessionStorage.setItem('Drupal.webform.message.'+id,true);break;case 'user':case 'state':case 'custom':$.get($element.find('.js-webform-message__link').attr('href'));return true;}}})(jQuery,Drupal,once);;
8(function($,Drupal,once){Drupal.behaviors.webformSelectOptionsDisabled={attach(context){$(once('webform-select-options-disabled','select[data-webform-select-options-disabled]',context)).each(function(){var $select=$(this);var disabled=$select.attr('data-webform-select-options-disabled').split(/\s*,\s*/);$select.find('option').filter(function isDisabled(){return ($.inArray(this.value,disabled)!==-1);}).attr('disabled','disabled');});}};})(jQuery,Drupal,once);;

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.