1/* Translucent - Responsive Banner Rotator / Slider | v1.4.2 | Updated:17 SEP 2012 | (c) 2011-12 Ramesh Kumar | http://codecanyon.net/user/VF */ 2 3 4 5 6(function (e, f, h) { 7 var d = { 8 slide_autoplay: true, 9 slide_delaytime: 5, 10 slide_transition: 1, 11 slide_transition_period: 800, 12 slide_preload_images: 1, 13 slide_random_order: false, 14 image_align_center: true, 15 image_resize: true, 16 image_resize_to_fit: false, 17 navigation_type: 1, 18 button_size: 20, 19 button_size_touch_device: 28, 20 button_margin: 4, 21 button_opacity: 0.7, 22 button_space: 2, 23 button_color: "#FFFFFF", 24 button_show_next: true, 25 button_show_back: false, 26 button_show_timer: true, 27 button_show_numbers: true, 28 button_numbers_autohide: true, 29 button_numbers_horizontal: false, 30 dot_button_size: 14, 31 dot_button_space: 10, 32 dot_button_margin: 10, 33 dot_button_dark: false, 34 dot_button_bg_blur: true, 35 dot_button_bg_padding: 8, 36 caption_float_mode: false, 37 caption_bg_blur: 12, 38 caption_padding_x: 24, 39 caption_padding_y: 12, 40 caption_margin_x: 0, 41 caption_margin_y: 0, 42 caption_position_x: 50, 43 caption_position_y: 100, 44 caption_width: 300, 45 caption_height: "", 46 caption_bg_color: "#FFFFFF", 47 caption_bg_opacity: 0.08, 48 caption_bg_radius: 6, 49 caption_bg_shadow: 0.3, 50 caption_border: 1, 51 caption_border_color: "#FFFFFF", 52 caption_border_opacity: 0.15, 53 caption_allow_selection: false, 54 mouse_drag: true, 55 touch_swipe: true, 56 touch_dragdrop_factor: 60, 57 touch_throw_factor: 5, 58 responsive: true, 59 responsive_limit_autoplay: "", 60 responsive_limit_caption: 480, 61 responsive_limit_navigation: 480, 62 responsive_limit_navigation_type: 2, 63 responsive_screen_based_limits: false 64 }; 65 66 function i(k, t, q) { 67 var p = this; 68 var r = this.sett = e.extend({}, d, t); 69 this.instanceID = q; 70 this.$cont = k; 71 this.$children = this.$cont.find(".Slide"); 72 if (r.slide_random_order) { 73 this.shuffle(this.$children) 74 } 75 this.maxW = this.$cont.css("max-width"); 76 if (this.maxW.indexOf("%") < 0) { 77 this.maxW = parseInt(this.maxW) 78 } else { 79 this.maxW = false 80 } 81 this.bW = this.$cont.width(); 82 this.oH = parseInt(this.$cont.css("height")); 83 this.ratio = (this.maxW || this.bW) / this.oH; 84 this.bH = this.getHeight(); 85 86 this.FF2 = false; 87 this.IE8 = false; 88 89 this.canvasSupport = !!h.createElement("canvas").getContext; 90 this.touchDevice = "ontouchstart" in f; 91 this.slides = []; 92 this.slide_tot = this.$children.length; 93 this.slide_dir = -1; 94 this.slide_sel = 0; 95 this.slide_pr1 = ""; 96 this.slide_pr2 = ""; 97 this.slide_fin = false; 98 this.slide_drg = false; 99 this.slide_sta = true; 100 this.clockDraw; 101 this.clockContext; 102 this.clockStart; 103 this.clockDiff = 0; 104 this.clockTimer = r.button_show_timer; 105 this.clockPlaying = false; 106 this.buttonNext = r.button_show_next; 107 this.buttonBack = r.button_show_back; 108 this.buttonNumber = r.button_show_numbers; 109 this.buttonIE = this.IE8 ? 1 : 0; 110 this.buttonLeaveTimer; 111 this.navHolder; 112 this.draggable = ((this.touchDevice && r.touch_swipe) || (!this.touchDevice && r.mouse_drag)) ? true : false; 113 this.dragged = false; 114 this.numShow = false; 115 this.moved = 0; 116 this.timerob = e('<div style="position: absolute;"></div>'); 117 this.regxHost = new RegExp("^(?:f|ht)tp(?:s)?://([^/]+)", "im"); 118 if (this.touchDevice) { 119 this.downEvent = "touchstart"; 120 this.upEvent = "touchend"; 121 this.moveEvent = "touchmove" 122 } else { 123 this.downEvent = "mousedown"; 124 this.upEvent = "mouseup"; 125 this.moveEvent = "mousemove" 126 } 127 this.dotButtonBlurBG = false; 128 var n = ["move", "fade", "slideIn", "slideOut"]; 129 if (r.slide_transition < 1 || isNaN(r.slide_transition)) { 130 r.slide_transition = 1 131 } else { 132 if (r.slide_transition > n.length) { 133 r.slide_transition = n.length 134 } 135 } 136 r.slide_transition = n[r.slide_transition - 1]; 137 if (r.caption_margin_y == 0 && !r.caption_float_mode) { 138 r.caption_bg_radius = 0 139 } 140 if (r.button_show_numbers && !r.button_show_next) { 141 r.button_numbers_autohide = false 142 } 143 if (r.navigation_type < 1) { 144 r.navigation_type = 1 145 } else { 146 if (r.navigation_type > 3) { 147 r.navigation_type = 3 148 } 149 } 150 if (r.responsive_limit_navigation_type < 1) { 151 r.responsive_limit_navigation_type = 1 152 } else { 153 if (r.responsive_limit_navigation_type > 3) { 154 r.responsive_limit_navigation_type = 3 155 } 156 } 157 if (r.responsive_limit_navigation_type == "" || (r.navigation_type > 1 && r.responsive_limit_navigation_type === 1)) { 158 r.responsive_limit_navigation_type = r.navigation_type 159 } 160 if (this.touchDevice) { 161 r.button_size = Math.max(r.button_size, r.button_size_touch_device) 162 } 163 this.icSize = 60; 164 this.icOff = r.button_size > 26 ? this.icSize * 4 : 0; 165 if (r.dot_button_dark) { 166 this.icDotOff = -this.icSize * (11 + 0.5) + ((r.dot_button_size + r.dot_button_space) / 2) 167 } else { 168 this.icDotOff = -this.icSize * (8 + 0.5) + ((r.dot_button_size + r.dot_button_space) / 2) 169 } 170 // if (e.browser.webkit) {
171 // this.shProp = "-webkit-box-shadow" 172 // } else { 173 // if (e.browser.mozilla && this.$cont.css("box-shadow") != "none") { 174 // this.shProp = "-moz-box-shadow" 175 // } else { 176 this.shProp = "box-shadow" 177 // } 178 // } 179 this.blurIteration = this.touchDevice ? 1 : 2; 180 this.enableCaption = (r.responsive && this.checkLimit(r.responsive_limit_caption, false)) ? false : true; 181 this.currentNav = (r.responsive && this.checkLimit(r.responsive_limit_navigation, false)) ? r.responsive_limit_navigation_type : r.navigation_type; 182 this.autoPlaying = (r.responsive && this.checkLimit(r.responsive_limit_autoplay, false)) ? false : r.slide_autoplay; 183 var l = /url\(["']?([^'")]+)['"]?\)/; 184 var o = e('<div class="icon"></div>').appendTo(this.$cont); 185 this.icons = e(".icon").css("background-image").replace(l, "$1"); 186 this.imgList = [{ 187 src: this.icons, 188 loaded: false 189 }, { 190 src: this.$children.eq(0).find("img").attr("src"), 191 loaded: false 192 }]; 193 for (var m = 1; m < Math.min(r.slide_preload_images, this.slide_tot); m++) { 194 this.imgList.push({ 195 src: this.$children.eq(m).find("img").attr("src"), 196 loaded: false 197 }) 198 } 199 this.timer_sprite = this.canvasSupport || o.addClass("timer_sprite").css("background-image").replace(l, "$1"); 200 o.remove(); 201 e.each(this.imgList, function (u) { 202 var s = new Image(); 203 e(s).bind("load", { 204 id: u, 205 self: p 206 }, p.loadComplete).bind("error", { 207 id: u, 208 self: p 209 }, p.loadComplete); 210 s.src = p.imgList[u].src 211 }) 212 } 213 i.prototype = { 214 loadComplete: function (n) { 215 var l = n.data.self, 216 k = true; 217 l.imgList[n.data.id].loaded = true; 218 for (var m = 0; m < l.imgList.length; m++) { 219 if (!l.imgList[m].loaded) { 220 k = false 221 } 222 } 223 if (k) { 224 l.init() 225 } 226 }, 227 init: function () { 228 var y = this, 229 v = y.sett, 230 o = "0px 0px 6px rgba(0, 0, 0, ", 231 D = y.$children.find("div")[0], 232 m, x, E, w, t, p, n, k, u, z, B, A; 233 y.blurIE = Math.max((v.caption_bg_blur / 3), 3); 234 var q = 0; 235 if (v.button_show_next) { 236 q++ 237 } 238 if (v.button_show_back) { 239 q++ 240 } 241 if (v.button_show_timer) { 242 q++ 243 } 244 if (v.button_numbers_horizontal && !v.button_numbers_autohide) { 245 q += y.slide_tot 246 } 247 y.navWidth = q * (v.button_size + v.button_space); 248 for (var C = 0; C < y.slide_tot; C++) { 249 x = y.$children.eq(C).css({ 250 "z-index": y.slide_tot - C, 251 visibility: "visible" 252 }); 253 E = x.find("img").attr("galleryimg", "no").addClass("noSelect"); 254 if (!D && v.navigation_type == 2 && v.dot_button_bg_blur && v.dot_button_margin > -1) { 255 y.dotButtonBlurBG = true; 256 y.sett.caption_float_mode = true; 257 y.updateFloatSettings(); 258 w = e("<div>"); 259 x.append(w) 260 } else { 261 w = x.find("div") 262 } 263 y.slides.push({ 264 src: E.attr("src"), 265 scale: 1, 266 ox: "", 267 oy: "", 268 con: x, 269 img: E, 270 txt: w[0] ? w : false, 271 loaded: false, 272 butt: "", 273 z: y.slide_tot - C, 274 delay: (x.data("delay") || v.slide_delaytime) * 1000, 275 pd: x.data("position"), 276 wd: x.data("width"), 277 hd: x.data("height") 278 }); 279 if (w[0]) { 280 w.css({ 281 left: v.caption_padding_x, 282 top: v.caption_padding_y, 283 display: "none" 284 }).wrapInner(e("<span></span>").css("opacity", 0.99)); 285 if (v.caption_allow_selection) { 286 w.bind("mousedown", function (s) { 287 s.stopImmediatePropagation() 288 }) 289 } else { 290 w.addClass("noSelect").attr("unselectable", "on") 291 } 292 t = e('<div style="z-index: 3; position: absolute; bottom: ' + v.caption_margin_y + "px; " + (y.dotButtonBlurBG ? "" : "display: none") + ';"> <div class="txtCont"></div> </div>'); 293 e.extend(y.slides[C], { 294 cap: t, 295 txtCont: t.find(".txtCont") 296 }); 297 n = x.data("caption_bg_shadow") || v.caption_bg_shadow; 298 k = "-moz-border-radius: " + v.caption_bg_radius + "px; -webkit-border-radius: " + v.caption_bg_radius + "px; border-radius: " + v.caption_bg_radius + "px; -khtml-border-radius: " + v.caption_bg_radius + "px;"; 299 if (v.caption_bg_blur > 0) { 300 if (y.IE8) { 301 m = e('<div class="captionCanvas" style="z-index:1; overflow:hidden;"> <div style="position:absolute; z-index:2; top:' + (-(v.caption_bg_blur) * 2) + "px; left:" + (-(v.caption_bg_blur * 2)) + "px; -ms-filter: progid:DXImageTransform.Microsoft.blur(pixelradius=" + v.caption_bg_blur + "); filter: progid:DXImageTransform.Microsoft.blur(pixelradius=" + v.caption_bg_blur + ');"> <img src="' + E.attr("src") + '" style="position:absolute;" /> </div> </div>'); 302 if (v.caption_margin_y <= v.caption_bg_blur / 2 && !v.caption_float_mode) { 303 m.append('<div class=".TBinner" style="z-index:1; position:absolute; top:' + (-(y.blurIE) * 2) + "px; left:" + (-(y.blurIE * 2)) + "px; -ms-filter: progid:DXImageTransform.Microsoft.blur(pixelradius=" + y.blurIE + "); filter: progid:DXImageTransform.Microsoft.blur(pixelradius=" + y.blurIE + ');"> <img src="' + E.attr("src") + '" style="position:absolute;" /> </div>') 304 } 305 } else { 306 if (!y.FF2) { 307 m = e('<canvas class="captionCanvas" style="' + k + '"></canvas>') 308 } 309 } 310 } else { 311 if (n > 0 && !y.FF2) { 312 m = e('<div class="captionCanvas" style="' + k + '"></div>') 313 } 314 } 315 u = x.data("caption_bg_color") || v.caption_bg_color; 316 z = x.data("caption_bg_opacity") || v.caption_bg_opacity; 317 B = e('<div class="captionCanvas" style="z-index:2; background-color:' + u + ";" + k + '"></div>').css("opacity", z); 318 if (v.caption_border) { 319 A = e('<div class="captionCanvas" style="z-index:3; border:' + v.caption_border + "px solid " + v.caption_border_color + ";" + k + '"></div>').css("opacity", v.caption_border_opacity) 320 } 321 if (n > 0 && !y.FF2) {
322 m.css(y.shProp, (o + n + ")")) 323 } 324 t.append(m).append(B).append(A); 325 y.slides[C].txtCont.append(w); 326 x.append(t); 327 y.slides[C].bord = A; 328 y.slides[C].col = B; 329 y.slides[C].can = m 330 } 331 x.hide().bind(y.downEvent, { 332 id: C, 333 self: y 334 }, y.startDrag) 335 } 336 y.imageLoad(0); 337 for (var C = 1; C < y.slide_tot; C++) { 338 var l = new Image(); 339 y.slides[C].img.hide(); 340 e(l).bind("load", { 341 id: C, 342 self: y 343 }, y.imageLoad); 344 l.src = y.slides[C].src 345 } 346 if (y.draggable) { 347 var r = y.$cont.find("a"); 348 r.each(function () { 349 var s = e(this); 350 s.bind("click", { 351 l: s.attr("href"), 352 t: s.attr("target") 353 }, function (F) { 354 F.stopImmediatePropagation(); 355 F.preventDefault(); 356 if (!y.slide_drg) { 357 e(h).unbind(".TransBannerDrag_" + y.instanceID); 358 f.open(F.data.l, F.data.t ? F.data.t.toLowerCase() : "_self") 359 } else { 360 y.slide_drg = false 361 } 362 return false 363 }); 364 if (s.find("img").length < 1) { 365 s.bind("mousedown", function (F) { 366 F.preventDefault(); 367 return false 368 }) 369 } 370 }) 371 } 372 if (v.responsive) { 373 e(f).bind("resize", function (s) { 374 y.blurIteration = 1; 375 y.resizeBanner({ 376 internal: true 377 }) 378 }) 379 } 380 }, 381 imageLoad: function (l) { 382 var k, m; 383 if (l.data) { 384 k = l.data.self; 385 m = l.data.id 386 } else { 387 k = this; 388 m = l 389 } 390 k.slides[m].imgW = k.slides[m].img[0].width; 391 k.slides[m].imgH = k.slides[m].img[0].height; 392 k.resizeImage(m); 393 if (k.slides[m].txt) { 394 k.updateText(m) 395 } 396 if (!k.IE8 && !k.FF2 && k.sett.caption_bg_blur > 0 && k.slides[m].txt) { 397 k.createBlur(m, true) 398 } else { 399 k.showSlide(m) 400 } 401 }, 402 resizeImage: function (p) { 403 var m = this, 404 o = m.sett, 405 k = m.slides, 406 l, n; 407 if (o.image_resize) { 408 k[p].scale = m.bW / k[p].imgW; 409 if ((k[p].scale * k[p].imgH <= m.bH && !o.image_resize_to_fit) || (k[p].scale * k[p].imgH >= m.bH && o.image_resize_to_fit)) { 410 k[p].scale = m.bH / k[p].imgH; 411 k[p].img.height(m.bH); 412 k[p].img.width(k[p].imgW * k[p].scale); 413 l = k[p].imgW * k[p].scale; 414 n = m.bH 415 } else { 416 k[p].img.width(m.bW); 417 k[p].img.height(k[p].imgH * k[p].scale); 418 l = m.bW; 419 n = k[p].imgH * k[p].scale 420 } 421 if (o.image_align_center) { 422 m.alignCenter(p) 423 } 424 if (m.IE8) { 425 e(k[p].can).find("img").each(function () { 426 this.width = l; 427 this.height = n 428 }) 429 } 430 } else { 431 if (o.image_align_center) { 432 m.alignCenter(p) 433 } 434 } 435 }, 436 alignCenter: function (k) { 437 this.slides[k].ox = (this.bW - (this.slides[k].imgW * this.slides[k].scale)) / 2; 438 this.slides[k].oy = (this.bH - (this.slides[k].imgH * this.slides[k].scale)) / 2; 439 this.slides[k].img.css({ 440 left: this.slides[k].ox, 441 top: this.slides[k].oy 442 }) 443 }, 444 createBlur: function (o, l) { 445 var m = this, 446 k = m.slides[o], 447 n = m.getHostName(k.src); 448 if (n && n !== h.domain) { 449 e.getImageData({ 450 url: k.src, 451 success: function (p) { 452 g(p, k.cx, k.cy, k.cw, k.ch, k.scale, k.ox, k.oy, k.can[0], m.sett.caption_bg_blur, false, m.blurIteration); 453 if (l) { 454 m.showSlide(o) 455 } 456 }, 457 error: function (q, p) { 458 if (l) { 459 m.showSlide(o) 460 } 461 } 462 }) 463 } else { 464 g(k.img[0], k.cx, k.cy, k.cw, k.ch, k.scale, k.ox, k.oy, k.can[0], m.sett.caption_bg_blur, false, m.blurIteration); 465 if (l) { 466 m.showSlide(o) 467 } 468 } 469 }, 470 showSlide: function (k) { 471 this.slides[k].con.css("background-image", "none"); 472 this.slides[k].loaded = true; 473 if (k == this.slide_sel) { 474 this.slides[k].img.fadeIn(400) 475 } else { 476 this.slides[k].img.show() 477 } 478 if (k == 0) { 479 this[this.sett.slide_transition](); 480 if (this.sett.button_show_next || this.sett.button_show_back || this.sett.button_show_timer || this.sett.button_show_numbers) { 481 this.setNavigation() 482 } 483 } 484 }, 485 getHostName: function (k) { 486 var l = k.match(this.regxHost); 487 if (l !== null) { 488 return l[1].toString() 489 } else { 490 return false 491 } 492 }, 493 updateFloatSettings: function () { 494 this.sett.caption_position_x = ((this.bW - ((this.sett.dot_button_size + this.sett.dot_button_space) * this.slide_tot) + this.sett.dot_button_space) / 2) - this.sett.dot_button_bg_padding; 495 this.sett.caption_position_y = this.bH - this.sett.dot_button_margin - (this.sett.dot_button_bg_padding * 2) - this.sett.dot_button_size; 496 this.sett.caption_width = ((this.sett.dot_button_size + this.sett.dot_button_space) * this.slide_tot) - this.sett.dot_button_space + (this.sett.dot_button_bg_padding * 2); 497 this.sett.caption_height = this.sett.dot_button_size + this.sett.dot_button_bg_padding * 2; 498 this.sett.caption_bg_radius = this.sett.caption_height 499 }, 500 getHeight: function () { 501 var l = this, 502 k; 503 if (!l.sett.responsive) { 504 return l.$cont.height() 505 } 506 if (l.maxW) { 507 if (l.bW < l.maxW) { 508 k = l.bW / l.ratio 509 } else { 510 k = l.oH 511 } 512 l.$cont.height(k) 513 } else { 514 if (l.$cont.css("max-width").indexOf("%") < 0) { 515 k = l.bW / l.ratio; 516 l.$cont.height(k) 517 } else { 518 k = l.$cont.height() 519 } 520 } 521 return Math.max(20, k) 522 }, 523 checkLimit: function (m, l) { 524 var k; 525 if (m) { 526 k = (this.sett.responsive_screen_based_limits || l) ? Math.max(screen.width, screen.height) : this.bW; 527 return (k <= parseInt(m) ? true : false) 528 } else { 529 return false 530 } 531 }, 532 updateText: function (w) { 533 var v = this, 534 r = v.sett, 535 C = v.slides, 536 u = v.slides[w].con, 537 E = v.slides[w].img, 538 t = v.slides[w].txt, 539 p = v.slides[w].cap, 540 m = v.slides[w].txtCont, 541 A = v.slides[w].bord, 542 B = v.slides[w].col, 543 k = v.slides[w].can, 544 y, x, z, F, D = v.slides[w].pd, 545 o = v.slides[w].wd, 546 n = v.slides[w].hd, 547 q; 548 if (r.caption_float_mode) { 549 if (v.dotButtonBlurBG) { 550 v.updateFloatSettings() 551 } 552 if (D && !v.dotButtonBlurBG) { 553 y = parseInt(D.split(",")[0], 10); 554 x = parseInt(D.split(",")[1], 10) 555 } else { 556 y = r.caption_position_x; 557 x = r.caption_position_y 558 } 559 if (o && !v.dotButtonBlurBG) { 560 z = parseInt(o, 10) 561 } else { 562 z = r.caption_width 563 } 564 if (y == v.maxW - z) { 565 y = v.bW - z 566 } else { 567 if (v.maxW && !v.dotButtonBlurBG) { 568 y *= v.bW / v.maxW; 569 x *= v.bW / v.maxW 570 } 571 } 572 if (y + z + r.caption_margin_x > v.bW) { 573 z = v.bW - y - r.caption_margin_x 574 } 575 t.width((z - (r.caption_padding_x * 2))); 576 if (n && !v.dotButtonBlurBG) { 577 F = parseInt(n, 10) 578 } else { 579 if (r.caption_height == "") { 580 F = v.getHiddenTextHeight(u, p, t) + (r.caption_padding_y * 2) 581 } else { 582 F = r.caption_height 583 } 584 } 585 if (x + F + r.caption_margin_y > v.bH) { 586 F = v.bH - x - r.caption_margin_y 587 } 588 t.height(r.caption_height == "" ? "auto" : F); 589 p.css({ 590 left: y, 591 top: x, 592 width: z, 593 height: F 594 }) 595 } else { 596 p.css({ 597 left: r.caption_padding_x, 598 width: v.bW - ((r.caption_padding_x + r.caption_margin_x) * 2) - (v.currentNav > 1 ? 0 : v.navWidth) 599 }); 600 t.width(v.bW - ((r.caption_padding_x + r.caption_margin_x) * 2) - (v.currentNav > 1 ? 0 : v.navWidth)); 601 q = Math.min(v.getHiddenTextHeight(u, p, t) + (r.caption_padding_y * 2), v.bH - (r.caption_margin_y * 2)); 602 y = r.caption_margin_x; 603 x = v.bH - q - r.caption_margin_y; 604 z = v.bW - (r.caption_margin_x * 2); 605 F = q; 606 t.width(z - (v.currentNav > 1 ? 0 : v.navWidth) - (r.caption_padding_x * 2)); 607 p.css({ 608 left: y, 609 width: z, 610 height: F 611 }) 612 } 613 m.css({ 614 width: z, 615 height: F 616 }); 617 var l = u.data("caption_bg_shadow") || r.caption_bg_shadow; 618 e.extend(v.slides[w], { 619 cx: y, 620 cy: x, 621 cw: z, 622 ch: F, 623 tx: r.caption_padding_x + y, 624 ty: r.caption_padding_y + x, 625 tw: t.width() 626 }); 627 if (r.caption_bg_blur > 0) { 628 if (v.IE8) { 629 k.css({ 630 width: z - 1, 631 height: F - 1 632 }); 633 k.find("div").css({ 634 width: z + (r.caption_bg_blur * 2), 635 height: F + (r.caption_bg_blur * 2) 636 }); 637 e(C[w].can).find("img").each(function () { 638 e(this).css({ 639 left: C[w].ox - y + (r.caption_bg_blur), 640 top: C[w].oy - x + (r.caption_bg_blur / 2) 641 }) 642 }); 643 if (r.caption_margin_y <= r.caption_bg_blur / 2 && !r.caption_float_mode) { 644 k.find(".TBinner").css({ 645 width: z + (v.blurIE * 2), 646 height: F + (v.blurIE * 2) 647 }).find("img").css({ 648 left: -y + (v.blurIE), 649 top: -x + (v.blurIE) 650 }) 651 } 652 } else { 653 v.createBlur(w, false) 654 } 655 } else { 656 if (l > 0 && !v.FF2) { 657 k.css({ 658 width: z, 659 height: F 660 }) 661 } 662 } 663 B.css({ 664 width: z, 665 height: F 666 }); 667 if (r.caption_border) { 668 A.css({ 669 width: z - (r.caption_border * 2), 670 height: F - (r.caption_border * 2) 671 }) 672 } 673 }, 674 getHiddenTextHeight: function (p, n, k) { 675 var o = []; 676 if (p.css("display") == "none") { 677 o.push(p.css("display", "block")) 678 } 679 if (n.css("display") == "none") { 680 o.push(n.css("display", "block")) 681 } 682 if (k.css("display") == "none") { 683 o.push(k.css("display", "block")) 684 } 685 var l = k.height(); 686 for (var m = 0; m < o.length; m++) { 687 o[m].css("display", "none") 688 } 689 return l 690 }, 691 shuffle: function (k) { 692 var m, n; 693 for (var l = 0; l < k.length; l++) { 694 m = Math.floor(Math.random() * k.length); 695 n = k[l]; 696 k[l] = k[m]; 697 k[m] = n 698 } 699 }, 700 startDrag: function (l) { 701 var k = l.data.self, 702 o = l.data.id, 703 n = l.pageX || l.originalEvent.changedTouches[0].pageX, 704 m = l.pageY || l.originalEvent.changedTouches[0].pageY; 705 k.ch = 0, k.p = 0; 706 if (k.currentNav < 3 && k.sett.button_numbers_autohide) { 707 k.checkDropDown(false, false) 708 } 709 if (k.buttonNext[0]) { 710 k.buttonNext.trigger("mouseout", { 711 self: k, 712 num: "next", 713 butt: k.buttonNext 714 }) 715 } 716 if (l.type == "mousedown") { 717 l.preventDefault() 718 } 719 if (!k.draggable || k.slide_drg || !k.slide_fin) { 720 return 721 } 722 if (k.sett.slide_transition !== "move") { 723 k.slides[o].con.css(k.shProp, "0px 0px 45px 0px #000000") 724 } 725 k.slide_drg = false; 726 e(h).unbind(".TransBannerDrag_" + k.instanceID).bind(k.moveEvent + ".TransBannerDrag_" + k.instanceID, { 727 self: k, 728 id: l.data.id, 729 sx: n, 730 sy: m 731 }, k.onDragMove).bind(k.upEvent + ".TransBannerDrag_" + k.instanceID, { 732 self: k, 733 id: l.data.id, 734 sx: n, 735 sy: m 736 }, k.onDragUp) 737 }, 738 dragTransComplete: function (k) { 739 k.slide_fin = true; 740 k.slide_drg = false; 741 if (k.sett.button_show_numbers && this.currentNav < 3) { 742 k.toggleButton(true) 743 } else { 744 k
744.timerReset(true) 745 } 746 if (k.slides[k.n].txt) { 747 if (!k.dotButtonBlurBG) { 748 k.slides[k.n].cap.hide() 749 } 750 if (k.sett.caption_float_mode) { 751 k.slides[k.n].cap.css("left", (k.IE8 || k.dotButtonBlurBG) ? k.slides[k.n].cx : k.slides[k.n].cx + (100 * -k.slide_dir)) 752 } 753 } 754 if (k.slides[k.n].txt && k.enableCaption) { 755 k.animateCaption() 756 } 757 if (k.autoPlaying) { 758 k.startDelayTimer() 759 } 760 }, 761 onDragMove: function (n) { 762 var k = n.data.self, 763 m = k.sett, 764 q = n.data.id, 765 p = n.data.sx, 766 o = n.data.sy, 767 l; 768 if (k.touchDevice) { 769 l = n.originalEvent.changedTouches[0].pageX; 770 if ((n.originalEvent.touches.length > 1 || Math.abs(l - p) < Math.abs(n.originalEvent.changedTouches[0].pageY - o) / 2) && !k.slide_drg) { 771 k.slide_drg = false; 772 e(h).unbind(".TransBannerDrag_" + k.instanceID); 773 return 774 } 775 } else { 776 l = n.pageX 777 } 778 k.ch = l - k.p; 779 k.p = l; 780 k.pos = l - p; 781 if (k.pos > k.bW) { 782 k.pos = k.bW 783 } 784 if (k.pos < -k.bW) { 785 k.pos = -k.bW 786 } 787 if (!k.slide_drg) { 788 k.dragFir = k.pos 789 } else { 790 if ((k.dragFir > 0 && k.pos < 0) || (k.dragFir < 0 && k.pos > 0)) { 791 k.pos = k.dragFir = 0; 792 k.slide_drg = false 793 } 794 } 795 k.n = k.slide_sel + (k.pos > 0 ? -1 : 1); 796 if (k.n < 0) { 797 k.n = k.slide_tot - 1 798 } else { 799 if (k.n > k.slide_tot - 1) { 800 k.n = 0 801 } 802 } 803 if (k.slides[k.n].txt && !k.dotButtonBlurBG) { 804 k.slides[k.n].cap.hide() 805 } 806 k.slide_pr1 = k.n; 807 k.zSort(2, 1); 808 if (k.clockPlaying) { 809 k.clockPlaying = false; 810 k.timerob.stop(); 811 k.timerReset(true) 812 } 813 if (k.slide_drg && k.pos == 0) { 814 k.slide_drg = false; 815 k.slides[q].con.css("left", 0); 816 k.slides[k.n].con.css("left", 0) 817 } else { 818 k.slide_drg = true; 819 k.slides[q].con.css("left", k.pos); 820 k.slides[k.n].con.css("left", (m.slide_transition == "move" ? k.pos + (k.pos > 0 ? -k.bW : k.bW) : 0)); 821 k.slides[k.n].con.show() 822 } 823 n.preventDefault(); 824 return false 825 }, 826 onDragUp: function (p) { 827 var l = p.data.self, 828 n = l.sett, 829 r = p.data.id, 830 q = p.data.sx, 831 k = n.slide_transition == "move"; 832 e(h).unbind(".TransBannerDrag_" + l.instanceID); 833 if (l.slide_drg) { 834 var m = 0; 835 var o = l.slides[r].con.position().left; 836 if (o > n.touch_dragdrop_factor) { 837 m = 1 838 } else { 839 if (o < -n.touch_dragdrop_factor) { 840 m = -1 841 } 842 } 843 if (!l.IE8) { 844 if (l.ch > n.touch_throw_factor) { 845 m = o < 0 ? 0 : 1 846 } else { 847 if (l.ch < -n.touch_throw_factor) { 848 m = o > 0 ? 0 : -1 849 } 850 } 851 } 852 if (m !== 0) { 853 l.dragged = true; 854 l.slide_dir = m; 855 l.slide_fin = false; 856 l.slide_sel = l.n 857 } 858 l.slides[r].con.stop().animate({ 859 left: (l.bW + (k ? 0 : 30)) * m 860 }, { 861 duration: m == 0 ? 400 : Math.max((l.bW - (l.slides[r].con.position().left * m)) / (k ? 1.5 : 0.75), k ? 400 : 600), 862 easing: (k || m == 0) ? "easeOutQuad" : "easeOutQuart", 863 step: function (s) { 864 if (k) { 865 l.slides[l.n].con.css("left", s + (l.pos > 0 ? -l.bW : l.bW)) 866 } 867 }, 868 complete: function () { 869 if (!k) { 870 l.slides[r].con.css(l.shProp, "none") 871 } 872 if (m == 0) { 873 l.slide_drg = false; 874 !l.autoPlaying || l.startDelayTimer() 875 } else { 876 l.dragTransComplete(l) 877 } 878 } 879 }) 880 } 881 return false 882 }, 883 changeSlide: function (k) { 884 this.slide_pr2 = this.slide_pr1; 885 this.slide_pr1 = this.slide_sel; 886 this.dragged = false; 887 if (k == "next") { 888 this.slide_sel = this.slide_sel + 1 > this.slide_tot - 1 ? 0 : this.slide_sel + 1 889 } else { 890 if (k == "back") { 891 this.slide_sel = this.slide_sel - 1 < 0 ? this.slide_tot - 1 : this.slide_sel - 1 892 } else { 893 this.slide_sel = k 894 } 895 } 896 this[this.sett.slide_transition]() 897 }, 898 zSort: function (m, l) { 899 var n = 1; 900 for (var k = 0; k < this.slide_tot; k++) { 901 if (k !== this.slide_sel && k !== this.slide_pr1) { 902 if (this.slides[k]) { 903 this.slides[k].con.css("z-index", n); 904 if (this.IE8) { 905 this.slides[k].con.hide() 906 } 907 } 908 n++ 909 } 910 } 911 if (this.slides[this.slide_pr1]) { 912 this.slides[this.slide_pr1].con.css("z-index", this.slide_tot + l) 913 } 914 if (this.slides[this.slide_sel]) { 915 this.slides[this.slide_sel].con.css("z-index", this.slide_tot + m) 916 } 917 }, 918 textOut: function () { 919 var k = this; 920 if (this.slides[this.slide_pr1] && this.sett.slide_transition == "fade") { 921 this.slides[this.slide_pr1].txt.stop(true).animate({ 922 left: -k.slides[k.slide_pr1].cw / 2 923 }, { 924 duration: 150, 925 easing: "easeOutQuad", 926 queue: false, 927 complete: function () { 928 e(this).hide() 929 } 930 }) 931 } 932 }, 933 textIn: function () { 934 var k = this, 935 l = -k.slide_dir, 936 n = k.IE8 ? "filter" : "opacity", 937 m = k.IE8 ? "none" : 1; 938 if (k.sett.slide_transition == "fade" && !k.dragged) { 939 l = 1 940 } 941 if (k.slides[k.slide_sel].txt) { 942 k.slides[k.slide_sel].txt.css({ 943 left: k.sett.caption_padding_x + (100 * l), 944 prop: m 945 }).hide().fadeIn(600, function () { 946 if (k.IE8) { 947 e(this).removeAttr("filter").removeAttr("-ms-filter") 948 } 949 }).animate({ 950 left: k.sett.caption_padding_x 951 }, {
952 duration: 800, 953 easing: "easeOutQuart", 954 queue: false 955 }) 956 } 957 }, 958 animateCaption: function () { 959 var k = this, 960 l = this.slide_sel; 961 this.slides[this.slide_sel].txt.hide(); 962 if (this.sett.caption_float_mode) { 963 if (this.IE8 || this.dotButtonBlurBG) { 964 if (!k.dotButtonBlurBG) { 965 this.slides[l].cap.hide().fadeIn({ 966 duration: 300 967 }) 968 } 969 } else { 970 this.slides[l].cap.hide().fadeIn({ 971 duration: 800, 972 queue: false 973 }).animate({ 974 left: this.slides[l].cx 975 }, { 976 duration: 600 977 }) 978 } 979 this.textIn() 980 } else { 981 if (this.IE8) { 982 this.slides[l].cap.hide().fadeIn({ 983 duration: 600, 984 complete: function () { 985 k.textIn() 986 }, 987 queue: false 988 }) 989 } else { 990 this.slides[l].cap.hide().fadeIn({ 991 duration: 600, 992 queue: false 993 }).animate({ 994 _: 100 995 }, { 996 duration: 400, 997 complete: function () { 998 k.textIn() 999 } 1000 }) 1001 } 1002 } 1003 }, 1004 setNavigation: function () { 1005 var k = this; 1006 for (var l = 1; l <= 3; l++) { 1007 if (((!k.sett.responsive || k.sett.responsive_limit_navigation == "" || !k.checkLimit(k.sett.responsive_limit_navigation, true)) && k.sett.navigation_type === l) || (k.sett.responsive && k.sett.responsive_limit_navigation !== "" && k.sett.responsive_limit_navigation_type === l)) { 1008 if (l == 1) { 1009 k.navHolder = k.navigation(); 1010 k.$cont.prepend(k.navHolder) 1011 } else { 1012 if (l == 2) { 1013 k.navHolderD = k.dotNavigation(); 1014 k.$cont.prepend(k.navHolderD) 1015 } else { 1016 if (l == 3) { 1017 k.navHolderA = k.arrowNavigation(); 1018 k.$cont.prepend(k.navHolderA) 1019 } 1020 } 1021 } 1022 } 1023 } 1024 k.swapNavigation(false); 1025 if (!k.sett.button_numbers_autohide && k.sett.button_show_numbers && k.navHolder) { 1026 for (var l = 0; l < k.slide_tot; l++) { 1027 k.showHideButton(l, true) 1028 } 1029 } 1030 }, 1031 arrowNavigation: function () { 1032 var k = this, 1033 n = k.sett, 1034 m = n.button_size, 1035 o = n.button_space, 1036 l = e('<div class="navHolder" style="z-index:' + (k.slide_tot + 70) + '; left: 0px; top: 0px;"></div>'); 1037 k.buttonNextA = k.addButton(k, l, 4, true, false, "next").css({ 1038 left: k.bW - m - n.button_margin, 1039 top: (k.bH - m) / 2 1040 }); 1041 k.buttonBackA = k.addButton(k, l, 5, true, false, "back").css({ 1042 left: n.button_margin, 1043 top: (k.bH - m) / 2 1044 }); 1045 return l 1046 }, 1047 dotNavigation: function () { 1048 var l = this, 1049 p = l.sett, 1050 o = p.dot_button_size + p.dot_button_space, 1051 q = 0, 1052 k = (((o + q) * l.slide_tot) - q) / 2, 1053 n = e('<div class="navHolder" style="z-index:' + (l.slide_tot + 60) + "; left: " + parseInt(l.bW / 2 / 1) + 'px; bottom: 0px;"></div>'); 1054 for (var m = 0; m < l.slide_tot; m++) { 1055 l.slides[m].buttS = l.addButton(l, n, 4, false, true, m).css({ 1056 left: ((o + q) * m) - k, 1057 top: -(p.dot_button_margin > -1 ? o - (p.dot_button_space / 2) + p.dot_button_margin + (l.dotButtonBlurBG ? p.dot_button_bg_padding : 0) : p.dot_button_margin + (p.dot_button_space / 2)) 1058 }) 1059 } 1060 return n 1061 }, 1062 navigation: function () { 1063 var z = this, 1064 A = z.sett, 1065 p = z.slides, 1066 u = z.buttonNext, 1067 l = z.buttonBack, 1068 t = z.buttonPause, 1069 x = z.buttonIE, 1070 B = A.button_size, 1071 k = A.button_space; 1072 nav = z.nav = z; 1073 z.currentDown = -1; 1074 var w = e('<div class="navHolder" style="z-index:' + (z.slide_tot + 50) + ';"></div>'); 1075 if (u || z.buttonNumber) { 1076 var v = e('<div style="z-index:4; position: absolute; left: ' + (-B) + "px; top: " + (-(B + k) * (z.slide_tot + (u ? 1 : 0)) + k) + "px; width: " + B + "px; height: " + ((B + k) * (z.slide_tot + 1) - k) + 'px;"></div>'); 1077 if (A.button_numbers_horizontal) { 1078 v.css({ 1079 "z-index": 4, 1080 position: "absolute",
1081 left: -(B + k) * (z.slide_tot + (u ? 1 : 0)) + k, 1082 top: -B, 1083 width: (B + k) * (z.slide_tot + (u ? 1 : 0)) - k, 1084 height: B 1085 }) 1086 } 1087 w.append(v) 1088 } 1089 if (u) { 1090 u = z.buttonNext = z.addButton(nav, v, 4, true, false, "next").css({ 1091 left: (A.button_numbers_horizontal ? ((B + k) * z.slide_tot) : 0) - x, 1092 top: (A.button_numbers_horizontal ? 0 : ((B + k) * z.slide_tot)) - x 1093 }); 1094 if (A.button_numbers_autohide && z.buttonNumber) { 1095 if (!z.touchDevice) { 1096 u.bind("mouseenter", { 1097 self: z, 1098 up: true 1099 }, z.checkDropDown); 1100 v.bind("mouseleave", { 1101 self: z, 1102 up: false 1103 }, z.checkDropDown).bind("mouseenter", function (s) { 1104 if (z.numShow) { 1105 clearTimeout(z.buttonLeaveTimer) 1106 } 1107 }) 1108 } 1109 } 1110 } 1111 if (z.clockTimer) { 1112 var q, o; 1113 if (z.canvasSupport) { 1114 z.clockTimer = e('<canvas id="clockTimer" width="' + B + '" height="' + B + '" style="position:absolute; z-index:2;"></canvas>'); 1115 var y = z.clockContext = z.clockTimer[0].getContext("2d"); 1116 y.shadowColor = "rgba(0, 0, 0, 0.5)"; 1117 y.shadowBlur = 3; 1118 y.shadowOffsetX = 0; 1119 y.shadowOffsetY = 0; 1120 y.lineWidth = B / 10; 1121 y.lineCap = "round" 1122 } else { 1123 z.clockTimer = e('<div style="position:absolute; z-index:2; width:' + B + "px; height:" + B + 'px; overflow:hidden"> <div style="position:absolute; left: -2px; top:-2px; width:' + (B !== 20 ? (960 * (B / 20 / 1)) : 960) + "px; height:" + (B + 2) + "px; filter : progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + z.timer_sprite + ", sizingMethod=" + (B !== 20 ? "scale" : "noscale") + ') alpha(opacity=100);"> </div> </div>') 1124 } 1125 if (A.button_numbers_horizontal && u) { 1126 v.append(z.clockTimer) 1127 } else { 1128 w.append(z.clockTimer) 1129 } 1130 if (A.button_numbers_horizontal) { 1131 if (u) { 1132 if (z.buttonNumber && !A.button_numbers_autohide) { 1133 q = -(B + k); 1134 o = 0 1135 } else { 1136 q = (B + k) * (z.slide_tot - 1); 1137 o = 0 1138 } 1139 } else { 1140 if (z.buttonNumber && !A.button_numbers_autohide) { 1141 q = -((B + k) * (z.slide_tot + 1)) + k; 1142 o = -B 1143 } else { 1144 q = -B; 1145 o = -B - x 1146 } 1147 } 1148 } else { 1149 q = -((B * (u || z.buttonNumber ? 2 : 1)) + (u || z.buttonNumber ? k : 0)); 1150 o = -B 1151 } 1152 z.clockTimer.css({ 1153 left: q, 1154 top: o 1155 }); 1156 t = z.buttonPause = z.addButton(nav, A.button_numbers_horizontal && u ? v : w, 3, true, false, "pause").css({ 1157 left: q - x, 1158 top: o - x 1159 }); 1160 if (z.autoPlaying) { 1161 t.css("opacity", 0) 1162 } else { 1163 z.clockTimer.css("opacity", 0) 1164 } 1165 if (!z.touchDevice) { 1166 t.bind("mouseenter", function (s) { 1167 t.stop().animate({ 1168 opacity: 1 1169 }, { 1170 duration: 400, 1171 easing: "easeOutQuad" 1172 }) 1173 }).bind("mouseleave", function (s) { 1174 if (z.autoPlaying) { 1175 t.stop().animate({ 1176 opacity: 0 1177 }, { 1178 duration: 400, 1179 easing: "easeOutQuart" 1180 }) 1181 } 1182 }) 1183 } 1184 } 1185 if (l) { 1186 var n, m; 1187 l = z.buttonBack = z.addButton(nav, A.button_numbers_horizontal && u ? v : w, 1, true, false, "back"); 1188 if (A.button_numbers_horizontal) { 1189 if (u) { 1190 n = (B + k) * (z.slide_tot - (z.clockTimer ? 2 : 1)); 1191 m = 0 1192 } else { 1193 if (z.clockTimer) { 1194 n = parseInt(z.clockTimer.css("left"), 10) - B - k; 1195 m = parseInt(z.clockTimer.css("top"), 10) 1196 } else { 1197 n = -B + x; 1198 m = -B 1199 } 1200 } 1201 } else { 1202 if (z.clockTimer) { 1203 n = (-(B + k) * (u ? 3 : 2)) + k 1204 } else { 1205 n = -((B * (u || z.buttonNumber ? 2 : 1)) + (u || z.buttonNumber ? k : 0)) 1206 } 1207 m = -B 1208 } 1209 l.css({ 1210 left: n - x, 1211 top: m - x 1212 }) 1213 } 1214 if (z.buttonNumber) { 1215 for (var r = 0; r < z.slide_tot; r++) { 1216 p[r].butt = z.addButton(nav, v, z.slide_tot - r + 5, false, false, r); 1217 if (A.button_numbers_horizontal) { 1218 p[r].butt.css({ 1219 top: -x, 1220 left: ((B + k) * r) - x 1221 }) 1222 } else { 1223 p[r].butt.css({ 1224 left: -x, 1225 top: ((B + k) * r) - x 1226 }) 1227 } 1228 if (r == z.slide_sel) { 1229 p[r].butt.bg.css("opacity", 1) 1230 } 1231 p[r].butt.hide() 1232 } 1233 } 1234 w.css({ 1235 right: A.button_margin - (A.caption_float_mode ? 0 : -A.caption_margin_x), 1236 bottom: A.button_margin - (A.caption_float_mode ? 0 : -A.caption_margin_y) 1237 }); 1238 return w 1239 }, 1240 swapNavigation: function (k) { 1241 e(h).unbind(".TransBannerButtonUp_" + this.instanceID); 1242 if (this.currentNav === 1) { 1243 if (this.navHolder) { 1244 this.navHolder.show() 1245 } 1246 if (this.navHolderD) { 1247 this.navHolderD.hide() 1248 } 1249 if (this.navHolderA) { 1250 this.navHolderA.hide() 1251 } 1252 } else { 1253 if (this.currentNav === 2) { 1254 if (this.navHolder) { 1255 this.navHolder.hide() 1256 } 1257 if (this.navHolderD) { 1258 this.navHolderD.show() 1259 } 1260 if (this.navHolderA) { 1261 this.navHolderA.hide() 1262 } 1263 } else { 1264 if (this.currentNav === 3) { 1265 if (this.navHolder) { 1266 this.navHolder.hide() 1267 } 1268 if (this.navHolderD) { 1269 this.navHolderD.hide() 1270 } 1271 if (this.navHolderA) { 1272 this.navHolderA.show() 1273 } 1274 } 1275 } 1276 } 1277 e(h).bind(this.upEvent + ".TransBannerButtonUp_" + this.instanceID, { 1278 self: this 1279 }, this.releaseButton); 1280 if (this.currentNav < 3) { 1281 this.toggleButton(true) 1282 } 1283 this.timerReset(true); 1284 if (this.autoPlaying && k) { 1285 this.startDelayTimer() 1286 } 1287 }, 1288 addButton: function (k, t, v, s, l, p) { 1289 var w = this, 1290 x = l ? w.sett.dot_button_size + w.sett.dot_button_space : w.sett.button_size, 1291 o, u, r, n = e('<div class="noSelect" style="z-index:' + v + "; position: absolute;
1291 width:" + (x + (w.buttonIE * 2)) + "px; height:" + (x + (w.buttonIE * 2)) + 'px; cursor: pointer;"> <div class="defaultButton rounded ' + (!w.IE8 && (s || l) ? "icon" : "") + '" style="position: absolute; overflow: hidden; z-index:2; left: ' + w.buttonIE + "px; top: " + w.buttonIE + "px; right:" + w.buttonIE + "px; bottom:" + w.buttonIE + "px; width:" + x + "px; height:" + x + "px; " + (w.IE8 || l ? "" : "background-color:" + w.sett.button_color) + '">' + (w.IE8 && !l ? ' <div class="buttonAlpha" style="background-color:' + w.sett.button_color + '"></div> <div class="buttonTopBot" style="background-color:' + w.sett.button_color + '"></div> <div class="buttonCent iconHolder ' + (s ? "icon" : "") + '" unselectable="on" style="height: ' + (x - 2) + "px; background-color:" + w.sett.button_color + '" align="center">' + (s ? "" : ' <span unselectable="on" class="buttonText ' + (w.icOff > 0 ? "buttonTextSizeTouch" : " buttonTextSizeNormal") + '" style="position:relative; text-align: center; line-height:' + (x - 1) + "px; left:" + (String(p + 1).length <= 1 ? 1 : 0) + 'px; top:-1px;" align="center">' + (p + 1) + "</span>") + " </div>" : "") + " </div> " + (l || !w.IE8 ? "" : '<div class="buttonShadow"></div>') + " </div>"), 1292 m = n.find(".defaultButton"); 1293 if (w.IE8) { 1294 o = n.find(".buttonShadow"); 1295 u = m.find(".iconHolder"); 1296 if (s) { 1297 u.css("background-position", (l ? w.icDotOff : (p == "next" ? ((x - w.icSize) / 2) - w.icSize : p == "pause" ? ((x - w.icSize) / 2) - (w.autoPlaying ? w.icSize * 2 : w.icSize * 3) : (x - w.icSize) / 2) - w.icOff) + "px center") 1298 } else { 1299 if (l) { 1300 m.append(l = e('<div style="position: absolute; width:' + x + "px; height:" + x + "px; left:" + w.icDotOff + "px; top:" + (-(w.icSize / 2) + (x / 2)) + "px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + w.icons + ', sizingMethod=image) alpha(opacity=100);"></div>')) 1301 } else { 1302 var q = u.find(".buttonText") 1303 } 1304 } 1305 n.append(m, o) 1306 } else { 1307 if (s || l) { 1308 m.css("background-position", (l ? w.icDotOff : (p == "next" ? ((x - w.icSize) / 2) - w.icSize : p == "pause" ? ((x - w.icSize) / 2) - (w.autoPlaying ? w.icSize * 2 : w.icSize * 3) : (x - w.icSize) / 2) - w.icOff) + "px center") 1309 } else { 1310 r = e('<div align="center" class="buttonText ' + (w.icOff > 0 ? "buttonTextSizeTouch" : " buttonTextSizeNormal") + '" style="z-index:2; position: absolute; left: 0px; top: 0px; width: 100%; height:100%; line-height:' + x + 'px; text-align: center; cursor:hand;">' + (p + 1) + "</div>") 1311 } 1312 if (!l) { 1313 m.css(w.shProp, "0px 0px 2px rgba(0, 0, 0, .7)") 1314 } 1315 n.append(m, r) 1316 } 1317 if (!l) { 1318 m.css("opacity", w.sett.button_opacity) 1319 } 1320 n.bg = m; 1321 n.sh = o; 1322 n.ih = u; 1323 n.bt = q; 1324 n.dot = l; 1325 t.append(n); 1326 n.bind("mouseenter mouseleave " + w.downEvent, { 1327 self: w, 1328 num: p, 1329 dot: l, 1330 btn: n 1331 }, w.hoverButton); 1332 return n 1333 }, 1334 hoverButton: function (p) { 1335 var l = p.data.self, 1336 m = p.data.num, 1337 k = p.data.dot, 1338 o = p.data.btn, 1339 n = k ? l.sett.dot_button_size + l.sett.dot_button_space : l.sett.button_size, 1340 q; 1341 if (p.type == "mouseenter") { 1342 if (k) { 1343 if (l.IE8) { 1344 o.dot.css("left", l.icDotOff - l.icSize) 1345 } else { 1346 o.bg.css("background-position", l.icDotOff - l.icSize + "px center") 1347 } 1348 } else { 1349 o.bg.css({ 1350 opacity: 1 1351 }) 1352 } 1353 } else { 1354 if (p.type == "mouseleave") { 1355 if (m != l.slide_sel) { 1356 if (k) { 1357 if (l.IE8) { 1358 o.dot.css("left", l.icDotOff) 1359 } else { 1360 o.bg.css("background-position", l.icDotOff + "px center") 1361 } 1362 } else { 1363 o.bg.css("opacity", l.sett.button_opacity) 1364 } 1365 } 1366 } else { 1367 p.stopImmediatePropagation(); 1368 if (m !== l.slide_sel) { 1369 if (k) { 1370 if (l.IE8) { 1371 o.dot.css("left", l.icDotOff - (l.icSize * 2)) 1372 } else { 1373 o.bg.css("background-position", (l.icDotOff - (l.icSize * 2)) + "px center") 1374 } 1375 } else { 1376 q = ((n - l.icSize) / 2) - l.icOff - 1; 1377 if (m == "next") { 1378 q -= l.icSize 1379 } else { 1380 if (m == "pause" && l.autoPlaying) { 1381 q -= l.icSize * 2 1382 } else { 1383 if (m == "pause" && !l.autoPlaying) { 1384 q -= l.icSize * 3 1385 } 1386 } 1387 } 1388 l.resizeButton(o, l.buttonIE + (k ? 0 : 1), 1, n - 2, q, m == "next" && !l.numShow && l.touchDevice ? l.sett.button_opacity : 1); 1389 if (o.bt) { 1390 o.bt.css("top", -2) 1391 } 1392 } 1393 l.currentDown = m 1394 } 1395 if (l.touchDevice && l.currentNav < 3) { 1396 if (m == "next" && !l.numShow) { 1397 l.checkDropDown(false, true) 1398 } else { 1399 if (m == "back" || m == "pause" && l.numShow) { 1400 l.checkDropDown(false, false) 1401 } 1402 } 1403 } 1404 } 1405 } 1406 }, 1407 releaseButton: function (p) { 1408 var k = p.data.self, 1409 m = (k.currentNav == 2) ? k.sett.dot_button_size + k.sett.dot_button_space : k.sett.button_size, 1410 n = k.checkTransitionStatus(), 1411 o = (k.currentDown < 0 || k.slide_sel === k.currentDown) ? true : false; 1412 if (k.currentDown == "next") { 1413 if (n) { 1414 k.slide_dir = -1; 1415 k.changeSlide("next") 1416 } 1417 k.resizeButton(k.currentNav == 3 ? k.buttonNextA : k.buttonNext, k.buttonIE, 0, m, (((m - k.icSize) / 2) - k.icSize) - k.icOff, 1) 1418 } else { 1419 if (k.currentDown == "back") { 1420 if (n) { 1421 k.slide_dir = 1; 1422 k.changeSlide("back") 1423 } 1424 k.resizeButton(k.currentNav == 3 ? k.buttonBackA : k.buttonBack, k.buttonIE, 0, m, ((m - k.icSize) / 2) - k.icOff, k.touchDevice ? k.sett.button_opacity : 1) 1425 } else { 1426 if (k.currentDown == "pause") { 1427 if (k.autoPlaying) { 1428 k.autoPlaying = false; 1429 k.buttonPause.css("opacity", 1); 1430 k.clockTimer.css("opacity", 0); 1431 k.timerReset(true) 1432 } else { 1433 k.autoPlaying = true; 1434 k.buttonPause.stop().animate({ 1435 opacity: 0 1436 }, { 1437 duration: 400, 1438 easing: "easeOutQuart" 1439 }); 1440 k.clockTimer.css("opacity", 1); 1441 k.timerReset(true); 1442 k.startDelayTimer() 1443 } 1444 k.resizeButton(k.buttonPause, k.buttonIE, 0, m, (((m - k.icSize) / 2) - (k.autoPlaying ? k.icSize * 2 : k.icSize * 3)) - k.icOff, k.touchDevice ? k.sett.button_opacity : 1) 1445 } else { 1446 if (k.currentDown > -1) { 1447 if (n && k.slide_sel !== k.currentDown) { 1448 if (k.currentDown > k.slide_sel) { 1449 k.slide_dir = -1 1450 } else { 1451 if (k.currentDown < k.slide_sel) { 1452 k.slide_dir = 1 1453 } 1454 } 1455 k.changeSlide(k.currentDown) 1456 } 1457 if (k.currentNav !== 2) { 1458 var l = k.currentNav === 1 ? k.slides[k.slide_sel].butt : k.slides[k.slide_sel].buttS; 1459 if (l.ih) { 1460 l.ih.height(m - 2) 1461 } 1462 if (l.bt) { 1463 l.bt.css("top", -1) 1464 } 1465 } 1466 } 1467 } 1468 } 1469 } 1470 if (k.currentDown !== "pause" && !o) { 1471 if (k.sett.button_show_numbers && k.currentNav < 3) { 1472 k.toggleButton(false) 1473 } else { 1474 k.timerReset(false) 1475 } 1476 } 1477 k.currentDown = -1 1478 }, 1479 resizeButton: function (n, o, m, l, q, k, p) { 1480 n.bg.css({ 1481 opacity: k, 1482 left: o, 1483 top: o, 1484 width: l, 1485 height: l, 1486 "background-position": q + "px center" 1487 }); 1488 if (n.sh) { 1489 n.sh.css({ 1490 left: m, 1491 top: m, 1492 width: l + 2, 1493 height: l + 2 1494 }) 1495 } 1496 if (n.ih) { 1497 n.ih.css({ 1498 height: l - 2, 1499 "background-position": q + "px center" 1500 }) 1501 } 1502 }, 1503 toggleButton: function (k) { 1504 var n = (this.currentNav == 2 ? this.sett.dot_button_size + this.sett.dot_button_space : this.sett.button_size); 1505 for (var m = 0, l; m < this.slide_tot; m++) { 1506 l = this.currentNav > 1 ? this.slides[m].buttS : this.slides[m].butt; 1507 if (l) { 1508 l.bg.css({ 1509 opacity: (m == this.slide_sel || this.currentNav == 2) ? 1 : this.sett.button_opacity, 1510 left: this.buttonIE, 1511 top: this.buttonIE, 1512 width: n, 1513 height: n 1514 }) 1515 } 1516 if (this.currentNav == 2) { 1517 if (this.IE8) { 1518 l.dot.css("left", this.icDotOff - (m == this.slide_sel ? this.icSize : 0)) 1519 } else { 1520 l.bg.css("background-position", (this.icDotOff - (m == this.slide_sel ? this.icSize : 0)) + "px center") 1521 } 1522 } 1523 } 1524 this.timerReset(k); 1525 l = this.currentNav > 1 ? this.slides[this.slide_sel].buttS : this.slides[this.slide_sel].butt; 1526 if (this.buttonIE > 0 && l.sh) { 1527 l.sh.css({ 1528 left: 0, 1529 top: 0, 1530 width: this.sett.button_size + 2, 1531 height: this.sett.button_size + 2 1532 }) 1533 } 1534 }, 1535 checkDropDown: function (n, k) { 1536 var l = n ? n.data.self : this; 1537 var k = n ? n.data.up : k; 1538 if (k && !l.numShow) { 1539 for (var m = 0; m < l.slide_tot; m++) { 1540 clearTimeout(l.buttonLeaveTimer); 1541 clearTimeout(l.slides[m].timer); 1542 l.showHideButton(m, true) 1543 } 1544 } else { 1545 if (!k && l.numShow) { 1546 l.buttonLeaveTimer = setTimeout(function () { 1547 l.numShow = false; 1548 for (var o = 0; o < l.slide_tot; o++) { 1549 l.showHideButton(o, false) 1550 } 1551 }, n ? 300 : 0) 1552 } 1553 } 1554 }, 1555 showHideButton: function (o, k) { 1556 var m = this; 1557 var n, p, r, q, l; 1558 l = m.slides[o].butt; 1559 clearTimeout(m.buttonLeaveTimer); 1560 clearTimeout(m.slides[o].timer); 1561 l.stop(); 1562 if (k) { 1563 m.numShow = true; 1564 m.slides[o].butt.show(); 1565 if (l.css("opacity") == 1) { 1566 l.css("opacity", 0) 1567 } 1568 n = (m.slide_tot - o) * (100 / m.slide_tot); 1569 p = 20 + ((m.slide_tot - o) * (300 / m.slide_tot)); 1570 r = 1; 1571 q = 3 1572 } else { 1573 m.numShow = false; 1574 n = o * (150 / m.slide_tot); 1575 p = 20 + (o * (150 / m.slide_tot)); 1576 r = 0; 1577 q = 8 1578 } 1579 m.slides[o].timer = setTimeout(function () { 1580 l.animate({ 1581 opacity: r 1582 }, { 1583 duration: p, 1584 step: function (s) { 1585 m.showHideStep(s, q, l, k, o) 1586 }, 1587 complete: function () { 1588 if (!k) { 1589 m.slides[o].butt.hide() 1590 } 1591 } 1592 }) 1593 }, n) 1594 }, 1595 showHideStep: function (m, r, n, q, o) { 1596 var t = this, 1597 v = t.currentNav == 2 ? t.sett.dot_button_size : t.sett.button_size, 1598 k = t.currentNav == 2 ? t.sett.dot_button_space : t.sett.button_space, 1599 l = parseInt((v / r) - (v / r * m), 10), 1600 u = v - (l * 2); 1601 n.bg.css({ 1602 left: l + t.buttonIE, 1603 top: l + t.buttonIE, 1604 width: u, 1605 height: u 1606 }); 1607 if (t.buttonIE > 0) { 1608 n.sh.css({ 1609 left: l, 1610 top: l, 1611 width: u + 2, 1612 height: u + 2 1613 }) 1614 } 1615 if (n.ih) { 1616 n.bt.css("top", -l - 1); 1617 n.ih.height(u - 2) 1618 } 1619 if (t.sett.button_numbers_horizontal && o == t.slide_tot - 1) { 1620 if (t.clockTimer && t.navHolder) { 1621 if (t.buttonNext) { 1622 t.clockTimer.css("left", q ? -(v + k) * m : ((v + k) * (t.slide_tot - 1) * (1 - m)) + (v + k) * m) 1623 } 1624 if (t.buttonBack) { 1625 t.buttonBack.css("left", parseInt(t.clockTimer.css("left")) - v - k - t.buttonIE) 1626 } 1627 t.buttonPause.css({ 1628 left: parseInt(t.clockTimer.css("left"), 10) - t.buttonIE, 1629 top: parseInt(t.clockTimer.css("top"), 10) - t.buttonIE 1630
1630 }) 1631 } else { 1632 if (t.buttonBack && t.buttonNext) { 1633 t.buttonBack.css("left", (q ? -m * (v + k) : ((v + k) * (t.slide_tot - 1) * (1 - m)) + (v + k) * m) - t.buttonIE) 1634 } 1635 } 1636 } 1637 }, 1638 checkTransitionStatus: function () { 1639 if (this.sett.slide_transition == "fade") { 1640 if (this.slide_fin) { 1641 return true 1642 } else { 1643 return false 1644 } 1645 } else { 1646 if (this.slide_dir < 0 && this.slides[this.slide_sel].con.position().left < this.bW / 2) { 1647 return true 1648 } else { 1649 if (this.slide_dir > 0 && this.slides[this.slide_sel].con.position().left > -this.bW / 2) { 1650 return true 1651 } else { 1652 return false 1653 } 1654 } 1655 } 1656 }, 1657 startDelayTimer: function () { 1658 var k = this; 1659 if (k.clockTimer && k.currentNav == 1) { 1660 1661 // k.clockTimer.stop() 1662 } 1663 k.clockPlaying = true; 1664 k.timerob.stop().css("left", 0).animate({ 1665 left: 720 1666 }, { 1667 easing: "linear", 1668 duration: k.slides[k.slide_sel].delay, 1669 queue: false, 1670 step: function (m) { 1671 if (k.sett.button_show_timer && k.currentNav == 1) { 1672 if (k.canvasSupport) { 1673 var l = k.drawTimer(k); 1674 l.strokeStyle = k.sett.button_color; 1675 l.beginPath(); 1676 l.arc(k.sett.button_size / 2, k.sett.button_size / 2, (k.sett.button_size / 2) - (k.sett.button_size / 10), (Math.PI * 2 * (m / 720)) - (Math.PI / 2), -Math.PI / 2, true); 1677 l.stroke(); 1678 l.closePath() 1679 } else { 1680 var n = (parseInt(m / 720 * 39, 10) * -(24 * k.sett.button_size / 20)) - 2; 1681 n < -(39 * (24 * k.sett.button_size / 20)) - 2 ? n = -2 : ""; 1682 1683 k.clockTimer.children().eq(0).css("left", n) 1684 } 1685 } 1686 }, 1687 complete: function () { 1688 k.clockPlaying = false; 1689 if (!k.slide_drg) { 1690 k.slide_dir = -1; 1691 k.changeSlide("next"); 1692 if (k.sett.button_show_numbers && k.currentNav < 3) { 1693 k.toggleButton(false) 1694 } else { 1695 k.timerReset(false) 1696 } 1697 } 1698 } 1699 }) 1700 }, 1701 timerReset: function (l) { 1702 var k = this; 1703 if (k.clockPlaying) { 1704 k.timerob.stop() 1705 } 1706 if (k.autoPlaying) { 1707 if (k.clockTimer && k.currentNav == 1) { 1708 if (l) { 1709 k.timerHalt() 1710 } else { 1711 k.clockTimer.stop().fadeTo(300, 0.4, function (m) { 1712 k.timerHalt() 1713 }) 1714 } 1715 } 1716 } 1717 }, 1718 timerHalt: function () { 1719 var k = this; 1720 if (k.canvasSupport) { 1721 k.drawTimer(k) 1722 } else { 1723 k.clockTimer.css("filter", "none").children().eq(0).css("left", -2) 1724 } 1725 }, 1726 drawTimer: function (l) { 1727 var k = l.clockContext; 1728 k.clearRect(0, 0, l.sett.button_size, l.sett.button_size); 1729 k.strokeStyle = "rgba(255, 255, 255, .4)"; 1730 k.beginPath(); 1731 k.arc(l.sett.button_size / 2, l.sett.button_size / 2, (l.sett.button_size / 2) - (l.sett.button_size / 10), 0, Math.PI * 2, true); 1732 k.stroke(); 1733 k.closePath(); 1734 l.clockTimer.css("opacity", 1); 1735 return k 1736 }, 1737 transPrepare: function (n, m, o, l) { 1738 var k = this; 1739 k.zSort(n, m); 1740 if (k.slides[o].txt) { 1741 if (!k.dotButtonBlurBG) { 1742 k.slides[o].cap.hide() 1743 } 1744 if (k.sett.caption_float_mode) { 1745 k.slides[o].cap.css("left", k.slides[o].cx + (k.IE8 || k.dotButtonBlurBG ? 0 : (100 * -k.slide_dir))) 1746 } 1747 if (l && k.IE8) { 1748 k.slides[o].txt.stop(true); 1749 k.slides[o].cap.stop(true) 1750 } 1751 } 1752 if (k.slide_pr1 !== "") { 1753 if (k.slides[k.slide_pr1].txt) { 1754 k.textOut() 1755 } 1756 } 1757 k.slide_drg = false; 1758 k.slide_fin = false; 1759 k.slide_playing = true 1760 }, 1761 transComplete: function (k, l) { 1762 k.slide_fin = true; 1763 if (k.slide_sta) { 1764 k.slide_sta = false; 1765 k.$cont.css("background-image", "none") 1766 } 1767 if (k.slide_sel == k.slide_sel && k.slides[l].txt && k.enableCaption && k.slide_sel == l) { 1768 k.animateCaption() 1769 } 1770 if (k.autoPlaying) { 1771 if (k.currentNav == 3) { 1772 k.toggleButton(true) 1773 } 1774 k.startDelayTimer() 1775 } 1776 }, 1777 move: function () { 1778 var k = this, 1779 l = k.slide_sel; 1780 k.transPrepare(2, 1, l, false); 1781 k.slides[l].con.stop().css({ 1782 left: (k.slide_pr1 !== "" ? k.slides[k.slide_pr1].con.position().left + (-k.bW * k.slide_dir) : -k.bW * k.slide_dir), 1783 display: "block" 1784 }).animate({ 1785 left: 0 1786 }, { 1787 duration: k.sett.slide_transition_period + 100, 1788 easing: "easeInOutQuart", 1789 step: function (m) { 1790 if (k.slide_pr1 !== "" && k.slide_pr1 !== l) { 1791 k.slides[k.slide_pr1].con.stop().css("left", m + (k.bW * k.slide_dir)) 1792 } 1793 if (k.slide_pr2 !== "" && k.slide_pr2 !== l &&
1793k.slide_pr2 !== k.slide_pr1) { 1794 k.slides[k.slide_pr2].con.stop().css("left", m + (k.bW * 2 * k.slide_dir)) 1795 } 1796 }, 1797 complete: function () { 1798 k.transComplete(k, l) 1799 } 1800 }) 1801 }, 1802 fade: function () { 1803 var k = this, 1804 l = k.slide_sel; 1805 k.transPrepare(2, 1, l, false); 1806 k.slides[l].con.stop().css({ 1807 left: 0, 1808 display: "none" 1809 }).fadeIn({ 1810 duration: k.sett.slide_transition_period + 100, 1811 easing: "easeInOutQuart", 1812 complete: function () { 1813 k.transComplete(k, l) 1814 } 1815 }) 1816 }, 1817 slideIn: function () { 1818 var k = this, 1819 m = this.slide_sel, 1820 l = k.shProp; 1821 k.transPrepare(2, 1, m, true); 1822 k.slides[m].con.stop(true).css({ 1823 left: (k.bW + 30) * -k.slide_dir, 1824 sh: "0px 0px 45px 0px #000000", 1825 display: "block" 1826 }).animate({ 1827 left: 0 1828 }, { 1829 duration: k.sett.slide_transition_period + 100, 1830 easing: "easeInOutQuart", 1831 complete: function () { 1832 k.transComplete(k, m); 1833 k.slides[m].con.css(k.shProp, "none") 1834 } 1835 }) 1836 }, 1837 slideOut: function () { 1838 var k = this, 1839 m = this.slide_sel, 1840 l = k.shProp; 1841 k.transPrepare(1, 2, m, false); 1842 if (k.slide_pr1 !== "") { 1843 k.slides[m].con.stop(true).css({ 1844 left: 0, 1845 sh: "0px 0px 45px 0px #000000", 1846 display: "block" 1847 }); 1848 if (k.IE8 && k.slides[m].txt) { 1849 k.slides[k.slide_pr1].txt.stop(true); 1850 k.slides[k.slide_pr1].cap.stop(true) 1851 } 1852 k.slides[k.slide_pr1].con.stop(true).animate({ 1853 left: k.slide_dir * (k.bW + 30) 1854 }, { 1855 duration: k.sett.slide_transition_period, 1856 easing: "easeInOutQuart", 1857 complete: function () { 1858 k.transComplete(k, m); 1859 k.slides[m].con.css(k.shProp, "none") 1860 } 1861 }) 1862 } else { 1863 k.slides[m].con.stop(true).css({ 1864 left: k.bW, 1865 display: "block" 1866 }).animate({ 1867 left: 0 1868 }, { 1869 duration: k.sett.slide_transition_period, 1870 easing: "easeInOutQuart", 1871 complete: function () { 1872 k.slide_fin = true; 1873 if (m == k.slide_sel && k.slides[m].txt && k.enableCaption) { 1874 k.animateCaption() 1875 } 1876 if (k.autoPlaying) { 1877 k.startDelayTimer() 1878 } 1879 } 1880 }) 1881 } 1882 }, 1883 resizeBanner: function (o) { 1884 var l = this, 1885 k = l.bW; 1886 if (o.internal) { 1887 l.bW = l.$cont.width(); 1888 l.bH = l.getHeight() 1889 } else { 1890 if (o.width) { 1891 l.bW = k = o.width; 1892 l.$cont.width(l.bW) 1893 } else { 1894 if (o.maxWidth) { 1895 l.bW = k = l.maxW = o.maxWidth; 1896 l.$cont.css("max-width", l.maxW + "px"); 1897 l.bW = l.$cont.width() 1898 } 1899 } 1900 if (o.height) { 1901 l.bH = l.oH = o.height; 1902 l.ratio = k / l.oH 1903 } else { 1904 l.oH = k / l.ratio 1905 } 1906 l.bH = l.getHeight() 1907 } 1908 if (l.sett.responsive) { 1909 l.enableCaption = !l.checkLimit(l.sett.responsive_limit_caption, false); 1910 if (l.sett.responsive_limit_navigation !== "") { 1911 if (l.checkLimit(l.sett.responsive_limit_navigation, false)) { 1912 if (l.currentNav !== l.sett.responsive_limit_navigation_type) { 1913 l.currentNav = l.sett.responsive_limit_navigation_type; 1914 l.swapNavigation(true) 1915 } 1916 } else { 1917 if (l.currentNav !== l.sett.navigation_type) { 1918 l.currentNav = l.sett.navigation_type; 1919 l.swapNavigation(true) 1920 } 1921 } 1922 } 1923 } 1924 if (l.currentNav == 2) { 1925 l.navHolderD.css("left", l.bW / 2) 1926 } else { 1927 if (l.currentNav == 3) { 1928 l.buttonNextA.css({ 1929 left: l.bW - l.sett.button_size - l.sett.button_margin, 1930 top: (l.bH - l.sett.button_size) / 2 1931 }); 1932 l.buttonBackA.css({ 1933 left: l.sett.button_margin, 1934 top: (l.bH - l.sett.button_size) / 2 1935 }) 1936 } 1937 } 1938 for (var m = l.slide_sel, n = true; m < l.slide_tot; m++) { 1939 if (n || m !== l.slide_sel) { 1940 l.resizeImage(m); 1941 if (l.slides[m].txt) { 1942 l.updateText(m); 1943 if (!l.enableCaption && !l.dotButtonBlurBG) { 1944 l.slides[m].cap.hide() 1945 } else { 1946 l.slides[m].cap.show(); 1947 l.slides[m].txt.show() 1948 } 1949 } 1950 if (n) { 1951 m = (l.slide_sel == 0) ? 0 : -1; 1952 n = false 1953 } else { 1954 l.slides[m].con.stop().css("left", l.bW * l.slide_dir) 1955 } 1956 } 1957 } 1958 } 1959 }; 1960 e.fn.TransBanner = function (l) { 1961 var k = arguments; 1962 return this.each(function (o) { 1963 var n = e(this); 1964 var m = n.data("TransBanner"); 1965 if (!m) { 1966 var p = new Date(); 1967 n.data("TransBanner", new i(n, l, p.getTime())) 1968 } else { 1969 if (m[k[0]]) { 1970 m[l].apply(m, Array.prototype.slice.call(k, 1)) 1971 } 1972 } 1973 }) 1974 }; 1975 1976 1977 //Below is slightly customized version of StackBoxBlur to fit TransBanner 1978 1979 /* 1980 1981 StackBoxBlur - a fast almost Box Blur For Canvas 1982 1983 Version: 0.3
1984 Author: Mario Klingemann 1985 Contact: [email protected] 1986 Website: http://www.quasimondo.com/ 1987 Twitter: @quasimondo 1988 1989 In case you find this class useful - especially in commercial projects - 1990 I am not totally unhappy for a small donation to my PayPal account 1991 [email protected] 1992 1993 Copyright (c) 2010 Mario Klingemann 1994 1995 Permission is hereby granted, free of charge, to any person 1996 obtaining a copy of this software and associated documentation 1997 files (the "Software"), to deal in the Software without 1998 restriction, including without limitation the rights to use, 1999 copy, modify, merge, publish, distribute, sublicense, and/or sell 2000 copies of the Software, and to permit persons to whom the 2001 Software is furnished to do so, subject to the following 2002 conditions: 2003 2004 The above copyright notice and this permission notice shall be 2005 included in all copies or substantial portions of the Software. 2006 2007 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 2008 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 2009 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 2010 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 2011 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 2012 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2013 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2014 OTHER DEALINGS IN THE SOFTWARE. 2015 */ 2016 2017 var j = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1]; 2018 var a = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9]; 2019 2020 function g(v, y, r, s, w, x, A, C, B, t, E, z) { 2021 var q = s; 2022 var u = w; 2023 B.style.width = q + "px"; 2024 B.style.height = u + "px"; 2025 B.width = q; 2026 B.height = u; 2027 var D = B.getContext("2d"); 2028 D.clearRect(0, 0, q, u); 2029 D.scale(x, x); 2030 D.drawImage(v, (-y + (A !== "" ? A : 0)) / x, (-r + (C !== "" ? C : 0)) / x); 2031 if (isNaN(t) || t < 1) { 2032 return 2033 } 2034 b(B, 0, 0, q, u, t, z);
2035 D.restore() 2036 } 2037 2038 function b(aC, aj, al, aI, aH, ab, X) { 2039 if (isNaN(ab) || ab < 1) { 2040 return 2041 } 2042 ab |= 0; 2043 if (isNaN(X)) { 2044 X = 1 2045 } 2046 X |= 0; 2047 if (X > 3) { 2048 X = 3 2049 } 2050 if (X < 1) { 2051 X = 1 2052 } 2053 var p = aC.getContext("2d"); 2054 var Y; 2055 try { 2056 try { 2057 Y = p.getImageData(aj, al, aI, aH) 2058 } catch (x) { 2059 try { 2060 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); 2061 Y = p.getImageData(aj, al, aI, aH) 2062 } catch (x) { 2063 return 2064 } 2065 } 2066 } catch (x) {} 2067 var aD = Y.data; 2068 var ad, ae, V, Z, av, ar, ay, aF, aE, am, ax, ak, ao, ag, ac, au, az, at, aq, ah; 2069 var y = ab + ab + 1; 2070 var af = aI << 2; 2071 var aw = aI - 1; 2072 var aa = aH - 1; 2073 var aA = ab + 1; 2074 var ai = new c(); 2075 var an = ai; 2076 for (V = 1; V < y; V++) { 2077 an = an.next = new c(); 2078 if (V == aA) { 2079 var aB = an 2080 } 2081 } 2082 an.next = ai; 2083 var W = null; 2084 var ap = j[ab]; 2085 var aG = a[ab]; 2086 while (X-- > 0) { 2087 ay = ar = 0; 2088 for (ae = aH; --ae > -1;) { 2089 aF = aA * (az = aD[ar]); 2090 aE = aA * (at = aD[ar + 1]); 2091 am = aA * (aq = aD[ar + 2]); 2092 an = ai; 2093 for (V = aA; --V > -1;) { 2094 an.r = az; 2095 an.g = at; 2096 an.b = aq; 2097 an = an.next 2098 } 2099 for (V = 1; V < aA; V++) { 2100 Z = ar + ((aw < V ? aw : V) << 2); 2101 aF += (an.r = aD[Z++]); 2102 aE += (an.g = aD[Z++]); 2103 am += (an.b = aD[Z]); 2104 an = an.next 2105 } 2106 W = ai; 2107 for (ad = 0; ad < aI; ad++) { 2108 aD[ar++] = (aF * ap) >>> aG; 2109 aD[ar++] = (aE * ap) >>> aG; 2110 aD[ar++] = (am * ap) >>> aG; 2111 ar++; 2112 Z = (ay + ((Z = ad + ab + 1) < aw ? Z : aw)) << 2; 2113 aF -= W.r - (W.r = aD[Z++]); 2114 aE -= W.g - (W.g = aD[Z++]); 2115 am -= W.b - (W.b = aD[Z]); 2116 W = W.next 2117 } 2118 ay += aI 2119 } 2120 for (ad = 0; ad < aI; ad++) { 2121 ar = ad << 2; 2122 aF = aA * (az = aD[ar++]); 2123 aE = aA * (at = aD[ar++]); 2124 am = aA * (aq = aD[ar]); 2125 an = ai; 2126 for (V = 0; V < aA; V++) { 2127 an.r = az; 2128 an.g = at; 2129 an.b = aq; 2130 an = an.next 2131 } 2132 av = aI; 2133 for (V = 1; V <= ab; V++) { 2134 ar = (av + ad) << 2; 2135 aF += (an.r = aD[ar++]); 2136 aE += (an.g = aD[ar++]); 2137 am += (an.b = aD[ar]); 2138 an = an.next; 2139 if (V < aa) { 2140 av += aI 2141 } 2142 } 2143 ar = ad; 2144 W = ai; 2145 for (ae = 0; ae < aH; ae++) { 2146 Z = ar << 2; 2147 aD[Z] = (aF * ap) >>> aG; 2148 aD[Z + 1] = (aE * ap) >>> aG; 2149 aD[Z + 2] = (am * ap) >>> aG; 2150 Z = (ad + (((Z = ae + aA) < aa ? Z : aa) * aI)) << 2; 2151 aF -= W.r - (W.r = aD[Z]); 2152 aE -= W.g - (W.g = aD[Z + 1]); 2153 am -= W.b - (W.b = aD[Z + 2]); 2154 W = W.next; 2155 ar += aI 2156 } 2157 } 2158 } 2159 p.putImageData(Y, aj, al) 2160 } 2161 2162 function c() { 2163 this.r = 0; 2164 this.g = 0; 2165 this.b = 0; 2166 this.a = 0; 2167 this.next = null 2168 } 2169})(jQuery, window, document); 2170
2171///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 2172/* 2173 * 2174 * jQuery $.getImageData Plugin 0.3 2175 * http://www.maxnov.com/getimagedata 2176 * 2177 * Written by Max Novakovic (http://www.maxnov.com/) 2178 * Date: Thu Jan 13 2011 2179 * 2180 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2181 * 2182 * Includes jQuery JSONP Core Plugin 2.1.4 2183 * http://code.google.com/p/jquery-jsonp/ 2184 * Copyright 2010, Julian Aubourg 2185 * Released under the MIT License. 2186 * 2187 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2188 * 2189 * Copyright 2011, Max Novakovic 2190 * Dual licensed under the MIT or GPL Version 2 licenses. 2191 * http://www.maxnov.com/getimagedata/#license 2192 * 2193 */ 2194(function (c, g) { 2195 function n() {} 2196 2197 function o(a) { 2198 s = [a] 2199 } 2200 2201 function e(a, j, k) { 2202 return a && a.apply(j.context || j, k) 2203 } 2204 2205 function h(a) { 2206 function j(b) { 2207 !l++ && g(function () { 2208 p(); 2209 q && (t[d] = { 2210 s: [b] 2211 }); 2212 z && (b = z.apply(a, [b])); 2213 e(a.success, a, [b, A]); 2214 e(B, a, [a, A]) 2215 }, 0) 2216 } 2217 2218 function k(b) { 2219 !l++ && g(function () { 2220 p(); 2221 q && b != C && (t[d] = b); 2222 e(a.error, a, [a, b]); 2223 e(B, a, [a, b]) 2224 }, 0) 2225 } 2226 a = c.extend({}, D, a); 2227 var B = a.complete, 2228 z = a.dataFilter, 2229 E = a.callbackParameter, 2230 F = a.callback, 2231 R = a.cache, 2232 q = a.pageCache, 2233 G = a.charset, 2234 d = a.url, 2235 f = a.data, 2236 H = a.timeout, 2237 r, l = 0, 2238 p = n; 2239 a.abort = function () { 2240 !l++ && 2241 p() 2242 }; 2243 if (e(a.beforeSend, a, [a]) === false || l) return a; 2244 d = d || u; 2245 f = f ? typeof f == "string" ? f : c.param(f, a.traditional) : u; 2246 d += f ? (/\?/.test(d) ? "&" : "?") + f : u; 2247 E && (d += (/\?/.test(d) ? "&" : "?") + encodeURIComponent(E) + "=?"); 2248 !R && !q && (d += (/\?/.test(d) ? "&" : "?") + "_" + (new Date).getTime() + "="); 2249 d = d.replace(/=\?(&|$)/, "=" + F + "$1"); 2250 q && (r = t[d]) ? r.s ? j(r.s[0]) : k(r) : g(function (b, m, v) { 2251 if (!l) { 2252 v = H > 0 && g(function () { 2253 k(C) 2254 }, H); 2255 p = function () { 2256 v && clearTimeout(v); 2257 b[I] = b[w] = b[J] = b[x] = null; 2258 i[K](b); 2259 m && i[K](m) 2260 }; 2261 window[F] = o; 2262 b = c(L)[0]; 2263 b.id = M + S++; 2264 if (G) b[T] = 2265 G; 2266 var O = function (y) { 2267 (b[w] || n)(); 2268 y = s; 2269 s = undefined; 2270 y ? j(y[0]) : k(N) 2271 }; 2272 if (P.msie) { 2273 b.event = w; 2274 b.htmlFor = b.id; 2275 b[I] = function () { 2276 /loaded|complete/.test(b.readyState) && O() 2277 } 2278 } else { 2279 b[x] = b[J] = O; 2280 P.opera ? (m = c(L)[0]).text = "jQuery('#" + b.id + "')[0]." + x + "()" : b[Q] = Q 2281 } 2282 b.src = d; 2283 i.insertBefore(b, i.firstChild); 2284 m && i.insertBefore(m, i.firstChild) 2285 } 2286 }, 0); 2287 return a 2288 } 2289 var Q = "async", 2290 T = "charset", 2291 u = "", 2292 N = "error", 2293 M = "_jqjsp", 2294 w = "onclick", 2295 x = "on" + N, 2296 J = "onload", 2297 I = "onreadystatechange", 2298 K = "removeChild", 2299 L = "<script/>", 2300 A = "success", 2301 C = "timeout", 2302 P = c.browser,
2303 i = c("head")[0] || document.documentElement, 2304 t = {}, 2305 S = 0, 2306 s, D = { 2307 callback: M, 2308 url: location.href 2309 }; 2310 h.setup = function (a) { 2311 c.extend(D, a) 2312 }; 2313 c.jsonp = h 2314})(jQuery, setTimeout); 2315(function (c) { 2316 c.getImageData = function (a) { 2317 var f = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/; 2318 if (a.url) { 2319 var g = location.protocol === "https:", 2320 e = ""; 2321 e = a.server && f.test(a.server) && a.server.indexOf("https:") && (g || a.url.indexOf("https:")) ? a.server : "//img-to-json.appspot.com/?callback=?"; 2322 c.jsonp({ 2323 url: e, 2324 data: { 2325 url: escape(a.url) 2326 }, 2327 dataType: "jsonp", 2328 timeout: 1E4, 2329 success: function (b) { 2330 var d = new Image; 2331 c(d).load(function () { 2332 this.width = b.width;
2333 this.height = b.height; 2334 typeof a.success == typeof Function && a.success(this) 2335 }).attr("src", b.data) 2336 }, 2337 error: function (b, d) { 2338 typeof a.error == typeof Function && a.error(b, d) 2339 } 2340 }) 2341 } else typeof a.error == typeof Function && a.error(null, "no_url") 2342 } 2343})(jQuery); 2344/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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.