1var direction = []; 2var sliders = []; 3 4var move = []; 5 6function startMovie(slider){ 7 var sliderDirection = jQuery(slider).attr('data-direction'); 8 var sliderDelayMovie = jQuery(slider).attr('data-delay'); 9 var allVisible = (checkVisivility(jQuery(slider)) < jQuery(slider).width()); 10console.log(sliderDelayMovie); 11console.log(checkVisivility(jQuery(slider))); 12console.log(jQuery(slider).width()); 13 if(sliderDelayMovie != 0 && !(allVisible)){ 14console.log('111'); 15console.log(sliderDirection); 16 if(sliderDirection == 'right'){ 17console.log('@@@@@'); 18 move[jQuery(slider).index()] = setInterval(function(){scrollRight(jQuery(slider), 1);}, sliderDelayMovie); 19 }else if(sliderDirection == 'left' || jQuery(slider).attr('data-width')){ 20 move[jQuery(slider).index()] = setInterval(function(){scrollLeft(jQuery(slider), 1);}, sliderDelayMovie); 21 }else if(sliderDirection == 'top'){ 22 move[jQuery(slider).index()] = setInterval(function(){scrollUp(jQuery(slider), 1);}, sliderDelayMovie); 23 }else if(sliderDirection == 'bottom' || jQuery(slider).attr('data-height')){ 24 move[jQuery(slider).index()] = setInterval(function(){scrollDown(jQuery(slider), 1);}, sliderDelayMovie); 25 } 26 } 27} 28function checkVisivility(slider){ 29 var sumWidth = 0; 30 jQuery(slider).find('blockquote, div div div').each(function(){ 31 sumWidth = sumWidth + jQuery(this).width(); 32 }) 33 return(sumWidth); 34} 35 36jQuery(document).ready(function(){ 37 jQuery.each(jQuery('.slider'), function(i, val){ 38 startMovie(jQuery(this)); 39 }); 40 jQuery('.slider .leftArrMovie').click(function(){ 41 scrollLeft(jQuery(this).parents('.slider')); 42 }); 43 jQuery('.slider .rightArrMovie').click(function(){ 44 scrollRight(jQuery(this).parents('.slider')); 45 }); 46 jQuery('.slider .upArrMovie').click(function(){ 47 scrollUp(jQuery(this).parents('.slider')); 48 }); 49 jQuery('.slider .downArrMovie').click(function(){ 50 scrollDown(jQuery(this).parents('.slider')); 51 }); 52}); 53 54/*-------------------------------------------------------------------*/ 55 56function scrollLeft(slider, repeat){ 57 var i = jQuery(slider).index(); 58 if(!(repeat)){ 59 clearInterval(move[i]); 60 } 61 if(!(direction[i] == 'left' && sliders[i] == 'act')){ 62 direction[i] = 'left'; 63 sliders[i] = 'act'; 64 var firstBlock = jQuery(slider).find('div div div:first-child, blockquote:first-child'); 65 var listBlock = jQuery(slider).find('.list'); 66 var leftMFirst = Math.abs(parseInt(jQuery(listBlock).css('margin-left'))); 67 var leftM = Math.abs(parseInt(jQuery(firstBlock).css('margin-left'))); 68 var rightM = parseInt(jQuery(slider).find('blockquote, div div div').css('margin-right')); 69 var fullWidth = Math.round(jQuery(firstBlock).width() + parseInt(jQuery(firstBlock).css('padding-left')) + parseInt(jQuery(firstBlock).css('padding-right')) + rightM); 70 var leftShift = leftM - fullWidth; 71 var timeShiftMovie = jQuery(slider).attr('data-shift'); 72 var maxWidthMovie = jQuery(slider).attr('data-width'); 73 if(leftMFirst == leftM){ 74 var step = fullWidth; 75 }else{ 76 var step = fullWidth - leftM; 77 } 78 var stepTime = timeShiftMovie*step/maxWidthMovie; 79 jQuery(slider).stop(true); 80 jQuery(firstBlock).stop(true); 81 if(leftMFirst == leftM){ 82 jQuery(firstBlock).css({'marginLeft':'0'}); 83 jQuery(slider).find('div div div:last-child, blockquote:last-child').insertBefore(firstBlock).css({'marginLeft':leftShift + 'px'}); 84 } 85 jQuery(slider).find('div div div:first-child, blockquote:first-child').animate({marginLeft:leftMFirst + 'px'},stepTime,function(){ 86 jQuery(slider).find('blockquote, div div div').end(); 87 jQuery(this).css({'marginLeft':leftMFirst + 'px'}); 88 direction[i] = ''; 89 sliders[i] = ''; 90 }); 91 } 92} 93function scrollRight(slider, repeat){ 94 var i = jQuery(slider).index(); 95 if(!(repeat)){ 96 clearInterval(move[i]); 97 } 98 if(!(direction[i] == 'right' && sliders[i] == 'act')){ 99 direction[i] = 'right'; 100 sliders[i] = 'act'; 101 var firstBlock = jQuery(slider).find('div div div:first-child, blockquote:first-child'); 102 var listBlock = jQuery(slider).find('.list');
103 var leftMFirst = Math.abs(parseInt(jQuery(listBlock).css('margin-left'))); 104 var leftM = Math.abs(parseInt(jQuery(firstBlock).css('margin-left'))); 105 var rightM = parseInt(jQuery(slider).find('blockquote, div div div').css('margin-right')); 106 var fullWidth = Math.round(jQuery(firstBlock).width() + parseInt(jQuery(firstBlock).css('padding-left')) + parseInt(jQuery(firstBlock).css('padding-right')) + rightM); 107 var leftShift = leftMFirst - fullWidth; 108 var timeShiftMovie = jQuery(slider).attr('data-shift'); 109 var maxWidthMovie = jQuery(slider).attr('data-width'); 110 if(leftMFirst == leftM){ 111 var step = fullWidth; 112 }else{ 113 var step = jQuery('.movie').width() - fullWidth + leftM; 114 } 115 var stepTime = timeShiftMovie*step/maxWidthMovie; 116 jQuery(slider).stop(true); 117 jQuery(firstBlock).stop(true); 118 jQuery(firstBlock).animate({marginLeft:leftShift + 'px'},stepTime,function(){ 119 jQuery(firstBlock).appendTo(jQuery(jQuery(listBlock))).css({'marginLeft':0}); 120 jQuery(slider).find('blockquote:first-child, div div div:first-child').css({'marginLeft':leftMFirst + 'px'}); 121 direction = ''; 122 sliders[jQuery(slider).index()] = ''; 123 }); 124 } 125} 126 127 128function scrollUp(slider, repeat){ 129 var i = jQuery(slider).index(); 130 if(!(repeat)){ 131 clearInterval(move[i]); 132 } 133 if(!(direction[i] == 'up' && sliders[i] == 'act')){ 134 direction[i] = 'up'; 135 sliders[i] = 'act'; 136 var firstBlock = jQuery(slider).find('div div div:first-child, blockquote:first-child'); 137 var listBlock = jQuery(slider).find('.list'); 138 var topMFirst = Math.abs(parseInt(jQuery(listBlock).css('margin-top'))); 139 var topM = Math.abs(parseInt(jQuery(firstBlock).css('margin-top'))); 140 var bottomM = parseInt(jQuery(slider).find('blockquote, div div div').css('margin-bottom')); 141 var fullHeight = Math.round(jQuery(firstBlock).height() + parseInt(jQuery(firstBlock).css('padding-top')) + parseInt(jQuery(firstBlock).css('padding-bottom')) + bottomM); 142 var topShift = topMFirst - fullHeight; 143 var timeShiftMovie = jQuery(slider).attr('data-shift'); 144 var maxHeightMovie = jQuery(slider).attr('data-height'); 145 if(Math.round(topM) == Math.round(topMFirst)){ 146 var step = fullHeight; 147 }else{ 148 var step = jQuery('.movie').height() - fullHeight + topM; 149 } 150 if(Math.abs(Math.round(topM)) == Math.abs(Math.round(topShift))){ 151 console.log('topShift: ' + topShift); 152 console.log('topM: ' + topM); 153 154 console.log('step: ' + step); 155 clearInterval(move[i]); 156// return false; 157 } 158 var stepTime = timeShiftMovie*step/maxHeightMovie; 159 160/* console.log('topShift: ' + topShift); 161 console.log('topMFirst: ' + topMFirst); 162 console.log('topM: ' + topM);*/ 163 jQuery(slider).stop(true); 164 jQuery(firstBlock).stop(true); 165 jQuery(firstBlock).animate({marginTop:topShift + 'px'},stepTime,function(){ 166 jQuery(slider).find('div div div:first-child, blockquote:first-child').appendTo(jQuery(jQuery(listBlock))).css({'marginTop':0}); 167 jQuery(slider).find('blockquote:first-child, div div div:first-child').css({'marginTop':topMFirst + 'px'}); 168 direction = ''; 169 sliders[jQuery(slider).index()] = ''; 170 }); 171 } 172} 173function scrollDown(slider, repeat){ 174 var i = jQuery(slider).index(); 175 if(!(repeat)){ 176 clearInterval(move[i]); 177 } 178 if(!(direction[i] == 'down' && sliders[i] == 'act')){ 179 direction[i] = 'down'; 180 sliders[i] = 'act'; 181 var firstBlock = jQuery(slider).find('div div div:first-child, blockquote:first-child'); 182 var listBlock = jQuery(slider).find('.list'); 183 var topMFirst = Math.abs(parseInt(jQuery(listBlock).css('margin-top'))); 184 var topM = Math.abs(parseInt(jQuery(firstBlock).css('margin-top'))); 185 var bottomM = parseInt(jQuery(slider).find('blockquote, .div div div').css('margin-bottom')); 186 var fullHeight = Math.round(jQuery(firstBlock).height() + parseInt(jQuery(firstBlock).css('padding-top')) + parseInt(jQuery(firstBlock).css('padding-bottom')) + bottomM); 187 var topShift = topM - fullHeight; 188 var timeShiftMovie = jQuery(slider).attr('data-shift'); 189 var maxHeightMovie = jQuery(slider).attr('data-height'); 190 if(topMFirst == topM){ 191 var step = fullHeight; 192 }else{ 193 var step = fullHeight - topM; 194 } 195 var stepTime = timeShiftMovie*step/maxHeightMovie; 196 jQuery(slider).stop(true); 197 jQuery(firstBlock).stop(true); 198 if(topMFirst == topM){ 199 jQuery(firstBlock).css({'marginTop':'0'}); 200 jQuery(slider).find('div div div:last-child, blockquote:last-child').insertBefore(firstBlock).css({'marginTop':topShift + 'px'}); 201 } 202 jQuery(slider).find('div div div:first-child, blockquote:first-child').animate({marginTop:topMFirst + 'px'},stepTime,function(){ 203 jQuery(slider).find('blockquote, div div div').end(); 204 jQuery(this).css({'marginTop':topMFirst + 'px'}); 205 direction[i] = ''; 206 sliders[i] = ''; 207 }); 208 } 209} 210 211 212var cssHead = document.getElementsByTagName('head')[0]; 213var cssLink = document.createElement('link'); 214cssLink.rel = 'stylesheet'; 215cssLink.type = 'text/css'; 216cssLink.href = 'https://cdn.envybox.io/widget/cbk.css'; 217cssHead.appendChild(cssLink); 218(function() { 219var d = document; 220var w = window; 221 222function l() { 223 var s = document.createElement('script'); 224 s.type = 'text/javascript'; 225 s.async = true; 226 s.src = 'https://cdn.envybox.io/widget/cbk.js?wcb_code=6aa33d3f233fe36da9507587713f3799'; 227 var ss = document.getElementsByTagName('script')[0]; 228 ss.parentNode.insertBefore(s, ss); 229} 230if (d.readyState == 'complete') { 231 l(); 232} else { 233 if (w.attachEvent) { 234 w.attachEvent('onload', l); 235 } else { 236 w.addEventListener('load', l, false); 237 } 238} 239})();
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.