1function setupBanners(){ 2resetBannerHeight(); 3isVideo = false; 4if ( $('#bannersVideo').length ) isVideo = true; 5bannerBgs(); 6bannerControls() ; 7if (bannerTransition=='fade') { 8$('#banners li').css( "display","none"); 9$('#banners li:first-child').css( "display","block"); 10} 11 12if (bannerTransition=='swipe') { 13outerWidth = Math.floor( $("#bannerWrap" ).width() ); 14$('#banners').css( "width" , 20000 + "px" ); 15$('#banners li').css( "position","relative"); 16$('#banners li').css( "display","block"); 17$('#banners li').css( "float","left"); 18$('#banners li ').css( "width" , outerWidth + "px" ); 19} 20}/*// eo setup*/ 21 22function resetBannerHeight(){ 23headerheight =Math.floor( $('#header').height( ) ) ; 24navheight =Math.floor( $('#navMain').height( ) ) ; 25bannerHeight = winH ; 26} 27 28function resetWidth(){ 29outerWidth = Math.floor( $("#bannerWrap" ).width() ); 30if (bannerTransition=='swipe') { 31$('#banners').css( "width" , 20000 + "px" ); 32$('#banners li ').css( "width" , outerWidth + "px" ); 33} 34} 35 36function swipeBanners(){ 37bannerTimer = setInterval(function(){ /*//resetWidth();*/ 38if ( textFadeInOut ==2 ) $("#banners div " ).animate({ opacity: 0 }, 400 ); 39$("#banners" ).delay(400).animate({ marginLeft: eval( 0-outerWidth) }, slideSpeed , function(){ /*// delay for fade text, if not just adds some time*/ 40$('#banners li:last').after($('#banners li:first')); 41$(this).css({marginLeft:0}); 42currentBanner =$("#banners" ).find("li:first").attr('id').replace("banner",""); // numeric only 43if ( textFadeInOut ==2 ) $("#banner" + currentBanner + " .bannerTextWrap " ).delay(500).animate({ opacity: 1 }, 1000 ); 44nextBanner = eval( currentBanner ) + 1; 45if (nextBanner == numBanners ) nextBanner= 0; 46}); 47}, bannerDelay ); 48} /*// eo fn */ 49 50/*///if ( textFadeInOut ==2 ) $("#banner" + nextBanner ).addClass('bannerActive');*/ 51 52function fadeBanners(){ 53bannerTimer = setInterval(function(){ 54if ( textFadeInOut ==2 ) $("#banners .bannerTextWrap " ).animate({ opacity: 0 }, 1800 ); 55nextBanner = currentBanner + 1; 56if (nextBanner >= numBanners ) nextBanner= 0; 57$("#banners li" ).delay(400).fadeOut(fadeSpeed); //delay for fadeinout text 58if ( textFadeInOut ==2 ) $("#banner" + nextBanner + " .bannerTextWrap " ).delay(1500).animate({ opacity: 1 }, 1500 ); 59$("#banner" + nextBanner ).fadeIn(fadeSpeed); 60$('#bannerDots li').removeClass('activeDot'); 61$('#bannerDot' + nextBanner).addClass('activeDot'); 62currentBanner = nextBanner; 63}, bannerDelay );/*// eo timer*/ 64} /*// eo fn */ 65 66function bannerControlAction(toShow){ 67clearInterval(bannerTimer); 68$("#banner" + currentBanner ).fadeOut(100); 69$("#banner" + toShow ).fadeIn(300); 70if ( textFadeInOut == 2 ) $(" #banners .bannerTextWrap " ).animate({ opacity: 1 }, 1500 ); 71currentBanner = parseInt( toShow ) ; 72} 73 74function bannerBgs(){ 75$(' .bannerBg ').each(function () { 76bannerBg= $(this).attr('data-bannerBg') ; 77bannerBgMob= $(this).attr('data-bannerBgMob') ; 78if ( bannerBgMob =="" ) bannerBgMob = bannerBg; 79if ( !isMobile ) $(this).css('background-image' , 'url(' + bannerBg + ')' ); 80if ( isMobile ) $(this).css('background-image' , 'url(' + bannerBgMob + ')' ); 81}) /*// each */ 82 83$(' .maskBg ').each(function () { 84bannerBg= $(this).attr('data-bannerBg') ; 85bannerBgMob= $(this).attr('data-bannerBgMob') ; 86if ( bannerBgMob =="" ) bannerBgMob = bannerBg; 87if ( !isMobile ) $(this).css('background-image' , 'url(' + bannerBg + ')' ); 88if ( isMobile ) $(this).css('background-image' , 'url(' + bannerBgMob + ')' ); 89}) /*// each */ 90} /* // eofn bannerBgs*/ 91 92function bannerControls(){ 93numBanners = $("#banners li").length; 94//if ( isMobile ) $(".bannerControls").css('opacity' ,'0' ); 95if ( !isMobile && numBanners >1) { 96$('#bannerWrap').on('mouseenter ', function(event){ $(".bannerControls " ).animate({ opacity: 0.6 }, 300 );event.stopPropagation() ; }) 97$('#bannerWrap').on('mouseleave ', function(event){ $(".bannerControls " ).animate({ opacity: 0 }, 300 );event.stopPropagation() ; }) 98//$('.bannerControls span').on('mouseover ', function(event){ $(this).animate({ opacity: 0.9 }, 200 );event.stopPropagation() ; }) 99//$('.bannerControls span').on('mouseout ', function(event){ $(this).animate({ opacity: 0.6 }, 200 );event.stopPropagation() ; }) 100 101$('#bannerControlPrevious span').on('click ', function(event){ 102toShow = currentBanner - 1; 103if (toShow < 0 ) toShow= numBanners-1; 104bannerControlAction(toShow); 105event.stopPropagation() ; 106}) 107 108$('#bannerControlNext span').on('click ', function(event){ 109toShow = currentBanner + 1; 110if (toShow >= numBanners ) toShow= 0; 111bannerControlAction(toShow); 112event.stopPropagation() ; 113}) 114} /*/// EO SCREEN CONTROLS*/ 115} /*//eofn */ 116 117$(window).on('load', function() { 118 119setupBanners(); 120 121$( "#banners li, #bannersVideo" ).each(function( index ) { 122textColour = $( this ).attr('data-textColour'); 123$(this).css('color', textColour ); 124}); 125 126$(" #bannerWrap" ).fadeTo(500,1);/*//animate({ opacity: 1 },500 ) ; */ 127if ( textFadeInOut ==2 ) $(" #banner0 div " ).delay(2500).animate({ opacity: 1 }, 2000); 128if ( textFadeInOut ==1 ) $(" #banners li div " ).delay(100).animate({ opacity: 1 }, 100 );/* // 1 = static - show all*/ 129numBanners = $("#banners li").length; 130if ( numBanners > 1 ){ 131slideSpeed = 500; 132fadeSpeed = 1500; 133currentBanner = 0; 134bannerTimer = null; 135/*/// MOBILE CONTROLS*/ 136if (isMobile){ 137swipedetect( 'bannerWrap' , true , function(swipedir){ 138if ( swipedir == "right" && numBanners > 1 ) { 139toShow = currentBanner + 1; 140if (toShow >= numBanners ) toShow= 0; 141bannerControlAction(toShow); 142event.stopPropagation() ; 143} 144if ( swipedir == "left" && numBanners > 1 ) { 145toShow = currentBanner - 1; 146if (toShow < 0 ) toShow= numBanners-1; 147bannerControlAction(toShow); 148event.stopPropagation() ; 149} 150})
151}/* /// EO MOBILE CONTROLS*/ 152 153if (bannerTransition=='swipe') swipeBanners(); 154if (bannerTransition=='fade') fadeBanners(); 155 156} /*// if there are banners*/ 157 158$('em.hashLink').on('click ', function(event){ 159$("html, body").animate({scrollTop: $('#contentWrapper' ).offset().top + 0 }, 1000); 160}) 161 162 163/*videoBanner = $('#videoContainer').attr('data-videoBanner'); 164$('#videoContainer').html('<video playsinline autoplay muted id="videoBanner"> <source src="' + videoBanner +'" type="video/mp4" ></video>'); 165$(".opacityMask , .bannerTextWrap " ).delay( textDelay ).animate({ opacity: 1 }, 1800 ); */ 166 167$(".bannerControls").css('opacity' ,'1' ); 168 169$('#bannerDot0').addClass('activeDot'); 170 171$('#bannerDots li').on('click' , function(){ 172key = $(this).attr('data-bannerkey'); 173bannerControlAction(key); 174$('#bannerDots li').removeClass('activeDot'); 175$('#bannerDot' + key).addClass('activeDot'); 176}) 177$(window).smartresize(function(){ resetBannerHeight(); resetWidth(); bannerBgs(); bannerControls() ; }); 178 179}) /*// load */
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.