1/** 2 * BxSlider v4.1.2 - Fully loaded, responsive content slider 3 * http://bxslider.com 4 * 5 * Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com 6 * Written while drinking Belgian ales and listening to jazz 7 * 8 * Released under the MIT license - http://opensource.org/licenses/MIT 9 */ 10!function(t) { 11 var e = {} 12 , s = { 13 mode: "horizontal", 14 slideSelector: "", 15 infiniteLoop: !0, 16 hideControlOnEnd: !1, 17 speed: 500, 18 easing: null, 19 slideMargin: 0, 20 startSlide: 0, 21 randomStart: !1, 22 captions: !1, 23 ticker: !1, 24 tickerHover: !1, 25 adaptiveHeight: !1, 26 adaptiveHeightSpeed: 500, 27 video: !1, 28 useCSS: !0, 29 preloadImages: "visible", 30 responsive: !0, 31 slideZIndex: 50, 32 touchEnabled: !0, 33 swipeThreshold: 50, 34 oneToOneTouch: !0, 35 preventDefaultSwipeX: !0, 36 preventDefaultSwipeY: !1, 37 pager: !0, 38 pagerType: "full", 39 pagerShortSeparator: " / ", 40 pagerSelector: null, 41 buildPager: null, 42 pagerCustom: null, 43 controls: !0, 44 nextText: "Next", 45 prevText: "Prev", 46 nextSelector: null, 47 prevSelector: null, 48 autoControls: !1, 49 startText: "Start", 50 stopText: "Stop", 51 autoControlsCombine: !1, 52 autoControlsSelector: null, 53 auto: !1, 54 pause: 4e3, 55 autoStart: !0, 56 autoDirection: "next", 57 autoHover: !1, 58 autoDelay: 0, 59 minSlides: 1, 60 maxSlides: 1, 61 moveSlides: 0, 62 slideWidth: 0, 63 onSliderLoad: function() {}, 64 onSlideBefore: function() {}, 65 onSlideAfter: function() {}, 66 onSlideNext: function() {}, 67 onSlidePrev: function() {}, 68 onSliderResize: function() {} 69 }; 70 t.fn.bxSlider = function(n) { 71 if (0 == this.length) 72 return this; 73 if (this.length > 1) 74 return this.each(function() { 75 t(this).bxSlider(n) 76 }), 77 this; 78 var o = {} 79 , r = this; 80 e.el = this; 81 var a = t(window).width() 82 , l = t(window).height() 83 , d = function() { 84 o.settings = t.extend({}, s, n), 85 o.settings.slideWidth = parseInt(o.settings.slideWidth), 86 o.children = r.children(o.settings.slideSelector), 87 o.children.length < o.settings.minSlides && (o.settings.minSlides = o.children.length), 88 o.children.length < o.settings.maxSlides && (o.settings.maxSlides = o.children.length), 89 o.settings.randomStart && (o.settings.startSlide = Math.floor(Math.random() * o.children.length)), 90 o.active = { 91 index: o.settings.startSlide 92 }, 93 o.carousel = o.settings.minSlides > 1 || o.settings.maxSlides > 1, 94 o.carousel && (o.settings.preloadImages = "all"), 95 o.minThreshold = o.settings.minSlides * o.settings.slideWidth + (o.settings.minSlides - 1) * o.settings.slideMargin, 96 o.maxThreshold = o.settings.maxSlides * o.settings.slideWidth + (o.settings.maxSlides - 1) * o.settings.slideMargin, 97 o.working = !1, 98 o.controls = {}, 99 o.interval = null, 100 o.animProp = "vertical" == o.settings.mode ? "top" : "left", 101 o.usingCSS = o.settings.useCSS && "fade" != o.settings.mode && function() { 102 var t = document.createElement("div") 103 , e = ["WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]; 104 for (var i in e) 105 if (void 0 !== t.style[e[i]]) 106 return o.cssPrefix = e[i].replace("Perspective", "").toLowerCase(), 107 o.animProp = "-" + o.cssPrefix + "-transform", 108 !0; 109 return !1 110 }(), 111 "vertical" == o.settings.mode && (o.settings.maxSlides = o.settings.minSlides), 112 r.data("origStyle", r.attr("style")), 113 r.children(o.settings.slideSelector).each(function() { 114 t(this).data("origStyle", t(this).attr("style")) 115 }), 116 c() 117 } 118 , c = function() { 119 r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'), 120 o.viewport = r.parent(),
121 o.loader = t('<div class="bx-loading" />'), 122 o.viewport.prepend(o.loader), 123 r.css({ 124 width: "horizontal" == o.settings.mode ? 100 * o.children.length + 215 + "%" : "auto", 125 position: "relative" 126 }), 127 o.usingCSS && o.settings.easing ? r.css("-" + o.cssPrefix + "-transition-timing-function", o.settings.easing) : o.settings.easing || (o.settings.easing = "swing"), 128 f(), 129 o.viewport.css({ 130 width: "100%", 131 overflow: "hidden", 132 position: "relative" 133 }), 134 o.viewport.parent().css({ 135 maxWidth: p() 136 }), 137 o.settings.pager || o.viewport.parent().css({ 138 margin: "0 auto 0px" 139 }), 140 o.children.css({ 141 "float": "horizontal" == o.settings.mode ? "left" : "none", 142 listStyle: "none", 143 position: "relative" 144 }), 145 o.children.css("width", u()), 146 "horizontal" == o.settings.mode && o.settings.slideMargin > 0 && o.children.css("marginRight", o.settings.slideMargin), 147 "vertical" == o.settings.mode && o.settings.slideMargin > 0 && o.children.css("marginBottom", o.settings.slideMargin), 148 "fade" == o.settings.mode && (o.children.css({ 149 position: "absolute", 150 zIndex: 0, 151 display: "none" 152 }), 153 o.children.eq(o.settings.startSlide).css({ 154 zIndex: o.settings.slideZIndex, 155 display: "block" 156 })), 157 o.controls.el = t('<div class="bx-controls" />'), 158 o.settings.captions && P(), 159 o.active.last = o.settings.startSlide == x() - 1, 160 o.settings.video && r.fitVids(); 161 var e = o.children.eq(o.settings.startSlide); 162 "all" == o.settings.preloadImages && (e = o.children), 163 o.settings.ticker ? o.settings.pager = !1 : (o.settings.pager && T(), 164 o.settings.controls && C(), 165 o.settings.auto && o.settings.autoControls && E(), 166 (o.settings.controls || o.settings.autoControls || o.settings.pager) && o.viewport.after(o.controls.el)), 167 g(e, h) 168 } 169 , g = function(e, i) { 170 var s = e.find("img, iframe").length; 171 if (0 == s) 172 return i(), 173 void 0; 174 var n = 0; 175 e.find("img, iframe").each(function() { 176 t(this).one("load", function() { 177 ++n == s && i() 178 }).each(function() { 179 this.complete && t(this).load() 180 }) 181 }) 182 } 183 , h = function() { 184 if (o.settings.infiniteLoop && "fade" != o.settings.mode && !o.settings.ticker) { 185 var e = "vertical" == o.settings.mode ? o.settings.minSlides : o.settings.maxSlides 186 , i = o.children.slice(0, e).clone().addClass("bx-clone") 187 , s = o.children.slice(-e).clone().addClass("bx-clone"); 188 r.append(i).prepend(s) 189 } 190 o.loader.remove(), 191 S(), 192 "vertical" == o.settings.mode && (o.settings.adaptiveHeight = !0), 193 o.viewport.height(v()), 194 r.redrawSlider(), 195 o.settings.onSliderLoad(o.active.index), 196 o.initialized = !0, 197 o.settings.responsive && t(window).bind("resize", Z), 198 o.settings.auto && o.settings.autoStart && H(), 199 o.settings.ticker && L(), 200 o.settings.pager && q(o.settings.startSlide), 201 o.settings.controls && W(), 202 o.settings.touchEnabled && !o.settings.ticker && O() 203 } 204 , v = function() { 205 var e = 0 206 , s = t(); 207 if ("vertical" == o.settings.mode || o.settings.adaptiveHeight) 208 if (o.carousel) { 209 var n = 1 == o.settings.moveSlides ? o.active.index : o.active.index * m(); 210 for (s = o.children.eq(n), 211 i = 1; i <= o.settings.maxSlides - 1; i++) 212 s = n + i >= o.children.length ? s.add(o.children.eq(i - 1)) : s.add(o.children.eq(n + i)) 213 } else 214 s = o.children.eq(o.active.index); 215 else 216 s = o.children; 217 return "vertical" == o.settings.mode ? (s.each(function() { 218 e += t(this).outerHeight() 219 }), 220 o.settings.slideMargin > 0 && (e += o.settings.slideMargin * (o.settings.minSlides - 1))) : e = Math.max.apply(Math, s.map(function() { 221 return t(this).outerHeight(!1) 222 }).get()), 223 e 224 } 225 , p = function() { 226 var t = "100%"; 227 return o.settings.slideWidth > 0 && (t = "horizontal" == o.settings.mode ? o.settings.maxSlides * o.settings.slideWidth + (o.settings.maxSlides - 1) * o.settings.slideMargin : o.settings.slideWidth), 228 t 229 } 230 , u = function() { 231 var t = o.settings.slideWidth 232 , e = o.viewport.width(); 233 return 0 == o.settings.slideWidth || o.settings.slideWidth > e && !o.carousel || "vertical" == o.settings.mode ? t = e : o.settings.maxSlides > 1 && "horizontal" == o.settings.mode && (e > o.maxThreshold || e < o.minThreshold && (t = (e - o.settings.slideMargin * (o.settings.minSlides - 1)) / o.settings.minSlides)), 234 t 235 } 236 , f = function() { 237 var t = 1; 238 if ("horizontal" == o.settings.mode && o.settings.slideWidth > 0) 239 if (o.viewport.width() < o.minThreshold) 240 t = o.settings.minSlides; 241 else if (o.viewport.width() > o.maxThreshold) 242 t = o.settings.maxSlides; 243 else { 244 var e = o.children.first().width(); 245 t = Math.floor(o.viewport.width() / e) 246 } 247 else 248 "vertical" == o.settings.mode && (t = o.settings.minSlides); 249 return t 250 } 251 , x = function() { 252 var t = 0; 253 if (o.settings.moveSlides > 0) 254 if (o.settings.infiniteLoop) 255 t = o.children.length / m(); 256 else 257 for (var e = 0, i = 0; e < o.children.length; ) 258 ++t, 259 e = i + f(), 260 i += o.settings.moveSlides <= f() ? o.settings.moveSlides : f(); 261 else
262 t = Math.ceil(o.children.length / f()); 263 return t 264 } 265 , m = function() { 266 return o.settings.moveSlides > 0 && o.settings.moveSlides <= f() ? o.settings.moveSlides : f() 267 } 268 , S = function() { 269 if (o.children.length > o.settings.maxSlides && o.active.last && !o.settings.infiniteLoop) { 270 if ("horizontal" == o.settings.mode) { 271 var t = o.children.last() 272 , e = t.position(); 273 b(-(e.left - (o.viewport.width() - t.width())), "reset", 0) 274 } else if ("vertical" == o.settings.mode) { 275 var i = o.children.length - o.settings.minSlides 276 , e = o.children.eq(i).position(); 277 b(-e.top, "reset", 0) 278 } 279 } else { 280 var e = o.children.eq(o.active.index * m()).position(); 281 o.active.index == x() - 1 && (o.active.last = !0), 282 void 0 != e && ("horizontal" == o.settings.mode ? b(-e.left, "reset", 0) : "vertical" == o.settings.mode && b(-e.top, "reset", 0)) 283 } 284 } 285 , b = function(t, e, i, s) { 286 if (o.usingCSS) { 287 var n = "vertical" == o.settings.mode ? "translate3d(0, " + t + "px, 0)" : "translate3d(" + t + "px, 0, 0)"; 288 r.css("-" + o.cssPrefix + "-transition-duration", i / 1e3 + "s"), 289 "slide" == e ? (r.css(o.animProp, n), 290 r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() { 291 r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"), 292 D() 293 })) : "reset" == e ? r.css(o.animProp, n) : "ticker" == e && (r.css("-" + o.cssPrefix + "-transition-timing-function", "linear"), 294 r.css(o.animProp, n), 295 r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() { 296 r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"), 297 b(s.resetValue, "reset", 0), 298 N() 299 })) 300 } else { 301 var a = {}; 302 a[o.animProp] = t, 303 "slide" == e ? r.animate(a, i, o.settings.easing, function() { 304 D() 305 }) : "reset" == e ? r.css(o.animProp, t) : "ticker" == e && r.animate(a, speed, "linear", function() { 306 b(s.resetValue, "reset", 0), 307 N() 308 }) 309 } 310 } 311 , w = function() { 312 for (var e = "", i = x(), s = 0; i > s; s++) { 313 var n = ""; 314 o.settings.buildPager && t.isFunction(o.settings.buildPager) ? (n = o.settings.buildPager(s), 315 o.pagerEl.addClass("bx-custom-pager")) : (n = s + 1, 316 o.pagerEl.addClass("bx-default-pager")), 317 e += '<div class="bx-pager-item"><a href="" data-slide-index="' + s + '" class="bx-pager-link">' + n + "</a></div>" 318 } 319 o.pagerEl.html(e) 320 } 321 , T = function() { 322 o.settings.pagerCustom ? o.pagerEl = t(o.settings.pagerCustom) : (o.pagerEl = t('<div class="bx-pager" />'), 323 o.settings.pagerSelector ? t(o.settings.pagerSelector).html(o.pagerEl) : o.controls.el.addClass("bx-has-pager").append(o.pagerEl), 324 w()), 325 o.pagerEl.on("click", "a", I) 326 } 327 , C = function() { 328 o.controls.next = t('<a class="bx-next" href="">' + o.settings.nextText + "</a>"), 329 o.controls.prev = t('<a class="bx-prev" href="">' + o.settings.prevText + "</a>"), 330 o.controls.next.bind("click", y), 331 o.controls.prev.bind("click", z), 332 o.settings.nextSelector && t(o.settings.nextSelector).append(o.controls.next), 333 o.settings.prevSelector && t(o.settings.prevSelector).append(o.controls.prev), 334 o.settings.nextSelector || o.settings.prevSelector || (o.controls.directionEl = t('<
334div class="bx-controls-direction" />'), 335 o.controls.directionEl.append(o.controls.prev).append(o.controls.next), 336 o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl)) 337 } 338 , E = function() { 339 o.controls.start = t('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + o.settings.startText + "</a></div>"), 340 o.controls.stop = t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + o.settings.stopText + "</a></div>"), 341 o.controls.autoEl = t('<div class="bx-controls-auto" />'), 342 o.controls.autoEl.on("click", ".bx-start", k), 343 o.controls.autoEl.on("click", ".bx-stop", M), 344 o.settings.autoControlsCombine ? o.controls.autoEl.append(o.controls.start) : o.controls.autoEl.append(o.controls.start).append(o.controls.stop), 345 o.settings.autoControlsSelector ? t(o.settings.autoControlsSelector).html(o.controls.autoEl) : o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl), 346 A(o.settings.autoStart ? "stop" : "start") 347 } 348 , P = function() { 349 //o.children.each(function() { 350 // var e = t(this).find("img:first").attr("title"); 351 // void 0 != e && ("" + e).length && t(this).append('<div class="bx-caption"><span>' + e + "</span></div>") 352 //}) 353 o.children.each(function() { 354 // title屿§ãå¦ç 355 var eTitle = t(this).find("img:first").attr("title"); 356 if (eTitle && eTitle.length) { 357 t(this).append('<div class="bx-caption"><span>' + eTitle + "</span></div>"); 358 } 359 360 // data-title屿§ãå¦ç 361 var eDataTitle = t(this).find("img:first").attr("data-title"); 362 if (eDataTitle && eDataTitle.length) { 363 t(this).append('<div class="bx-caption"><span>' + eDataTitle + "</span></div>"); 364 } 365 }); 366 } 367 , y = function(t) { 368 o.settings.auto && r.stopAuto(), 369 r.goToNextSlide(), 370 t.preventDefault() 371 } 372 , z = function(t) { 373 o.settings.auto && r.stopAuto(), 374 r.goToPrevSlide(), 375 t.preventDefault() 376 } 377 , k = function(t) { 378 r.startAuto(), 379 t.preventDefault() 380 } 381 , M = function(t) { 382 r.stopAuto(), 383 t.preventDefault() 384 } 385 , I = function(e) { 386 o.settings.auto && r.stopAuto(); 387 var i = t(e.currentTarget) 388 , s = parseInt(i.attr("data-slide-index")); 389 s != o.active.index && r.goToSlide(s), 390 e.preventDefault() 391 } 392 , q = function(e) { 393 var i = o.children.length; 394 return "short" == o.settings.pagerType ? (o.settings.maxSlides > 1 && (i = Math.ceil(o.children.length / o.settings.maxSlides)), 395 o.pagerEl.html(e + 1 + o.settings.pagerShortSeparator + i), 396 void 0) : (o.pagerEl.find("a").removeClass("active"), 397 o.pagerEl.each(function(i, s) { 398 t(s).find("a").eq(e).addClass("active") 399 }), 400 void 0) 401 } 402 , D = function() { 403 if (o.settings.infiniteLoop) { 404 var t = ""; 405 0 == o.active.index ? t = o.children.eq(0).position() : o.active.index == x() - 1 && o.carousel ? t = o.children.eq((x() - 1) * m()).position() : o.active.index == o.children.length - 1 && (t = o.children.eq(o.children.length - 1).position()), 406 t && ("horizontal" == o.settings.mode ? b(-t.left, "reset", 0) : "vertical" == o.settings.mode && b(-t.top, "reset", 0)) 407 } 408 o.working = !1, 409 o.settings.onSlideAfter(o.children.eq(o.active.index), o.oldIndex, o.active.index) 410 } 411 , A = function(t) { 412 o.settings.autoControlsCombine ? o.controls.autoEl.html(o.controls[t]) : (o.controls.autoEl.find("a").removeClass("active"), 413 o.controls.autoEl.find("a:not(.bx-" + t + ")").addClass("active")) 414 } 415 , W = function() { 416 1 == x() ? (o.controls.prev.addClass("disabled"), 417 o.controls.next.addClass("disabled")) : !o.settings.infiniteLoop && o.settings.hideControlOnEnd && (0 == o.active.index ? (o.controls.prev.addClass("disabled"), 418 o.controls.next.removeClass("disabled")) : o.active.index == x() - 1 ? (o.controls.next.addClass("disabled"), 419 o.controls.prev.removeClass("disabled")) : (o.controls.prev.removeClass("disabled"), 420 o.controls.next.removeClass("disabled"))) 421 } 422 , H = function() { 423 o.settings.autoDelay > 0 ? setTimeout(r.startAuto, o.settings.autoDelay) : r.startAuto(), 424 o.settings.autoHover && r.hover(function() { 425 o.interval && (r.stopAuto(!0), 426 o.autoPaused = !0) 427 }, function() { 428 o.autoPaused && (r.startAuto(!0), 429 o.autoPaused = null) 430 }) 431 } 432 , L = function() { 433 var e = 0; 434 if ("next" == o.settings.autoDirection) 435 r.append(o.children.clone().addClass("bx-clone")); 436 else { 437 r.prepend(o.children.clone().addClass("bx-clone")); 438 var i = o.children.first().position(); 439 e = "horizontal" == o.settings.mode ? -i.left : -i.top 440 } 441 b(e, "reset", 0), 442 o.settings.pager = !1, 443 o.settings.controls = !1, 444 o.settings.autoControls = !1, 445 o.settings.tickerHover && !o.usingCSS && o.viewport.hover(function() { 446 r.stop() 447 }, function() { 448 var e = 0; 449 o.children.each(function() { 450 e += "horizontal" == o.settings.mode ? t(this).outerWidth(!0) : t(this).outerHeight(!0) 451 }); 452 var i = o.settings.speed / e 453 , s = "horizontal" == o.settings.mode ? "left" : "top"
454 , n = i * (e - Math.abs(parseInt(r.css(s)))); 455 N(n) 456 }), 457 N() 458 } 459 , N = function(t) { 460 speed = t ? t : o.settings.speed; 461 var e = { 462 left: 0, 463 top: 0 464 } 465 , i = { 466 left: 0, 467 top: 0 468 }; 469 "next" == o.settings.autoDirection ? e = r.find(".bx-clone").first().position() : i = o.children.first().position(); 470 var s = "horizontal" == o.settings.mode ? -e.left : -e.top 471 , n = "horizontal" == o.settings.mode ? -i.left : -i.top 472 , a = { 473 resetValue: n 474 }; 475 b(s, "ticker", speed, a) 476 } 477 , O = function() { 478 o.touch = { 479 start: { 480 x: 0, 481 y: 0 482 }, 483 end: { 484 x: 0, 485 y: 0 486 } 487 }, 488 o.viewport.bind("touchstart", X) 489 } 490 , X = function(t) { 491 if (o.working) 492 t.preventDefault(); 493 else { 494 o.touch.originalPos = r.position(); 495 var e = t.originalEvent; 496 o.touch.start.x = e.changedTouches[0].pageX, 497 o.touch.start.y = e.changedTouches[0].pageY, 498 o.viewport.bind("touchmove", Y), 499 o.viewport.bind("touchend", V) 500 } 501 } 502 , Y = function(t) { 503 var e = t.originalEvent 504 , i = Math.abs(e.changedTouches[0].pageX - o.touch.start.x) 505 , s = Math.abs(e.changedTouches[0].pageY - o.touch.start.y); 506 if (3 * i > s && o.settings.preventDefaultSwipeX ? t.preventDefault() : 3 * s > i && o.settings.preventDefaultSwipeY && t.preventDefault(), 507 "fade" != o.settings.mode && o.settings.oneToOneTouch) { 508 var n = 0; 509 if ("horizontal" == o.settings.mode) { 510 var r = e.changedTouches[0].pageX - o.touch.start.x; 511 n = o.touch.originalPos.left + r 512 } else { 513 var r = e.changedTouches[0].pageY - o.touch.start.y; 514 n = o.touch.originalPos.top + r 515 } 516 b(n, "reset", 0) 517 } 518 } 519 , V = function(t) { 520 o.viewport.unbind("touchmove", Y); 521 var e = t.originalEvent 522 , i = 0; 523 if (o.touch.end.x = e.changedTouches[0].pageX, 524 o.touch.end.y = e.changedTouches[0].pageY, 525 "fade" == o.settings.mode) { 526 var s = Math.abs(o.touch.start.x - o.touch.end.x); 527 s >= o.settings.swipeThreshold && (o.touch.start.x > o.touch.end.x ? r.goToNextSlide() : r.goToPrevSlide(), 528 r.stopAuto()) 529 } else { 530 var s = 0; 531 "horizontal" == o.settings.mode ? (s = o.touch.end.x - o.touch.start.x, 532 i = o.touch.originalPos.left) : (s = o.touch.end.y - o.touch.start.y, 533 i = o.touch.originalPos.top), 534 !o.settings.infiniteLoop && (0 == o.active.index && s > 0 || o.active.last && 0 > s) ? b(i, "reset", 200) : Math.abs(s) >= o.settings.swipeThreshold ? (0 > s ? r.goToNextSlide() : r.goToPrevSlide(), 535 r.stopAuto()) : b(i, "reset", 200) 536 } 537 o.viewport.unbind("touchend", V) 538 } 539 , Z = function() { 540 var e = t(window).width() 541 , i = t(window).height(); 542 (a != e || l != i) && (a = e, 543 l = i, 544 r.redrawSlider(), 545 o.settings.onSliderResize.call(r, o.active.index)) 546 }; 547 return r.goToSlide = function(e, i) { 548 if (!o.working && o.active.index != e) 549 if (o.working = !0, 550 o.oldIndex = o.active.index, 551 o.active.index = 0 > e ? x() - 1 : e >= x() ? 0 : e, 552 o.settings.onSlideBefore(o.children.eq(o.active.index), o.oldIndex, o.active.index), 553 "next" == i ? o.settings.onSlideNext(o.children.eq(o.active.index), o.oldIndex, o.active.index) : "prev" == i && o.settings.onSlidePrev(o.children.eq(o.active.index), o.oldIndex, o.active.index), 554 o.active.last = o.active.index >= x() - 1, 555 o.settings.pager && q(o.active.index), 556 o.settings.controls && W(), 557 "fade" == o.settings.mode) 558 o.settings.adaptiveHeight && o.viewport.height() != v() && o.viewport.animate({ 559 height: v() 560 }, o.settings.adaptiveHeightSpeed), 561 o.children.filter(":visible").fadeOut(o.settings.speed).css({ 562 zIndex: 0 563 }), 564 o.children.eq(o.active.index).css("zIndex", o.settings.slideZIndex + 1).fadeIn(o.settings.speed, function() { 565 t(this).css("zIndex", o.settings.slideZIndex), 566 D() 567 }); 568 else { 569 o.settings.adaptiveHeight && o.viewport.height() != v() && o.viewport.animate({ 570 height: v() 571 }, o.settings.adaptiveHeightSpeed); 572 var s = 0 573 , n = { 574 left: 0, 575 top: 0 576 }; 577 if (!o.settings.infiniteLoop && o.carousel && o.active.last) 578 if ("horizontal" == o.settings.mode) { 579 var a = o.children.eq(o.children.length - 1); 580 n = a.position(), 581 s = o.viewport.width() - a.outerWidth() 582 } else { 583 var l = o.children.length - o.settings.minSlides; 584 n = o.children.eq(l).position() 585 } 586 else if (o.carousel && o.active.last && "prev" == i) { 587 var d = 1 == o.settings.moveSlides ? o.settings.maxSlides - m() : (x() - 1) * m() - (o.children.length - o.settings.maxSlides) 588 , a = r.children(".bx-clone").eq(d); 589 n = a.position() 590 } else if ("next" == i && 0 == o.active.index) 591 n = r.find("> .bx-clone").eq(o.settings.maxSlides).position(), 592 o.active.last = !1; 593 else if (e >= 0) { 594 var c = e * m(); 595 n = o.children.eq(c).position() 596 } 597 if ("undefined" != typeof n) { 598 var g = "horizontal" == o.settings.mode ? -(n.left - s) : -n.top; 599 b(g, "slide", o.settings.speed) 600 } 601 } 602 } 603 , 604 r.goToNextSlide = function() { 605 if (o.settings.infiniteLoop || !o.active.last) { 606 var t = parseInt(o.active.index) + 1; 607 r.goToSlide(t, "next") 608 } 609 } 610 , 611 r.goToPrevSlide = function() { 612 if (o.settings.infiniteLoop || 0 != o.active.index) { 613 var t = parseInt(o.active.index) - 1; 614 r.goToSlide(t, "prev") 615 } 616 } 617 , 618 r.startAuto = function(t) { 619 o.interval || (o.interval = setInterval(function() { 620 "next" == o.settings.autoDirection ? r.goToNextSlide() : r.goToPrevSlide() 621 }, o.settings.pause), 622 o.settings.autoControls && 1 != t && A("stop")) 623 } 624 , 625 r.stopAuto = function(t) { 626 o.interval && (clearInterval(o.interval), 627 o.interval = null, 628 o.settings.autoControls && 1 != t && A("start")) 629 } 630 , 631 r.getCurrentSlide = function() { 632 return o.active.index 633 } 634 , 635 r.getCurrentSlideElement = function() { 636 return o.children.eq(o.active.index) 637 } 638 , 639 r.getSlideCount = function() { 640 return o.children.length 641 } 642 , 643 r.redrawSlider = function() { 644 o.children.add(r.find(".bx-clone")).outerWidth(u()), 645 o.viewport.css("height", v()), 646 o.settings.ticker || S(), 647 o.active.last && (o.active.index = x() - 1), 648 o.active.index >= x() && (o.active.last = !0), 649 o.settings.pager && !o.settings.pagerCustom && (w(), 650 q(o.active.index)) 651 } 652 , 653 r.destroySlider = function() { 654 o.initialized && (o.initialized = !1, 655 t(".bx-clone", this).remove(), 656 o.children.each(function() { 657 void 0 != t(this).data("origStyle") ? t(this).attr("style", t(this).data("origStyle")) : t(this).removeAttr("style") 658 }), 659 void 0 != t(this).data("origStyle") ? this.attr("style", t(this).data("origStyle")) : t(this).removeAttr("style"), 660 t(this).unwrap().unwrap(), 661 o.controls.el && o.controls.el.remove(), 662 o.controls.next && o.controls.next.remove(), 663 o.controls.prev && o.controls.prev.remove(), 664 o.pagerEl && o.settings.controls && o.pagerEl.remove(), 665 t(".bx-caption", this).remove(), 666 o.controls.autoEl && o.controls.autoEl.remove(), 667 clearInterval(o.interval), 668 o.settings.responsive && t(window).unbind("resize", Z)) 669 } 670 , 671 r.reloadSlider = function(t) { 672 void 0 != t && (n = t), 673 r.destroySlider(), 674 d() 675 } 676 , 677 d(), 678 this 679 } 680}(jQuery);
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.