forked from blackstoneblackstone/html5Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsceneshow.js
executable file
·4229 lines (4133 loc) · 227 KB
/
sceneshow.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
function mobilecheck() {
var a = !1;
return function(b) {
(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(b) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0, 4))) && (a = !0)
}(navigator.userAgent || navigator.vendor || window.opera), a
}
function isWeixin() {
var a = navigator.userAgent.toLowerCase();
return "micromessenger" == a.match(/MicroMessenger/i) ? !0 : !1
}
function countCharacters(a) {
for (var b = 0, c = 0; c < a.length; c++) {
var d = a.charCodeAt(c);
d >= 1 && 126 >= d || d >= 65376 && 65439 >= d ? b++ : b += 2
}
return b
}
function playVideo(a) {
if (a && a.bgAudio) {
$("#audio_btn").addClass("video_exist"), "1" == a.bgAudio.type ? $("#media").attr("src", a.bgAudio.url) : $("#media").attr("src", ((a.bgAudio.url.indexOf('syspic/') >= 0) ? PREFIX_FILE_HOST : USER_FILE_HOST) + a.bgAudio.url); {
navigator.userAgent.match(/(iPod|iPhone|iPad)/i) ? "progress" : "loadeddata"
}
navigator.userAgent.match(/(iPod|iPhone|iPad)/i) || $("#media").bind("loadstart", function() {
$("#audio_btn").removeClass("off").addClass("loading_background"), $("#yinfu").addClass("loading_yinfu")
}).bind("loadeddata", function() {
$("#audio_btn").removeClass("loading_background").addClass("off"), $("#yinfu").removeClass("loading_yinfu")
}), $("#media").bind("canplay", function() {
$("#media")[0].play(), $("#audio_btn").removeClass("off").addClass("play_yinfu"), $("#yinfu").addClass("rotate")
}), $("#audio_btn").show().click(function() {
$(this).hasClass("off") ? ($(this).addClass("play_yinfu").removeClass("off"), $("#yinfu").addClass("rotate"), $("#media")[0].play()) : ($(this).addClass("off").removeClass("play_yinfu"), $("#yinfu").removeClass("rotate"), $("#media")[0].pause())
})
}
}
function renderPage(a, b, c) {
a.templateParser("jsonParser").parse({
def: c[b - 1],
appendTo: "#page" + b,
mode: "view"
});
var d, e, f = 1,
g = $(".z-current").width(),
h = $(".z-current").height();
if (imageWidth = $(".m-img").width(), imageHeight = $(".m-img").height(), g / h >= 320 / 486 ? (f = h / 486, d = (g / f - 320) / 2) : (f = g / 320, e = (h / f - 486) / 2), e && $(".edit_area").css({
marginTop: e
}), d && $(".edit_area").css({
marginLeft: d
}), tplCount >= c.length && ($("#MobileViewport").attr("content", "width=320, initial-scale=" + f + ", maximum-scale=" + f + ", user-scalable=no"), 320 != clientWidth && clientWidth == document.documentElement.clientWidth || isWeixin() && (navigator.userAgent.indexOf("Android") > -1 || navigator.userAgent.indexOf("Linux") > -1))) {
var i = 320 / g,
j = 486 / h,
k = Math.max(i, j);
k = k > 1 ? k : 160 * k, k = parseInt(k), $("#MobileViewport").attr("content", "width=320, target-densitydpi=" + k)
}
}
function completeEffect(a) {
return $(a).find(".page_effect.lock")[0] ? !1 : !0
}
function cancelFlip() {
return isNext ? "0" == theClass._scrollMode || "1" == theClass._scrollMode || "2" == theClass._scrollMode ? (currentPage.style.webkitTransform = "scale(1)", activePage.style.webkitTransform = "translateY(100%)", currentPage.style.mozTransform = "scale(1)", activePage.style.mozTransform = "translateY(100%)", currentPage.style.transform = "scale(1)", activePage.style.transform = "translateY(100%)") : (currentPage.style.webkitTransform = "scale(1)", activePage.style.webkitTransform = "translateX(100%)", currentPage.style.mozTransform = "scale(1)", activePage.style.mozTransform = "translateX(100%)", currentPage.style.transform = "scale(1)", activePage.style.transform = "translateX(100%)") : "0" == theClass._scrollMode || "1" == theClass._scrollMode || "2" == theClass._scrollMode ? (currentPage.style.webkitTransform = "scale(1)", activePage.style.webkitTransform = "translateY(-100%)", currentPage.style.mozTransform = "scale(1)", activePage.style.mozTransform = "translateY(-100%)", currentPage.style.transform = "scale(1)", activePage.style.transform = "translateY(-100%)") : (currentPage.style.webkitTransform = "scale(1)", activePage.style.webkitTransform = "translateX(-100%)", currentPage.style.mozTransform = "scale(1)", activePage.style.mozTransform = "translateX(-100%)", currentPage.style.transform = "scale(1)", activePage.style.transform = "translateX(-100%)"), $(currentPage).find(".page_effect.lock")[0] ? !1 : !0
}
function verticalMove() {
if (Math.abs(moveDistanceY) > Math.abs(moveDistanceX) && completeEffect(currentPage))
if (moveDistanceY > 0) {
if (theClass._isDisableFlipPrevPage) return;
isNext || isFirstTime ? (isNext = !1, isFirstTime = !1, activePage && (activePage.classList.remove("z-active"), activePage.classList.remove("z-move")), scroll ? triggerLoop = !0 : currentPage.previousElementSibling && currentPage.previousElementSibling.classList.contains("main-page") ? activePage = currentPage.previousElementSibling : (activePage = theClass._$pages.last().get(0), triggerLoop = !0), activePage && activePage.classList.contains("main-page") ? (activePage.classList.add("z-active"), activePage.classList.add("z-move"), activePage.style.webkitTransition = "none", activePage.style.webkitTransform = "translateY(-" + window.innerHeight + "px)", activePage.style.mozTransition = "none", activePage.style.mozTransform = "translateY(-" + window.innerHeight + "px)", activePage.style.transition = "none", activePage.style.transform = "translateY(-" + window.innerHeight + "px)", $(activePage).trigger("active"), currentPage.style.webkitTransformOrigin = "bottom center", currentPage.style.mozTransformOrigin = "bottom center", currentPage.style.transformOrigin = "bottom center") : (currentPage.style.webkitTransform = "translateY(0px) scale(1)", currentPage.style.mozTransform = "translateY(0px) scale(1)", currentPage.style.transform = "translateY(0px) scale(1)", activePage = null)) : (activePage.style.webkitTransform = "translateY(-" + (window.innerHeight - moveDistanceY) + "px)", activePage.style.mozTransform = "translateY(-" + (window.innerHeight - moveDistanceY) + "px)", activePage.style.transform = "translateY(-" + (window.innerHeight - moveDistanceY) + "px)", "1" == theClass._scrollMode && (currentPage.style.webkitTransform = "scale(" + (window.innerHeight / (window.innerHeight + moveDistanceY)).toFixed(3) + ")", currentPage.style.mozTransform = "scale(" + (window.innerHeight / (window.innerHeight + moveDistanceY)).toFixed(3) + ")", currentPage.style.transform = "scale(" + (window.innerHeight / (window.innerHeight + moveDistanceY)).toFixed(3) + ")"))
} else if (0 > moveDistanceY) {
if (theClass._isDisableFlipNextPage) return;
!isNext || isFirstTime ? (isNext = !0, isFirstTime = !1, activePage && (activePage.classList.remove("z-active"), activePage.classList.remove("z-move")), scroll ? triggerLoop = !0 : currentPage.nextElementSibling && currentPage.nextElementSibling.classList.contains("main-page") ? activePage = currentPage.nextElementSibling : (activePage = theClass._$pages.first().get(0), triggerLoop = !0), activePage && activePage.classList.contains("main-page") ? (activePage.classList.add("z-active"), activePage.classList.add("z-move"), activePage.style.webkitTransition = "none", activePage.style.webkitTransform = "translateY(" + window.innerHeight + "px)", activePage.style.mozTransition = "none", activePage.style.mozTransform = "translateY(" + window.innerHeight + "px)", activePage.style.transition = "none", activePage.style.transform = "translateY(" + window.innerHeight + "px)", $(activePage).trigger("active"), currentPage.style.webkitTransformOrigin = "top center", currentPage.style.mozTransformOrigin = "top center", currentPage.style.transformOrigin = "top center") : (currentPage.style.webkitTransform = "translateY(0px) scale(1)", currentPage.style.mozTransform = "translateY(0px) scale(1)", currentPage.style.transform = "translateY(0px) scale(1)", activePage = null)) : (activePage.style.webkitTransform = "translateY(" + (window.innerHeight + moveDistanceY) + "px)", activePage.style.mozTransform = "translateY(" + (window.innerHeight + moveDistanceY) + "px)", activePage.style.transform = "translateY(" + (window.innerHeight + moveDistanceY) + "px)", "1" == theClass._scrollMode && (currentPage.style.webkitTransform = "scale(" + ((window.innerHeight + moveDistanceY) / window.innerHeight).toFixed(3) + ")", currentPage.style.mozTransform = "scale(" + ((window.innerHeight + moveDistanceY) / window.innerHeight).toFixed(3) + ")", currentPage.style.transform = "scale(" + ((window.innerHeight + moveDistanceY) / window.innerHeight).toFixed(3) + ")"))
}
}
function verticalEnd() {
Math.abs(moveDistanceY) > Math.abs(moveDistanceX) && Math.abs(moveDistanceY) > 20 ? ("1" == theClass._scrollMode ? (currentPage.style.webkitTransform = "scale(0.2)", activePage.style.webkitTransform = "translateY(0px)", currentPage.style.mozTransform = "scale(0.2)", activePage.style.mozTransform = "translateY(0px)", currentPage.style.transform = "scale(0.2)", activePage.style.transform = "translateY(0px)") : (currentPage.style.webkitTransform = "scale(1)", activePage.style.webkitTransform = "translateY(0px)", currentPage.style.mozTransform = "scale(1)", activePage.style.mozTransform = "translateY(0px)", currentPage.style.transform = "scale(1)", activePage.style.transform = "translateY(0px)"), completeEffect(activePage) || $("#audio_btn").css("opacity", 0), setTimeout(function() {
activePage.classList.remove("z-active"), activePage.classList.remove("z-move"), activePage.classList.add("z-current"), currentPage.classList.remove("z-current"), currentPage.classList.remove("z-move"), theClass._isDisableFlipPage = !1, theClass.$currentPage = $(activePage).trigger("current"), $(currentPage).trigger("hide")
}, 500)) : (theClass._isDisableFlipPage = !1, cancelFlip())
}
function horizontalMove() {
if (Math.abs(moveDistanceX) > Math.abs(moveDistanceY) && completeEffect(currentPage))
if (moveDistanceX > 0) {
if (theClass._isDisableFlipPrevPage) return;
isNext || isFirstTime ? (isNext = !1, isFirstTime = !1, activePage && (activePage.classList.remove("z-active"), activePage.classList.remove("z-move")), scroll ? triggerLoop = !0 : currentPage.previousElementSibling && currentPage.previousElementSibling.classList.contains("main-page") ? activePage = currentPage.previousElementSibling : (activePage = theClass._$pages.last().get(0), triggerLoop = !0), activePage && activePage.classList.contains("main-page") ? (activePage.classList.add("z-active"), activePage.classList.add("z-move"), activePage.style.webkitTransition = "none", activePage.style.webkitTransform = "translateX(-" + window.innerWidth + "px)", activePage.style.mozTransition = "none", activePage.style.mozTransform = "translateX(-" + window.innerWidth + "px)", activePage.style.transition = "none", activePage.style.transform = "translateX(-" + window.innerWidth + "px)", $(activePage).trigger("active"), currentPage.style.webkitTransformOrigin = "center right", currentPage.style.mozTransformOrigin = "center right", currentPage.style.transformOrigin = "center right") : (currentPage.style.webkitTransform = "translateX(0px) scale(1)", currentPage.style.mozTransform = "translateX(0px) scale(1)", currentPage.style.transform = "translateX(0px) scale(1)", activePage = null)) : (activePage.style.webkitTransform = "translateX(-" + (window.innerWidth - moveDistanceX) + "px)", activePage.style.mozTransform = "translateX(-" + (window.innerWidth - moveDistanceX) + "px)", activePage.style.transform = "translateX(-" + (window.innerWidth - moveDistanceX) + "px)", "3" == theClass._scrollMode && (currentPage.style.webkitTransform = "scale(" + (window.innerWidth / (window.innerWidth + moveDistanceX)).toFixed(3) + ")", currentPage.style.mozTransform = "scale(" + (window.innerWidth / (window.innerWidth + moveDistanceX)).toFixed(3) + ")", currentPage.style.transform = "scale(" + (window.innerWidth / (window.innerWidth + moveDistanceX)).toFixed(3) + ")"))
} else if (0 > moveDistanceX) {
if (theClass._isDisableFlipNextPage) return;
!isNext || isFirstTime ? (isNext = !0, isFirstTime = !1, activePage && (activePage.classList.remove("z-active"), activePage.classList.remove("z-move")), scroll ? triggerLoop = !0 : currentPage.nextElementSibling && currentPage.nextElementSibling.classList.contains("main-page") ? activePage = currentPage.nextElementSibling : (activePage = theClass._$pages.first().get(0), triggerLoop = !0), activePage && activePage.classList.contains("main-page") ? (activePage.classList.add("z-active"), activePage.classList.add("z-move"), activePage.style.webkitTransition = "none", activePage.style.webkitTransform = "translateX(" + window.innerWidth + "px)", activePage.style.mozTransition = "none", activePage.style.mozTransform = "translateX(" + window.innerWidth + "px)", activePage.style.transition = "none", activePage.style.transform = "translateX(" + window.innerWidth + "px)", $(activePage).trigger("active"), currentPage.style.webkitTransformOrigin = "center left", currentPage.style.mozTransformOrigin = "center left", currentPage.style.transformOrigin = "center left") : (currentPage.style.webkitTransform = "translateX(0px) scale(1)", currentPage.style.mozTransform = "translateX(0px) scale(1)", currentPage.style.transform = "translateX(0px) scale(1)", activePage = null)) : (activePage.style.webkitTransform = "translateX(" + (window.innerWidth + moveDistanceX) + "px)", activePage.style.mozTransform = "translateX(" + (window.innerWidth + moveDistanceX) + "px)", activePage.style.transform = "translateX(" + (window.innerWidth + moveDistanceX) + "px)", "3" == theClass._scrollMode && (currentPage.style.webkitTransform = "scale(" + ((window.innerWidth + moveDistanceX) / window.innerWidth).toFixed(3) + ")", currentPage.style.mozTransform = "scale(" + ((window.innerWidth + moveDistanceX) / window.innerWidth).toFixed(3) + ")", currentPage.style.transform = "scale(" + ((window.innerWidth + moveDistanceX) / window.innerWidth).toFixed(3) + ")"))
}
}
function horizontalEnd() {
Math.abs(moveDistanceX) > Math.abs(moveDistanceY) && Math.abs(moveDistanceX) > 20 ? ("3" == theClass._scrollMode ? (currentPage.style.webkitTransform = "scale(0.2)", activePage.style.webkitTransform = "translateX(0px)", currentPage.style.mozTransform = "scale(0.2)", activePage.style.mozTransform = "translateX(0px)", currentPage.style.transform = "scale(0.2)", activePage.style.transform = "translateX(0px)") : (currentPage.style.webkitTransform = "scale(1)", activePage.style.webkitTransform = "translateX(0px)", currentPage.style.mozTransform = "scale(1)", activePage.style.mozTransform = "translateX(0px)", currentPage.style.transform = "scale(1)", activePage.style.transform = "translateX(0px)"), completeEffect(activePage) || $("#audio_btn").css("opacity", 0), setTimeout(function() {
activePage.classList.remove("z-active"), activePage.classList.remove("z-move"), activePage.classList.add("z-current"), currentPage.classList.remove("z-current"), currentPage.classList.remove("z-move"), theClass._isDisableFlipPage = !1, theClass.$currentPage = $(activePage).trigger("current"), $(currentPage).trigger("hide")
}, 500)) : (theClass._isDisableFlipPage = !1, cancelFlip())
}
function singleMove(a) {
if (Math.abs(moveDistanceX) > Math.abs(moveDistanceY) && completeEffect(currentPage))
if (moveDistanceX > 0) {
if (theClass._isDisableFlipPrevPage) return;
isNext || isFirstTime ? (isNext = !1, isFirstTime = !1, activePage && (activePage.classList.remove("z-active"), activePage.classList.remove("z-move")), scroll ? triggerLoop = !0 : currentPage.previousElementSibling && currentPage.previousElementSibling.classList.contains("main-page") ? activePage = currentPage.previousElementSibling : (activePage = theClass._$pages.last().get(0), triggerLoop = !0), activePage && activePage.classList.contains("main-page") ? (activePage.classList.add("z-active"), activePage.classList.add("z-move"), activePage.style.webkitTransition = "none", activePage.style.webkitTransform = "translateX(-" + a + "px)", activePage.style.mozTransition = "none", activePage.style.mozTransform = "translateX(-" + a + "px)", activePage.style.transition = "none", activePage.style.transform = "translateX(-" + a + "px)", $(activePage).trigger("active")) : (currentPage.style.webkitTransform = "translateX(0px) scale(1)", currentPage.style.mozTransform = "translateX(0px) scale(1)", currentPage.style.transform = "translateX(0px) scale(1)", activePage = null)) : (activePage.style.webkitTransform = "translateX(-" + (a - moveDistanceX) + "px)", activePage.style.mozTransform = "translateX(-" + (a - moveDistanceX) + "px)", activePage.style.transform = "translateX(-" + (a - moveDistanceX) + "px)", currentPage.style.webkitTransform = "translateX(" + moveDistanceX + "px)", currentPage.style.mozTransform = "translateX(" + moveDistanceX + "px)", currentPage.style.transform = "translateX(" + moveDistanceX + "px)")
} else if (0 > moveDistanceX) {
if (theClass._isDisableFlipNextPage) return;
!isNext || isFirstTime ? (isNext = !0, isFirstTime = !1, activePage && (activePage.classList.remove("z-active"), activePage.classList.remove("z-move")), scroll ? triggerLoop = !0 : currentPage.nextElementSibling && currentPage.nextElementSibling.classList.contains("main-page") ? activePage = currentPage.nextElementSibling : (activePage = theClass._$pages.first().get(0), triggerLoop = !0), activePage && activePage.classList.contains("main-page") ? (activePage.classList.add("z-active"), activePage.classList.add("z-move"), activePage.style.webkitTransition = "none", activePage.style.webkitTransform = "translateX(-" + a + "px)", activePage.style.mozTransition = "none", activePage.style.mozTransform = "translateX(-" + a + "px)", activePage.style.transition = "none", activePage.style.transform = "translateX(-" + a + "px)", $(activePage).trigger("active")) : (currentPage.style.webkitTransform = "translateX(0px) scale(1)", currentPage.style.mozTransform = "translateX(0px) scale(1)", currentPage.style.transform = "translateX(0px) scale(1)", activePage = null)) : (activePage.style.webkitTransform = "translateX(" + (a + moveDistanceX) + "px)", activePage.style.mozTransform = "translateX(" + (a + moveDistanceX) + "px)", activePage.style.transform = "translateX(" + (a + moveDistanceX) + "px)", currentPage.style.webkitTransform = "translateX(" + moveDistanceX + "px)", currentPage.style.mozTransform = "translateX(" + moveDistanceX + "px)", currentPage.style.transform = "translateX(" + moveDistanceX + "px)")
}
}
function singleEnd(a) {
Math.abs(moveDistanceX) > Math.abs(moveDistanceY) && Math.abs(moveDistanceX) > 20 ? (moveDistanceX > 0 ? (currentPage.style.webkitTransform = "translateX(" + a + "px)", currentPage.style.mozTransform = "translateX(" + a + "px)", currentPage.style.transform = "translateX(" + a + "px)") : (currentPage.style.webkitTransform = "translateX(-" + a + "px)", currentPage.style.mozTransform = "translateX(-" + a + "px)", currentPage.style.transform = "translateX(-" + a + "px)"), activePage.style.webkitTransform = "translateX(0px)", activePage.style.mozTransform = "translateX(0px)", activePage.style.transform = "translateX(0px)", completeEffect(activePage) || $("#audio_btn").css("opacity", 0), setTimeout(function() {
activePage.classList.remove("z-active"), activePage.classList.remove("z-move"), activePage.classList.add("z-current"), currentPage.classList.remove("z-current"), currentPage.classList.remove("z-move"), theClass._isDisableFlipPage = !1, theClass.$currentPage = $(activePage).trigger("current"), $(currentPage).trigger("hide")
}, 500)) : (theClass._isDisableFlipPage = !1, cancelFlip())
}
function pageScroll(a) {
scroll = !0;
var b = $(currentPage).find(".m-img").attr("id").charAt(4),
c = $(currentPage).siblings(".main-page").find("#page" + a);
activePage = $(c).parent(".main-page")[0], b > a ? prePage() : a > b && nextPage()
}
function scrollStart(a) {
isMobile && a && (a = event), theClass._isDisableFlipPage || (currentPage = theClass._$pages.filter(".z-current").get(0), scroll || (activePage = null), currentPage && completeEffect(currentPage) && (isStart = !0, isNext = !1, isFirstTime = !0, moveDistanceX = 0, moveDistanceY = 0, a && "mousedown" == a.type ? (startX = a.pageX, startY = a.pageY) : a && "touchstart" == a.type && (startX = a.touches[0].pageX, startY = a.touches[0].pageY), currentPage.classList.add("z-move"), currentPage.style.webkitTransition = "none", currentPage.style.mozTransition = "none", currentPage.style.transition = "none"))
}
function scrollMove(a) {
var b = isMobile || window.top != window.self ? window.innerWidth : $(".nr").width();
isMobile && a && (a = event), isStart && theClass._$pages.length > 1 && (a && "mousemove" == a.type ? (moveDistanceX = a.pageX - startX, moveDistanceY = a.pageY - startY) : a && "touchmove" == a.type && (moveDistanceX = a.touches[0].pageX - startX, moveDistanceY = a.touches[0].pageY - startY), "0" == theClass._scrollMode || "2" == theClass._scrollMode || "1" == theClass._scrollMode ? verticalMove() : "4" == theClass._scrollMode || "3" == theClass._scrollMode ? horizontalMove() : "5" == theClass._scrollMode && singleMove(b))
}
function scrollEnd() {
var a = isMobile || window.top != window.self ? window.innerWidth : $(".nr").width();
isStart && completeEffect(currentPage) && (isStart = !1, activePage ? (theClass._isDisableFlipPage = !0, currentPage.style.webkitTransition = "-webkit-transform 0.4s ease-out", activePage.style.webkitTransition = "-webkit-transform 0.4s ease-out", currentPage.style.mozTransition = "-moz-transform 0.4s ease-out", activePage.style.mozTransition = "-moz-transform 0.4s ease-out", currentPage.style.transition = "transform 0.4s ease-out", activePage.style.transition = "transform 0.4s ease-out", "0" == theClass._scrollMode || "2" == theClass._scrollMode || "1" == theClass._scrollMode ? verticalEnd() : "4" == theClass._scrollMode || "3" == theClass._scrollMode ? horizontalEnd() : "5" == theClass._scrollMode && singleEnd(a)) : currentPage.classList.remove("z-move")), scroll = !1
}
function prePage() {
var a = 0;
scrollStart();
var b = setInterval(function() {
a += 1, 0 == flipMode || 1 == flipMode || 2 == flipMode ? moveDistanceY = a : (3 == flipMode || 4 == flipMode || 5 == flipMode) && (moveDistanceX = a), scrollMove(), a >= 21 && (clearInterval(b), scrollEnd())
}, 1)
}
function nextPage() {
var a = 0;
scrollStart();
var b = setInterval(function() {
a -= 1, 0 == flipMode || 1 == flipMode || 2 == flipMode ? moveDistanceY = a : (3 == flipMode || 4 == flipMode || 5 == flipMode) && (moveDistanceX = a), scrollMove(), -21 >= a && (clearInterval(b), scrollEnd())
}, 1)
}! function(a, b) {
function c(a) {
var b = ob[a] = {};
return $.each(a.split(bb), function(a, c) {
b[c] = !0
}), b
}
function d(a, c, d) {
if (d === b && 1 === a.nodeType) {
var e = "data-" + c.replace(qb, "-$1").toLowerCase();
if (d = a.getAttribute(e), "string" == typeof d) {
try {
d = "true" === d ? !0 : "false" === d ? !1 : "null" === d ? null : +d + "" === d ? +d : pb.test(d) ? $.parseJSON(d) : d
} catch (f) {}
$.data(a, c, d)
} else d = b
}
return d
}
function e(a) {
var b;
for (b in a)
if (("data" !== b || !$.isEmptyObject(a[b])) && "toJSON" !== b) return !1;
return !0
}
function f() {
return !1
}
function g() {
return !0
}
function h(a) {
return !a || !a.parentNode || 11 === a.parentNode.nodeType
}
function i(a, b) {
do a = a[b]; while (a && 1 !== a.nodeType);
return a
}
function j(a, b, c) {
if (b = b || 0, $.isFunction(b)) return $.grep(a, function(a, d) {
var e = !!b.call(a, d, a);
return e === c
});
if (b.nodeType) return $.grep(a, function(a) {
return a === b === c
});
if ("string" == typeof b) {
var d = $.grep(a, function(a) {
return 1 === a.nodeType
});
if (Kb.test(b)) return $.filter(b, d, !c);
b = $.filter(b, d)
}
return $.grep(a, function(a) {
return $.inArray(a, b) >= 0 === c
})
}
function k(a) {
var b = Nb.split("|"),
c = a.createDocumentFragment();
if (c.createElement)
for (; b.length;) c.createElement(b.pop());
return c
}
function l(a, b) {
return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b))
}
function m(a, b) {
if (1 === b.nodeType && $.hasData(a)) {
var c, d, e, f = $._data(a),
g = $._data(b, f),
h = f.events;
if (h) {
delete g.handle, g.events = {};
for (c in h)
for (d = 0, e = h[c].length; e > d; d++) $.event.add(b, c, h[c][d])
}
g.data && (g.data = $.extend({}, g.data))
}
}
function n(a, b) {
var c;
1 === b.nodeType && (b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(), "object" === c ? (b.parentNode && (b.outerHTML = a.outerHTML), $.support.html5Clone && a.innerHTML && !$.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : "input" === c && Xb.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : "option" === c ? b.selected = a.defaultSelected : "input" === c || "textarea" === c ? b.defaultValue = a.defaultValue : "script" === c && b.text !== a.text && (b.text = a.text), b.removeAttribute($.expando))
}
function o(a) {
return "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName("*") : "undefined" != typeof a.querySelectorAll ? a.querySelectorAll("*") : []
}
function p(a) {
Xb.test(a.type) && (a.defaultChecked = a.checked)
}
function q(a, b) {
if (b in a) return b;
for (var c = b.charAt(0).toUpperCase() + b.slice(1), d = b, e = rc.length; e--;)
if (b = rc[e] + c, b in a) return b;
return d
}
function r(a, b) {
return a = b || a, "none" === $.css(a, "display") || !$.contains(a.ownerDocument, a)
}
function s(a, b) {
for (var c, d, e = [], f = 0, g = a.length; g > f; f++) c = a[f], c.style && (e[f] = $._data(c, "olddisplay"), b ? (!e[f] && "none" === c.style.display && (c.style.display = ""), "" === c.style.display && r(c) && (e[f] = $._data(c, "olddisplay", w(c.nodeName)))) : (d = cc(c, "display"), !e[f] && "none" !== d && $._data(c, "olddisplay", d)));
for (f = 0; g > f; f++) c = a[f], c.style && (b && "none" !== c.style.display && "" !== c.style.display || (c.style.display = b ? e[f] || "" : "none"));
return a
}
function t(a, b, c) {
var d = kc.exec(b);
return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
}
function u(a, b, c, d) {
for (var e = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, f = 0; 4 > e; e += 2) "margin" === c && (f += $.css(a, c + qc[e], !0)), d ? ("content" === c && (f -= parseFloat(cc(a, "padding" + qc[e])) || 0), "margin" !== c && (f -= parseFloat(cc(a, "border" + qc[e] + "Width")) || 0)) : (f += parseFloat(cc(a, "padding" + qc[e])) || 0, "padding" !== c && (f += parseFloat(cc(a, "border" + qc[e] + "Width")) || 0));
return f
}
function v(a, b, c) {
var d = "width" === b ? a.offsetWidth : a.offsetHeight,
e = !0,
f = $.support.boxSizing && "border-box" === $.css(a, "boxSizing");
if (0 >= d || null == d) {
if (d = cc(a, b), (0 > d || null == d) && (d = a.style[b]), lc.test(d)) return d;
e = f && ($.support.boxSizingReliable || d === a.style[b]), d = parseFloat(d) || 0
}
return d + u(a, b, c || (f ? "border" : "content"), e) + "px"
}
function w(a) {
if (nc[a]) return nc[a];
var b = $("<" + a + ">").appendTo(P.body),
c = b.css("display");
return b.remove(), ("none" === c || "" === c) && (dc = P.body.appendChild(dc || $.extend(P.createElement("iframe"), {
frameBorder: 0,
width: 0,
height: 0
})), ec && dc.createElement || (ec = (dc.contentWindow || dc.contentDocument).document, ec.write("<!doctype html><html><body>"), ec.close()), b = ec.body.appendChild(ec.createElement(a)), c = cc(b, "display"), P.body.removeChild(dc)), nc[a] = c, c
}
function x(a, b, c, d) {
var e;
if ($.isArray(b)) $.each(b, function(b, e) {
c || uc.test(a) ? d(a, e) : x(a + "[" + ("object" == typeof e ? b : "") + "]", e, c, d)
});
else if (c || "object" !== $.type(b)) d(a, b);
else
for (e in b) x(a + "[" + e + "]", b[e], c, d)
}
function y(a) {
return function(b, c) {
"string" != typeof b && (c = b, b = "*");
var d, e, f, g = b.toLowerCase().split(bb),
h = 0,
i = g.length;
if ($.isFunction(c))
for (; i > h; h++) d = g[h], f = /^\+/.test(d), f && (d = d.substr(1) || "*"), e = a[d] = a[d] || [], e[f ? "unshift" : "push"](c)
}
}
function z(a, c, d, e, f, g) {
f = f || c.dataTypes[0], g = g || {}, g[f] = !0;
for (var h, i = a[f], j = 0, k = i ? i.length : 0, l = a === Kc; k > j && (l || !h); j++) h = i[j](c, d, e), "string" == typeof h && (!l || g[h] ? h = b : (c.dataTypes.unshift(h), h = z(a, c, d, e, h, g)));
return (l || !h) && !g["*"] && (h = z(a, c, d, e, "*", g)), h
}
function A(a, c) {
var d, e, f = $.ajaxSettings.flatOptions || {};
for (d in c) c[d] !== b && ((f[d] ? a : e || (e = {}))[d] = c[d]);
e && $.extend(!0, a, e)
}
function B(a, c, d) {
var e, f, g, h, i = a.contents,
j = a.dataTypes,
k = a.responseFields;
for (f in k) f in d && (c[k[f]] = d[f]);
for (;
"*" === j[0];) j.shift(), e === b && (e = a.mimeType || c.getResponseHeader("content-type"));
if (e)
for (f in i)
if (i[f] && i[f].test(e)) {
j.unshift(f);
break
}
if (j[0] in d) g = j[0];
else {
for (f in d) {
if (!j[0] || a.converters[f + " " + j[0]]) {
g = f;
break
}
h || (h = f)
}
g = g || h
}
return g ? (g !== j[0] && j.unshift(g), d[g]) : void 0
}
function C(a, b) {
var c, d, e, f, g = a.dataTypes.slice(),
h = g[0],
i = {},
j = 0;
if (a.dataFilter && (b = a.dataFilter(b, a.dataType)), g[1])
for (c in a.converters) i[c.toLowerCase()] = a.converters[c];
for (; e = g[++j];)
if ("*" !== e) {
if ("*" !== h && h !== e) {
if (c = i[h + " " + e] || i["* " + e], !c)
for (d in i)
if (f = d.split(" "), f[1] === e && (c = i[h + " " + f[0]] || i["* " + f[0]])) {
c === !0 ? c = i[d] : i[d] !== !0 && (e = f[0], g.splice(j--, 0, e));
break
}
if (c !== !0)
if (c && a["throws"]) b = c(b);
else try {
b = c(b)
} catch (k) {
return {
state: "parsererror",
error: c ? k : "No conversion from " + h + " to " + e
}
}
}
h = e
}
return {
state: "success",
data: b
}
}
function D() {
try {
return new a.XMLHttpRequest
} catch (b) {}
}
function E() {
try {
return new a.ActiveXObject("Microsoft.XMLHTTP")
} catch (b) {}
}
function F() {
return setTimeout(function() {
Vc = b
}, 0), Vc = $.now()
}
function G(a, b) {
$.each(b, function(b, c) {
for (var d = (_c[b] || []).concat(_c["*"]), e = 0, f = d.length; f > e; e++)
if (d[e].call(a, b, c)) return
})
}
function H(a, b, c) {
var d, e = 0,
f = $c.length,
g = $.Deferred().always(function() {
delete h.elem
}),
h = function() {
for (var b = Vc || F(), c = Math.max(0, i.startTime + i.duration - b), d = 1 - (c / i.duration || 0), e = 0, f = i.tweens.length; f > e; e++) i.tweens[e].run(d);
return g.notifyWith(a, [i, d, c]), 1 > d && f ? c : (g.resolveWith(a, [i]), !1)
},
i = g.promise({
elem: a,
props: $.extend({}, b),
opts: $.extend(!0, {
specialEasing: {}
}, c),
originalProperties: b,
originalOptions: c,
startTime: Vc || F(),
duration: c.duration,
tweens: [],
createTween: function(b, c) {
var d = $.Tween(a, i.opts, b, c, i.opts.specialEasing[b] || i.opts.easing);
return i.tweens.push(d), d
},
stop: function(b) {
for (var c = 0, d = b ? i.tweens.length : 0; d > c; c++) i.tweens[c].run(1);
return b ? g.resolveWith(a, [i, b]) : g.rejectWith(a, [i, b]), this
}
}),
j = i.props;
for (I(j, i.opts.specialEasing); f > e; e++)
if (d = $c[e].call(i, a, j, i.opts)) return d;
return G(i, j), $.isFunction(i.opts.start) && i.opts.start.call(a, i), $.fx.timer($.extend(h, {
anim: i,
queue: i.opts.queue,
elem: a
})), i.progress(i.opts.progress).done(i.opts.done, i.opts.complete).fail(i.opts.fail).always(i.opts.always)
}
function I(a, b) {
var c, d, e, f, g;
for (c in a)
if (d = $.camelCase(c), e = b[d], f = a[c], $.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = $.cssHooks[d], g && "expand" in g) {
f = g.expand(f), delete a[d];
for (c in f) c in a || (a[c] = f[c], b[c] = e)
} else b[d] = e
}
function J(a, b, c) {
var d, e, f, g, h, i, j, k, l = this,
m = a.style,
n = {},
o = [],
p = a.nodeType && r(a);
c.queue || (j = $._queueHooks(a, "fx"), null == j.unqueued && (j.unqueued = 0, k = j.empty.fire, j.empty.fire = function() {
j.unqueued || k()
}), j.unqueued++, l.always(function() {
l.always(function() {
j.unqueued--, $.queue(a, "fx").length || j.empty.fire()
})
})), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [m.overflow, m.overflowX, m.overflowY], "inline" === $.css(a, "display") && "none" === $.css(a, "float") && ($.support.inlineBlockNeedsLayout && "inline" !== w(a.nodeName) ? m.zoom = 1 : m.display = "inline-block")), c.overflow && (m.overflow = "hidden", $.support.shrinkWrapBlocks || l.done(function() {
m.overflow = c.overflow[0], m.overflowX = c.overflow[1], m.overflowY = c.overflow[2]
}));
for (d in b)
if (f = b[d], Xc.exec(f)) {
if (delete b[d], f === (p ? "hide" : "show")) continue;
o.push(d)
}
if (g = o.length)
for (h = $._data(a, "fxshow") || $._data(a, "fxshow", {}), p ? $(a).show() : l.done(function() {
$(a).hide()
}), l.done(function() {
var b;
$.removeData(a, "fxshow", !0);
for (b in n) $.style(a, b, n[b])
}), d = 0; g > d; d++) e = o[d], i = l.createTween(e, p ? h[e] : 0), n[e] = h[e] || $.style(a, e), e in h || (h[e] = i.start, p && (i.end = i.start, i.start = "width" === e || "height" === e ? 1 : 0))
}
function K(a, b, c, d, e) {
return new K.prototype.init(a, b, c, d, e)
}
function L(a, b) {
var c, d = {
height: a
},
e = 0;
for (b = b ? 1 : 0; 4 > e; e += 2 - b) c = qc[e], d["margin" + c] = d["padding" + c] = a;
return b && (d.opacity = d.width = a), d
}
function M(a) {
return $.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1
}
var N, O, P = a.document,
Q = a.location,
R = a.navigator,
S = a.jQuery,
T = a.$,
U = Array.prototype.push,
V = Array.prototype.slice,
W = Array.prototype.indexOf,
X = Object.prototype.toString,
Y = Object.prototype.hasOwnProperty,
Z = String.prototype.trim,
$ = function(a, b) {
return new $.fn.init(a, b, N)
},
_ = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
ab = /\S/,
bb = /\s+/,
cb = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
db = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
eb = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
fb = /^[\],:{}\s]*$/,
gb = /(?:^|:|,)(?:\s*\[)+/g,
hb = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
ib = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
jb = /^-ms-/,
kb = /-([\da-z])/gi,
lb = function(a, b) {
return (b + "").toUpperCase()
},
mb = function() {
P.addEventListener ? (P.removeEventListener("DOMContentLoaded", mb, !1), $.ready()) : "complete" === P.readyState && (P.detachEvent("onreadystatechange", mb), $.ready())
},
nb = {};
$.fn = $.prototype = {
constructor: $,
init: function(a, c, d) {
var e, f, g;
if (!a) return this;
if (a.nodeType) return this.context = this[0] = a, this.length = 1, this;
if ("string" == typeof a) {
if (e = "<" === a.charAt(0) && ">" === a.charAt(a.length - 1) && a.length >= 3 ? [null, a, null] : db.exec(a), e && (e[1] || !c)) {
if (e[1]) return c = c instanceof $ ? c[0] : c, g = c && c.nodeType ? c.ownerDocument || c : P, a = $.parseHTML(e[1], g, !0), eb.test(e[1]) && $.isPlainObject(c) && this.attr.call(a, c, !0), $.merge(this, a);
if (f = P.getElementById(e[2]), f && f.parentNode) {
if (f.id !== e[2]) return d.find(a);
this.length = 1, this[0] = f
}
return this.context = P, this.selector = a, this
}
return !c || c.jquery ? (c || d).find(a) : this.constructor(c).find(a)
}
return $.isFunction(a) ? d.ready(a) : (a.selector !== b && (this.selector = a.selector, this.context = a.context), $.makeArray(a, this))
},
selector: "",
jquery: "1.8.2",
length: 0,
size: function() {
return this.length
},
toArray: function() {
return V.call(this)
},
get: function(a) {
return null == a ? this.toArray() : 0 > a ? this[this.length + a] : this[a]
},
pushStack: function(a, b, c) {
var d = $.merge(this.constructor(), a);
return d.prevObject = this, d.context = this.context, "find" === b ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")"), d
},
each: function(a, b) {
return $.each(this, a, b)
},
ready: function(a) {
return $.ready.promise().done(a), this
},
eq: function(a) {
return a = +a, -1 === a ? this.slice(a) : this.slice(a, a + 1)
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq(-1)
},
slice: function() {
return this.pushStack(V.apply(this, arguments), "slice", V.call(arguments).join(","))
},
map: function(a) {
return this.pushStack($.map(this, function(b, c) {
return a.call(b, c, b)
}))
},
end: function() {
return this.prevObject || this.constructor(null)
},
push: U,
sort: [].sort,
splice: [].splice
}, $.fn.init.prototype = $.fn, $.extend = $.fn.extend = function() {
var a, c, d, e, f, g, h = arguments[0] || {},
i = 1,
j = arguments.length,
k = !1;
for ("boolean" == typeof h && (k = h, h = arguments[1] || {}, i = 2), "object" != typeof h && !$.isFunction(h) && (h = {}), j === i && (h = this, --i); j > i; i++)
if (null != (a = arguments[i]))
for (c in a) d = h[c], e = a[c], h !== e && (k && e && ($.isPlainObject(e) || (f = $.isArray(e))) ? (f ? (f = !1, g = d && $.isArray(d) ? d : []) : g = d && $.isPlainObject(d) ? d : {}, h[c] = $.extend(k, g, e)) : e !== b && (h[c] = e));
return h
}, $.extend({
noConflict: function(b) {
return a.$ === $ && (a.$ = T), b && a.jQuery === $ && (a.jQuery = S), $
},
isReady: !1,
readyWait: 1,
holdReady: function(a) {
a ? $.readyWait++ : $.ready(!0)
},
ready: function(a) {
if (a === !0 ? !--$.readyWait : !$.isReady) {
if (!P.body) return setTimeout($.ready, 1);
$.isReady = !0, a !== !0 && --$.readyWait > 0 || (O.resolveWith(P, [$]), $.fn.trigger && $(P).trigger("ready").off("ready"))
}
},
isFunction: function(a) {
return "function" === $.type(a)
},
isArray: Array.isArray || function(a) {
return "array" === $.type(a)
},
isWindow: function(a) {
return null != a && a == a.window
},
isNumeric: function(a) {
return !isNaN(parseFloat(a)) && isFinite(a)
},
type: function(a) {
return null == a ? String(a) : nb[X.call(a)] || "object"
},
isPlainObject: function(a) {
if (!a || "object" !== $.type(a) || a.nodeType || $.isWindow(a)) return !1;
try {
if (a.constructor && !Y.call(a, "constructor") && !Y.call(a.constructor.prototype, "isPrototypeOf")) return !1
} catch (c) {
return !1
}
var d;
for (d in a);
return d === b || Y.call(a, d)
},
isEmptyObject: function(a) {
var b;
for (b in a) return !1;
return !0
},
error: function(a) {
throw new Error(a)
},
parseHTML: function(a, b, c) {
var d;
return a && "string" == typeof a ? ("boolean" == typeof b && (c = b, b = 0), b = b || P, (d = eb.exec(a)) ? [b.createElement(d[1])] : (d = $.buildFragment([a], b, c ? null : []), $.merge([], (d.cacheable ? $.clone(d.fragment) : d.fragment).childNodes))) : null
},
parseJSON: function(b) {
return b && "string" == typeof b ? (b = $.trim(b), a.JSON && a.JSON.parse ? a.JSON.parse(b) : fb.test(b.replace(hb, "@").replace(ib, "]").replace(gb, "")) ? new Function("return " + b)() : void $.error("Invalid JSON: " + b)) : null
},
parseXML: function(c) {
var d, e;
if (!c || "string" != typeof c) return null;
try {
a.DOMParser ? (e = new DOMParser, d = e.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c))
} catch (f) {
d = b
}
return (!d || !d.documentElement || d.getElementsByTagName("parsererror").length) && $.error("Invalid XML: " + c), d
},
noop: function() {},
globalEval: function(b) {
b && ab.test(b) && (a.execScript || function(b) {
a.eval.call(a, b)
})(b)
},
camelCase: function(a) {
return a.replace(jb, "ms-").replace(kb, lb)
},
nodeName: function(a, b) {
return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
},
each: function(a, c, d) {
var e, f = 0,
g = a.length,
h = g === b || $.isFunction(a);
if (d)
if (h) {
for (e in a)
if (c.apply(a[e], d) === !1) break
} else
for (; g > f && c.apply(a[f++], d) !== !1;);
else if (h) {
for (e in a)
if (c.call(a[e], e, a[e]) === !1) break
} else
for (; g > f && c.call(a[f], f, a[f++]) !== !1;);
return a
},
trim: Z && !Z.call(" ") ? function(a) {
return null == a ? "" : Z.call(a)
} : function(a) {
return null == a ? "" : (a + "").replace(cb, "")
},
makeArray: function(a, b) {
var c, d = b || [];
return null != a && (c = $.type(a), null == a.length || "string" === c || "function" === c || "regexp" === c || $.isWindow(a) ? U.call(d, a) : $.merge(d, a)), d
},
inArray: function(a, b, c) {
var d;
if (b) {
if (W) return W.call(b, a, c);
for (d = b.length, c = c ? 0 > c ? Math.max(0, d + c) : c : 0; d > c; c++)
if (c in b && b[c] === a) return c
}
return -1
},
merge: function(a, c) {
var d = c.length,
e = a.length,
f = 0;
if ("number" == typeof d)
for (; d > f; f++) a[e++] = c[f];
else
for (; c[f] !== b;) a[e++] = c[f++];
return a.length = e, a
},
grep: function(a, b, c) {
var d, e = [],
f = 0,
g = a.length;
for (c = !!c; g > f; f++) d = !!b(a[f], f), c !== d && e.push(a[f]);
return e
},
map: function(a, c, d) {
var e, f, g = [],
h = 0,
i = a.length,
j = a instanceof $ || i !== b && "number" == typeof i && (i > 0 && a[0] && a[i - 1] || 0 === i || $.isArray(a));
if (j)
for (; i > h; h++) e = c(a[h], h, d), null != e && (g[g.length] = e);
else
for (f in a) e = c(a[f], f, d), null != e && (g[g.length] = e);
return g.concat.apply([], g)
},
guid: 1,
proxy: function(a, c) {
var d, e, f;
return "string" == typeof c && (d = a[c], c = a, a = d), $.isFunction(a) ? (e = V.call(arguments, 2), f = function() {
return a.apply(c, e.concat(V.call(arguments)))
}, f.guid = a.guid = a.guid || $.guid++, f) : b
},
access: function(a, c, d, e, f, g, h) {
var i, j = null == d,
k = 0,
l = a.length;
if (d && "object" == typeof d) {
for (k in d) $.access(a, c, k, d[k], 1, g, e);
f = 1
} else if (e !== b) {
if (i = h === b && $.isFunction(e), j && (i ? (i = c, c = function(a, b, c) {
return i.call($(a), c)
}) : (c.call(a, e), c = null)), c)
for (; l > k; k++) c(a[k], d, i ? e.call(a[k], k, c(a[k], d)) : e, h);
f = 1
}
return f ? a : j ? c.call(a) : l ? c(a[0], d) : g
},
now: function() {
return (new Date).getTime()
}
}), $.ready.promise = function(b) {
if (!O)
if (O = $.Deferred(), "complete" === P.readyState) setTimeout($.ready, 1);
else if (P.addEventListener) P.addEventListener("DOMContentLoaded", mb, !1), a.addEventListener("load", $.ready, !1);
else {
P.attachEvent("onreadystatechange", mb), a.attachEvent("onload", $.ready);
var c = !1;
try {
c = null == a.frameElement && P.documentElement
} catch (d) {}
c && c.doScroll && function e() {
if (!$.isReady) {
try {
c.doScroll("left")
} catch (a) {
return setTimeout(e, 50)
}
$.ready()
}
}()
}
return O.promise(b)
}, $.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(a, b) {
nb["[object " + b + "]"] = b.toLowerCase()
}), N = $(P);
var ob = {};
$.Callbacks = function(a) {
a = "string" == typeof a ? ob[a] || c(a) : $.extend({}, a);
var d, e, f, g, h, i, j = [],
k = !a.once && [],
l = function(b) {
for (d = a.memory && b, e = !0, i = g || 0, g = 0, h = j.length, f = !0; j && h > i; i++)
if (j[i].apply(b[0], b[1]) === !1 && a.stopOnFalse) {
d = !1;
break
}
f = !1, j && (k ? k.length && l(k.shift()) : d ? j = [] : m.disable())
},
m = {
add: function() {
if (j) {
var b = j.length;
! function c(b) {
$.each(b, function(b, d) {
var e = $.type(d);
"function" !== e || a.unique && m.has(d) ? d && d.length && "string" !== e && c(d) : j.push(d)
})
}(arguments), f ? h = j.length : d && (g = b, l(d))
}
return this
},
remove: function() {
return j && $.each(arguments, function(a, b) {
for (var c;
(c = $.inArray(b, j, c)) > -1;) j.splice(c, 1), f && (h >= c && h--, i >= c && i--)
}), this
},
has: function(a) {
return $.inArray(a, j) > -1
},
empty: function() {
return j = [], this
},
disable: function() {
return j = k = d = b, this
},
disabled: function() {
return !j
},
lock: function() {
return k = b, d || m.disable(), this
},
locked: function() {
return !k
},
fireWith: function(a, b) {
return b = b || [], b = [a, b.slice ? b.slice() : b], j && (!e || k) && (f ? k.push(b) : l(b)), this
},
fire: function() {
return m.fireWith(this, arguments), this
},
fired: function() {
return !!e
}
};
return m
}, $.extend({
Deferred: function(a) {
var b = [
["resolve", "done", $.Callbacks("once memory"), "resolved"],
["reject", "fail", $.Callbacks("once memory"), "rejected"],
["notify", "progress", $.Callbacks("memory")]
],
c = "pending",
d = {
state: function() {
return c
},
always: function() {
return e.done(arguments).fail(arguments), this
},
then: function() {
var a = arguments;
return $.Deferred(function(c) {
$.each(b, function(b, d) {
var f = d[0],
g = a[b];
e[d[1]]($.isFunction(g) ? function() {
var a = g.apply(this, arguments);
a && $.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f + "With"](this === e ? c : this, [a])
} : c[f])
}), a = null
}).promise()
},
promise: function(a) {
return null != a ? $.extend(a, d) : d
}
},
e = {};
return d.pipe = d.then, $.each(b, function(a, f) {
var g = f[2],
h = f[3];
d[f[1]] = g.add, h && g.add(function() {
c = h
}, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = g.fire, e[f[0] + "With"] = g.fireWith
}), d.promise(e), a && a.call(e, e), e
},
when: function(a) {
var b, c, d, e = 0,
f = V.call(arguments),
g = f.length,
h = 1 !== g || a && $.isFunction(a.promise) ? g : 0,
i = 1 === h ? a : $.Deferred(),
j = function(a, c, d) {
return function(e) {
c[a] = this, d[a] = arguments.length > 1 ? V.call(arguments) : e, d === b ? i.notifyWith(c, d) : --h || i.resolveWith(c, d)
}
};
if (g > 1)
for (b = new Array(g), c = new Array(g), d = new Array(g); g > e; e++) f[e] && $.isFunction(f[e].promise) ? f[e].promise().done(j(e, d, f)).fail(i.reject).progress(j(e, c, b)) : --h;
return h || i.resolveWith(d, f), i.promise()
}
}), $.support = function() {
var b, c, d, e, f, g, h, i, j, k, l, m = P.createElement("div");
if (m.setAttribute("className", "t"), m.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", c = m.getElementsByTagName("*"), d = m.getElementsByTagName("a")[0], d.style.cssText = "top:1px;float:left;opacity:.5", !c || !c.length) return {};
e = P.createElement("select"), f = e.appendChild(P.createElement("option")), g = m.getElementsByTagName("input")[0], b = {
leadingWhitespace: 3 === m.firstChild.nodeType,
tbody: !m.getElementsByTagName("tbody").length,
htmlSerialize: !!m.getElementsByTagName("link").length,
style: /top/.test(d.getAttribute("style")),
hrefNormalized: "/a" === d.getAttribute("href"),
opacity: /^0.5/.test(d.style.opacity),
cssFloat: !!d.style.cssFloat,
checkOn: "on" === g.value,
optSelected: f.selected,
getSetAttribute: "t" !== m.className,
enctype: !!P.createElement("form").enctype,
html5Clone: "<:nav></:nav>" !== P.createElement("nav").cloneNode(!0).outerHTML,
boxModel: "CSS1Compat" === P.compatMode,
submitBubbles: !0,
changeBubbles: !0,
focusinBubbles: !1,
deleteExpando: !0,
noCloneEvent: !0,
inlineBlockNeedsLayout: !1,
shrinkWrapBlocks: !1,
reliableMarginRight: !0,
boxSizingReliable: !0,
pixelPosition: !1
}, g.checked = !0, b.noCloneChecked = g.cloneNode(!0).checked, e.disabled = !0, b.optDisabled = !f.disabled;
try {
delete m.test
} catch (n) {
b.deleteExpando = !1
}
if (!m.addEventListener && m.attachEvent && m.fireEvent && (m.attachEvent("onclick", l = function() {
b.noCloneEvent = !1
}), m.cloneNode(!0).fireEvent("onclick"), m.detachEvent("onclick", l)), g = P.createElement("input"), g.value = "t", g.setAttribute("type", "radio"), b.radioValue = "t" === g.value, g.setAttribute("checked", "checked"), g.setAttribute("name", "t"), m.appendChild(g), h = P.createDocumentFragment(), h.appendChild(m.lastChild), b.checkClone = h.cloneNode(!0).cloneNode(!0).lastChild.checked, b.appendChecked = g.checked, h.removeChild(g), h.appendChild(m), m.attachEvent)
for (j in {
submit: !0,
change: !0,
focusin: !0
}) i = "on" + j, k = i in m, k || (m.setAttribute(i, "return;"), k = "function" == typeof m[i]), b[j + "Bubbles"] = k;
return $(function() {
var c, d, e, f, g = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
h = P.getElementsByTagName("body")[0];
h && (c = P.createElement("div"), c.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", h.insertBefore(c, h.firstChild), d = P.createElement("div"), c.appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", e = d.getElementsByTagName("td"), e[0].style.cssText = "padding:0;margin:0;border:0;display:none", k = 0 === e[0].offsetHeight, e[0].style.display = "", e[1].style.display = "none", b.reliableHiddenOffsets = k && 0 === e[0].offsetHeight, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", b.boxSizing = 4 === d.offsetWidth, b.doesNotIncludeMarginInBodyOffset = 1 !== h.offsetTop, a.getComputedStyle && (b.pixelPosition = "1%" !== (a.getComputedStyle(d, null) || {}).top, b.boxSizingReliable = "4px" === (a.getComputedStyle(d, null) || {
width: "4px"
}).width, f = P.createElement("div"), f.style.cssText = d.style.cssText = g, f.style.marginRight = f.style.width = "0", d.style.width = "1px", d.appendChild(f), b.reliableMarginRight = !parseFloat((a.getComputedStyle(f, null) || {}).marginRight)), "undefined" != typeof d.style.zoom && (d.innerHTML = "", d.style.cssText = g + "width:1px;padding:1px;display:inline;zoom:1", b.inlineBlockNeedsLayout = 3 === d.offsetWidth, d.style.display = "block", d.style.overflow = "visible", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", b.shrinkWrapBlocks = 3 !== d.offsetWidth, c.style.zoom = 1), h.removeChild(c), c = d = e = f = null)
}), h.removeChild(m), c = d = e = f = g = h = m = null, b
}();
var pb = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
qb = /([A-Z])/g;
$.extend({
cache: {},
deletedIds: [],
uuid: 0,
expando: "jQuery" + ($.fn.jquery + Math.random()).replace(/\D/g, ""),
noData: {
embed: !0,
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
applet: !0
},
hasData: function(a) {
return a = a.nodeType ? $.cache[a[$.expando]] : a[$.expando], !!a && !e(a)
},
data: function(a, c, d, e) {
if ($.acceptData(a)) {