1(function (a) { 2 a.fn.slideshow = function (p) { 3 var p = p || {}, autoplay = p && p.autoplay ? p.autoplay : "enable", 4 time_Interval = p && p.time_Interval ? p.time_Interval : "4000"; 5 time_Interval = parseInt(time_Interval); 6 var g = a(this), current = -1, y = g.children(".slideshow-products").children("div").length, v, w; 7 if (y == 0) { 8 g.append("Require content"); 9 return null 10 } 11 ; 12 if (autoplay == "enable") { 13 play() 14 } else { 15 current = 0; 16 showpic() 17 } 18 ;g.find(".slideshow-controls").children("li").hover(function () { 19 var index = g.find(".slideshow-controls").children("li").index($(this)); 20 if (index != current) { 21 current = index; 22 showpic() 23 } 24 }, function () { 25 }); 26 g.hover(function () { 27 if (autoplay == "enable") v = setTimeout(play, time_Interval) 28 }) 29 30 function showpic() { 31 clearTimeout(v); 32 g.find(".slideshow-products").find(".product").fadeOut(100); 33 g.find(".slideshow-products").find(".product").eq(current).fadeIn(100); 34 g.find(".slideshow-controls").children("li").eq(current).addClass("active"); 35 g.find(".slideshow-controls").children("li").eq(w).removeClass(); 36 w = current 37 } 38 39 function play() { 40 current++; 41 if (current >= y) current = 0; 42 showpic(); 43 v = setTimeout(play, time_Interval) 44 } 45 } 46})(jQuery); 47 48function resizeSlideshow(sliderId) 49{ 50 console.log('resizeSlideshow ' + sliderId); 51 var teaserElement = jQuery('#slideshow_' + sliderId); 52 if (teaserElement.length != 0) { 53 try { 54 var totalHeight = teaserElement.height(); 55 teaserElement.css({'max-height': totalHeight + 'px'}); 56 57 var count = teaserElement.find('.slideshow-controls li').length; 58 var controlsHeight = $(teaserElement.find('.slideshow-controls')[0]).height(); 59 60 if (controlsHeight > totalHeight) { 61 teaserElement.find('.slideshow-controls li p').css({ 'margin-top': 0, 'margin-bottom': 0}); 62 teaserElement.find('.slideshow-controls li').css({'padding-top': 0,'padding-top': 0}); 63 teaserElement.find('.slideshow-controls li').css({'height': totalHeight / count + 'px'}); 64 controlsHeight = $(teaserElement.find('.slideshow-controls')[0]).height(); 65 } 66 67 if (controlsHeight < totalHeight) { 68 var pad = (totalHeight - controlsHeight) / (count * 2); 69 teaserElement.find('.slideshow-controls li').css({'padding-top': pad + 'px','padding-bottom': pad + 'px'}); 70 } 71 } 72 catch (ex) { 73 console.log('#slideshow_{$data.slider_id} - resize =>', ex); 74 } 75 } 76 else{ 77 console.log('resizeSlideshow ' + sliderId + ' not found'); 78 } 79 80} 81 82
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.