1jQuery(document).ready(function($) { 2 var timer; 3 EXPERTS.start(); 4 5 $(".experts_index_wrap .item").hover(function() { 6 var self = this; 7 timer = setTimeout(function(){ 8 EXPERTS.expertQuoteHover($(self).attr("data-id")); 9 }, 1000); 10 }, function() { 11 clearTimeout(timer); 12 var self = this; 13 window.ACTIVE_EXPERT = 0; 14 setTimeout(function(){ 15 EXPERTS.expertQuoteHide($(self).attr("data-id")); 16 EXPERTS.start(true); 17 }, 3000) 18 }); 19}); 20var ACTIVE_EXPERT = 0; 21 22var EXPERTS = { 23 24 startTime: 3, //задеÑжка пеÑед запÑÑком ÑледÑÑÑего екÑпеÑÑа (ÑекÑнд) 25 loadingTime: 2, //вÑÐµÐ¼Ñ "ÑабоÑÑ" каÑÑинки загÑÑзки (ÑекÑнд) 26 nextTime: 5, //вÑÐµÐ¼Ñ Ð¿ÐµÑеклÑÑÐµÐ½Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñ ÐµÐºÑпеÑÑами поÑле полной загÑÑзки ÑекÑÑа (ÑекÑнд) 27 textSpeed: 60, //ÑкоÑоÑÑÑ ÑекÑÑа (1 - 100) 28 29 start: function(rand){ 30 var self = this; 31 var z = 0; 32 if (rand) z = self.getRandom(); 33 EXPERTS.expertQuoteShow(z); 34 }, 35 hideAll: function(id){ 36 var self = this; 37 for (var i = 0; i < 8; i++) { 38 if (i != id) self.expertQuoteHide(i); 39 } 40 }, 41 expertQuoteHover(id){ 42 var self = this; 43 self.hideAll(id); 44 window.ACTIVE_EXPERT = 10; 45 // self.expertQuoteShow(id, true); 46 }, 47 expertQuoteShow: function(id, isHover){ 48 console.log("expertQuoteShow", id); 49 if(window.ACTIVE_EXPERT == 10) return; 50 window.ACTIVE_EXPERT = id; 51 var self = this; 52 var z = 1; 53 if (isHover) { 54 self.hideAll(id); 55 z = 0; 56 } 57 58 setTimeout(function(){ 59 console.log("here"); 60 $(".experts_index_wrap .item").addClass('hdn'); 61 if (window.ACTIVE_EXPERT != id) { 62 self.expertQuoteHide(id); 63 return; 64 } 65 var expertQuote = self.getExpertQuote(id); 66 expertQuote.find('img').show(); 67 68 expertQuote.css('opacity', 0); 69 expertQuote.find('div').css('opacity', 0).css('position', 'absolute'); 70 expertQuote.find('a.more').hide(); 71 72 expertQuote.parent().addClass('active'); 73 expertQuote.css('opacity', 1).css('pointer-events', 'auto'); 74 75 setTimeout(function(){ 76 if (window.ACTIVE_EXPERT != id) { 77 self.expertQuoteHide(id); 78 return; 79 } 80 81 expertQuote.find('img').hide(); 82 83 expertQuote.css('opacity', 1); 84 expertQuote.find('div').css('opacity', 1).css('position', 'relative'); 85 86 expertQuote.find('div').typeIt({ 87 strings: expertQuote.attr("data-text"), 88 speed: 100 - self.textSpeed, 89 autoStart: false, 90 cursor: false, 91 callback: function(instance) { 92 if (window.ACTIVE_EXPERT != id) { 93 self.expertQuoteHide(id); 94 return; 95 } 96 setTimeout(function(){ 97 if (window.ACTIVE_EXPERT != id) { 98 self.expertQuoteHide(id); 99 return; 100 } 101 expertQuote.find('a.more').show(); 102 }, 500); 103 104 setTimeout(function(){ 105 if (window.ACTIVE_EXPERT != id) { 106 self.expertQuoteHide(id); 107 return; 108 } 109 $(".experts_index_wrap .item").removeClass('hdn'); 110 if (!isHover) self.expertQuoteHide(id); 111 if (!isHover) self.expertQuoteShow(self.getRandom(id)); 112 }, self.nextTime * 1000 ) 113 } 114 }); 115 }, self.loadingTime * 1000) 116 }, self.startTime*1000*z) 117 }, 118 expertQuoteHide: function(id){ 119 console.log("expertQuoteHide", id); 120 var expertQuote = this.getExpertQuote(id); 121 expertQuote.css('opacity', 0).css('height', 'auto').css('pointer-events', 'n
121one'); 122 expertQuote.parent().removeClass('active'); 123 124 setTimeout(function(){ 125 126 }, 1000) 127 128 }, 129 getExpertQuote: function(id){ 130 return jQuery(jQuery(".experts_index_wrap .item")[id]).find('.expert-quote').not('.shown'); 131 }, 132 getRandom(noId){ 133 var number = Math.floor(Math.random() * 7); 134 return number == noId ? this.getRandom(noId) : number; 135 } 136 137}
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.