1 2! function(s) { 3 function t(i, t) { 4 this.element = i, this.$el = s(i), this._defaults = n, this._name = 5 e; 6 var a = this.$el.data(), 7 l = {}; 8 for (var o in a) 9 if (a.hasOwnProperty(o) && o.match(/zs[A-Z]/)) { 10 var r = o.substr(2); 11 r = r.charAt(0).toLowerCase() + r.slice(1), l[r] = a[o] 12 } 13 return this.settings = s.extend({}, n, l, t), null == this.settings 14 .src || this.settings.src.length < 1 ? void console.log( 15 "ZoomSlider terminated - invalid input.") : void this.init() 16 } 17 var e = "zoomSlider", 18 n = { 19 src: null, 20 speed: 8e3, 21 switchSpeed: 800, 22 interval: 10000, 23 autoplay: !0, 24 bullets: !0, 25 overlay: "" 26 }; 27 s.extend(t.prototype, { 28 init: function() { 29 0 == s.isArray(this.settings.src) && (this.settings.src = [ 30 this.settings.src 31 ]), this.transEndEventNames = { 32 WebkitTransition: "webkitTransitionEnd", 33 MozTransition: "transitionend", 34 OTransition: "oTransitionEnd", 35 msTransition: "MSTransitionEnd", 36 transition: "transitionend" 37 }, this.transEndEventName = this.transEndEventNames[ 38 Modernizr.prefixed("transition")], this.support = 39 Modernizr.csstransitions && Modernizr.csstransforms; 40 var i = Modernizr.prefixed("transform"); 41 switch (i = i.replace(/([A-Z])/g, function(s, i) { 42 return "-" + i.toLowerCase() 43 }).replace(/^ms-/, "-ms-"), this.transitionProp = { 44 transition: i + " " + this.settings.speed + 45 "ms ease-out, opacity " + this.settings.switchSpeed + 46 "ms" 47 }, this.numSlides = this.settings.src.length, this.$el 48 .css("position")) { 49 case "relative": 50 case "absolute": 51 case "fixed": 52 break; 53 default: 54 this.$el.css("position", "relative") 55 } 56 var t = this, 57 e = s("<img />"); 58 e.on('load', function() { 59 1 == t.numSlides ? t.initSingle() : t.initSlideshow() 60 }), e.attr("src", this.settings.src[0]) 61 }, 62 initSlideshow: function() { 63 var t = this, 64 e = s('<div class="zs-slideshow"></div>'), 65 n = s('<div class="zs-slides"></div>'), 66 a = s('<div class="zs-bullets"></div>'); 67 for (i = 0; i < this.numSlides; i++) { 68 var l = s('<div class="zs-slide zs-slide-' + i + 69 '"></div>'); 70 l.css({ 71 "background-image": "url('" + this.settings 72 .src[i] + "')" 73 }).appendTo(n); 74 var o = s('<div class="zs-bullet zs-bullet-' + i + 75 '"></div>'); 76 o.appendTo(a), 0 == i && (l.addClass("active").css( 77 "opacity", 1), o.addClass("active")) 78 } 79 if (t._promoteChildren(), e.append(n).prependTo(this.$el), 80 1 == this.settings.bullets && (e.append(a), e.on( 81 "click", ".zs-bullet", function() { 82 t.jump(s(this).index()) 83 })), this.pos = 0, this.pending = null, this.switching = ! 84 1, this.$slideshow = e, this.$slides = n.children( 85 ".zs-slide"), this.$bullets = a.children( 86 ".zs-bullet"), this.$el.addClass("zs-enabled"), 87 "dots" == this.settings.overlay ? this.$el.addClass( 88 "overlay-dots") : "plain" == this.settings.overlay && 89 this.$el.addClass("overlay-plain"), this.support) { 90 var r = this.$slides.eq(0); 91 r.css("opacity", 0).css(this.transitionProp), 92 setTimeout(function() { 93 r.css({ 94 opacity: 1, 95 transform: "scale(1, 1)", 96 "z-index": 2 97 }) 98 }, 50) 99 } 100 1 == this.settings.autoplay && this.play() 101 }, 102 initSingle: function() { 103 var i = this, 104 t = s('<div class="zs-slideshow"></div>'), 105 e = s('<div class="zs-slides"></div>'), 106 n = s('<div class="zs-slide zs-slide-0"></div>'); 107 n.css({ 108 "background-image": "url('" + this.settings 109 .src[0] + "')" 110 }).appendTo(e), n.addClass("active").css("opacity", 111 1), i._promoteChildren(), t.append(e).prependTo( 112 this.$el), this.$el.addClass("zs-enabled"), 113 "dots" == this.settings.overlay ? this.$el.addClass( 114 "overlay-dots") : "plain" == this.settings.overlay && 115 this.$el.addClass("overlay-plain"), this.support && 116 (n.css("opacity", 0).css(this.transitionProp), 117 setTimeout(function() { 118 n.css({ 119 opacity: 1, 120 transform: "scale(1, 1)", 121 "z-index": 2 122 }) 123 }, 50)) 124 }, 125 _promoteChildren: function() { 126 this.$el.children().each(function() { 127 $this = s(this), "auto" == $this.css( 128 "z-index") && $this.css("z-index", 129 2), "static" == $this.css( 130 "position") && $this.css("position", 131 "relative") 132 }) 133 }, 134 jump: function(s) { 135 if (s >= this.numSlides) return void console.log( 136 "ZoomSlider: jump(pos) aborted. supplied index out of range." 137 ); 138 if (this.pos != s) { 139 if (this.switching) return void(this.pending = s); 140 var i = this, 141 t = this.$slides.eq(this.pos), 142 e = this.$slides.eq(s); 143 $(".slide-description").css("top", "1000px"); 144 $(".slide-description:eq(" + s + ")").animate({ 145 top : 100 146 }, 1500); 147 this.support ? (this.switching = !0, t.css( 148 "z-index", 1), e.addClass("active").css( 149 this.transitionProp).css({ 150 opacity: 1, 151 transform: "scale(1, 1)", 152 "z-index": 2 153 }).on(this.transEndEventName, function(s) { 154 "opacity" == s.originalEvent.propertyName && 155 (lastSlideBg = t.css( 156 "background-image"), t.removeClass( 157 "active").removeAttr( 158 "style").css( 159 "background-image", 160 lastSlideBg), e.off(i.transEndEventName), 161 i.switching = !1, null != i 162 .pending && setTimeout( 163 function() { 164 var s = i.pending; 165 i.pending = null, i 166 .$bullets.eq(s) 167 .click() 168 }, 30)) 169 })) : (t.removeClass("active"), e.addClass( 170 "active")), this.$bullets.eq(this.pos).removeClass( 171 "active"), this.$bullets.eq(s).addClass( 172 "active"), this.pos = s, this.settings.autoplay && 173 this.play() 174 } 175 }, 176 prev: function() { 177 var s = this.pos - 1; 178 0 > s && (s = this.numSlides - 1), this.jump(s) 179 }, 180 next: function() { 181 var s = this.pos + 1; 182 s >= this.numSlides && (s = 0), this.jump(s) 183 }, 184 play: function() { 185 null != this.timer && clearInterval(this.timer); 186 var s = this; 187 this.settings.autoplay = !0, this.timer = setInterval( 188 function() { 189 s.next() 190 }, this.settings.interval) 191 }, 192 stop: function() { 193 this.settings.autoplay = !1, clearInterval(this.timer), 194 this.timer = null 195 } 196 }), s.fn[e] = function(i) { 197 return this.each(function() { 198 s.data(this, "plugin_" + e) || s.data(this, "plugin_" + 199 e, new t(this, i)) 200 }) 201 }; 202 var a = s("[data-zs-src]"); 203 a.length > 0 && a.each(function() { 204 var i = s(this); 205 i.zoomSlider() 206 }) 207}(jQuery, window, document);
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.