1$(window).load(function () { 2 var intval = ""; 3 var numberOfSlides = $(".slides > div").length; 4 if (numberOfSlides < 2) 5 return; 6 var counter = 0; 7 var thumbs = $(".thumbs > div").toArray(); 8 var thumbWidth = 300; 9 var thumbHeight = 150; 10 var lastthumb = $(".thumbs > div:last-child"); 11 $(".slides div:eq(0)").addClass("first-child"); 12 $(thumbs).each(function (i, el) { 13 $(this).css({ 14 top: 450 - (i * 150 + 150) + "px" 15 }) 16 }); 17 lastthumb.parent().prepend(lastthumb); 18 var engage = function () { 19 if (counter == 0) { 20 $(".slides > div").eq((numberOfSlides - 1)).fadeOut("fast") 21 } else { 22 $(".slides > div").eq((counter - 1)).fadeOut("fast") 23 } 24 $(thumbs).each(function (i, el) { 25 $(this).animate({ 26 top: "+=150" 27 }, 1000, function () { 28 if (i == 0) { 29 $(this).css({ 30 top: "-150px" 31 }); 32 thumbs.push(thumbs.shift()) 33 } 34 }) 35 }); 36 $(".slides > div").eq(counter).fadeIn(1000); 37 if (counter < (numberOfSlides - 1)) { 38 counter++ 39 } else { 40 counter = 0 41 } 42 }; 43 var clickengage = function () { 44 inAction = false; 45 $(thumbs).each(function (i, el) { 46 var options = { 47 duration: 300, 48 start: function () { 49 inAction = true 50 }, 51 complete: function () { 52 inAction = false; 53 if (i == 0) { 54 $(this).css({ 55 top: "-150px" 56 }); 57 thumbs.push(thumbs.shift()) 58 } 59 } 60 }; 61 if ($(this).is(":animated")) { 62 inAction = true; 63 return 64 } else { 65 inAction = false; 66 $(this).animate({ 67 top: "+=150" 68 }, options); 69 if ($(this).is(":first-child")) { 70 if (counter == 0) { 71 $(".slides > div").eq((numberOfSlides - 1)).fadeOut("fast") 72 } else { 73 $(".slides > div").eq((counter - 1)).fadeOut("fast") 74 } 75 $(".slides > div").eq(counter).fadeIn("fast"); 76 if (counter < (numberOfSlides - 1)) { 77 counter++ 78 } else { 79 counter = 0 80 } 81 } 82 } 83 }); 84 console.log(inAction) 85 }; 86 var start_Int = function () { 87 if (intval == "") { 88 intval = window.setInterval(function () { 89 engage() 90 }, 7000) 91 } else { 92 stop_Int() 93 } 94 }; 95 var stop_Int = function () { 96 if (intval != "") { 97 window.clearInterval(intval); 98 intval = "" 99 } 100 }; 101 start_Int(); 102 $(".hero-slider").hover(function () { 103 stop_Int() 104 }, function () { 105 start_Int() 106 }); 107 $("a.advance-slide").click(function () { 108 clickengage() 109 }) 110});
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.