1// Camera slideshow v1.3.4 - a jQuery slideshow with many effects, transitions, easy to customize, using canvas and mobile ready, based on jQuery 1.4+ 2// Copyright (c) 2012 by Manuel Masia - www.pixedelic.com 3// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4; 5(function(a) { 6 a.fn.camera = function(b, c) { 7 function e() { 8 if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) { 9 return true 10 } 11 } 12 13 function H() { 14 var b = a(s).width(); 15 a("li", s).removeClass("camera_visThumb"); 16 a("li", s).each(function() { 17 var c = a(this).position(), 18 d = a("ul", s).outerWidth(), 19 e = a("ul", s).offset().left, 20 f = a("> div", s).offset().left, 21 g = f - e; 22 if (g > 0) { 23 a(".camera_prevThumbs", V).removeClass("hideNav") 24 } else { 25 a(".camera_prevThumbs", V).addClass("hideNav") 26 } 27 if (d - g > b) { 28 a(".camera_nextThumbs", V).removeClass("hideNav") 29 } else { 30 a(".camera_nextThumbs", V).addClass("hideNav") 31 } 32 var h = c.left, 33 i = c.left + a(this).width(); 34 if (i - g <= b && h - g >= 0) { 35 a(this).addClass("camera_visThumb") 36 } 37 }) 38 } 39 40 function K() { 41 function d() { 42 t = f.width(); 43 if (b.height.indexOf("%") != -1) { 44 var c = Math.round(t / (100 / parseFloat(b.height))); 45 if (b.minHeight != "" && c < parseFloat(b.minHeight)) { 46 u = parseFloat(b.minHeight) 47 } else { 48 u = c 49 } 50 f.css({ 51 height: u 52 }) 53 } else if (b.height == "auto") { 54 u = f.height() 55 } else { 56 u = parseFloat(b.height); 57 f.css({ 58 height: u 59 }) 60 } 61 a(".camerarelative", k).css({ 62 width: t, 63 height: u 64 }); 65 a(".imgLoaded", k).each(function() { 66 var c = a(this), 67 d = c.attr("width"), 68 e = c.attr("height"), 69 f = c.index(), 70 g, h, i = c.attr("data-alignment"), 71 j = c.attr("data-portrait"); 72 if (typeof i === "undefined" || i === false || i === "") { 73 i = b.alignment 74 } 75 if (typeof j === "undefined" || j === false || j === "") { 76 j = b.portrait 77 } 78 if (j == false || j == "false") { 79 if (d / e < t / u) { 80 var k = t / d; 81 var l = Math.abs(u - e * k) * .5; 82 switch (i) { 83 case "topLeft": 84 g = 0; 85 break; 86 case "topCenter": 87 g = 0; 88 break; 89 case "topRight": 90 g = 0; 91 break; 92 case "centerLeft": 93 g = "-" + l + "px"; 94 break; 95 case "center": 96 g = "-" + l + "px"; 97 break; 98 case "centerRight": 99 g = "-" + l + "px"; 100 break; 101 case "bottomLeft": 102 g = "-" + l * 2 + "px"; 103 break; 104 case "bottomCenter": 105 g = "-" + l * 2 + "px"; 106 break; 107 case "bottomRight": 108 g = "-" + l * 2 + "px"; 109 break 110 } 111 c.css({ 112 height: e * k, 113 "margin-left": 0, 114 "margin-right": 0, 115 "margin-top": g, 116 position: "absolute", 117 visibility: "visible", 118 width: t 119 }) 120 } else { 121 var k = u / e; 122 var l = Math.abs(t - d * k) * .5; 123 switch (i) { 124 case "topLeft": 125 h = 0; 126 break; 127 case "topCenter": 128 h = "-" + l + "px"; 129 break; 130 case "topRight": 131 h = "-" + l * 2 + "px"; 132 break; 133 case "centerLeft": 134 h = 0; 135 break; 136 case "center": 137 h = "-" + l + "px"; 138 break; 139 case "centerRight": 140 h = "-" + l * 2 + "px"; 141 break; 142 case "bottomLeft": 143 h = 0; 144 break; 145 case "bottomCenter": 146 h = "-" + l + "px"; 147 break; 148 case "bottomRight": 149 h = "-" + l * 2 + "px"; 150 break 151 } 152 c.css({ 153 height: u, 154 "margin-left": h, 155 "margin-right": h, 156 "margin-top": 0, 157 position: "absolute", 158 visibility: "visible", 159 width: d * k 160 }) 161 } 162 } else { 163 if (d / e < t / u) { 164 var k = u / e; 165 var l = Math.abs(t - d * k) * .5; 166 switch (i) { 167 case "topLeft": 168 h = 0; 169 break; 170 case "topCenter": 171 h = l + "px"; 172 break; 173 case "topRight": 174 h = l * 2 + "px"; 175 break; 176 case "centerLeft": 177 h = 0; 178 break; 179 case "center": 180 h = l + "px"; 181 break; 182 case "centerRight": 183 h = l * 2 + "px"; 184 break; 185 case "bottomLeft": 186 h = 0; 187 break; 188 case "bottomCenter": 189 h = l + "px"; 190 break; 191 case "bottomRight": 192 h = l * 2 + "px"; 193 break 194 } 195 c.css({ 196 height: u, 197 "margin-left": h, 198 "margin-right": h, 199 "margin-top": 0, 200 position: "absolute", 201 visibility: "visible", 202 width: d * k 203 }) 204 } else { 205 var k = t / d; 206 var l = Math.abs(u - e * k) * .5; 207 switch (i) { 208 case "topLeft": 209 g = 0; 210 break; 211 case "topCenter": 212 g = 0; 213 break; 214 case "topRight": 215 g = 0; 216 break; 217 case "centerLeft": 218 g = l + "px"; 219 break; 220 case "center": 221 g = l + "px"; 222 break; 223 case "centerRight": 224 g = l + "px"; 225 break; 226 case "bottomLeft": 227 g = l * 2 + "px"; 228 break; 229 case "bottomCenter": 230 g = l * 2 + "px"; 231 break; 232 case "bottomRight": 233 g = l * 2 + "px"; 234 break 235 } 236 c.css({ 237 height: e * k, 238 "margin-left": 0, 239 "margin-right": 0, 240 "margin-top": g, 241 position: "absolute", 242 visibility: "visible", 243 width: t 244 }) 245 } 246 } 247 }) 248 } 249 var c; 250 if (I == true) { 251 clearTimeout(c); 252 c = setTimeout(d, 200) 253 } else { 254 d() 255 } 256 I = true 257 } 258 259 function X(a) { 260 for (var b, c, d = a.length; d; b = parseInt(Math.random() * d), c = a[--d], a[d] = a[b], a[b] = c); 261 return a 262 } 263 264 function Y(a) { 265 return Math.ceil(a) == Math.floor(a) 266 } 267 268 function hb() { 269 if (a(s).length && !a(r).length) { 270 var b = a(s).outerWidth(), 271 c = a("ul > li", s).outerWidth(), 272 d = a("li.cameracurrent", s).length ? a("li.cameracurrent", s).position() : "", 273 e = a("ul > li", s).length * a("ul > li", s).outerWidth(), 274 g = a("ul", s).offset().left, 275 h = a("> div", s).offset().left, 276 i; 277 if (g < 0) { 278 i = "-" + (h - g) 279 } else { 280 i = h - g 281 } 282 if (gb == true) { 283 a("ul", s).width(a("ul > li", s).length * a("ul > li", s).outerWidth()); 284 if (a(s).length && !a(r).lenght) { 285 f.css({ 286 marginBottom: a(s).outerHeight() 287 }) 288 } 289 H(); 290 a("ul", s).width(a("ul > li", s).length * a("ul > li", s).outerWidth()); 291 if (a(s).length && !a(r).lenght) { 292 f.css({ 293 marginBottom: a(s).outerHeight() 294 }) 295 } 296 } 297 gb = false;
298 var j = a("li.cameracurrent", s).length ? d.left : "", 299 k = a("li.cameracurrent", s).length ? d.left + a("li.cameracurrent", s).outerWidth() : ""; 300 if (j < a("li.cameracurrent", s).outerWidth()) { 301 j = 0 302 } 303 if (k - i > b) { 304 if (j + b < e) { 305 a("ul", s).animate({ 306 "margin-left": "-" + j + "px" 307 }, 500, H) 308 } else { 309 a("ul", s).animate({ 310 "margin-left": "-" + (a("ul", s).outerWidth() - b) + "px" 311 }, 500, H) 312 } 313 } else if (j - i < 0) { 314 a("ul", s).animate({ 315 "margin-left": "-" + j + "px" 316 }, 500, H) 317 } else { 318 a("ul", s).css({ 319 "margin-left": "auto", 320 "margin-right": "auto" 321 }); 322 setTimeout(H, 100) 323 } 324 } 325 } 326 327 function ib() { 328 bb = 0; 329 var c = a(".camera_bar_cont", V).width(), 330 d = a(".camera_bar_cont", V).height(); 331 if (h != "pie") { 332 switch (U) { 333 case "leftToRight": 334 a("#" + i).css({ 335 right: c 336 }); 337 break; 338 case "rightToLeft": 339 a("#" + i).css({ 340 left: c 341 }); 342 break; 343 case "topToBottom": 344 a("#" + i).css({ 345 bottom: d 346 }); 347 break; 348 case "bottomToTop": 349 a("#" + i).css({ 350 top: d 351 }); 352 break 353 } 354 } else { 355 db.clearRect(0, 0, b.pieDiameter, b.pieDiameter) 356 } 357 } 358 359 function jb(c) { 360 j.addClass("camerasliding"); 361 R = false; 362 var d = parseFloat(a("div.cameraSlide.cameracurrent", k).index()); 363 if (c > 0) { 364 var l = c - 1 365 } else if (d == B - 1) { 366 var l = 0 367 } else { 368 var l = d + 1 369 } 370 var m = a(".cameraSlide:eq(" + l + ")", k); 371 var n = a(".cameraSlide:eq(" + (l + 1) + ")", k).addClass("cameranext"); 372 if (d != l + 1) { 373 n.hide() 374 } 375 a(".cameraContent", g).fadeOut(530); 376 a(".camera_caption", g).show(); 377 a(".camerarelative", m).append(a("> div ", j).eq(l).find("> div.camera_effected")); 378 a(".camera_target_content .cameraContent:eq(" + l + ")", f).append(a("> div ", j).eq(l).find("> div")); 379 if (!a(".imgLoaded", m).length) { 380 var o = v[l]; 381 var p = new Image; 382 p.src = o + "?" + (new Date).getTime(); 383 m.css("visibility", "hidden"); 384 m.prepend(a(p).attr("class", "imgLoaded").css("visibility", "hidden")); 385 var q, w; 386 if (!a(p).get(0).complete || q == "0" || w == "0" || typeof q === "undefined" || q === false || typeof w === "undefined" || w === false) { 387 a(".camera_loader", f).delay(500).fadeIn(400); 388 p.onload = function() { 389 q = p.naturalWidth; 390 w = p.naturalHeight; 391 a(p).attr("data-alignment", z[l]).attr("data-portrait", y[l]); 392 a(p).attr("width", q); 393 a(p).attr("height", w); 394 k.find(".cameraSlide_" + l).hide().css("visibility", "visible"); 395 K(); 396 jb(l + 1) 397 } 398 } 399 } else { 400 if (v.length > l + 1 && !a(".imgLoaded", n).length) { 401 var x = v[l + 1]; 402 var A = new Image; 403 A.src = x + "?" + (new Date).getTime(); 404 n.prepend(a(A).attr("class", "imgLoaded").css("visibility", "hidden")); 405 A.onload = function() {
406 q = A.naturalWidth; 407 w = A.naturalHeight; 408 a(A).attr("data-alignment", z[l + 1]).attr("data-portrait", y[l + 1]); 409 a(A).attr("width", q); 410 a(A).attr("height", w); 411 K() 412 } 413 } 414 b.onLoaded.call(this); 415 if (a(".camera_loader", f).is(":visible")) { 416 a(".camera_loader", f).fadeOut(400) 417 } else { 418 a(".camera_loader", f).css({ 419 visibility: "hidden" 420 }); 421 a(".camera_loader", f).fadeOut(400, function() { 422 a(".camera_loader", f).css({ 423 visibility: "visible" 424 }) 425 }) 426 } 427 var C = b.rows, 428 D = b.cols, 429 F = 1, 430 G = 0, 431 H, I, J, N, O, P = new Array("simpleFade", "curtainTopLeft", "curtainTopRight", "curtainBottomLeft", "curtainBottomRight", "curtainSliceLeft", "curtainSliceRight", "blindCurtainTopLeft", "blindCurtainTopRight", "blindCurtainBottomLeft", "blindCurtainBottomRight", "blindCurtainSliceBottom", "blindCurtainSliceTop", "stampede", "mosaic", "mosaicReverse", "mosaicRandom", "mosaicSpiral", "mosaicSpiralReverse", "topLeftBottomRight", "bottomRightTopLeft", "bottomLeftTopRight", "topRightBottomLeft", "scrollLeft", "scrollRight", "scrollTop", "scrollBottom", "scrollHorz"); 432 marginLeft = 0, marginTop = 0, opacityOnGrid = 0; 433 if (b.opacityOnGrid == true) { 434 opacityOnGrid = 0 435 } else { 436 opacityOnGrid = 1 437 } 438 var Q = a(" > div", j).eq(l).attr("data-fx"); 439 if (e() && b.mobileFx != "" && b.mobileFx != "default") { 440 N = b.mobileFx 441 } else { 442 if (typeof Q !== "undefined" && Q !== false && Q !== "default") { 443 N = Q 444 } else { 445 N = b.fx 446 } 447 } 448 if (N == "random") { 449 N = X(P); 450 N = N[0] 451 } else { 452 N = N; 453 if (N.indexOf(",") > 0) { 454 N = N.replace(/ /g, ""); 455 N = N.split(","); 456 N = X(N); 457 N = N[0] 458 } 459 } 460 dataEasing = a(" > div", j).eq(l).attr("data-easing"); 461 mobileEasing = a(" > div", j).eq(l).attr("data-mobileEasing"); 462 if (e() && b.mobileEasing != "" && b.mobileEasing != "default") { 463 if (typeof mobileEasing !== "undefined" && mobileEasing !== false && mobileEasing !== "default") { 464 O = mobileEasing 465 } else { 466 O = b.mobileEasing 467 } 468 } else { 469 if (typeof dataEasing !== "undefined" && dataEasing !== false && dataEasing !== "default") { 470 O = dataEasing 471 } else { 472 O = b.easing 473 } 474 } 475 H = a(" > div", j).eq(l).attr("data-slideOn"); 476 if (typeof H !== "undefined" && H !== false) { 477 T = H 478 } else { 479 if (b.slideOn == "random") { 480 var T = new Array("next", "prev"); 481 T = X(T); 482 T = T[0] 483 } else { 484 T = b.slideOn 485 } 486 } 487 var Y = a(" > div", j).eq(l).attr("data-time"); 488 if (typeof Y !== "undefined" && Y !== false && Y !== "") { 489 I = parseFloat(Y) 490 } else { 491 I = b.time 492 } 493 var Z = a(" > div", j).eq(l).attr("data-transPeriod"); 494 if (typeof Z !== "undefined" && Z !== false && Z !== "") { 495 J = parseFloat(Z) 496 } else { 497 J = b.transPeriod 498 } 499 if (!a(j).hasClass("camerastarted")) { 500 N = "simpleFade"; 501 T = "next"; 502 O = ""; 503 J = 400; 504 a(j).addClass("camerastarted") 505 } 506 switch (N) { 507 case "simpleFade": 508 D = 1; 509 C = 1; 510 break; 511 case "curtainTopLeft": 512 if (b.slicedCols == 0) { 513 D = b.cols 514 } else { 515 D = b.slicedCols 516 } 517 C = 1; 518 break; 519 case "curtainTopRight": 520 if (b.slicedCols == 0) { 521 D = b.cols 522 } else { 523 D = b.slicedCols 524 } 525 C = 1; 526 break; 527 case "curtainBottomLeft": 528 if (b.slicedCols == 0) { 529 D = b.cols 530 } else { 531 D = b.slicedCols 532 } 533 C = 1; 534 break; 535 case "curtainBottomRight": 536 if (b.slicedCols == 0) { 537 D = b.cols 538 } else { 539 D = b.slicedCols 540 } 541 C = 1; 542 break; 543 case "curtainSliceLeft": 544 if (b.slicedCols == 0) { 545 D = b.cols 546 } else { 547 D = b.slicedCols 548 } 549 C = 1; 550 break; 551 case "curtainSliceRight": 552 if (b.slicedCols == 0) { 553 D = b.cols 554 } else { 555 D = b.slicedCols 556 } 557 C = 1; 558 break; 559 case "blindCurtainTopLeft": 560 if (b.slicedRows == 0) { 561 C = b.rows 562 } else { 563 C = b.slicedRows 564 } 565 D = 1; 566 break; 567 case "blindCurtainTopRight": 568 if (b.slicedRows == 0) { 569 C = b.rows 570 } else { 571 C = b.slicedRows 572 } 573 D = 1; 574 break; 575 case "blindCurtainBottomLeft": 576 if (b.slicedRows == 0) { 577 C = b.rows 578 } else { 579 C = b.slicedRows 580 } 581 D = 1; 582 break; 583 case "blindCurtainBottomRight": 584 if (b.slicedRows == 0) { 585 C = b.rows 586 } else { 587 C = b.slicedRows 588 } 589 D = 1; 590 break; 591 case "blindCurtainSliceTop": 592 if (b.slicedRows == 0) { 593 C = b.rows 594 } else { 595 C = b.slicedRows 596 } 597 D = 1; 598 break; 599 case "blindCurtainSliceBottom": 600 if (b.slicedRows == 0) { 601 C = b.rows 602 } else { 603 C = b.slicedRows 604 } 605 D = 1; 606 break; 607 case "stampede": 608 G = "-" + J; 609 break; 610 case "mosaic": 611 G = b.gridDifference; 612 break; 613 case "mosaicReverse": 614 G = b.gridDifference; 615 break; 616 case "mosaicRandom": 617 break; 618 case "mosaicSpiral": 619 G = b.gridDifference; 620 F = 1.7; 621 break; 622 case "mosaicSpiralReverse": 623 G = b.gridDifference; 624 F = 1.7; 625 break; 626 case "topLeftBottomRight": 627 G = b.gridDifference; 628 F = 6; 629 break; 630 case "bottomRightTopLeft": 631 G = b.gridDifference; 632 F = 6; 633 break; 634 case "bottomLeftTopRight": 635 G = b.gridDifference; 636 F = 6; 637 break; 638 case "topRightBottomLeft": 639 G = b.gridDifference; 640 F = 6; 641 break; 642 case "scrollLeft": 643 D = 1; 644 C = 1; 645 break; 646 case "scrollRight": 647 D = 1; 648 C = 1; 649 break; 650 case "scrollTop": 651 D = 1; 652 C = 1; 653 break; 654 case "scrollBottom": 655 D = 1; 656 C = 1; 657 break; 658 case "scrollHorz": 659 D = 1; 660 C = 1; 661 break 662 } 663 var _ = 0; 664 var ab = C * D; 665 var eb = t - Math.floor(t / D) * D; 666 var fb = u - Math.floor(u / C) * C; 667 var gb; 668 var kb; 669 var lb = 0; 670 var mb = 0; 671 var nb = new Array; 672 var ob = new Array; 673 var pb = new Array; 674 while (_ < ab) { 675 nb.push(_); 676 ob.push(_); 677 E.append('<div class="cameraappended" style="display:none; overflow:hidden; position:absolute; z-index:1000" />'); 678 var qb = a(".cameraappended:eq(" + _ + ")", k); 679 if (N == "scrollLeft" || N == "scrollRight" || N == "scrollTop" || N == "scrollBottom" || N == "scrollHorz") { 680 S.eq(l).clone().show().appendTo(qb) 681 } else { 682 if (T == "next") { 683 S.eq(l).clone().show().appendTo(qb) 684 } else { 685 S.eq(d).clone().show().appendTo(qb) 686 } 687 } 688 if (_ % D < eb) { 689 gb = 1 690 } else { 691 gb = 0 692 } 693 if (_ % D == 0) { 694 lb = 0 695 } 696 if (Math.floor(_ / D) < fb) { 697 kb = 1 698 } else { 699 kb = 0 700 } 701 qb.css({ 702 height: Math.floor(u / C + kb + 1), 703 left: lb, 704 top: mb, 705 width: Math.floor(t / D + gb + 1) 706 }); 707 a("> .cameraSlide", qb).css({ 708 height: u, 709 "margin-left": "-" + lb + "px", 710 "margin-top": "-" + mb + "px", 711 width: t 712 }); 713 lb = lb + qb.width() - 1; 714 if (_ % D == D - 1) { 715 mb = mb + qb.height() - 1 716 } 717 _++ 718 } 719 switch (N) { 720 case "curtainTopLeft": 721 break; 722 case "curtainBottomLeft": 723 break; 724 case "curtainSliceLeft": 725 break; 726 case "curtainTopRight": 727 nb = nb.reverse(); 728 break; 729 case "curtainBottomRight": 730 nb = nb.reverse(); 731 break; 732 case "curtainSliceRight": 733 nb = nb.reverse(); 734 break; 735 case "blindCurtainTopLeft": 736 break; 737 case "blindCurtainBottomLeft": 738 nb = nb.reverse(); 739 break; 740 case "blindCurtainSliceTop": 741 break; 742 case "blindCurtainTopRight": 743 break; 744 case "blindCurtainBottomRight": 745 nb = nb.reverse(); 746 break; 747 case "blindCurtainSliceBottom": 748 nb = nb.reverse(); 749 break; 750 case "stampede": 751 nb = X(nb); 752 break; 753 case "mosaic": 754 break; 755 case "mosaicReverse": 756 nb = nb.reverse(); 757 break; 758 case "mosaicRandom": 759 nb = X(nb); 760 break; 761 case "mosaicSpiral": 762 var rb = C / 2, 763 sb, tb, ub, vb = 0; 764 for (ub = 0; ub < rb; ub++) { 765 tb = ub; 766 for (sb = ub; sb < D - ub - 1; sb++) { 767 pb[vb++] = tb * D + sb 768 } 769 sb = D - ub - 1; 770 for (tb = ub; tb < C - ub - 1; tb++) { 771 pb[vb++] = tb * D + sb 772 } 773 tb = C - ub - 1; 774 for (sb = D - ub - 1; sb > ub; sb--) { 775 pb[vb++] = tb * D + sb 776 } 777 sb = ub; 778 for (tb = C - ub - 1; tb > ub; tb--) { 779 pb[vb++] = tb * D + sb 780 } 781 } 782 nb = pb; 783 break; 784 case "mosaicSpiralReverse": 785 var rb = C / 2, 786 sb, tb, ub, vb = ab - 1; 787 for (ub = 0; ub < rb; ub++) { 788 tb = ub; 789 for (sb = ub; sb < D - ub - 1; sb++) { 790 pb[vb--] = tb * D + sb 791 } 792 sb = D - ub - 1; 793 for (tb = ub; tb < C - ub - 1; tb++) { 794 pb[vb--] = tb * D + sb 795 } 796 tb = C - ub - 1; 797 for (sb = D - ub - 1; sb > ub; sb--) { 798 pb[vb--] = tb * D + sb 799 } 800 sb = ub; 801 for (tb = C - ub - 1; tb > ub; tb--) { 802 pb[vb--] = tb * D + sb 803 } 804 } 805 nb = pb; 806
806 break; 807 case "topLeftBottomRight": 808 for (var tb = 0; tb < C; tb++) 809 for (var sb = 0; sb < D; sb++) { 810 pb.push(sb + tb) 811 } 812 ob = pb; 813 break; 814 case "bottomRightTopLeft": 815 for (var tb = 0; tb < C; tb++) 816 for (var sb = 0; sb < D; sb++) { 817 pb.push(sb + tb) 818 } 819 ob = pb.reverse(); 820 break; 821 case "bottomLeftTopRight": 822 for (var tb = C; tb > 0; tb--) 823 for (var sb = 0; sb < D; sb++) { 824 pb.push(sb + tb) 825 } 826 ob = pb; 827 break; 828 case "topRightBottomLeft": 829 for (var tb = 0; tb < C; tb++) 830 for (var sb = D; sb > 0; sb--) { 831 pb.push(sb + tb) 832 } 833 ob = pb; 834 break 835 } 836 a.each(nb, function(c, e) { 837 function o() { 838 a(this).addClass("cameraeased"); 839 if (a(".cameraeased", k).length >= 0) { 840 a(s).css({ 841 visibility: "visible" 842 }) 843 } 844 if (a(".cameraeased", k).length == ab) { 845 hb(); 846 a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom", g).each(function() { 847 a(this).css("visibility", "hidden") 848 }); 849 S.eq(l).show().css("z-index", "999").removeClass("cameranext").addClass("cameracurrent"); 850 S.eq(d).css("z-index", "1").removeClass("cameracurrent"); 851 a(".cameraContent", g).eq(l).addClass("cameracurrent"); 852 if (d >= 0) { 853 a(".cameraContent", g).eq(d).removeClass("cameracurrent") 854 } 855 b.onEndTransition.call(this); 856 if (a("> div", j).eq(l).attr("data-video") != "hide" && a(".cameraContent.cameracurrent .imgFake", g).length) { 857 a(".cameraContent.cameracurrent .imgFake", g).click() 858 } 859 var c = S.eq(l).find(".fadeIn").length; 860 var e = a(".cameraContent", g).eq(l).find(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom").length; 861 if (c != 0) { 862 a(".cameraSlide.cameracurrent .fadeIn", g).each(function() { 863 if (a(this).attr("data-easing") != "") { 864 var b = a(this).attr("data-easing") 865 } else { 866 var b = O 867 } 868 var d = a(this); 869 if (typeof d.attr("data-outerWidth") === "undefined" || d.attr("data-outerWidth") === false || d.attr("data-outerWidth") === "") { 870 var e = d.outerWidth(); 871 d.attr("data-outerWidth", e) 872 } else { 873 var e = d.attr("data-outerWidth") 874 } 875 if (typeof d.attr("data-outerHeight") === "undefined" || d.attr("data-outerHeight") === false || d.attr("data-outerHeight") === "") { 876 var f = d.outerHeight(); 877 d.attr("data-outerHeight", f) 878 } else { 879 var f = d.attr("data-outerHeight") 880 } 881 var g = d.position(); 882 var h = g.left; 883 var i = g.top; 884 var j = d.attr("class"); 885 var k = d.index(); 886 var l = d.parents(".camerarelative").outerHeight(); 887 var m = d.parents(".camerarelative").outerWidth(); 888 if (j.indexOf("fadeIn") != -1) { 889 d.animate({ 890 opacity: 0 891 }, 0).css("visibility", "visible").delay(I / c * .1 * (k - 1)).animate({ 892 opacity: 1 893 }, I / c * .15, b) 894 } else { 895 d.css("visibility", "visible") 896 } 897 }) 898 } 899 a(".cameraContent.cameracurrent", g).show(); 900 if (e != 0) { 901 a(".cameraContent.cameracurrent .moveFromLeft, .cameraContent.cameracurrent .moveFromRight, .cameraContent.cameracurrent .moveFromTop, .cameraContent.cameracurrent .moveFromBottom, .cameraContent.cameracurrent .fadeIn, .cameraContent.cameracurrent .fadeFromLeft, .cameraContent.cameracurrent .fadeFromRight, .cameraContent.cameracurrent .fadeFromTop, .cameraContent.cameracurrent .fadeFromBottom", g).each(function() { 902 if (a(this).attr("data-easing") != "") { 903 var b = a(this).attr("data-easing") 904 } else { 905 var b = O 906 } 907 var c = a(this); 908 var d = c.position(); 909 var f = d.left; 910 var g = d.top; 911 var h = c.attr("class"); 912 var i = c.index(); 913 var j = c.outerHeight(); 914 if (h.indexOf("moveFromLeft") != -1) { 915 c.css({ 916 left: "-" + t + "px", 917 right: "auto" 918 }); 919 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 920 left: d.left 921 }, I / e * .15, b) 922 } else if (h.indexOf("moveFromRight") != -1) { 923 c.css({ 924 left: t + "px", 925 right: "auto" 926 }); 927 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 928 left: d.left 929 }, I / e * .15, b) 930 } else if (h.indexOf("moveFromTop") != -1) { 931 c.css({ 932 top: "-" + u + "px", 933 bottom: "auto" 934 }); 935 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 936 top: d.top 937 }, I / e * .15, b, function() { 938 c.css({ 939 top: "auto", 940 bottom: 0 941 }) 942 }) 943 } else if (h.indexOf("moveFromBottom") != -1) { 944 c.css({ 945 top: u + "px", 946 bottom: "auto" 947 }); 948 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 949 top: d.top 950 }, I / e * .15, b) 951 } else if (h.indexOf("fadeFromLeft") != -1) { 952 c.animate({ 953 opacity: 0 954 }, 0).css({ 955 left: "-" + t + "px", 956 right: "auto" 957 }); 958 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 959 left: d.left, 960 opacity: 1 961 }, I / e * .15, b) 962 } else if (h.indexOf("fadeFromRight") != -1) { 963 c.animate({ 964 opacity: 0 965 }, 0).css({ 966 left: t + "px", 967 right: "auto" 968 }); 969 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 970 left: d.left, 971 opacity: 1 972 }, I / e * .15, b) 973 } else if (h.indexOf("fadeFromTop") != -1) { 974 c.animate({ 975 opacity: 0 976 }, 0).css({ 977 top: "-" + u + "px", 978 bottom: "auto" 979 }); 980 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 981 top: d.top, 982 opacity: 1 983 }, I / e * .15, b, function() { 984 c.css({ 985 top: "auto", 986 bottom: 0 987 }) 988 }) 989 } else if (h.indexOf("fadeFromBottom") != -1) { 990 c.animate({ 991 opacity: 0 992 }, 0).css({ 993 bottom: "-" + j + "px" 994 }); 995 c.css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 996 bottom: "0", 997 opacity: 1 998 }, I / e * .15, b) 999 } else if (h.indexOf("fadeIn") != -1) { 1000 c.animate({ 1001 opacity: 0 1002 }, 0).css("visibility", "visible").delay(I / e * .1 * (i - 1)).animate({ 1003 opacity: 1 1004 }, I / e * .15, b) 1005 } else { 1006 c.css("visibility", "visible") 1007 } 1008 }) 1009 }
1010 a(".cameraappended", k).remove(); 1011 j.removeClass("camerasliding"); 1012 S.eq(d).hide(); 1013 var f = a(".camera_bar_cont", V).width(), 1014 m = a(".camera_bar_cont", V).height(), 1015 o; 1016 if (h != "pie") { 1017 o = .05 1018 } else { 1019 o = .005 1020 } 1021 a("#" + i).animate({ 1022 opacity: b.loaderOpacity 1023 }, 200); 1024 L = setInterval(function() { 1025 if (j.hasClass("stopped")) { 1026 clearInterval(L) 1027 } 1028 if (h != "pie") { 1029 if (bb <= 1.002 && !j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) { 1030 bb = bb + o 1031 } else if (bb <= 1 && (j.hasClass("stopped") || j.hasClass("paused") || j.hasClass("stopped") || j.hasClass("hovered"))) { 1032 bb = bb 1033 } else { 1034 if (!j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) { 1035 clearInterval(L); 1036 W(); 1037 a("#" + i).animate({ 1038 opacity: 0 1039 }, 200, function() { 1040 clearTimeout(M); 1041 M = setTimeout(ib, n); 1042 jb(); 1043 b.onStartLoading.call(this) 1044 }) 1045 } 1046 } 1047 switch (U) { 1048 case "leftToRight": 1049 a("#" + i).animate({ 1050 right: f - f * bb 1051 }, I * o, "linear"); 1052 break; 1053 case "rightToLeft": 1054 a("#" + i).animate({ 1055 left: f - f * bb 1056 }, I * o, "linear"); 1057 break; 1058 case "topToBottom": 1059 a("#" + i).animate({ 1060 bottom: m - m * bb 1061 }, I * o, "linear"); 1062 break; 1063 case "bottomToTop": 1064 a("#" + i).animate({ 1065 bottom: m - m * bb 1066 }, I * o, "linear"); 1067 break 1068 } 1069 } else { 1070 cb = bb; 1071 db.clearRect(0, 0, b.pieDiameter, b.pieDiameter); 1072 db.globalCompositeOperation = "destination-over"; 1073 db.beginPath(); 1074 db.arc(b.pieDiameter / 2, b.pieDiameter / 2, b.pieDiameter / 2 - b.loaderStroke, 0, Math.PI * 2, false); 1075 db.lineWidth = b.loaderStroke; 1076 db.strokeStyle = b.loaderBgColor; 1077 db.stroke(); 1078 db.closePath(); 1079 db.globalCompositeOperation = "source-over"; 1080 db.beginPath(); 1081 db.arc(b.pieDiameter / 2, b.pieDiameter / 2, b.pieDiameter / 2 - b.loaderStroke, 0, Math.PI * 2 * cb, false); 1082 db.lineWidth = b.loaderStroke - b.loaderPadding * 2; 1083 db.strokeStyle = b.loaderColor; 1084 db.stroke(); 1085 db.closePath(); 1086 if (bb <= 1.002 && !j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) { 1087 bb = bb + o 1088 } else if (bb <= 1 && (j.hasClass("stopped") || j.hasClass("paused") || j.hasClass("hovered"))) { 1089 bb = bb 1090 } else { 1091 if (!j.hasClass("stopped") && !j.hasClass("paused") && !j.hasClass("hovered")) { 1092 clearInterval(L); 1093 W(); 1094 a("#" + i + ", .camera_canvas_wrap", V).animate({ 1095 opacity: 0 1096 }, 200, function() {
1097 clearTimeout(M); 1098 M = setTimeout(ib, n); 1099 jb(); 1100 b.onStartLoading.call(this) 1101 }) 1102 } 1103 } 1104 } 1105 }, I * o) 1106 } 1107 } 1108 if (e % D < eb) { 1109 gb = 1 1110 } else { 1111 gb = 0 1112 } 1113 if (e % D == 0) { 1114 lb = 0 1115 } 1116 if (Math.floor(e / D) < fb) { 1117 kb = 1 1118 } else { 1119 kb = 0 1120 } 1121 switch (N) { 1122 case "simpleFade": 1123 height = u; 1124 width = t; 1125 opacityOnGrid = 0; 1126 break; 1127 case "curtainTopLeft": 1128 height = 0, width = Math.floor(t / D + gb + 1), marginTop = "-" + Math.floor(u / C + kb + 1) + "px"; 1129 break; 1130 case "curtainTopRight": 1131 height = 0, width = Math.floor(t / D + gb + 1), marginTop = "-" + Math.floor(u / C + kb + 1) + "px"; 1132 break; 1133 case "curtainBottomLeft": 1134 height = 0, width = Math.floor(t / D + gb + 1), marginTop = Math.floor(u / C + kb + 1) + "px"; 1135 break; 1136 case "curtainBottomRight": 1137 height = 0, width = Math.floor(t / D + gb + 1), marginTop = Math.floor(u / C + kb + 1) + "px"; 1138 break; 1139 case "curtainSliceLeft": 1140 height = 0, width = Math.floor(t / D + gb + 1); 1141 if (e % 2 == 0) { 1142 marginTop = Math.floor(u / C + kb + 1) + "px" 1143 } else { 1144 marginTop = "-" + Math.floor(u / C + kb + 1) + "px" 1145 } 1146 break; 1147 case "curtainSliceRight": 1148 height = 0, width = Math.floor(t / D + gb + 1); 1149 if (e % 2 == 0) { 1150 marginTop = Math.floor(u / C + kb + 1) + "px" 1151 } else { 1152 marginTop = "-" + Math.floor(u / C + kb + 1) + "px" 1153 } 1154 break; 1155 case "blindCurtainTopLeft": 1156 height = Math.floor(u / C + kb + 1), width = 0, marginLeft = "-" + Math.floor(t / D + gb + 1) + "px"; 1157 break; 1158 case "blindCurtainTopRight": 1159 height = Math.floor(u / C + kb + 1), width = 0, marginLeft = Math.floor(t / D + gb + 1) + "px"; 1160 break; 1161 case "blindCurtainBottomLeft": 1162 height = Math.floor(u / C + kb + 1), width = 0, marginLeft = "-" + Math.floor(t / D + gb + 1) + "px"; 1163 break; 1164 case "blindCurtainBottomRight": 1165 height = Math.floor(u / C + kb + 1), width = 0, marginLeft = Math.floor(t / D + gb + 1) + "px"; 1166 break; 1167 case "blindCurtainSliceBottom": 1168 height = Math.floor(u / C + kb + 1), width = 0; 1169 if (e % 2 == 0) { 1170 marginLeft = "-" + Math.floor(t / D + gb + 1) + "px" 1171 } else { 1172 marginLeft = Math.floor(t / D + gb + 1) + "px" 1173 } 1174 break; 1175 case "blindCurtainSliceTop": 1176 height = Math.floor(u / C + kb + 1), width = 0; 1177 if (e % 2 == 0) { 1178 marginLeft = "-" + Math.floor(t / D + gb + 1) + "px" 1179 } else { 1180 marginLeft = Math.floor(t / D + gb + 1) + "px" 1181 } 1182 break; 1183 case "stampede": 1184 height = 0; 1185 width = 0; 1186 marginLeft = t * .2 * (c % D - (D - Math.floor(D / 2))) + "px"; 1187 marginTop = u * .2 * (Math.floor(c / D) + 1 - (C - Math.floor(C / 2))) + "px"; 1188 break; 1189 case "mosaic": 1190 height = 0; 1191 width = 0; 1192 break; 1193 case "mosaicReverse": 1194 height = 0; 1195 width = 0; 1196 marginLeft = Math.floor(t / D + gb + 1) + "px"; 1197 marginTop = Math.floor(u / C + kb + 1) + "px"; 1198 break; 1199 case "mosaicRandom": 1200 height = 0; 1201 width = 0; 1202 marginLeft = Math.floor(t / D + gb + 1) * .5 + "px"; 1203 marginTop = Math.floor(u / C + kb + 1) * .5 + "px"; 1204 break; 1205 case "mosaicSpiral": 1206 height = 0; 1207 width = 0; 1208 marginLeft = Math.floor(t / D + gb + 1) * .5 + "px"; 1209 marginTop = Math.floor(u / C + kb + 1) * .5 + "px"; 1210 break; 1211 case "mosaicSpiralReverse": 1212 height = 0; 1213 width = 0; 1214 marginLeft = Math.floor(t / D + gb + 1) * .5 + "px"; 1215 marginTop = Math.floor(u / C + kb + 1) * .5 + "px"; 1216 break; 1217 case "topLeftBottomRight": 1218 height = 0; 1219 width = 0; 1220 break; 1221 case "bottomRightTopLeft": 1222 height = 0; 1223 width = 0; 1224 marginLeft = Math.floor(t / D + gb + 1) + "px"; 1225 marginTop = Math.floor(u / C + kb + 1) + "px"; 1226 break; 1227 case "bottomLeftTopRight": 1228 height = 0; 1229 width = 0; 1230 marginLeft = 0; 1231 marginTop = Math.floor(u / C + kb + 1) + "px"; 1232 break; 1233 case "topRightBottomLeft": 1234 height = 0; 1235 width = 0; 1236 marginLeft = Math.floor(t / D + gb + 1) + "px"; 1237 marginTop = 0; 1238 break; 1239 case "scrollRight": 1240 height = u; 1241 width = t; 1242 marginLeft = -t; 1243 break; 1244 case "scrollLeft": 1245 height = u; 1246 width = t; 1247 marginLeft = t; 1248 break; 1249 case "scrollTop": 1250 height = u; 1251 width = t; 1252 marginTop = u; 1253 break; 1254 case "scrollBottom": 1255 height = u; 1256 width = t; 1257 marginTop = -u; 1258 break; 1259 case "scrollHorz": 1260 height = u; 1261 width = t; 1262 if (d == 0 && l == B - 1) { 1263 marginLeft = -t 1264 } else if (d < l || d == B - 1 && l == 0) { 1265 marginLeft = t 1266 } else { 1267 marginLeft = -t 1268 } 1269 break 1270 } 1271 var m = a(".cameraappended:eq(" + e + ")", k); 1272 if (typeof L !== "undefined") { 1273 clearInterval(L);
1274 clearTimeout(M); 1275 M = setTimeout(ib, J + G) 1276 } 1277 if (a(r).length) { 1278 a(".camera_pag li", f).removeClass("cameracurrent"); 1279 a(".camera_pag li", f).eq(l).addClass("cameracurrent") 1280 } 1281 if (a(s).length) { 1282 a("li", s).removeClass("cameracurrent"); 1283 a("li", s).eq(l).addClass("cameracurrent"); 1284 a("li", s).not(".cameracurrent").find("img").animate({ 1285 opacity: .5 1286 }, 0); 1287 a("li.cameracurrent img", s).animate({ 1288 opacity: 1 1289 }, 0); 1290 a("li", s).hover(function() { 1291 a("img", this).stop(true, false).animate({ 1292 opacity: 1 1293 }, 150) 1294 }, function() { 1295 if (!a(this).hasClass("cameracurrent")) { 1296 a("img", this).stop(true, false).animate({ 1297 opacity: .5 1298 }, 150) 1299 } 1300 }) 1301 } 1302 var n = parseFloat(J) + parseFloat(G); 1303 if (N == "scrollLeft" || N == "scrollRight" || N == "scrollTop" || N == "scrollBottom" || N == "scrollHorz") { 1304 b.onStartTransition.call(this); 1305 n = 0; 1306 m.delay((J + G) / ab * ob[c] * F * .5).css({ 1307 display: "block", 1308 height: height, 1309 "margin-left": marginLeft, 1310 "margin-top": marginTop, 1311 width: width 1312 }).animate({ 1313 height: Math.floor(u / C + kb + 1), 1314 "margin-top": 0, 1315 "margin-left": 0, 1316 width: Math.floor(t / D + gb + 1) 1317 }, J - G, O, o); 1318 S.eq(d).delay((J + G) / ab * ob[c] * F * .5).animate({ 1319 "margin-left": marginLeft * -1, 1320 "margin-top": marginTop * -1 1321 }, J - G, O, function() { 1322 a(this).css({ 1323 "margin-top": 0, 1324 "margin-left": 0 1325 }) 1326 }) 1327 } else { 1328 b.onStartTransition.call(this); 1329 n = parseFloat(J) + parseFloat(G); 1330 if (T == "next") { 1331 m.delay((J + G) / ab * ob[c] * F * .5).css({ 1332 display: "block", 1333 height: height, 1334 "margin-left": marginLeft, 1335 "margin-top": marginTop, 1336 width: width, 1337 opacity: opacityOnGrid 1338 }).animate({ 1339 height: Math.floor(u / C + kb + 1), 1340 "margin-top": 0, 1341 "margin-left": 0, 1342 opacity: 1, 1343 width: Math.floor(t / D + gb + 1) 1344 }, J - G, O, o) 1345 } else { 1346 S.eq(l).show().css("z-index", "999").addClass("cameracurrent"); 1347 S.eq(d).css("z-index", "1").removeClass("cameracurrent"); 1348 a(".cameraContent", g).eq(l).addClass("cameracurrent"); 1349 a(".cameraContent", g).eq(d).removeClass("cameracurrent"); 1350 m.delay((J + G) / ab * ob[c] * F * .5).css({ 1351 display: "block", 1352 height: Math.floor(u / C + kb + 1), 1353 "margin-top": 0, 1354 "margin-left": 0, 1355 opacity: 1, 1356 width: Math.floor(t / D + gb + 1) 1357 }).animate({ 1358 height: height, 1359 "margin-left": marginLeft, 1360 "margin-top": marginTop, 1361 width: width, 1362 opacity: opacityOnGrid 1363 }, J - G, O, o) 1364 } 1365 } 1366 }) 1367 } 1368 } 1369 var d = { 1370 alignment: "center", 1371 autoAdvance: true, 1372 mobileAutoAdvance: true, 1373 barDirection: "leftToRight", 1374 barPosition: "bottom", 1375 cols: 6, 1376 easing: "easeInOutExpo", 1377 mobileEasing: "", 1378 fx: "simpleFade", 1379 mobileFx: "", 1380 gridDifference: 250, 1381 height: "50%", 1382 imagePath: "images/", 1383 hover: true, 1384 loader: "pie", 1385 loaderColor: "#eeeeee", 1386 loaderBgColor: "#222222", 1387 loaderOpacity: .8, 1388 loaderPadding: 2, 1389 loaderStroke: 7, 1390 minHeight: "200px", 1391 navigation: true, 1392 navigationHover: true, 1393 mobileNavHover: true, 1394 opacityOnGrid: false, 1395 overlayer: true, 1396 pagination: true, 1397 playPause: true, 1398 pauseOnClick: true, 1399 pieDiameter: 38, 1400 piePosition: "rightTop", 1401 portrait: false, 1402 rows: 4, 1403 slicedCols: 12, 1404 slicedRows: 8, 1405 slideOn: "random", 1406 thumbnails: false, 1407 time: 7e3, 1408 transPeriod: 1500, 1409 onEndTransition: function() {}, 1410 onLoaded: function() {}, 1411 onStartLoading: function() {}, 1412 onStartTransition: function() {} 1413 }; 1414 var b = a.extend({}, d, b); 1415 var f = a(this).addClass("camera_wrap"); 1416 f.wrapInner('<div class="camera_src" />').wrapInner('<div class="camera_fakehover" />'); 1417 var g = a(".camera_fakehover", f); 1418 g.append('<div class="camera_target"></div>'); 1419 if (b.overlayer == true) { 1420 g.append('<div class="camera_overlayer"></div>') 1421 } 1422 g.append('<div class="camera_target_content"></div>'); 1423 var h; 1424 if (b.loader == "pie" && a.browser.msie && a.browser.version < 9) { 1425 h = "bar" 1426 } else { 1427 h = b.loader 1428 } 1429 if (h == "pie") { 1430 g.append('<div class="camera_pie"></div>') 1431 } else if (h == "bar") { 1432 g.append('<div class="camera_bar"></div>') 1433 } else { 1434 g.append('<div class="camera_bar" style="display:none"></div>') 1435 } 1436 if (b.playPause == true) { 1437 g.append('<div class="camera_commands"></div>') 1438 } 1439 if (b.navigation == true) { 1440 g.append('<div class="camera_prev"><span></span></div>').append('<div class="camera_next"><span></span></div>') 1441 } 1442 if (b.thumbnails == true) { 1443 f.append('<div class="camera_thumbs_cont" />') 1444 } 1445 if (b.thumbnails == true && b.pagination != true) { 1446 a(".camera_thumbs_cont", f).wrap("<div />").wrap('<div class="camera_thumbs" />').wrap("<div />").wrap('<div class="camera_command_wrap" />') 1447 } 1448 if (b.pagination == true) { 1449 f.append('<div class="camera_pag"></div>') 1450 } 1451 f.append('<div class="camera_loader"></div>'); 1452 a(".camera_caption", f).each(function() { 1453 a(this).wrapInner("<div />") 1454 }); 1455 var i = "pie_" + f.index(), 1456 j = a(".camera_src", f), 1457 k = a(".camera_target", f), 1458 l = a(".camera_target_content", f), 1459 m = a(".camera_pie", f), 1460 n = a(".camera_bar", f), 1461 o = a(".camera_prev", f), 1462 p = a(".camera_next", f), 1463 q = a(".camera_commands", f), 1464 r = a(".camera_pag", f), 1465 s = a(".camera_thumbs_cont", f); 1466 var t, u; 1467 var v = new Array; 1468 a("> div", j).each(function() { 1469 v.push(a(this).attr("data-src")) 1470 }); 1471 var w = new Array; 1472 a("> div", j).each(function() { 1473 if (a(this).attr("data-link")) { 1474 w.push(a(this).attr("data-link")) 1475 } else { 1476 w.push("") 1477 } 1478 }); 1479 var x = new Array; 1480 a("> div", j).each(function() { 1481 if (a(this).attr("data-target")) { 1482 x.push(a(this).attr("data-target")) 1483 } else { 1484 x.push("") 1485 } 1486 }); 1487 var y = new Array; 1488 a("> div", j).each(function() { 1489 if (a(this).attr("data-portrait")) { 1490 y.push(a(this).attr("data-portrait")) 1491 } else { 1492 y.push("") 1493 } 1494 }); 1495 var z = new Array; 1496 a("> div", j).each(function() { 1497 if (a(this).attr("data-alignment")) { 1498 z.push(a(this).attr("data-alignment")) 1499 } else { 1500 z.push("") 1501 } 1502 }); 1503 var A = new Array; 1504 a("> div", j).each(function() { 1505 if (a(this).attr("data-thumb")) { 1506 A.push(a(this).attr("data-thumb")) 1507 } else { 1508 A.push("") 1509 } 1510 }); 1511 var B = v.length; 1512 a(l).append('<div class="cameraContents" />'); 1513 var C; 1514 for (C = 0; C < B; C++) { 1515 a(".cameraContents", l).append('<div class="cameraContent" />'); 1516 if (w[C] != "") { 1517 var D = a("> div ", j).eq(C).attr("data-box"); 1518 if (typeof D !== "undefined" && D !== false && D != "") { 1519 D = 'data-box="' + a("> div ", j).eq(C).attr("data-box") + '"' 1520 } else { 1521 D = "" 1522 } 1523 a(".camera_target_content .cameraContent:eq(" + C + ")", f).append('<a class="camera_link" href="' + w[C] + '" ' + D + ' target="' + x[C] + '"></a>') 1524 } 1525 } 1526 a(".camera_caption", f).each(function() { 1527 var b = a(this).parent().index(), 1528 c = f.find(".cameraContent").eq(b); 1529 a(this).appendTo(c) 1530 }); 1531 k.append('<div class="cameraCont" />'); 1532 var E = a(".cameraCont", f); 1533 var F; 1534 for (F = 0; F < B; F++) { 1535 E.append('<div class="cameraSlide cameraSlide_' + F + '" />'); 1536 var G = a("> div:eq(" + F + ")", j); 1537 k.find(".cameraSlide_" + F).clone(G) 1538 } 1539 a(window).bind("load resize pageshow", function() { 1540 hb(); 1541 H() 1542 }); 1543 E.append('<div class="cameraSlide cameraSlide_' + F + '" />'); 1544 var I; 1545 f.show(); 1546 var t = k.width(); 1547 var u = k.height(); 1548 var J; 1549 a(window).bind("resize pageshow", function() { 1550 if (I == true) { 1551 K() 1552 } 1553 a("ul", s).animate({ 1554 "margin-top": 0 1555 }, 0, hb); 1556 if (!j.hasClass("paused")) { 1557 j.addClass("paused"); 1558 if (a(".camera_stop", V).length) { 1559 a(".camera_stop", V).hide(); 1560 a(".camera_play", V).show(); 1561 if (h != "none") { 1562 a("#" + i).hide() 1563 } 1564 } else { 1565 if (h != "none") { 1566 a("#" + i).hide() 1567 } 1568 } 1569 clearTimeout(J); 1570 J = setTimeout(function() { 1571 j.removeClass("paused"); 1572 if (a(".camera_play", V).length) { 1573 a(".camera_play", V).hide(); 1574 a(".camera_stop", V).show(); 1575 if (h != "none") { 1576 a("#" + i).fadeIn() 1577 } 1578 } else { 1579 if (h != "none") { 1580 a("#" + i).fadeIn() 1581 } 1582 } 1583 }, 1500) 1584 } 1585 }); 1586 var L, M; 1587 var N, O, P, q, r; 1588 var Q, R;
1589 if (e() && b.mobileAutoAdvance != "") { 1590 O = b.mobileAutoAdvance 1591 } else { 1592 O = b.autoAdvance 1593 } 1594 if (O == false) { 1595 j.addClass("paused") 1596 } 1597 if (e() && b.mobileNavHover != "") { 1598 P = b.mobileNavHover 1599 } else { 1600 P = b.navigationHover 1601 } 1602 if (j.length != 0) { 1603 var S = a(".cameraSlide", k); 1604 S.wrapInner('<div class="camerarelative" />'); 1605 var T; 1606 var U = b.barDirection; 1607 var V = f; 1608 a("iframe", g).each(function() { 1609 var b = a(this); 1610 var c = b.attr("src"); 1611 b.attr("data-src", c); 1612 var d = b.parent().index(".camera_src > div"); 1613 a(".camera_target_content .cameraContent:eq(" + d + ")", f).append(b) 1614 }); 1615 1616 function W() { 1617 a("iframe", g).each(function() { 1618 a(".camera_caption", g).show(); 1619 var c = a(this); 1620 var d = c.attr("data-src"); 1621 c.attr("src", d); 1622 var e = b.imagePath + "blank.gif"; 1623 var h = new Image; 1624 h.src = e; 1625 if (b.height.indexOf("%") != -1) { 1626 var i = Math.round(t / (100 / parseFloat(b.height))); 1627 if (b.minHeight != "" && i < parseFloat(b.minHeight)) { 1628 u = parseFloat(b.minHeight) 1629 } else { 1630 u = i 1631 } 1632 } else if (b.height == "auto") { 1633 u = f.height() 1634 } else { 1635 u = parseFloat(b.height) 1636 } 1637 c.after(a(h).attr({ 1638 "class": "imgFake", 1639 width: t, 1640 height: u 1641 })); 1642 var j = c.clone(); 1643 c.remove(); 1644 a(h).bind("click", function() { 1645 if (a(this).css("position") == "absolute") { 1646 a(this).remove(); 1647 if (d.indexOf("vimeo") != -1 || d.indexOf("youtube") != -1) { 1648 if (d.indexOf("?") != -1) { 1649 autoplay = "&autoplay=1" 1650 } else { 1651 autoplay = "?autoplay=1" 1652 } 1653 } else if (d.indexOf("dailymotion") != -1) { 1654 if (d.indexOf("?") != -1) { 1655 autoplay = "&autoPlay=1" 1656 } else { 1657 autoplay = "?autoPlay=1" 1658 } 1659 } 1660 j.attr("src", d + autoplay); 1661 R = true 1662 } else { 1663 a(this).css({ 1664 position: "absolute", 1665 top: 0, 1666 left: 0, 1667 zIndex: 10 1668 }).after(j); 1669 j.css({ 1670 position: "absolute", 1671 top: 0, 1672 left: 0, 1673 zIndex: 9 1674 }) 1675 } 1676 }) 1677 }) 1678 } 1679 W(); 1680 if (b.hover == true) { 1681 if (!e()) { 1682 g.hover(function() { 1683 j.addClass("hovered") 1684 }, function() { 1685 j.removeClass("hovered") 1686 }) 1687 } 1688 } 1689 if (P == true) { 1690 a(o, f).animate({ 1691 opacity: 0 1692 }, 0); 1693 a(p, f).animate({ 1694 opacity: 0 1695 }, 0); 1696 a(q, f).animate({ 1697 opacity: 0 1698 }, 0); 1699 if (e()) { 1700 g.live("vmouseover", function() { 1701 a(o, f).animate({ 1702 opacity: 1 1703 }, 200); 1704 a(p, f).animate({ 1705 opacity: 1 1706 }, 200); 1707 a(q, f).animate({ 1708 opacity: 1 1709 }, 200) 1710 }); 1711 g.live("vmouseout", function() { 1712 a(o, f).delay(500).animate({ 1713 opacity: 0 1714 }, 200); 1715 a(p, f).delay(500).animate({ 1716 opacity: 0 1717 }, 200); 1718 a(q, f).delay(500).animate({ 1719 opacity: 0 1720 }, 200) 1721 }) 1722 } else { 1723 g.hover(function() { 1724 a(o, f).animate({ 1725 opacity: 1 1726 }, 200); 1727 a(p, f).animate({ 1728 opacity: 1 1729 }, 200); 1730 a(q, f).animate({ 1731 opacity: 1 1732 }, 200) 1733 }, function() { 1734 a(o, f).animate({ 1735 opacity: 0 1736 }, 200); 1737 a(p, f).animate({ 1738 opacity: 0 1739 }, 200); 1740 a(q, f).animate({ 1741 opacity: 0 1742 }, 200) 1743 }) 1744 } 1745 } 1746 a(".camera_stop", V).live("click", function() { 1747 O = false;
1748 j.addClass("paused"); 1749 if (a(".camera_stop", V).length) { 1750 a(".camera_stop", V).hide(); 1751 a(".camera_play", V).show(); 1752 if (h != "none") { 1753 a("#" + i).hide() 1754 } 1755 } else { 1756 if (h != "none") { 1757 a("#" + i).hide() 1758 } 1759 } 1760 }); 1761 a(".camera_play", V).live("click", function() { 1762 O = true; 1763 j.removeClass("paused"); 1764 if (a(".camera_play", V).length) { 1765 a(".camera_play", V).hide(); 1766 a(".camera_stop", V).show(); 1767 if (h != "none") { 1768 a("#" + i).show() 1769 } 1770 } else { 1771 if (h != "none") { 1772 a("#" + i).show() 1773 } 1774 } 1775 }); 1776 if (b.pauseOnClick == true) { 1777 a(".camera_target_content", g).mouseup(function() { 1778 O = false; 1779 j.addClass("paused"); 1780 a(".camera_stop", V).hide(); 1781 a(".camera_play", V).show(); 1782 a("#" + i).hide() 1783 }) 1784 } 1785 a(".cameraContent, .imgFake", g).hover(function() { 1786 Q = true 1787 }, function() { 1788 Q = false 1789 }); 1790 a(".cameraContent, .imgFake", g).bind("click", function() { 1791 if (R == true && Q == true) { 1792 O = false; 1793 a(".camera_caption", g).hide(); 1794 j.addClass("paused"); 1795 a(".camera_stop", V).hide(); 1796 a(".camera_play", V).show(); 1797 a("#" + i).hide() 1798 } 1799 }) 1800 } 1801 if (h != "pie") { 1802 n.append('<span class="camera_bar_cont" />'); 1803 a(".camera_bar_cont", n).animate({ 1804 opacity: b.loaderOpacity 1805 }, 0).css({ 1806 position: "absolute", 1807 left: 0, 1808 right: 0, 1809 top: 0, 1810 bottom: 0, 1811 "background-color": b.loaderBgColor 1812 }).append('<span id="' + i + '" />'); 1813 a("#" + i).animate({ 1814 opacity: 0 1815 }, 0); 1816 var Z = a("#" + i); 1817 Z.css({ 1818 position: "absolute", 1819 "background-color": b.loaderColor 1820 }); 1821 switch (b.barPosition) { 1822 case "left": 1823 n.css({ 1824 right: "auto", 1825 width: b.loaderStroke 1826 }); 1827 break; 1828 case "right": 1829 n.css({ 1830 left: "auto", 1831 width: b.loaderStroke 1832 }); 1833 break; 1834 case "top": 1835 n.css({ 1836 bottom: "auto", 1837 height: b.loaderStroke 1838 }); 1839 break; 1840 case "bottom": 1841 n.css({ 1842 top: "auto", 1843 height: b.loaderStroke 1844 }); 1845 break 1846 } 1847 switch (U) { 1848 case "leftToRight": 1849 Z.css({ 1850 left: 0, 1851 right: 0, 1852 top: b.loaderPadding, 1853 bottom: b.loaderPadding 1854 }); 1855 break; 1856 case "rightToLeft": 1857 Z.css({ 1858 left: 0, 1859 right: 0, 1860 top: b.loaderPadding, 1861 bottom: b.loaderPadding 1862 }); 1863 break; 1864 case "topToBottom": 1865 Z.css({ 1866 left: b.loaderPadding, 1867 right: b.loaderPadding, 1868 top: 0, 1869 bottom: 0 1870 }); 1871 break; 1872 case "bottomToTop": 1873 Z.css({ 1874 left: b.loaderPadding, 1875 right: b.loaderPadding, 1876 top: 0, 1877 bottom: 0 1878 }); 1879 break 1880 } 1881 } else {
1882 m.append('<canvas id="' + i + '"></canvas>'); 1883 var _; 1884 var Z = document.getElementById(i); 1885 Z.setAttribute("width", b.pieDiameter); 1886 Z.setAttribute("height", b.pieDiameter); 1887 var ab; 1888 switch (b.piePosition) { 1889 case "leftTop": 1890 ab = "left:0; top:0;"; 1891 break; 1892 case "rightTop": 1893 ab = "right:0; top:0;"; 1894 break; 1895 case "leftBottom": 1896 ab = "left:0; bottom:0;"; 1897 break; 1898 case "rightBottom": 1899 ab = "right:0; bottom:0;"; 1900 break 1901 } 1902 Z.setAttribute("style", "position:absolute; z-index:1002; " + ab); 1903 var bb; 1904 var cb; 1905 if (Z && Z.getContext) { 1906 var db = Z.getContext("2d"); 1907 db.rotate(Math.PI * (3 / 2)); 1908 db.translate(-b.pieDiameter, 0) 1909 } 1910 } 1911 if (h == "none" || O == false) { 1912 a("#" + i).hide(); 1913 a(".camera_canvas_wrap", V).hide() 1914 } 1915 if (a(r).length) { 1916 a(r).append('<ul class="camera_pag_ul" />'); 1917 var eb; 1918 for (eb = 0; eb < B; eb++) { 1919 a(".camera_pag_ul", f).append('<li class="pag_nav_' + eb + '" style="position:relative; z-index:1002"><span><span>' + eb + "</span></span></li>") 1920 } 1921 a(".camera_pag_ul li", f).hover(function() { 1922 a(this).addClass("camera_hover"); 1923 if (a(".camera_thumb", this).length) { 1924 var b = a(".camera_thumb", this).outerWidth(), 1925 c = a(".camera_thumb", this).outerHeight(), 1926 d = a(this).outerWidth(); 1927 a(".camera_thumb", this).show().css({ 1928 top: "-" + c + "px", 1929 left: "-" + (b - d) / 2 + "px" 1930 }).animate({ 1931 opacity: 1, 1932 "margin-top": "-3px" 1933 }, 200); 1934 a(".thumb_arrow", this).show().animate({ 1935 opacity: 1, 1936 "margin-top": "-3px" 1937 }, 200) 1938 } 1939 }, function() { 1940 a(this).removeClass("camera_hover"); 1941 a(".camera_thumb", this).animate({ 1942 "margin-top": "-20px", 1943 opacity: 0 1944 }, 200, function() { 1945 a(this).css({ 1946 marginTop: "5px" 1947 }).hide() 1948 }); 1949 a(".thumb_arrow", this).animate({ 1950 "margin-top": "-20px", 1951 opacity: 0 1952 }, 200, function() { 1953 a(this).css({ 1954 marginTop: "5px" 1955 }).hide() 1956 }) 1957 }) 1958 } 1959 if (a(s).length) { 1960 var fb; 1961 if (!a(r).length) { 1962 a(s).append("<div />"); 1963 a(s).before('<div class="camera_prevThumbs hideNav"><div></div></div>').before('<div class="camera_nextThumbs hideNav"><div></div></div>'); 1964 a("> div", s).append("<ul />"); 1965 a.each(A, function(b, c) { 1966 if (a("> div", j).eq(b).attr("data-thumb") != "") { 1967 var d = a("> div", j).eq(b).attr("data-thumb"), 1968 e = new Image; 1969 e.src = d; 1970 a("ul", s).append('<li class="pix_thumb pix_thumb_' + b + '" />'); 1971 a("li.pix_thumb_" + b, s).append(a(e).attr("class", "camera_thumb")) 1972 } 1973 }) 1974 } else { 1975 a.each(A, function(b, c) { 1976 if (a("> div", j).eq(b).attr("data-thumb") != "") { 1977 var d = a("> div", j).eq(b).attr("data-thumb"), 1978 e = new Image; 1979 e.src = d; 1980 a("li.pag_nav_" + b, r).append(a(e).attr("class", "camera_thumb").css({ 1981 position: "absolute" 1982 }).animate({ 1983 opacity: 0 1984 }, 0)); 1985 a("li.pag_nav_" + b + " > img", r).after('<div class="thumb_arrow" />'); 1986 a("li.pag_nav_" + b + " > .thumb_arrow", r).animate({ 1987 opacity: 0 1988 }, 0) 1989 } 1990 }); 1991 f.css({ 1992 marginBottom: a(r).outerHeight() 1993 }) 1994 } 1995 } else if (!a(s).length && a(r).length) { 1996 f.css({ 1997 marginBottom: a(r).outerHeight() 1998 }) 1999 } 2000 var gb = true; 2001 if (a(q).length) { 2002 a(q).append('<div class="camera_play"></div>').append('<div class="camera_stop"></div>'); 2003 if (O == true) { 2004 a(".camera_play", V).hide(); 2005 a(".camera_stop", V).show() 2006 } else { 2007 a(".camera_stop", V).hide(); 2008 a(".camera_play", V).show() 2009 } 2010 } 2011 ib(); 2012 a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom", g).each(function() { 2013 a(this).css("visibility", "hidden") 2014 }); 2015 b.onStartLoading.call(this); 2016 jb(); 2017 if (a(o).length) { 2018 a(o).click(function() {
2019 if (!j.hasClass("camerasliding")) { 2020 var c = parseFloat(a(".cameraSlide.cameracurrent", k).index()); 2021 clearInterval(L); 2022 W(); 2023 a("#" + i + ", .camera_canvas_wrap", f).animate({ 2024 opacity: 0 2025 }, 0); 2026 ib(); 2027 if (c != 0) { 2028 jb(c) 2029 } else { 2030 jb(B) 2031 } 2032 b.onStartLoading.call(this) 2033 } 2034 }) 2035 } 2036 if (a(p).length) { 2037 a(p).click(function() { 2038 if (!j.hasClass("camerasliding")) { 2039 var c = parseFloat(a(".cameraSlide.cameracurrent", k).index()); 2040 clearInterval(L); 2041 W(); 2042 a("#" + i + ", .camera_canvas_wrap", V).animate({ 2043 opacity: 0 2044 }, 0); 2045 ib(); 2046 if (c == B - 1) { 2047 jb(1) 2048 } else { 2049 jb(c + 2) 2050 } 2051 b.onStartLoading.call(this) 2052 } 2053 }) 2054 } 2055 if (e()) { 2056 g.bind("swipeleft", function(c) { 2057 if (!j.hasClass("camerasliding")) { 2058 var d = parseFloat(a(".cameraSlide.cameracurrent", k).index()); 2059 clearInterval(L); 2060 W(); 2061 a("#" + i + ", .camera_canvas_wrap", V).animate({ 2062 opacity: 0 2063 }, 0); 2064 ib(); 2065 if (d == B - 1) { 2066 jb(1) 2067 } else { 2068 jb(d + 2) 2069 } 2070 b.onStartLoading.call(this) 2071 } 2072 }); 2073 g.bind("swiperight", function(c) { 2074 if (!j.hasClass("camerasliding")) { 2075 var d = parseFloat(a(".cameraSlide.cameracurrent", k).index()); 2076 clearInterval(L); 2077 W(); 2078 a("#" + i + ", .camera_canvas_wrap", V).animate({ 2079 opacity: 0 2080 }, 0); 2081 ib(); 2082 if (d != 0) { 2083 jb(d) 2084 } else { 2085 jb(B) 2086 } 2087 b.onStartLoading.call(this) 2088 } 2089 }) 2090 } 2091 if (a(r).length) { 2092 a(".camera_pag li", f).click(function() { 2093 if (!j.hasClass("camerasliding")) { 2094 var c = parseFloat(a(this).index()); 2095 var d = parseFloat(a(".cameraSlide.cameracurrent", k).index()); 2096 if (c != d) { 2097 clearInterval(L); 2098 W(); 2099 a("#" + i + ", .camera_canvas_wrap", V).animate({ 2100 opacity: 0 2101 }, 0); 2102 ib(); 2103 jb(c + 1); 2104 b.onStartLoading.call(this) 2105 } 2106 } 2107 }) 2108 } 2109 if (a(s).length) { 2110 a(".pix_thumb img", s).click(function() { 2111 if (!j.hasClass("camerasliding")) { 2112 var c = parseFloat(a(this).parents("li").index()); 2113 var d = parseFloat(a(".cameracurrent", k).index()); 2114 if (c != d) { 2115 clearInterval(L); 2116 W(); 2117 a("#" + i + ", .camera_canvas_wrap", V).animate({ 2118 opacity: 0 2119 }, 0); 2120 a(".pix_thumb", s).removeClass("cameracurrent"); 2121 a(this).parents("li").addClass("cameracurrent"); 2122 ib(); 2123 jb(c + 1); 2124 hb(); 2125 b.onStartLoading.call(this) 2126 } 2127 } 2128 }); 2129 a(".camera_thumbs_cont .camera_prevThumbs", V).hover(function() { 2130 a(this).stop(true, false).animate({ 2131 opacity: 1 2132 }, 250) 2133 }, function() { 2134 a(this).stop(true, false).animate({ 2135 opacity: .7 2136 }, 250) 2137 }); 2138 a(".camera_prevThumbs", V).click(function() { 2139 var b = 0, 2140 c = a(s).outerWidth(), 2141 d = a("ul", s).offset().left, 2142 e = a("> div", s).offset().left, 2143 f = e - d; 2144 a(".camera_visThumb", s).each(function() { 2145 var c = a(this).outerWidth(); 2146 b = b + c 2147 }); 2148 if (f - b > 0) { 2149 a("ul", s).animate({ 2150 "margin-left": "-" + (f - b) + "px" 2151 }, 500, H) 2152 } else { 2153 a("ul", s).animate({ 2154 "margin-left": 0 2155 }, 500, H) 2156 } 2157 }); 2158 a(".camera_thumbs_cont .camera_nextThumbs", V).hover(function() { 2159 a(this).stop(true, false).animate({ 2160 opacity: 1 2161 }, 250) 2162 }, function() { 2163 a(this).stop(true, false).animate({ 2164 opacity: .7 2165 }, 250) 2166 }); 2167 a(".camera_nextThumbs", V).click(function() { 2168 var b = 0, 2169 c = a(s).outerWidth(), 2170 d = a("ul", s).outerWidth(), 2171 e = a("ul", s).offset().left, 2172 f = a("> div", s).offset().left, 2173 g = f - e; 2174 a(".camera_visThumb", s).each(function() { 2175 var c = a(this).outerWidth(); 2176 b = b + c 2177 }); 2178 if (g + b + b < d) { 2179 a("ul", s).animate({ 2180 "margin-left": "-" + (g + b) + "px" 2181 }, 500, H) 2182 } else { 2183 a("ul", s).animate({ 2184 "margin-left": "-" + (d - c) + "px" 2185 }, 500, H) 2186 } 2187 }) 2188 } 2189 } 2190})(jQuery); 2191(function(a) { 2192 a.fn.cameraStop = function() { 2193 var b = a(this), 2194 c = a(".camera_src", b), 2195 d = "pie_" + b.index(); 2196 c.addClass("stopped"); 2197 if (a(".camera_showcommands").length) { 2198 var e = a(".camera_thumbs_wrap", b) 2199 } else { 2200 var e = b 2201 } 2202 } 2203})(jQuery); 2204(function(a) { 2205 a.fn.cameraPause = function() { 2206 var b = a(this); 2207 var c = a(".camera_src", b); 2208 c.addClass("paused") 2209 } 2210})(jQuery); 2211(function(a) { 2212 a.fn.cameraResume = function() { 2213 var b = a(this); 2214 var c = a(".camera_src", b); 2215 if (typeof autoAdv === "undefined" || autoAdv !== true) { 2216 c.removeClass("paused") 2217 } 2218 } 2219})(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.