Ultimate Responsive Image Slider Plugin - Version 2.8

Version Description

Download this release

Release Info

Developer weblizar
Plugin Icon 128x128 Ultimate Responsive Image Slider Plugin
Version 2.8
Comparing to
See all releases

Code changes from version 2.7 to 2.8

css/slider-pro.css CHANGED
@@ -1,5 +1,5 @@
1
/*!
2
- * - v1.1.0
3
* Homepage: http://bqworks.com/slider-pro/
4
* Author: bqworks
5
* Author URL: http://bqworks.com/
@@ -9,7 +9,8 @@
9
.slider-pro {
10
position: relative;
11
margin: 0 auto;
12
- margin-bottom: 10px;
13
}
14
15
.sp-slides-container {
@@ -745,8 +746,8 @@ a.sp-video:after {
745
--------------------------------------------------*/
746
.slider-pro img.sp-image,
747
.slider-pro img.sp-thumbnail {
748
- max-width: none !important;
749
- max-height: none !important;
750
border: none !important;
751
border-radius: 0 !important;
752
padding: 0 !important;
@@ -777,7 +778,7 @@ a.sp-video:after {
777
}
778
779
.slider-pro p.sp-layer {
780
- font-size: 14px ;
781
line-height: 1.4;
782
margin: 0;
783
}
@@ -820,13 +821,4 @@ a.sp-video:after {
820
821
.slider-pro img.sp-layer {
822
border: none;
823
- }
824
-
825
- .uris-slider-title{
826
- font-weight: bolder !important;
827
- padding-bottom: 5px !important;
828
- border-bottom: 2px solid #f2f2f2 !important;
829
- text-align: center !important;
830
- margin-bottom: 20px !important;
831
- font-size: 18px !important;
832
}
1
/*!
2
+ * - v1.2.4
3
* Homepage: http://bqworks.com/slider-pro/
4
* Author: bqworks
5
* Author URL: http://bqworks.com/
9
.slider-pro {
10
position: relative;
11
margin: 0 auto;
12
+ -moz-box-sizing: content-box;
13
+ box-sizing: content-box;
14
}
15
16
.sp-slides-container {
746
--------------------------------------------------*/
747
.slider-pro img.sp-image,
748
.slider-pro img.sp-thumbnail {
749
+ max-width: none;
750
+ max-height: none;
751
border: none !important;
752
border-radius: 0 !important;
753
padding: 0 !important;
778
}
779
780
.slider-pro p.sp-layer {
781
+ font-size: 14px;
782
line-height: 1.4;
783
margin: 0;
784
}
821
822
.slider-pro img.sp-layer {
823
border: none;
824
}
get-uris-pro.php CHANGED
@@ -20,7 +20,6 @@
20
</div>
21
22
</div>
23
-
24
</div>
25
<div class="plan-name" style="padding-top:40px; text-align: center;display:block;width:100%;overflow:hidden">
26
20
</div>
21
22
</div>
23
</div>
24
<div class="plan-name" style="padding-top:40px; text-align: center;display:block;width:100%;overflow:hidden">
25
help_and_support.php CHANGED
@@ -6,7 +6,7 @@
6
<hr>
7
<div class="purchase_btn_div" style="margin-top:20px; margin-left:30px;">
8
<h2 style="font-weight: bold;font-size: 24px;padding-top: 30px;">View Support Docs or Open a Ticket</h2>
9
- <a style= "margin-right:10px; margin-left:40px; margin-top:30px; text-decoration:none;" href="https://wordpress.org/support/plugin/ultimate-responsive-image-slider" target="_new" class="btn btn-primary btn-lg"><?php _e('View Support Docs or Open a Ticket','')?></a>
10
</div>
11
<hr>
12
@@ -49,16 +49,14 @@
49
<hr>
50
<div style="margin-top:30px;margin-left:30px;">
51
<h2 style="font-weight: bold;font-size: 28px;padding-top:10px;">Language Contribution </h2>
52
- <h6 style="font-size: 18px;padding-top: 20px;padding-bottom: 10px;line-height:30px;margin-left:30px;">Translate this plugin into your language <br> Question : How to convert Plguin into My Language ? <br> Answer : Contact as to lizarweb@gmail.com for translate this plugin into your language.</h6>
53
-
54
</div>
55
<hr>
56
<div style="margin-top:30px;margin-left:30px;">
57
- <h2 style="font-weight: bold;font-size: 28px;padding-top:10px;">Change Old Server Image URL</h2>
58
<form action="" method="post">
59
- <input type="submit" value="Change image URL" name= "urispchangeurl" style= "margin-top:10px; margin-right:10px; margin-left:30px; background:#31B0D5; text-decoration:none;" class="btn btn-primary btn-lg">
60
-
61
- <h6 style="font-size: 22px;padding-top: 10px;padding-bottom: 10px;line-height:40px"><b>Note:</b> Use this option after import <b>Ultimate Responsive Image Slider Settings</b> to change old server image url to new server image url.</h6>
62
</form>
63
</div>
64
</div>
6
<hr>
7
<div class="purchase_btn_div" style="margin-top:20px; margin-left:30px;">
8
<h2 style="font-weight: bold;font-size: 24px;padding-top: 30px;">View Support Docs or Open a Ticket</h2>
9
+ <a style= "margin-right:10px; margin-left:40px; margin-top:30px; text-decoration:none;" href="https://wordpress.org/support/plugin/ultimate-responsive-image-slider" target="_new" class="btn btn-primary btn-lg">View Support Docs or Open a Ticket</a>
10
</div>
11
<hr>
12
49
<hr>
50
<div style="margin-top:30px;margin-left:30px;">
51
<h2 style="font-weight: bold;font-size: 28px;padding-top:10px;">Language Contribution </h2>
52
+ <h6 style="font-size: 18px;padding-top: 20px;padding-bottom: 10px;line-height:30px; margin-left:30px;">Translate this plugin into your language <br> <strong>Question :</strong> How to convert Plguin into My Language ? <br> <strong>Answer :</strong> Contact as to lizarweb@gmail.com for translate this plugin into your language. We will guide you in better manner.</h6>
53
</div>
54
<hr>
55
<div style="margin-top:30px;margin-left:30px;">
56
+ <h2 style="font-weight: bold;font-size: 28px;padding-top:10px;">Change Old Server URLs</h2>
57
<form action="" method="post">
58
+ <input type="submit" value="Change All URLs" name= "urispchangeurl" style= "margin-top:10px; margin-right:10px; margin-left:30px; background:#31B0D5; text-decoration:none;" class="btn btn-primary btn-lg">
59
+ <h6 style="font-size: 22px;padding-top: 10px;padding-bottom: 10px;line-height:40px"><b>Note:</b> Use this option after successfully imported <b>Ultimate Responsive Image Slider</b> Plugin and Uploads directory from old server to new server.</h6>
60
</form>
61
</div>
62
</div>
img/Thumbs.db ADDED
Binary file
img/desc-bg-color.jpg ADDED
Binary file
img/desc-color.jpg ADDED
Binary file
img/navigation-color.jpg ADDED
Binary file
img/slide-distance.jpg ADDED
Binary file
img/title-bg-color.jpg ADDED
Binary file
img/title-color.jpg ADDED
Binary file
js/jquery.sliderPro.js CHANGED
@@ -1,2167 +1,5927 @@
1
/*!
2
- * - v1.1.0
3
- * Homepage: http://bqworks.com/slider-pro/
4
- * Author: bqworks
5
- * Author URL: http://bqworks.com/
6
- */
7
- ! function(a, b) {
8
- "use strict";
9
- b.SliderPro = {
10
- modules: [],
11
- addModule: function(a, c) {
12
- this.modules.push(a), b.extend(d.prototype, c)
13
- }
14
- };
15
- var c = b.SliderPro.namespace = "SliderPro",
16
- d = function(a, c) {
17
- this.instance = a, this.$slider = b(this.instance), this.$slides = null, this.$slidesMask = null, this.$slidesContainer = null, this.slides = [], this.slidesOrder = [], this.options = c, this.settings = {}, this.originalSettings = {}, this.originalGotoSlide = null, this.selectedSlideIndex = 0, this.previousSlideIndex = 0, this.middleSlidePosition = 0, this.supportedAnimation = null, this.vendorPrefix = null, this.transitionEvent = null, this.positionProperty = null, this.isIE = null, this.slidesPosition = 0, this.slideWidth = 0, this.slideHeight = 0, this.slideSize = 0, this.previousSlideWidth = 0, this.previousSlideHeight = 0, this.previousWindowWidth = 0, this.previousWindowHeight = 0, this.visibleOffset = 0, this.allowResize = !0, this.uniqueId = (new Date).valueOf(), this.breakpoints = [], this.currentBreakpoint = -1, this.shuffledIndexes = [], this._init()
18
- };
19
- d.prototype = {
20
- _init: function() {
21
- var d = this;
22
- this.supportedAnimation = f.getSupportedAnimation(), this.vendorPrefix = f.getVendorPrefix(), this.transitionEvent = f.getTransitionEvent(), this.isIE = f.checkIE(), this.$slider.removeClass("sp-no-js"), a.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) && this.$slider.addClass("ios");
23
- var e = /(msie) ([\w.]+)/,
24
- g = e.exec(a.navigator.userAgent.toLowerCase());
25
- this.isIE && this.$slider.addClass("ie"), null !== g && this.$slider.addClass("ie" + parseInt(g[2], 10)), this.$slidesContainer = b('<div class="sp-slides-container"></div>').appendTo(this.$slider), this.$slidesMask = b('<div class="sp-mask"></div>').appendTo(this.$slidesContainer), this.$slides = this.$slider.find(".sp-slides").appendTo(this.$slidesMask), this.$slider.find(".sp-slide").appendTo(this.$slides);
26
- var h = b.SliderPro.modules;
27
- if ("undefined" != typeof h)
28
- for (var i = 0; i < h.length; i++) {
29
- var j = h[i].substring(0, 1).toLowerCase() + h[i].substring(1) + "Defaults";
30
- "undefined" != typeof this[j] && b.extend(this.defaults, this[j])
31
- }
32
- if (this.settings = b.extend({}, this.defaults, this.options), "undefined" != typeof h)
33
- for (var k = 0; k < h.length; k++) "undefined" != typeof this["init" + h[k]] && this["init" + h[k]]();
34
- if (this.originalSettings = b.extend({}, this.settings), this.originalGotoSlide = this.gotoSlide, null !== this.settings.breakpoints) {
35
- for (var l in this.settings.breakpoints) this.breakpoints.push({
36
- size: parseInt(l, 10),
37
- properties: this.settings.breakpoints[l]
38
- });
39
- this.breakpoints = this.breakpoints.sort(function(a, b) {
40
- return a.size >= b.size ? 1 : -1
41
- })
42
- }
43
- if (this.selectedSlideIndex = this.settings.startSlide, this.settings.shuffle === !0) {
44
- var m = this.$slides.find(".sp-slide"),
45
- n = [];
46
- m.each(function(a) {
47
- d.shuffledIndexes.push(a)
48
- });
49
- for (var o = this.shuffledIndexes.length - 1; o > 0; o--) {
50
- var p = Math.floor(Math.random() * (o + 1)),
51
- q = this.shuffledIndexes[o];
52
- this.shuffledIndexes[o] = this.shuffledIndexes[p], this.shuffledIndexes[p] = q
53
- }
54
- b.each(this.shuffledIndexes, function(a, b) {
55
- n.push(m[b])
56
- }), this.$slides.empty().append(n)
57
- }
58
- b(a).on("resize." + this.uniqueId + "." + c, function() {
59
- var c = b(a).width(),
60
- e = b(a).height();
61
- d.allowResize === !1 || d.previousWindowWidth === c && d.previousWindowHeight === e || (d.previousWindowWidth = c, d.previousWindowHeight = e, d.allowResize = !1, setTimeout(function() {
62
- d.resize(), d.allowResize = !0
63
- }, 200))
64
- }), this.on("update." + c, function() {
65
- d.previousSlideWidth = 0, d.resize()
66
- }), this.update(), this.trigger({
67
- type: "init"
68
- }), b.isFunction(this.settings.init) && this.settings.init.call(this, {
69
- type: "init"
70
- })
71
- },
72
- update: function() {
73
- var a = this;
74
- "horizontal" === this.settings.orientation ? (this.$slider.removeClass("sp-vertical").addClass("sp-horizontal"), this.$slider.css({
75
- height: "",
76
- "max-height": ""
77
- }), this.$slides.find(".sp-slide").css("top", "")) : "vertical" === this.settings.orientation && (this.$slider.removeClass("sp-horizontal").addClass("sp-vertical"), this.$slides.find(".sp-slide").css("left", "")), this.positionProperty = "horizontal" === this.settings.orientation ? "left" : "top", this.gotoSlide = this.originalGotoSlide;
78
- for (var c = this.slides.length - 1; c >= 0; c--)
79
- if (0 === this.$slider.find('.sp-slide[data-index="' + c + '"]').length) {
80
- var d = this.slides[c];
81
- d.destroy(), this.slides.splice(c, 1)
82
- }
83
- this.slidesOrder.length = 0, this.$slider.find(".sp-slide").each(function(c) {
84
- var d = b(this);
85
- "undefined" == typeof d.attr("data-init") ? a._createSlide(c, d) : a.slides[c].setIndex(c), a.slidesOrder.push(c)
86
- }), this.middleSlidePosition = parseInt((a.slidesOrder.length - 1) / 2, 10), this.settings.loop === !0 && this._updateSlidesOrder(), this.trigger({
87
- type: "update"
88
- }), b.isFunction(this.settings.update) && this.settings.update.call(this, {
89
- type: "update"
90
- })
91
- },
92
- _createSlide: function(a, c) {
93
- var d = new e(b(c), a, this.settings);
94
- this.slides.splice(a, 0, d)
95
- },
96
- _updateSlidesOrder: function() {
97
- var a, c, d = b.inArray(this.selectedSlideIndex, this.slidesOrder) - this.middleSlidePosition;
98
- if (0 > d)
99
- for (a = this.slidesOrder.splice(d, Math.abs(d)), c = a.length - 1; c >= 0; c--) this.slidesOrder.unshift(a[c]);
100
- else if (d > 0)
101
- for (a = this.slidesOrder.splice(0, d), c = 0; c <= a.length - 1; c++) this.slidesOrder.push(a[c])
102
- },
103
- _updateSlidesPosition: function() {
104
- for (var a = parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty), 10), b = 0; b < this.slidesOrder.length; b++) {
105
- var c = this.$slides.find(".sp-slide").eq(this.slidesOrder[b]);
106
- c.css(this.positionProperty, a + (b - this.middleSlidePosition) * (this.slideSize + this.settings.slideDistance))
107
- }
108
- },
109
- _resetSlidesPosition: function() {
110
- for (var a = 0; a < this.slidesOrder.length; a++) {
111
- var b = this.$slides.find(".sp-slide").eq(this.slidesOrder[a]);
112
- b.css(this.positionProperty, a * (this.slideSize + this.settings.slideDistance))
113
- }
114
- var c = -parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty), 10) + this.visibleOffset;
115
- this._moveTo(c, !0)
116
- },
117
- resize: function() {
118
- var c = this;
119
- if (null !== this.settings.breakpoints && this.breakpoints.length > 0)
120
- if (b(a).width() > this.breakpoints[this.breakpoints.length - 1].size && -1 !== this.currentBreakpoint) this.currentBreakpoint = -1, this._setProperties(this.originalSettings, !1);
121
- else
122
- for (var d = 0, e = this.breakpoints.length; e > d; d++)
123
- if (b(a).width() <= this.breakpoints[d].size) {
124
- if (this.currentBreakpoint !== this.breakpoints[d].size) {
125
- var f = {
126
- type: "breakpointReach",
127
- size: this.breakpoints[d].size,
128
- settings: this.breakpoints[d].properties
129
- };
130
- this.trigger(f), b.isFunction(this.settings.breakpointReach) && this.settings.breakpointReach.call(this, f), this.currentBreakpoint = this.breakpoints[d].size;
131
- var g = b.extend({}, this.originalSettings, this.breakpoints[d].properties);
132
- return void this._setProperties(g, !1)
133
- }
134
- break
135
- }
136
- this.settings.responsive === !0 ? "fullWidth" !== this.settings.forceSize && "fullWindow" !== this.settings.forceSize || "auto" !== this.settings.visibleSize && ("auto" === this.settings.visibleSize || "vertical" !== this.settings.orientation) ? this.$slider.css({
137
- width: "100%",
138
- "max-width": this.settings.width,
139
- marginLeft: ""
140
- }) : (this.$slider.css("margin", 0), this.$slider.css({
141
- width: b(a).width(),
142
- "max-width": "",
143
- marginLeft: -this.$slider.offset().left
144
- })) : this.$slider.css({
145
- width: this.settings.width
146
- }), -1 === this.settings.aspectRatio && (this.settings.aspectRatio = this.settings.width / this.settings.height), this.slideWidth = this.$slider.width(), this.slideHeight = "fullWindow" === this.settings.forceSize ? b(a).height() : isNaN(this.settings.aspectRatio) ? this.settings.height : this.slideWidth / this.settings.aspectRatio, (this.previousSlideWidth !== this.slideWidth || this.previousSlideHeight !== this.slideHeight || "auto" !== this.settings.visibleSize || this.$slider.outerWidth() > this.$slider.parent().width() || this.$slider.width() !== this.$slidesMask.width()) && (this.previousSlideWidth = this.slideWidth, this.previousSlideHeight = this.slideHeight, this.slideSize = "horizontal" === this.settings.orientation ? this.slideWidth : this.slideHeight, this.visibleSlidesSize = this.slideSize, this.visibleOffset = 0, b.each(this.slides, function(a, b) {
147
- b.setSize(c.slideWidth, c.slideHeight)
148
- }), this.$slidesMask.css({
149
- width: this.slideWidth,
150
- height: this.slideHeight
151
- }), this.settings.autoHeight === !0 ? setTimeout(function() {
152
- c._resizeHeight()
153
- }, 1) : this.$slidesMask.css(this.vendorPrefix + "transition", ""), "auto" !== this.settings.visibleSize && ("horizontal" === this.settings.orientation ? ("fullWidth" === this.settings.forceSize || "fullWindow" === this.settings.forceSize ? (this.$slider.css("margin", 0), this.$slider.css({
154
- width: b(a).width(),
155
- "max-width": "",
156
- marginLeft: -this.$slider.offset().left
157
- })) : this.$slider.css({
158
- width: this.settings.visibleSize,
159
- "max-width": "100%",
160
- marginLeft: 0
161
- }), this.$slidesMask.css("width", this.$slider.width()), this.visibleSlidesSize = this.$slidesMask.width(), this.visibleOffset = Math.round((this.$slider.width() - this.slideWidth) / 2)) : (this.$slider.css("fullWindow" === this.settings.forceSize ? {
162
- height: b(a).height(),
163
- "max-height": ""
164
- } : {
165
- height: this.settings.visibleSize,
166
- "max-height": "100%"
167
- }), this.$slidesMask.css("height", this.$slider.height()), this.visibleSlidesSize = this.$slidesMask.height(), this.visibleOffset = Math.round((this.$slider.height() - this.slideHeight) / 2))), this._resetSlidesPosition(), this.trigger({
168
- type: "sliderResize"
169
- }), b.isFunction(this.settings.sliderResize) && this.settings.sliderResize.call(this, {
170
- type: "sliderResize"
171
- }))
172
- },
173
- _resizeHeight: function() {
174
- var a = this,
175
- b = this.getSlideAt(this.selectedSlideIndex),
176
- d = b.getSize();
177
- b.off("imagesLoaded." + c), b.on("imagesLoaded." + c, function(c) {
178
- if (c.index === a.selectedSlideIndex) {
179
- var d = b.getSize();
180
- a._resizeHeightTo(d.height)
181
- }
182
- }), "loading" !== d && this._resizeHeightTo(d.height)
183
- },
184
- gotoSlide: function(a) {
185
- if (a !== this.selectedSlideIndex && "undefined" != typeof this.slides[a]) {
186
- var c = this;
187
- this.previousSlideIndex = this.selectedSlideIndex, this.selectedSlideIndex = a, this.$slides.find(".sp-selected").removeClass("sp-selected"), this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).addClass("sp-selected"), this.settings.loop === !0 && (this._updateSlidesOrder(), this._updateSlidesPosition()), this.settings.autoHeight === !0 && this._resizeHeight();
188
- var d = -parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty), 10) + this.visibleOffset;
189
- this._moveTo(d, !1, function() {
190
- c.settings.loop === !0 && c._resetSlidesPosition(), c.trigger({
191
- type: "gotoSlideComplete",
192
- index: a,
193
- previousIndex: c.previousSlideIndex
194
- }), b.isFunction(c.settings.gotoSlideComplete) && c.settings.gotoSlideComplete.call(c, {
195
- type: "gotoSlideComplete",
196
- index: a,
197
- previousIndex: c.previousSlideIndex
198
- })
199
- }), this.trigger({
200
- type: "gotoSlide",
201
- index: a,
202
- previousIndex: this.previousSlideIndex
203
- }), b.isFunction(this.settings.gotoSlide) && this.settings.gotoSlide.call(this, {
204
- type: "gotoSlide",
205
- index: a,
206
- previousIndex: this.previousSlideIndex
207
- })
208
- }
209
- },
210
- nextSlide: function() {
211
- var a = this.selectedSlideIndex >= this.getTotalSlides() - 1 ? 0 : this.selectedSlideIndex + 1;
212
- this.gotoSlide(a)
213
- },
214
- previousSlide: function() {
215
- var a = this.selectedSlideIndex <= 0 ? this.getTotalSlides() - 1 : this.selectedSlideIndex - 1;
216
- this.gotoSlide(a)
217
- },
218
- _moveTo: function(a, b, c) {
219
- var d = this,
220
- e = {};
221
- if (a !== this.slidesPosition)
222
- if (this.slidesPosition = a, "css-3d" !== this.supportedAnimation && "css-2d" !== this.supportedAnimation || this.isIE !== !1) e["margin-" + this.positionProperty] = a, "undefined" != typeof b && b === !0 ? this.$slides.css(e) : (this.$slides.addClass("sp-animated"), this.$slides.animate(e, this.settings.slideAnimationDuration, function() {
223
- d.$slides.removeClass("sp-animated"), "function" == typeof c && c()
224
- }));
225
- else {
226
- var f, g = "horizontal" === this.settings.orientation ? a : 0,
227
- h = "horizontal" === this.settings.orientation ? 0 : a;
228
- e[this.vendorPrefix + "transform"] = "css-3d" === this.supportedAnimation ? "translate3d(" + g + "px, " + h + "px, 0)" : "translate(" + g + "px, " + h + "px)", "undefined" != typeof b && b === !0 ? f = "" : (this.$slides.addClass("sp-animated"), f = this.vendorPrefix + "transform " + this.settings.slideAnimationDuration / 1e3 + "s", this.$slides.on(this.transitionEvent, function(a) {
229
- a.target === a.currentTarget && (d.$slides.off(d.transitionEvent), d.$slides.removeClass("sp-animated"), "function" == typeof c && c())
230
- })), e[this.vendorPrefix + "transition"] = f, this.$slides.css(e)
231
- }
232
- },
233
- _stopMovement: function() {
234
- var a = {};
235
- if ("css-3d" !== this.supportedAnimation && "css-2d" !== this.supportedAnimation || this.isIE !== !1) this.$slides.stop(), this.slidesPosition = parseInt(this.$slides.css("margin-" + this.positionProperty), 10);
236
- else {
237
- var b = this.$slides.css(this.vendorPrefix + "transform"),
238
- c = -1 !== b.indexOf("matrix3d") ? "matrix3d" : "matrix",
239
- d = b.replace(c, "").match(/-?[0-9\.]+/g),
240
- e = "matrix3d" === c ? parseInt(d[12], 10) : parseInt(d[4], 10),
241
- f = "matrix3d" === c ? parseInt(d[13], 10) : parseInt(d[5], 10);
242
- a[this.vendorPrefix + "transform"] = "css-3d" === this.supportedAnimation ? "translate3d(" + e + "px, " + f + "px, 0)" : "translate(" + e + "px, " + f + "px)", a[this.vendorPrefix + "transition"] = "", this.$slides.css(a), this.$slides.off(this.transitionEvent), this.slidesPosition = "horizontal" === this.settings.orientation ? e : f
243
- }
244
- this.$slides.removeClass("sp-animated")
245
- },
246
- _resizeHeightTo: function(a) {
247
- var b = {
248
- height: a
249
- };
250
- "css-3d" === this.supportedAnimation || "css-2d" === this.supportedAnimation ? (b[this.vendorPrefix + "transition"] = "height " + this.settings.heightAnimationDuration / 1e3 + "s", this.$slidesMask.css(b)) : this.$slidesMask.animate(b, this.settings.heightAnimationDuration)
251
- },
252
- destroy: function() {
253
- this.$slider.removeData("sliderPro"), this.$slider.removeAttr("style"), this.$slides.removeAttr("style"), this.off("update." + c), b(a).off("resize." + this.uniqueId + "." + c);
254
- var d = b.SliderPro.modules;
255
- if ("undefined" != typeof d)
256
- for (var e = 0; e < d.length; e++) "undefined" != typeof this["destroy" + d[e]] && this["destroy" + d[e]]();
257
- b.each(this.slides, function(a, b) {
258
- b.destroy()
259
- }), this.slides.length = 0, this.$slides.prependTo(this.$slider), this.$slidesContainer.remove()
260
- },
261
- _setProperties: function(a, b) {
262
- for (var c in a) this.settings[c] = a[c], b !== !1 && (this.originalSettings[c] = a[c]);
263
- this.update()
264
- },
265
- on: function(a, b) {
266
- return this.$slider.on(a, b)
267
- },
268
- off: function(a) {
269
- return this.$slider.off(a)
270
- },
271
- trigger: function(a) {
272
- return this.$slider.triggerHandler(a)
273
- },
274
- getSlideAt: function(a) {
275
- return this.slides[a]
276
- },
277
- getSelectedSlide: function() {
278
- return this.selectedSlideIndex
279
- },
280
- getTotalSlides: function() {
281
- return this.slides.length
282
- },
283
- defaults: {
284
- width: 500,
285
- height: 300,
286
- responsive: !0,
287
- aspectRatio: -1,
288
- imageScaleMode: "cover",
289
- centerImage: !0,
290
- autoHeight: !1,
291
- startSlide: 0,
292
- shuffle: !1,
293
- orientation: "horizontal",
294
- forceSize: "none",
295
- loop: !0,
296
- slideDistance: 10,
297
- slideAnimationDuration: 700,
298
- heightAnimationDuration: 700,
299
- visibleSize: "auto",
300
- breakpoints: null,
301
- init: function() {},
302
- update: function() {},
303
- sliderResize: function() {},
304
- gotoSlide: function() {},
305
- gotoSlideComplete: function() {},
306
- breakpointReach: function() {}
307
- }
308
- };
309
- var e = function(a, b, c) {
310
- this.$slide = a, this.$mainImage = null, this.$imageContainer = null, this.hasMainImage = !1, this.isMainImageLoaded = !1, this.isMainImageLoading = !1, this.hasImages = !1, this.areImagesLoaded = !1, this.width = 0, this.height = 0, this.settings = c, this.setIndex(b), this._init()
311
- };
312
- e.prototype = {
313
- _init: function() {
314
- this.$slide.attr("data-init", !0), this.$mainImage = 0 !== this.$slide.find(".sp-image").length ? this.$slide.find(".sp-image") : null, null !== this.$mainImage && (this.hasMainImage = !0, this.$imageContainer = b('<div class="sp-image-container"></div>').prependTo(this.$slide), 0 !== this.$mainImage.parent("a").length ? this.$mainImage.parent("a").appendTo(this.$imageContainer) : this.$mainImage.appendTo(this.$imageContainer)), this.hasImages = 0 !== this.$slide.find("img").length ? !0 : !1
315
- },
316
- setSize: function(a, b) {
317
- this.width = a, this.height = this.settings.autoHeight === !0 ? "auto" : b, this.$slide.css({
318
- width: this.width,
319
- height: this.height
320
- }), this.hasMainImage === !0 && (this.$imageContainer.css({
321
- width: this.width,
322
- height: this.height
323
- }), "undefined" == typeof this.$mainImage.attr("data-src") && this.resizeMainImage())
324
- },
325
- getSize: function() {
326
- var a, b = this;
327
- if (this.hasImages === !0 && this.areImagesLoaded === !1 && "undefined" == typeof this.$slide.attr("data-loading")) {
328
- this.$slide.attr("data-loading", !0);
329
- var d = f.checkImagesComplete(this.$slide, function() {
330
- b.areImagesLoaded = !0, b.$slide.removeAttr("data-loading"), b.trigger({
331
- type: "imagesLoaded." + c,
332
- index: b.index
333
- })
334
- });
335
- return "complete" === d ? (a = this.calculateSize(), {
336
- width: a.width,
337
- height: a.height
338
- }) : "loading"
339
- }
340
- return a = this.calculateSize(), {
341
- width: a.width,
342
- height: a.height
343
- }
344
- },
345
- calculateSize: function() {
346
- var a = this.$slide.width(),
347
- c = this.$slide.height();
348
- return this.$slide.children().each(function(d, e) {
349
- var f = b(e);
350
- if (f.is(":hidden") !== !0) {
351
- var g = e.getBoundingClientRect(),
352
- h = f.position().top + (g.bottom - g.top),
353
- i = f.position().left + (g.right - g.left);
354
- h > c && (c = h), i > a && (a = i)
355
- }
356
- }), {
357
- width: a,
358
- height: c
359
- }
360
- },
361
- resizeMainImage: function(a) {
362
- var b = this;
363
- return a === !0 && (this.isMainImageLoaded = !1, this.isMainImageLoading = !1), this.isMainImageLoaded === !1 && this.isMainImageLoading === !1 ? (this.isMainImageLoading = !0, void f.checkImagesComplete(this.$mainImage, function() {
364
- b.isMainImageLoaded = !0, b.isMainImageLoading = !1, b.resizeMainImage(), b.trigger({
365
- type: "imagesLoaded." + c,
366
- index: b.index
367
- })
368
- })) : void(this.settings.autoHeight === !0 ? this.$mainImage.css({
369
- width: "100%",
370
- height: "auto",
371
- marginLeft: "",
372
- marginTop: ""
373
- }) : ("cover" === this.settings.imageScaleMode ? this.$mainImage.css(this.$mainImage.width() / this.$mainImage.height() <= this.width / this.height ? {
374
- width: "100%",
375
- height: "auto"
376
- } : {
377
- width: "auto",
378
- height: "100%"
379
- }) : "contain" === this.settings.imageScaleMode ? this.$mainImage.css(this.$mainImage.width() / this.$mainImage.height() >= this.width / this.height ? {
380
- width: "100%",
381
- height: "auto"
382
- } : {
383
- width: "auto",
384
- height: "100%"
385
- }) : "exact" === this.settings.imageScaleMode && this.$mainImage.css({
386
- width: "100%",
387
- height: "100%"
388
- }), this.settings.centerImage === !0 && this.$mainImage.css({
389
- marginLeft: .5 * (this.$imageContainer.width() - this.$mainImage.width()),
390
- marginTop: .5 * (this.$imageContainer.height() - this.$mainImage.height())
391
- })))
392
- },
393
- destroy: function() {
394
- this.$slide.removeAttr("style"), this.$slide.removeAttr("data-init"), this.$slide.removeAttr("data-index"), this.$slide.removeAttr("data-loaded"), this.hasMainImage === !0 && (this.$slide.find(".sp-image").removeAttr("style").appendTo(this.$slide), this.$slide.find(".sp-image-container").remove())
395
- },
396
- getIndex: function() {
397
- return this.index
398
- },
399
- setIndex: function(a) {
400
- this.index = a, this.$slide.attr("data-index", this.index)
401
- },
402
- on: function(a, b) {
403
- return this.$slide.on(a, b)
404
- },
405
- off: function(a) {
406
- return this.$slide.off(a)
407
- },
408
- trigger: function(a) {
409
- return this.$slide.triggerHandler(a)
410
- }
411
- }, a.SliderPro = d, a.SliderProSlide = e, b.fn.sliderPro = function(a) {
412
- var c = Array.prototype.slice.call(arguments, 1);
413
- return this.each(function() {
414
- if ("undefined" == typeof b(this).data("sliderPro")) {
415
- var e = new d(this, a);
416
- b(this).data("sliderPro", e)
417
- } else if ("undefined" != typeof a) {
418
- var f = b(this).data("sliderPro");
419
- if ("function" == typeof f[a]) f[a].apply(f, c);
420
- else if ("undefined" != typeof f.settings[a]) {
421
- var g = {};
422
- g[a] = c[0], f._setProperties(g)
423
- } else "object" == typeof a ? f._setProperties(a) : b.error(a + " does not exist in sliderPro.")
424
- }
425
- })
426
- };
427
- var f = {
428
- supportedAnimation: null,
429
- vendorPrefix: null,
430
- transitionEvent: null,
431
- isIE: null,
432
- getSupportedAnimation: function() {
433
- if (null !== this.supportedAnimation) return this.supportedAnimation;
434
- var a = document.body || document.documentElement,
435
- b = a.style,
436
- c = "undefined" != typeof b.transition || "undefined" != typeof b.WebkitTransition || "undefined" != typeof b.MozTransition || "undefined" != typeof b.OTransition;
437
- if (c === !0) {
438
- var d = document.createElement("div");
439
- if (("undefined" != typeof d.style.WebkitPerspective || "undefined" != typeof d.style.perspective) && (this.supportedAnimation = "css-3d"), "css-3d" === this.supportedAnimation && "undefined" != typeof d.styleWebkitPerspective) {
440
- var e = document.createElement("style");
441
- e.textContent = "@media (transform-3d),(-webkit-transform-3d){#test-3d{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0;}}", document.getElementsByTagName("head")[0].appendChild(e), d.id = "test-3d", document.body.appendChild(d), (9 !== d.offsetLeft || 5 !== d.offsetHeight) && (this.supportedAnimation = null), e.parentNode.removeChild(e), d.parentNode.removeChild(d)
442
- }
443
- null !== this.supportedAnimation || "undefined" == typeof d.style["-webkit-transform"] && "undefined" == typeof d.style.transform || (this.supportedAnimation = "css-2d")
444
- } else this.supportedAnimation = "javascript";
445
- return this.supportedAnimation
446
- },
447
- getVendorPrefix: function() {
448
- if (null !== this.vendorPrefix) return this.vendorPrefix;
449
- var a = document.createElement("div"),
450
- b = ["Webkit", "Moz", "ms", "O"];
451
- if ("transform" in a.style) return this.vendorPrefix = "", this.vendorPrefix;
452
- for (var c = 0; c < b.length; c++)
453
- if (b[c] + "Transform" in a.style) {
454
- this.vendorPrefix = "-" + b[c].toLowerCase() + "-";
455
- break
456
- }
457
- return this.vendorPrefix
458
- },
459
- getTransitionEvent: function() {
460
- if (null !== this.transitionEvent) return this.transitionEvent;
461
- var a = document.createElement("div"),
462
- b = {
463
- transition: "transitionend",
464
- WebkitTransition: "webkitTransitionEnd",
465
- MozTransition: "transitionend",
466
- OTransition: "oTransitionEnd"
467
- };
468
- for (var c in b)
469
- if (c in a.style) {
470
- this.transitionEvent = b[c];
471
- break
472
- }
473
- return this.transitionEvent
474
- },
475
- checkImagesComplete: function(a, b) {
476
- var c = this,
477
- d = this.checkImagesStatus(a);
478
- if ("loading" === d) var e = setInterval(function() {
479
- d = c.checkImagesStatus(a), "complete" === d && (clearInterval(e), "function" == typeof b && b())
480
- }, 100);
481
- else "function" == typeof b && b();
482
- return d
483
- },
484
- checkImagesStatus: function(a) {
485
- var c = "complete";
486
- return a.is("img") && a[0].complete === !1 ? c = "loading" : a.find("img").each(function() {
487
- var a = b(this)[0];
488
- a.complete === !1 && (c = "loading")
489
- }), c
490
- },
491
- checkIE: function() {
492
- if (null !== this.isIE) return this.isIE; {
493
- var b = a.navigator.userAgent;
494
- b.indexOf("MSIE")
495
- }
496
- return this.isIE = -1 !== b.indexOf("MSIE") || b.match(/Trident.*rv\:11\./) ? !0 : !1, this.isIE
497
- }
498
- };
499
- a.SliderProUtils = f
500
- }(window, jQuery),
501
- function(a, b) {
502
- "use strict";
503
- var c = "Thumbnails." + b.SliderPro.namespace,
504
- d = {
505
- $thumbnails: null,
506
- $thumbnailsContainer: null,
507
- thumbnails: null,
508
- selectedThumbnailIndex: 0,
509
- thumbnailsSize: 0,
510
- thumbnailsContainerSize: 0,
511
- thumbnailsPosition: 0,
512
- thumbnailsOrientation: null,
513
- thumbnailsPositionProperty: null,
514
- isThumbnailScroller: !1,
515
- initThumbnails: function() {
516
- var a = this;
517
- this.thumbnails = [], this.on("update." + c, b.proxy(this._thumbnailsOnUpdate, this)), this.on("sliderResize." + c, b.proxy(this._thumbnailsOnResize, this)), this.on("gotoSlide." + c, function(b) {
518
- a._gotoThumbnail(b.index)
519
- })
520
- },
521
- _thumbnailsOnUpdate: function() {
522
- var a = this;
523
- if (0 === this.$slider.find(".sp-thumbnail").length && 0 === this.thumbnails.length) return void(this.isThumbnailScroller = !1);
524
- if (this.isThumbnailScroller = !0, null === this.$thumbnailsContainer && (this.$thumbnailsContainer = b('<div class="sp-thumbnails-container"></div>').insertAfter(this.$slidesContainer)), null === this.$thumbnails)
525
- if (0 !== this.$slider.find(".sp-thumbnails").length) {
526
- if (this.$thumbnails = this.$slider.find(".sp-thumbnails").appendTo(this.$thumbnailsContainer), this.settings.shuffle === !0) {
527
- var c = this.$thumbnails.find(".sp-thumbnail"),
528
- d = [];
529
- b.each(this.shuffledIndexes, function(a, e) {
530
- var f = b(c[e]);
531
- 0 !== f.parent("a").length && (f = f.parent("a")), d.push(f)
532
- }), this.$thumbnails.empty().append(d)
533
- }
534
- } else this.$thumbnails = b('<div class="sp-thumbnails"></div>').appendTo(this.$thumbnailsContainer);
535
- this.$slides.find(".sp-thumbnail").each(function() {
536
- var c = b(this),
537
- d = c.parents(".sp-slide").index(),
538
- e = a.$thumbnails.find(".sp-thumbnail").length - 1;
539
- d > e ? c.appendTo(a.$thumbnails) : c.insertBefore(a.$thumbnails.find(".sp-thumbnail").eq(d))
540
- });
541
- for (var e = this.thumbnails.length - 1; e >= 0; e--)
542
- if (0 === this.$thumbnails.find('.sp-thumbnail[data-index="' + e + '"]').length) {
543
- var f = this.thumbnails[e];
544
- f.destroy(), this.thumbnails.splice(e, 1)
545
- }
546
- this.$thumbnails.find(".sp-thumbnail").each(function(c) {
547
- var d = b(this);
548
- "undefined" == typeof d.attr("data-init") ? a._createThumbnail(d, c) : a.thumbnails[c].setIndex(c)
549
- }), this.$thumbnailsContainer.removeClass("sp-top-thumbnails sp-bottom-thumbnails sp-left-thumbnails sp-right-thumbnails"), "top" === this.settings.thumbnailsPosition ? (this.$thumbnailsContainer.addClass("sp-top-thumbnails"), this.thumbnailsOrientation = "horizontal") : "bottom" === this.settings.thumbnailsPosition ? (this.$thumbnailsContainer.addClass("sp-bottom-thumbnails"), this.thumbnailsOrientation = "horizontal") : "left" === this.settings.thumbnailsPosition ? (this.$thumbnailsContainer.addClass("sp-left-thumbnails"), this.thumbnailsOrientation = "vertical") : "right" === this.settings.thumbnailsPosition && (this.$thumbnailsContainer.addClass("sp-right-thumbnails"), this.thumbnailsOrientation = "vertical"), this.settings.thumbnailPointer === !0 ? this.$thumbnailsContainer.addClass("sp-has-pointer") : this.$thumbnailsContainer.removeClass("sp-has-pointer"), this.selectedThumbnailIndex = this.selectedSlideIndex, this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedThumbnailIndex).addClass("sp-selected-thumbnail"), this.thumbnailsSize = 0, b.each(this.thumbnails, function(b, c) {
550
- c.setSize(a.settings.thumbnailWidth, a.settings.thumbnailHeight), a.thumbnailsSize += "horizontal" === a.thumbnailsOrientation ? c.getSize().width : c.getSize().height
551
- }), "horizontal" === this.thumbnailsOrientation ? (this.$thumbnails.css({
552
- width: this.thumbnailsSize,
553
- height: this.settings.thumbnailHeight
554
- }), this.$thumbnailsContainer.css("height", ""), this.thumbnailsPositionProperty = "left") : (this.$thumbnails.css({
555
- width: this.settings.thumbnailWidth,
556
- height: this.thumbnailsSize
557
- }), this.$thumbnailsContainer.css("width", ""), this.thumbnailsPositionProperty = "top"), this.trigger({
558
- type: "thumbnailsUpdate"
559
- }), b.isFunction(this.settings.thumbnailsUpdate) && this.settings.thumbnailsUpdate.call(this, {
560
- type: "thumbnailsUpdate"
561
- })
562
- },
563
- _createThumbnail: function(a, b) {
564
- var d = this,
565
- f = new e(a, this.$thumbnails, b);
566
- f.on("thumbnailClick." + c, function(a) {
567
- d.gotoSlide(a.index)
568
- }), this.thumbnails.splice(b, 0, f)
569
- },
570
- _thumbnailsOnResize: function() {
571
- if (this.isThumbnailScroller !== !1) {
572
- var c, d = this;
573
- "horizontal" === this.thumbnailsOrientation ? (this.thumbnailsContainerSize = Math.min(this.$slidesMask.width(), this.thumbnailsSize), this.$thumbnailsContainer.css("width", this.thumbnailsContainerSize), "fullWindow" === this.settings.forceSize && (this.$slidesMask.css("height", this.$slidesMask.height() - this.$thumbnailsContainer.outerHeight(!0)), this.slideHeight = this.$slidesMask.height(), b.each(this.slides, function(a, b) {
574
- b.setSize(d.slideWidth, d.slideHeight)
575
- }))) : "vertical" === this.thumbnailsOrientation && (this.$slidesMask.width() + this.$thumbnailsContainer.outerWidth(!0) > this.$slider.parent().width() && ("fullWidth" === this.settings.forceSize || "fullWindow" === this.settings.forceSize ? this.$slider.css("max-width", b(a).width() - this.$thumbnailsContainer.outerWidth(!0)) : this.$slider.css("max-width", this.$slider.parent().width() - this.$thumbnailsContainer.outerWidth(!0)), this.$slidesMask.css("width", this.$slider.width()), "horizontal" === this.settings.orientation ? (this.visibleOffset = Math.round((this.$slider.width() - this.slideSize) / 2), this.visibleSlidesSize = this.$slidesMask.width()) : "vertical" === this.settings.orientation && (this.slideWidth = this.$slider.width(), b.each(this.slides, function(a, b) {
576
- b.setSize(d.slideWidth, d.slideHeight)
577
- })), this._resetSlidesPosition()), this.thumbnailsContainerSize = Math.min(this.$slidesMask.height(), this.thumbnailsSize), this.$thumbnailsContainer.css("height", this.thumbnailsContainerSize)), c = this.thumbnailsSize <= this.thumbnailsContainerSize || 0 === this.$thumbnails.find(".sp-selected-thumbnail").length ? 0 : Math.max(-this.thumbnails[this.selectedThumbnailIndex].getPosition()[this.thumbnailsPositionProperty], this.thumbnailsContainerSize - this.thumbnailsSize), "top" === this.settings.thumbnailsPosition ? this.$slider.css({
578
- paddingTop: this.$thumbnailsContainer.outerHeight(!0),
579
- paddingLeft: "",
580
- paddingRight: ""
581
- }) : "bottom" === this.settings.thumbnailsPosition ? this.$slider.css({
582
- paddingTop: "",
583
- paddingLeft: "",
584
- paddingRight: ""
585
- }) : "left" === this.settings.thumbnailsPosition ? this.$slider.css({
586
- paddingTop: "",
587
- paddingLeft: this.$thumbnailsContainer.outerWidth(!0),
588
- paddingRight: ""
589
- }) : "right" === this.settings.thumbnailsPosition && this.$slider.css({
590
- paddingTop: "",
591
- paddingLeft: "",
592
- paddingRight: this.$thumbnailsContainer.outerWidth(!0)
593
- }), this._moveThumbnailsTo(c, !0)
594
- }
595
- },
596
- _gotoThumbnail: function(a) {
597
- if (this.isThumbnailScroller !== !1 && "undefined" != typeof this.thumbnails[a]) {
598
- var c = this.selectedThumbnailIndex,
599
- d = this.thumbnailsPosition;
600
- if (this.selectedThumbnailIndex = a, this.$thumbnails.find(".sp-selected-thumbnail").removeClass("sp-selected-thumbnail"), this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedThumbnailIndex).addClass("sp-selected-thumbnail"), this.selectedThumbnailIndex >= c) {
601
- var e = this.selectedThumbnailIndex === this.thumbnails.length - 1 ? this.selectedThumbnailIndex : this.selectedThumbnailIndex + 1,
602
- f = this.thumbnails[e],
603
- g = "horizontal" === this.thumbnailsOrientation ? f.getPosition().right : f.getPosition().bottom,
604
- h = -this.thumbnailsPosition + this.thumbnailsContainerSize;
605
- g > h && (d = this.thumbnailsPosition - (g - h))
606
- } else if (this.selectedThumbnailIndex < c) {
607
- var i = 0 === this.selectedThumbnailIndex ? this.selectedThumbnailIndex : this.selectedThumbnailIndex - 1,
608
- j = this.thumbnails[i],
609
- k = "horizontal" === this.thumbnailsOrientation ? j.getPosition().left : j.getPosition().top;
610
- k < -this.thumbnailsPosition && (d = -k)
611
- }
612
- this._moveThumbnailsTo(d), this.trigger({
613
- type: "gotoThumbnail"
614
- }), b.isFunction(this.settings.gotoThumbnail) && this.settings.gotoThumbnail.call(this, {
615
- type: "gotoThumbnail"
616
- })
617
- }
618
- },
619
- _moveThumbnailsTo: function(a, c, d) {
620
- var e = this,
621
- f = {};
622
- if (a !== this.thumbnailsPosition)
623
- if (this.thumbnailsPosition = a, "css-3d" === this.supportedAnimation || "css-2d" === this.supportedAnimation) {
624
- var g, h = "horizontal" === this.thumbnailsOrientation ? a : 0,
625
- i = "horizontal" === this.thumbnailsOrientation ? 0 : a;
626
- f[this.vendorPrefix + "transform"] = "css-3d" === this.supportedAnimation ? "translate3d(" + h + "px, " + i + "px, 0)" : "translate(" + h + "px, " + i + "px)", "undefined" != typeof c && c === !0 ? g = "" : (this.$thumbnails.addClass("sp-animated"), g = this.vendorPrefix + "transform 0.7s", this.$thumbnails.on(this.transitionEvent, function(a) {
627
- a.target === a.currentTarget && (e.$thumbnails.off(e.transitionEvent), e.$thumbnails.removeClass("sp-animated"), "function" == typeof d && d(), e.trigger({
628
- type: "thumbnailsMoveComplete"
629
- }), b.isFunction(e.settings.thumbnailsMoveComplete) && e.settings.thumbnailsMoveComplete.call(e, {
630
- type: "thumbnailsMoveComplete"
631
- }))
632
- })), f[this.vendorPrefix + "transition"] = g, this.$thumbnails.css(f)
633
- } else f["margin-" + this.thumbnailsPositionProperty] = a, "undefined" != typeof c && c === !0 ? this.$thumbnails.css(f) : this.$thumbnails.addClass("sp-animated").animate(f, 700, function() {
634
- e.$thumbnails.removeClass("sp-animated"), "function" == typeof d && d(), e.trigger({
635
- type: "thumbnailsMoveComplete"
636
- }), b.isFunction(e.settings.thumbnailsMoveComplete) && e.settings.thumbnailsMoveComplete.call(e, {
637
- type: "thumbnailsMoveComplete"
638
- })
639
- })
640
- },
641
- _stopThumbnailsMovement: function() {
642
- var a = {};
643
- if ("css-3d" === this.supportedAnimation || "css-2d" === this.supportedAnimation) {
644
- var b = this.$thumbnails.css(this.vendorPrefix + "transform"),
645
- c = -1 !== b.indexOf("matrix3d") ? "matrix3d" : "matrix",
646
- d = b.replace(c, "").match(/-?[0-9\.]+/g),
647
- e = "matrix3d" === c ? parseInt(d[12], 10) : parseInt(d[4], 10),
648
- f = "matrix3d" === c ? parseInt(d[13], 10) : parseInt(d[5], 10);
649
- a[this.vendorPrefix + "transform"] = "css-3d" === this.supportedAnimation ? "translate3d(" + e + "px, " + f + "px, 0)" : "translate(" + e + "px, " + f + "px)", a[this.vendorPrefix + "transition"] = "", this.$thumbnails.css(a), this.$thumbnails.off(this.transitionEvent), this.thumbnailsPosition = "horizontal" === this.thumbnailsOrientation ? parseInt(d[4], 10) : parseInt(d[5], 10)
650
- } else this.$thumbnails.stop(), this.thumbnailsPosition = parseInt(this.$thumbnails.css("margin-" + this.thumbnailsPositionProperty), 10);
651
- this.$thumbnails.removeClass("sp-animated")
652
- },
653
- destroyThumbnails: function() {
654
- var d = this;
655
- this.off("update." + c), this.isThumbnailScroller !== !1 && (this.off("sliderResize." + c), this.off("gotoSlide." + c), b(a).off("resize." + this.uniqueId + "." + c), this.$thumbnails.find(".sp-thumbnail").each(function() {
656
- var a = b(this),
657
- e = parseInt(a.attr("data-index"), 10),
658
- f = d.thumbnails[e];
659
- f.off("thumbnailClick." + c), f.destroy()
660
- }), this.thumbnails.length = 0, this.$thumbnails.appendTo(this.$slider), this.$thumbnailsContainer.remove(), this.$slider.css({
661
- paddingTop: "",
662
- paddingLeft: "",
663
- paddingRight: ""
664
- }))
665
- },
666
- thumbnailsDefaults: {
667
- thumbnailWidth: 100,
668
- thumbnailHeight: 80,
669
- thumbnailsPosition: "bottom",
670
- thumbnailPointer: !1,
671
- thumbnailsUpdate: function() {},
672
- gotoThumbnail: function() {},
673
- thumbnailsMoveComplete: function() {}
674
- }
675
- },
676
- e = function(a, b, c) {
677
- this.$thumbnail = a, this.$thumbnails = b, this.$thumbnailContainer = null, this.width = 0, this.height = 0, this.isImageLoaded = !1, this.setIndex(c), this._init()
678
- };
679
- e.prototype = {
680
- _init: function() {
681
- var a = this;
682
- this.$thumbnail.attr("data-init", !0), this.$thumbnailContainer = b('<div class="sp-thumbnail-container"></div>').appendTo(this.$thumbnails), 0 !== this.$thumbnail.parent("a").length ? this.$thumbnail.parent("a").appendTo(this.$thumbnailContainer) : this.$thumbnail.appendTo(this.$thumbnailContainer), this.$thumbnailContainer.on("click." + c, function() {
683
- a.trigger({
684
- type: "thumbnailClick." + c,
685
- index: a.index
686
- })
687
- })
688
- },
689
- setSize: function(a, b) {
690
- this.width = a, this.height = b, this.$thumbnailContainer.css({
691
- width: this.width,
692
- height: this.height
693
- }), this.$thumbnail.is("img") && "undefined" == typeof this.$thumbnail.attr("data-src") && this.resizeImage()
694
- },
695
- getSize: function() {
696
- return {
697
- width: this.$thumbnailContainer.outerWidth(!0),
698
- height: this.$thumbnailContainer.outerHeight(!0)
699
- }
700
- },
701
- getPosition: function() {
702
- return {
703
- left: this.$thumbnailContainer.position().left + parseInt(this.$thumbnailContainer.css("marginLeft"), 10),
704
- right: this.$thumbnailContainer.position().left + parseInt(this.$thumbnailContainer.css("marginLeft"), 10) + this.$thumbnailContainer.outerWidth(),
705
- top: this.$thumbnailContainer.position().top + parseInt(this.$thumbnailContainer.css("marginTop"), 10),
706
- bottom: this.$thumbnailContainer.position().top + parseInt(this.$thumbnailContainer.css("marginTop"), 10) + this.$thumbnailContainer.outerHeight()
707
- }
708
- },
709
- setIndex: function(a) {
710
- this.index = a, this.$thumbnail.attr("data-index", this.index)
711
- },
712
- resizeImage: function() {
713
- var a = this;
714
- if (this.isImageLoaded === !1) return void SliderProUtils.checkImagesComplete(this.$thumbnailContainer, function() {
715
- a.isImageLoaded = !0, a.resizeImage()
716
- });
717
- this.$thumbnail = this.$thumbnailContainer.find(".sp-thumbnail");
718
- var b = this.$thumbnail.width(),
719
- c = this.$thumbnail.height();
720
- this.$thumbnail.css(b / c <= this.width / this.height ? {
721
- width: "100%",
722
- height: "auto"
723
- } : {
724
- width: "auto",
725
- height: "100%"
726
- }), this.$thumbnail.css({
727
- marginLeft: .5 * (this.$thumbnailContainer.width() - this.$thumbnail.width()),
728
- marginTop: .5 * (this.$thumbnailContainer.height() - this.$thumbnail.height())
729
- })
730
- },
731
- destroy: function() {
732
- this.$thumbnailContainer.off("click." + c), this.$thumbnail.removeAttr("data-init"), this.$thumbnail.removeAttr("data-index"), 0 !== this.$thumbnail.parent("a").length ? this.$thumbnail.parent("a").insertBefore(this.$thumbnailContainer) : this.$thumbnail.insertBefore(this.$thumbnailContainer), this.$thumbnailContainer.remove()
733
- },
734
- on: function(a, b) {
735
- return this.$thumbnailContainer.on(a, b)
736
- },
737
- off: function(a) {
738
- return this.$thumbnailContainer.off(a)
739
- },
740
- trigger: function(a) {
741
- return this.$thumbnailContainer.triggerHandler(a)
742
- }
743
- }, b.SliderPro.addModule("Thumbnails", d)
744
- }(window, jQuery),
745
- function(a, b) {
746
- "use strict";
747
- var c = "ConditionalImages." + b.SliderPro.namespace,
748
- d = {
749
- previousImageSize: null,
750
- currentImageSize: null,
751
- isRetinaScreen: !1,
752
- initConditionalImages: function() {
753
- this.currentImageSize = this.previousImageSize = "default", this.isRetinaScreen = "undefined" != typeof this._isRetina && this._isRetina() === !0, this.on("update." + c, b.proxy(this._conditionalImagesOnUpdate, this)), this.on("sliderResize." + c, b.proxy(this._conditionalImagesOnResize, this))
754
- },
755
- _conditionalImagesOnUpdate: function() {
756
- b.each(this.slides, function(a, c) {
757
- var d = c.$slide;
758
- d.find("img:not([ data-default ])").each(function() {
759
- var a = b(this);
760
- "undefined" != typeof a.attr("data-src") ? a.attr("data-default", a.attr("data-src")) : a.attr("data-default", a.attr("src"))
761
- })
762
- })
763
- },
764
- _conditionalImagesOnResize: function() {
765
- if (this.currentImageSize = this.slideWidth <= this.settings.smallSize ? "small" : this.slideWidth <= this.settings.mediumSize ? "medium" : this.slideWidth <= this.settings.largeSize ? "large" : "default", this.previousImageSize !== this.currentImageSize) {
766
- var a = this;
767
- b.each(this.slides, function(c, d) {
768
- var e = d.$slide;
769
- e.find("img").each(function() {
770
- var c = b(this),
771
- e = "";
772
- a.isRetinaScreen === !0 && "undefined" != typeof c.attr("data-retina" + a.currentImageSize) ? (e = c.attr("data-retina" + a.currentImageSize), "undefined" != typeof c.attr("data-retina") && c.attr("data-retina") !== e && c.attr("data-retina", e)) : (a.isRetinaScreen === !1 || a.isRetinaScreen === !0 && "undefined" == typeof c.attr("data-retina")) && "undefined" != typeof c.attr("data-" + a.currentImageSize) && (e = c.attr("data-" + a.currentImageSize), "undefined" != typeof c.attr("data-src") && c.attr("data-src") !== e && c.attr("data-src", e)), "" !== e && "undefined" == typeof c.attr("data-src") && c.attr("src") !== e && a._loadConditionalImage(c, e, function(a) {
773
- a.hasClass("sp-image") && (d.$mainImage = a, d.resizeMainImage(!0))
774
- })
775
- })
776
- }), this.previousImageSize = this.currentImageSize
777
- }
778
- },
779
- _loadConditionalImage: function(a, c, d) {
780
- var e = b(new Image);
781
- e.attr("class", a.attr("class")), e.attr("style", a.attr("style")), b.each(a.data(), function(a, b) {
782
- e.attr("data-" + a, b)
783
- }), "undefined" != typeof a.attr("width") && e.attr("width", a.attr("width")), "undefined" != typeof a.attr("height") && e.attr("height", a.attr("height")), "undefined" != typeof a.attr("alt") && e.attr("alt", a.attr("alt")), "undefined" != typeof a.attr("title") && e.attr("title", a.attr("title")), e.attr("src", c), e.insertAfter(a), a.remove(), a = null, "function" == typeof d && d(e)
784
- },
785
- destroyConditionalImages: function() {
786
- this.off("update." + c), this.off("sliderResize." + c)
787
- },
788
- conditionalImagesDefaults: {
789
- smallSize: 480,
790
- mediumSize: 768,
791
- largeSize: 1024
792
- }
793
- };
794
- b.SliderPro.addModule("ConditionalImages", d)
795
- }(window, jQuery),
796
- function(a, b) {
797
- "use strict";
798
- var c = "Retina." + b.SliderPro.namespace,
799
- d = {
800
- initRetina: function() {
801
- this._isRetina() !== !1 && (this.on("update." + c, b.proxy(this._checkRetinaImages, this)), 0 !== this.$slider.find(".sp-thumbnail").length && this.on("update.Thumbnails." + c, b.proxy(this._checkRetinaThumbnailImages, this)))
802
- },
803
- _isRetina: function() {
804
- return a.devicePixelRatio >= 2 ? !0 : a.matchMedia && a.matchMedia("(-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx)").matches ? !0 : !1
805
- },
806
- _checkRetinaImages: function() {
807
- var a = this;
808
- b.each(this.slides, function(c, d) {
809
- var e = d.$slide;
810
- "undefined" == typeof e.attr("data-retina-loaded") && (e.attr("data-retina-loaded", !0), e.find("img[data-retina]").each(function() {
811
- var c = b(this);
812
- "undefined" != typeof c.attr("data-src") ? c.attr("data-src", c.attr("data-retina")) : a._loadRetinaImage(c, function(a) {
813
- a.hasClass("sp-image") && (d.$mainImage = a, d.resizeMainImage(!0))
814
- })
815
- }))
816
- })
817
- },
818
- _checkRetinaThumbnailImages: function() {
819
- var a = this;
820
- b.each(this.thumbnails, function(c, d) {
821
- var e = d.$thumbnailContainer;
822
- "undefined" == typeof e.attr("data-retina-loaded") && (e.attr("data-retina-loaded", !0), e.find("img[data-retina]").each(function() {
823
- var c = b(this);
824
- "undefined" != typeof c.attr("data-src") ? c.attr("data-src", c.attr("data-retina")) : a._loadRetinaImage(c, function(a) {
825
- a.hasClass("sp-thumbnail") && d.resizeImage()
826
- })
827
- }))
828
- })
829
- },
830
- _loadRetinaImage: function(a, c) {
831
- var d = !1,
832
- e = "";
833
- if ("undefined" != typeof a.attr("data-retina") && (d = !0, e = a.attr("data-retina")), "undefined" != typeof a.attr("data-src") && (d === !1 && (e = a.attr("data-src")), a.removeAttr("data-src")), "" !== e) {
834
- var f = b(new Image);
835
- f.attr("class", a.attr("class")), f.attr("style", a.attr("style")), b.each(a.data(), function(a, b) {
836
- f.attr("data-" + a, b)
837
- }), "undefined" != typeof a.attr("width") && f.attr("width", a.attr("width")), "undefined" != typeof a.attr("height") && f.attr("height", a.attr("height")), "undefined" != typeof a.attr("alt") && f.attr("alt", a.attr("alt")), "undefined" != typeof a.attr("title") && f.attr("title", a.attr("title")), f.insertAfter(a), a.remove(), a = null, f.attr("src", e), "function" == typeof c && c(f)
838
- }
839
- },
840
- destroyRetina: function() {
841
- this.off("update." + c), this.off("update.Thumbnails." + c)
842
- }
843
- };
844
- b.SliderPro.addModule("Retina", d)
845
- }(window, jQuery),
846
- function(a, b) {
847
- "use strict";
848
- var c = "LazyLoading." + b.SliderPro.namespace,
849
- d = {
850
- allowLazyLoadingCheck: !0,
851
- initLazyLoading: function() {
852
- this.on("sliderResize." + c, b.proxy(this._lazyLoadingOnResize, this)), this.on("gotoSlide." + c, b.proxy(this._checkAndLoadVisibleImages, this)), this.on("thumbnailsUpdate." + c + " thumbnailsMoveComplete." + c, b.proxy(this._checkAndLoadVisibleThumbnailImages, this))
853
- },
854
- _lazyLoadingOnResize: function() {
855
- var a = this;
856
- this.allowLazyLoadingCheck !== !1 && (this.allowLazyLoadingCheck = !1, this._checkAndLoadVisibleImages(), 0 !== this.$slider.find(".sp-thumbnail").length && this._checkAndLoadVisibleThumbnailImages(), setTimeout(function() {
857
- a.allowLazyLoadingCheck = !0
858
- }, 500))
859
- },
860
- _checkAndLoadVisibleImages: function() {
861
- if (0 !== this.$slider.find(".sp-slide:not([ data-loaded ])").length) {
862
- var a = this,
863
- c = this.settings.loop === !0 ? this.middleSlidePosition : this.selectedSlideIndex,
864
- d = Math.ceil((this.visibleSlidesSize - this.slideSize) / 2 / this.slideSize),
865
- e = c - d - 1 > 0 ? c - d - 1 : 0,
866
- f = c + d + 1 < this.getTotalSlides() - 1 ? c + d + 1 : this.getTotalSlides() - 1,
867
- g = this.slidesOrder.slice(e, f + 1);
868
- b.each(g, function(c, d) {
869
- var e = a.slides[d],
870
- f = e.$slide;
871
- "undefined" == typeof f.attr("data-loaded") && (f.attr("data-loaded", !0), f.find("img[ data-src ]").each(function() {
872
- var c = b(this);
873
- a._loadImage(c, function(a) {
874
- a.hasClass("sp-image") && (e.$mainImage = a, e.resizeMainImage(!0))
875
- })
876
- }))
877
- })
878
- }
879
- },
880
- _checkAndLoadVisibleThumbnailImages: function() {
881
- if (0 !== this.$slider.find(".sp-thumbnail-container:not([ data-loaded ])").length) {
882
- var a = this,
883
- c = this.thumbnailsSize / this.thumbnails.length,
884
- d = Math.floor(Math.abs(this.thumbnailsPosition / c)),
885
- e = Math.floor((-this.thumbnailsPosition + this.thumbnailsContainerSize) / c),
886
- f = this.thumbnails.slice(d, e + 1);
887
- b.each(f, function(c, d) {
888
- var e = d.$thumbnailContainer;
889
- "undefined" == typeof e.attr("data-loaded") && (e.attr("data-loaded", !0), e.find("img[ data-src ]").each(function() {
890
- var c = b(this);
891
- a._loadImage(c, function() {
892
- d.resizeImage()
893
- })
894
- }))
895
- })
896
- }
897
- },
898
- _loadImage: function(a, c) {
899
- var d = b(new Image);
900
- d.attr("class", a.attr("class")), d.attr("style", a.attr("style")), b.each(a.data(), function(a, b) {
901
- d.attr("data-" + a, b)
902
- }), "undefined" != typeof a.attr("width") && d.attr("width", a.attr("width")), "undefined" != typeof a.attr("height") && d.attr("height", a.attr("height")), "undefined" != typeof a.attr("alt") && d.attr("alt", a.attr("alt")), "undefined" != typeof a.attr("title") && d.attr("title", a.attr("title")), d.attr("src", a.attr("data-src")), d.removeAttr("data-src"), d.insertAfter(a), a.remove(), a = null, "function" == typeof c && c(d)
903
- },
904
- destroyLazyLoading: function() {
905
- this.off("update." + c), this.off("gotoSlide." + c), this.off("sliderResize." + c), this.off("thumbnailsUpdate." + c), this.off("thumbnailsMoveComplete." + c)
906
- }
907
- };
908
- b.SliderPro.addModule("LazyLoading", d)
909
- }(window, jQuery),
910
- function(a, b) {
911
- "use strict";
912
- var c = "Layers." + b.SliderPro.namespace,
913
- d = {
914
- layersGotoSlideReference: null,
915
- waitForLayersTimer: null,
916
- initLayers: function() {
917
- this.on("update." + c, b.proxy(this._layersOnUpdate, this)), this.on("sliderResize." + c, b.proxy(this._layersOnResize, this)), this.on("gotoSlide." + c, b.proxy(this._layersOnGotoSlide, this))
918
- },
919
- _layersOnUpdate: function() {
920
- var a = this;
921
- b.each(this.slides, function(a, c) {
922
- c.$slide;
923
- this.$slide.find(".sp-layer:not([ data-init ])").each(function() {
924
- var a = new f(b(this));
925
- "undefined" == typeof c.layers && (c.layers = []), c.layers.push(a), b(this).hasClass("sp-static") === !1 && ("undefined" == typeof c.animatedLayers && (c.animatedLayers = []), c.animatedLayers.push(a))
926
- })
927
- }), this.settings.waitForLayers === !0 && (clearTimeout(this.waitForLayersTimer), this.waitForLayersTimer = setTimeout(function() {
928
- a.layersGotoSlideReference = a.gotoSlide, a.gotoSlide = a._layersGotoSlide
929
- }, 1))
930
- },
931
- _layersOnResize: function() {
932
- var a, c, d = this,
933
- e = this.settings.autoScaleLayers;
934
- return this.settings.autoScaleLayers === !1 ? void this.showLayers(this.selectedSlideIndex) : (-1 === this.settings.autoScaleReference ? "string" == typeof this.settings.width && -1 !== this.settings.width.indexOf("%") ? e = !1 : a = parseInt(this.settings.width, 10) : a = this.settings.autoScaleReference, c = e === !0 && this.slideWidth < a ? d.slideWidth / a : 1, b.each(this.slides, function(a, d) {
935
- "undefined" != typeof d.layers && b.each(d.layers, function(a, b) {
936
- b.scale(c)
937
- })
938
- }), void this.showLayers(this.selectedSlideIndex))
939
- },
940
- _layersGotoSlide: function(a) {
941
- var b = this,
942
- d = this.slides[this.selectedSlideIndex].animatedLayers;
943
- this.$slider.hasClass("sp-swiping") || "undefined" == typeof d || 0 === d.length ? this.layersGotoSlideReference(a) : (this.on("hideLayersComplete." + c, function() {
944
- b.off("hideLayersComplete." + c), b.layersGotoSlideReference(a)
945
- }), this.hideLayers(this.selectedSlideIndex))
946
- },
947
- _layersOnGotoSlide: function() {
948
- this.previousSlideIndex !== this.selectedSlideIndex && this.hideLayers(this.previousSlideIndex), this.showLayers(this.selectedSlideIndex)
949
- },
950
- showLayers: function(a) {
951
- var c = this,
952
- d = this.slides[a].animatedLayers,
953
- e = 0;
954
- "undefined" != typeof d && b.each(d, function(a, f) {
955
- f.isVisible() === !0 ? (e++, e === d.length && (c.trigger({
956
- type: "showLayersComplete",
957
- index: a
958
- }), b.isFunction(c.settings.showLayersComplete) && c.settings.showLayersComplete.call(c, {
959
- type: "showLayersComplete",
960
- index: a
961
- }))) : f.show(function() {
962
- e++, e === d.length && (c.trigger({
963
- type: "showLayersComplete",
964
- index: a
965
- }), b.isFunction(c.settings.showLayersComplete) && c.settings.showLayersComplete.call(c, {
966
- type: "showLayersComplete",
967
- index: a
968
- }))
969
- })
970
- })
971
- },
972
- hideLayers: function(a) {
973
- var c = this,
974
- d = this.slides[a].animatedLayers,
975
- e = 0;
976
- "undefined" != typeof d && b.each(d, function(a, f) {
977
- f.isVisible() === !1 ? (e++, e === d.length && (c.trigger({
978
- type: "hideLayersComplete",
979
- index: a
980
- }), b.isFunction(c.settings.hideLayersComplete) && c.settings.hideLayersComplete.call(c, {
981
- type: "hideLayersComplete",
982
- index: a
983
- }))) : f.hide(function() {
984
- e++, e === d.length && (c.trigger({
985
- type: "hideLayersComplete",
986
- index: a
987
- }), b.isFunction(c.settings.hideLayersComplete) && c.settings.hideLayersComplete.call(c, {
988
- type: "hideLayersComplete",
989
- index: a
990
- }))
991
- })
992
- })
993
- },
994
- destroyLayers: function() {
995
- this.off("update." + c), this.off("resize." + c), this.off("gotoSlide." + c), this.off("hideLayersComplete." + c)
996
- },
997
- layersDefaults: {
998
- waitForLayers: !1,
999
- autoScaleLayers: !0,
1000
- autoScaleReference: -1,
1001
- showLayersComplete: function() {},
1002
- hideLayersComplete: function() {}
1003
- }
1004
- },
1005
- e = a.SliderProSlide.prototype.destroy;
1006
- a.SliderProSlide.prototype.destroy = function() {
1007
- "undefined" != typeof this.layers && (b.each(this.layers, function(a, b) {
1008
- b.destroy()
1009
- }), this.layers.length = 0), "undefined" != typeof this.animatedLayers && (this.animatedLayers.length = 0), e.apply(this)
1010
- };
1011
- var f = function(a) {
1012
- this.$layer = a, this.visible = !1, this.styled = !1, this.data = null, this.position = null, this.horizontalProperty = null, this.verticalProperty = null, this.horizontalPosition = null, this.verticalPosition = null, this.scaleRatio = 1, this.supportedAnimation = SliderProUtils.getSupportedAnimation(), this.vendorPrefix = SliderProUtils.getVendorPrefix(), this.transitionEvent = SliderProUtils.getTransitionEvent(), this.stayTimer = null, this._init()
1013
- };
1014
- f.prototype = {
1015
- _init: function() {
1016
- this.$layer.attr("data-init", !0), this.$layer.hasClass("sp-static") ? this._setStyle() : this.$layer.css({
1017
- visibility: "hidden",
1018
- display: "none"
1019
- })
1020
- },
1021
- _setStyle: function() {
1022
- this.styled = !0, this.$layer.css("display", ""), this.data = this.$layer.data(), "undefined" != typeof this.data.width && this.$layer.css("width", this.data.width), "undefined" != typeof this.data.height && this.$layer.css("height", this.data.height), "undefined" != typeof this.data.depth && this.$layer.css("z-index", this.data.depth), this.position = this.data.position ? this.data.position.toLowerCase() : "topleft", this.horizontalProperty = -1 !== this.position.indexOf("right") ? "right" : -1 !== this.position.indexOf("left") ? "left" : "center", this.verticalProperty = -1 !== this.position.indexOf("bottom") ? "bottom" : -1 !== this.position.indexOf("top") ? "top" : "center", this._setPosition(), this.scale(this.scaleRatio)
1023
- },
1024
- _setPosition: function() {
1025
- var a = this.$layer.attr("style");
1026
- this.horizontalPosition = "undefined" != typeof this.data.horizontal ? this.data.horizontal : 0, this.verticalPosition = "undefined" != typeof this.data.vertical ? this.data.vertical : 0, "center" === this.horizontalProperty ? (("undefined" == typeof a || "undefined" != typeof a && -1 === a.indexOf("width")) && (this.$layer.css("white-space", ""), this.$layer.css("width", this.$layer.outerWidth(!0))), this.$layer.css({
1027
- marginLeft: "auto",
1028
- marginRight: "auto",
1029
- left: this.horizontalPosition,
1030
- right: 0
1031
- })) : this.$layer.css(this.horizontalProperty, this.horizontalPosition), "center" === this.verticalProperty ? (("undefined" == typeof a || "undefined" != typeof a && -1 === a.indexOf("height")) && (this.$layer.css("white-space", ""), this.$layer.css("height", this.$layer.outerHeight(!0))), this.$layer.css({
1032
- marginTop: "auto",
1033
- marginBottom: "auto",
1034
- top: this.verticalPosition,
1035
- bottom: 0
1036
- })) : this.$layer.css(this.verticalProperty, this.verticalPosition)
1037
- },
1038
- scale: function(a) {
1039
- if (!this.$layer.hasClass("sp-no-scale") && (this.scaleRatio = a, this.styled !== !1)) {
1040
- var b = "center" === this.horizontalProperty ? "left" : this.horizontalProperty,
1041
- c = "center" === this.verticalProperty ? "top" : this.verticalProperty,
1042
- d = {};
1043
- d[this.vendorPrefix + "transform-origin"] = this.horizontalProperty + " " + this.verticalProperty, d[this.vendorPrefix + "transform"] = "scale(" + this.scaleRatio + ")", "string" != typeof this.horizontalPosition && (d[b] = this.horizontalPosition * this.scaleRatio), "string" != typeof this.verticalPosition && (d[c] = this.verticalPosition * this.scaleRatio), "string" == typeof this.data.width && -1 !== this.data.width.indexOf("%") && (d.width = (parseInt(this.data.width, 10) / this.scaleRatio).toString() + "%"), "string" == typeof this.data.height && -1 !== this.data.height.indexOf("%") && (d.height = (parseInt(this.data.height, 10) / this.scaleRatio).toString() + "%"), this.$layer.css(d)
1044
- }
1045
- },
1046
- show: function(a) {
1047
- if (this.visible !== !0) {
1048
- this.visible = !0, this.styled === !1 && this._setStyle();
1049
- var b = this,
1050
- c = "undefined" != typeof this.data.showOffset ? this.data.showOffset : 50,
1051
- d = "undefined" != typeof this.data.showDuration ? this.data.showDuration / 1e3 : .4,
1052
- e = "undefined" != typeof this.data.showDelay ? this.data.showDelay : 10,
1053
- f = "undefined" != typeof b.data.stayDuration ? parseInt(b.data.stayDuration, 10) : -1;
1054
- if ("javascript" === this.supportedAnimation) this.$layer.stop().delay(e).css({
1055
- opacity: 0,
1056
- visibility: "visible"
1057
- }).animate({
1058
- opacity: 1
1059
- }, 1e3 * d, function() {
1060
- -1 !== f && (b.stayTimer = setTimeout(function() {
1061
- b.hide(), b.stayTimer = null
1062
- }, f)), "undefined" != typeof a && a()
1063
- });
1064
- else {
1065
- var g = {
1066
- opacity: 0,
1067
- visibility: "visible"
1068
- },
1069
- h = {
1070
- opacity: 1
1071
- },
1072
- i = "";
1073
- g[this.vendorPrefix + "transform"] = "scale(" + this.scaleRatio + ")", h[this.vendorPrefix + "transform"] = "scale(" + this.scaleRatio + ")", h[this.vendorPrefix + "transition"] = "opacity " + d + "s", "undefined" != typeof this.data.showTransition && ("left" === this.data.showTransition ? i = c + "px, 0" : "right" === this.data.showTransition ? i = "-" + c + "px, 0" : "up" === this.data.showTransition ? i = "0, " + c + "px" : "down" === this.data.showTransition && (i = "0, -" + c + "px"), g[this.vendorPrefix + "transform"] += "css-3d" === this.supportedAnimation ? " translate3d(" + i + ", 0)" : " translate(" + i + ")", h[this.vendorPrefix + "transform"] += "css-3d" === this.supportedAnimation ? " translate3d(0, 0, 0)" : " translate(0, 0)", h[this.vendorPrefix + "transition"] += ", " + this.vendorPrefix + "transform " + d + "s"), this.$layer.on(this.transitionEvent, function(c) {
1074
- c.target === c.currentTarget && (b.$layer.off(b.transitionEvent).css(b.vendorPrefix + "transition", ""), -1 !== f && (b.stayTimer = setTimeout(function() {
1075
- b.hide(), b.stayTimer = null
1076
- }, f)), "undefined" != typeof a && a())
1077
- }), this.$layer.css(g), setTimeout(function() {
1078
- b.$layer.css(h)
1079
- }, e)
1080
- }
1081
- }
1082
- },
1083
- hide: function(a) {
1084
- if (this.visible !== !1) {
1085
- var c = this,
1086
- d = "undefined" != typeof this.data.hideOffset ? this.data.hideOffset : 50,
1087
- e = "undefined" != typeof this.data.hideDuration ? this.data.hideDuration / 1e3 : .4,
1088
- f = "undefined" != typeof this.data.hideDelay ? this.data.hideDelay : 10;
1089
- if (this.visible = !1, null !== this.stayTimer && clearTimeout(this.stayTimer), "javascript" === this.supportedAnimation) this.$layer.stop().delay(f).animate({
1090
- opacity: 0
1091
- }, 1e3 * e, function() {
1092
- b(this).css("visibility", "hidden"), "undefined" != typeof a && a()
1093
- });
1094
- else {
1095
- var g = "",
1096
- h = {
1097
- opacity: 0
1098
- };
1099
- h[this.vendorPrefix + "transform"] = "scale(" + this.scaleRatio + ")", h[this.vendorPrefix + "transition"] = "opacity " + e + "s", "undefined" != typeof this.data.hideTransition && ("left" === this.data.hideTransition ? g = "-" + d + "px, 0" : "right" === this.data.hideTransition ? g = d + "px, 0" : "up" === this.data.hideTransition ? g = "0, -" + d + "px" : "down" === this.data.hideTransition && (g = "0, " + d + "px"), h[this.vendorPrefix + "transform"] += "css-3d" === this.supportedAnimation ? " translate3d(" + g + ", 0)" : " translate(" + g + ")", h[this.vendorPrefix + "transition"] += ", " + this.vendorPrefix + "transform " + e + "s"), this.$layer.on(this.transitionEvent, function(b) {
1100
- b.target === b.currentTarget && (c.$layer.off(c.transitionEvent).css(c.vendorPrefix + "transition", ""), c.visible === !1 && c.$layer.css("visibility", "hidden"), "undefined" != typeof a && a())
1101
- }), setTimeout(function() {
1102
- c.$layer.css(h)
1103
- }, f)
1104
- }
1105
- }
1106
- },
1107
- isVisible: function() {
1108
- return this.visible === !1 || this.$layer.is(":hidden") ? !1 : !0
1109
- },
1110
- destroy: function() {
1111
- this.$layer.removeAttr("style"), this.$layer.removeAttr("data-init")
1112
- }
1113
- }, b.SliderPro.addModule("Layers", d)
1114
- }(window, jQuery),
1115
- function(a, b) {
1116
- "use strict";
1117
- var c = "Fade." + b.SliderPro.namespace,
1118
- d = {
1119
- fadeGotoSlideReference: null,
1120
- initFade: function() {
1121
- this.on("update." + c, b.proxy(this._fadeOnUpdate, this))
1122
- },
1123
- _fadeOnUpdate: function() {
1124
- this.settings.fade === !0 && (this.fadeGotoSlideReference = this.gotoSlide, this.gotoSlide = this._fadeGotoSlide)
1125
- },
1126
- _fadeGotoSlide: function(a) {
1127
- if (a !== this.selectedSlideIndex)
1128
- if (this.$slider.hasClass("sp-swiping")) this.fadeGotoSlideReference(a);
1129
- else {
1130
- var c, d, e = this,
1131
- f = a;
1132
- b.each(this.slides, function(a, b) {
1133
- var g = b.getIndex(),
1134
- h = b.$slide;
1135
- g === f ? (h.css({
1136
- opacity: 0,
1137
- left: 0,
1138
- top: 0,
1139
- "z-index": 20
1140
- }), c = h) : g === e.selectedSlideIndex ? (h.css({
1141
- opacity: 1,
1142
- left: 0,
1143
- top: 0,
1144
- "z-index": 10
1145
- }), d = h) : h.css("visibility", "hidden")
1146
- }), this.previousSlideIndex = this.selectedSlideIndex, this.selectedSlideIndex = a, e.settings.loop === !0 && e._updateSlidesOrder(), this._moveTo(this.visibleOffset, !0), this.settings.fadeOutPreviousSlide === !0 && this._fadeSlideTo(d, 0), this._fadeSlideTo(c, 1, function() {
1147
- b.each(e.slides, function(a, b) {
1148
- var c = b.$slide;
1149
- c.css({
1150
- visibility: "",
1151
- opacity: "",
1152
- "z-index": ""
1153
- })
1154
- }), e._resetSlidesPosition(), e.trigger({
1155
- type: "gotoSlideComplete",
1156
- index: a,
1157
- previousIndex: e.previousSlideIndex
1158
- }), b.isFunction(e.settings.gotoSlideComplete) && e.settings.gotoSlideComplete.call(e, {
1159
- type: "gotoSlideComplete",
1160
- index: a,
1161
- previousIndex: e.previousSlideIndex
1162
- })
1163
- }), this.settings.autoHeight === !0 && this._resizeHeight(), this.trigger({
1164
- type: "gotoSlide",
1165
- index: a,
1166
- previousIndex: this.previousSlideIndex
1167
- }), b.isFunction(this.settings.gotoSlide) && this.settings.gotoSlide.call(this, {
1168
- type: "gotoSlide",
1169
- index: a,
1170
- previousIndex: this.previousSlideIndex
1171
- })
1172
- }
1173
- },
1174
- _fadeSlideTo: function(a, b, c) {
1175
- var d = this;
1176
- "css-3d" === this.supportedAnimation || "css-2d" === this.supportedAnimation ? (setTimeout(function() {
1177
- var c = {
1178
- opacity: b
1179
- };
1180
- c[d.vendorPrefix + "transition"] = "opacity " + d.settings.fadeDuration / 1e3 + "s", a.css(c)
1181
- }, 1), a.on(this.transitionEvent, function(b) {
1182
- b.target === b.currentTarget && (a.off(d.transitionEvent), a.css(d.vendorPrefix + "transition", ""), "function" == typeof c && c())
1183
- })) : a.stop().animate({
1184
- opacity: b
1185
- }, this.settings.fadeDuration, function() {
1186
- "function" == typeof c && c()
1187
- })
1188
- },
1189
- destroyFade: function() {
1190
- this.off("update." + c), null !== this.fadeGotoSlideReference && (this.gotoSlide = this.fadeGotoSlideReference)
1191
- },
1192
- fadeDefaults: {
1193
- fade: !1,
1194
- fadeOutPreviousSlide: !0,
1195
- fadeDuration: 500
1196
- }
1197
- };
1198
- b.SliderPro.addModule("Fade", d)
1199
- }(window, jQuery),
1200
- function(a, b) {
1201
- "use strict";
1202
- var c = "TouchSwipe." + b.SliderPro.namespace,
1203
- d = {
1204
- isTouchSupport: !1,
1205
- touchStartPoint: {
1206
- x: 0,
1207
- y: 0
1208
- },
1209
- touchEndPoint: {
1210
- x: 0,
1211
- y: 0
1212
- },
1213
- touchDistance: {
1214
- x: 0,
1215
- y: 0
1216
- },
1217
- touchStartPosition: 0,
1218
- isTouchMoving: !1,
1219
- touchSwipeEvents: {
1220
- startEvent: "",
1221
- moveEvent: "",
1222
- endEvent: ""
1223
- },
1224
- initTouchSwipe: function() {
1225
- this.settings.touchSwipe !== !1 && (this.isTouchSupport = "ontouchstart" in a, this.isTouchSupport === !0 ? (this.touchSwipeEvents.startEvent = "touchstart", this.touchSwipeEvents.moveEvent = "touchmove", this.touchSwipeEvents.endEvent = "touchend") : (this.touchSwipeEvents.startEvent = "mousedown", this.touchSwipeEvents.moveEvent = "mousemove", this.touchSwipeEvents.endEvent = "mouseup"), this.$slidesMask.on(this.touchSwipeEvents.startEvent + "." + c, b.proxy(this._onTouchStart, this)), this.$slidesMask.on("dragstart." + c, function(a) {
1226
- a.preventDefault()
1227
- }), this.$slidesMask.addClass("sp-grab"))
1228
- },
1229
- _onTouchStart: function(a) {
1230
- if (!(b(a.target).closest(".sp-selectable").length >= 1)) {
1231
- var d = this.isTouchSupport ? a.originalEvent.touches[0] : a.originalEvent;
1232
- this.isTouchSupport === !1 && a.preventDefault(), b(a.target).parents(".sp-slide").find("a").one("click." + c, function(a) {
1233
- a.preventDefault()
1234
- }), this.touchStartPoint.x = d.pageX || d.clientX, this.touchStartPoint.y = d.pageY || d.clientY, this.touchStartPosition = this.slidesPosition, this.touchDistance.x = this.touchDistance.y = 0, this.$slides.hasClass("sp-animated") && (this.isTouchMoving = !0, this._stopMovement(), this.touchStartPosition = this.slidesPosition), this.$slidesMask.on(this.touchSwipeEvents.moveEvent + "." + c, b.proxy(this._onTouchMove, this)), b(document).on(this.touchSwipeEvents.endEvent + "." + this.uniqueId + "." + c, b.proxy(this._onTouchEnd, this)), this.$slidesMask.removeClass("sp-grab").addClass("sp-grabbing"), this.$slider.addClass("sp-swiping")
1235
- }
1236
- },
1237
- _onTouchMove: function(a) {
1238
- var b = this.isTouchSupport ? a.originalEvent.touches[0] : a.originalEvent;
1239
- this.isTouchMoving = !0, this.touchEndPoint.x = b.pageX || b.clientX, this.touchEndPoint.y = b.pageY || b.clientY, this.touchDistance.x = this.touchEndPoint.x - this.touchStartPoint.x, this.touchDistance.y = this.touchEndPoint.y - this.touchStartPoint.y;
1240
- var c = "horizontal" === this.settings.orientation ? this.touchDistance.x : this.touchDistance.y,
1241
- d = "horizontal" === this.settings.orientation ? this.touchDistance.y : this.touchDistance.x;
1242
- Math.abs(c) > Math.abs(d) && (a.preventDefault(), this.settings.loop === !1 && (this.slidesPosition > this.touchStartPosition && 0 === this.selectedSlideIndex || this.slidesPosition < this.touchStartPosition && this.selectedSlideIndex === this.getTotalSlides() - 1) && (c = .2 * c), this._moveTo(this.touchStartPosition + c, !0))
1243
- },
1244
- _onTouchEnd: function(a) {
1245
- var d = this,
1246
- e = "horizontal" === this.settings.orientation ? this.touchDistance.x : this.touchDistance.y;
1247
- if (this.$slidesMask.off(this.touchSwipeEvents.moveEvent + "." + c), b(document).off(this.touchSwipeEvents.endEvent + "." + this.uniqueId + "." + c), this.$slidesMask.removeClass("sp-grabbing").addClass("sp-grab"), (this.isTouchMoving === !1 || this.isTouchMoving === !0 && Math.abs(this.touchDistance.x) < 10 && Math.abs(this.touchDistance.y) < 10) && (b(a.target).parents(".sp-slide").find("a").off("click." + c), this.$slider.removeClass("sp-swiping")), setTimeout(function() {
1248
- d.$slider.removeClass("sp-swiping")
1249
- }, 1), this.isTouchMoving !== !1) {
1250
- this.isTouchMoving = !1, b(a.target).parents(".sp-slide").one("click", function(a) {
1251
- a.preventDefault()
1252
- });
1253
- var f = -parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty), 10) + this.visibleOffset;
1254
- if (Math.abs(e) < this.settings.touchSwipeThreshold) this._moveTo(f);
1255
- else {
1256
- var g = e / (this.slideSize + this.settings.slideDistance);
1257
- g = parseInt(g, 10) + (g > 0 ? 1 : -1);
1258
- var h = this.slidesOrder[b.inArray(this.selectedSlideIndex, this.slidesOrder) - g];
1259
- this.settings.loop === !0 ? this.gotoSlide(h) : "undefined" != typeof h ? this.gotoSlide(h) : this._moveTo(f)
1260
- }
1261
- }
1262
- },
1263
- destroyTouchSwipe: function() {
1264
- this.$slidesMask.off(this.touchSwipeEvents.startEvent + "." + c), this.$slidesMask.off(this.touchSwipeEvents.moveEvent + "." + c), this.$slidesMask.off("dragstart." + c), b(document).off(this.touchSwipeEvents.endEvent + "." + this.uniqueId + "." + c), this.$slidesMask.removeClass("sp-grab")
1265
- },
1266
- touchSwipeDefaults: {
1267
- touchSwipe: !0,
1268
- touchSwipeThreshold: 50
1269
- }
1270
- };
1271
- b.SliderPro.addModule("TouchSwipe", d)
1272
- }(window, jQuery),
1273
- function(a, b) {
1274
- "use strict";
1275
- var c = "Caption." + b.SliderPro.namespace,
1276
- d = {
1277
- $captionContainer: null,
1278
- captionContent: "",
1279
- initCaption: function() {
1280
- this.on("update." + c, b.proxy(this._captionOnUpdate, this)), this.on("gotoSlide." + c, b.proxy(this._updateCaptionContent, this))
1281
- },
1282
- _captionOnUpdate: function() {
1283
- this.$captionContainer = this.$slider.find(".sp-caption-container"), this.$slider.find(".sp-caption").length && 0 === this.$captionContainer.length && (this.$captionContainer = b('<div class="sp-caption-container"></div>').appendTo(this.$slider), this._updateCaptionContent()), this.$slides.find(".sp-caption").each(function() {
1284
- b(this).css("display", "none")
1285
- })
1286
- },
1287
- _updateCaptionContent: function() {
1288
- var a = this,
1289
- b = this.$slider.find(".sp-slide").eq(this.selectedSlideIndex).find(".sp-caption"),
1290
- c = 0 !== b.length ? b.html() : "";
1291
- this.settings.fadeCaption === !0 ? "" !== this.captionContent ? (0 === parseFloat(this.$captionContainer.css("opacity"), 10) && (this.$captionContainer.css(this.vendorPrefix + "transition", ""), this.$captionContainer.css("opacity", 1)), this._fadeCaptionTo(0, function() {
1292
- a.captionContent = c, "" !== c ? (a.$captionContainer.html(a.captionContent), a._fadeCaptionTo(1)) : a.$captionContainer.empty()
1293
- })) : (this.captionContent = c, this.$captionContainer.html(this.captionContent), this.$captionContainer.css("opacity", 0), this._fadeCaptionTo(1)) : (this.captionContent = c, this.$captionContainer.html(this.captionContent))
1294
- },
1295
- _fadeCaptionTo: function(a, b) {
1296
- var c = this;
1297
- "css-3d" === this.supportedAnimation || "css-2d" === this.supportedAnimation ? (setTimeout(function() {
1298
- var b = {
1299
- opacity: a
1300
- };
1301
- b[c.vendorPrefix + "transition"] = "opacity " + c.settings.captionFadeDuration / 1e3 + "s", c.$captionContainer.css(b)
1302
- }, 1), this.$captionContainer.on(this.transitionEvent, function(a) {
1303
- a.target === a.currentTarget && (c.$captionContainer.off(c.transitionEvent), c.$captionContainer.css(c.vendorPrefix + "transition", ""), "function" == typeof b && b())
1304
- })) : this.$captionContainer.stop().animate({
1305
- opacity: a
1306
- }, this.settings.captionFadeDuration, function() {
1307
- "function" == typeof b && b()
1308
- })
1309
- },
1310
- destroyCaption: function() {
1311
- this.off("update." + c), this.off("gotoSlide." + c), this.$captionContainer.remove(), this.$slider.find(".sp-caption").each(function() {
1312
- b(this).css("display", "")
1313
- })
1314
- },
1315
- captionDefaults: {
1316
- fadeCaption: !0,
1317
- captionFadeDuration: 500
1318
- }
1319
- };
1320
- b.SliderPro.addModule("Caption", d)
1321
- }(window, jQuery),
1322
- function(a, b) {
1323
- "use strict";
1324
- var c = "DeepLinking." + b.SliderPro.namespace,
1325
- d = {
1326
- initDeepLinking: function() {
1327
- var d = this,
1328
- e = !0;
1329
- this.on("init." + c, function() {
1330
- d._gotoHash(a.location.hash)
1331
- }), this.on("gotoSlide." + c, function(b) {
1332
- e = !1, d.settings.updateHash === !0 && (a.location.hash = d.$slider.attr("id") + "/" + b.index)
1333
- }), b(a).on("hashchange." + this.uniqueId + "." + c, function() {
1334
- e === !0 && d._gotoHash(a.location.hash), e = !0
1335
- })
1336
- },
1337
- _parseHash: function(a) {
1338
- if ("" !== a) {
1339
- a = a.substring(1);
1340
- var b = a.split("/"),
1341
- c = b.pop(),
1342
- d = a.slice(0, -c.toString().length - 1);
1343
- if (this.$slider.attr("id") === d) return {
1344
- sliderID: d,
1345
- slideId: c
1346
- }
1347
- }
1348
- return !1
1349
- },
1350
- _gotoHash: function(a) {
1351
- var b = this._parseHash(a);
1352
- if (b !== !1) {
1353
- var c = b.slideId,
1354
- d = parseInt(c, 10);
1355
- if (isNaN(d)) {
1356
- var e = this.$slider.find(".sp-slide#" + c).index(); - 1 !== e && this.gotoSlide(e)
1357
- } else this.gotoSlide(d)
1358
- }
1359
- },
1360
- destroyDeepLinking: function() {
1361
- this.off("init." + c), this.off("gotoSlide." + c), b(a).off("hashchange." + this.uniqueId + "." + c)
1362
- },
1363
- deepLinkingDefaults: {
1364
- updateHash: !1
1365
- }
1366
- };
1367
- b.SliderPro.addModule("DeepLinking", d)
1368
- }(window, jQuery),
1369
- function(a, b) {
1370
- "use strict";
1371
- var c = "Autoplay." + b.SliderPro.namespace,
1372
- d = {
1373
- autoplayTimer: null,
1374
- isTimerRunning: !1,
1375
- isTimerPaused: !1,
1376
- initAutoplay: function() {
1377
- this.on("update." + c, b.proxy(this._autoplayOnUpdate, this))
1378
- },
1379
- _autoplayOnUpdate: function() {
1380
- this.settings.autoplay === !0 ? (this.on("gotoSlide." + c, b.proxy(this._autoplayOnGotoSlide, this)), this.on("mouseenter." + c, b.proxy(this._autoplayOnMouseEnter, this)), this.on("mouseleave." + c, b.proxy(this._autoplayOnMouseLeave, this)), this.startAutoplay()) : (this.off("gotoSlide." + c), this.off("mouseenter." + c), this.off("mouseleave." + c), this.stopAutoplay())
1381
- },
1382
- _autoplayOnGotoSlide: function() {
1383
- this.isTimerRunning === !0 && this.stopAutoplay(), this.isTimerPaused === !1 && this.startAutoplay()
1384
- },
1385
- _autoplayOnMouseEnter: function() {
1386
- !this.isTimerRunning || "pause" !== this.settings.autoplayOnHover && "stop" !== this.settings.autoplayOnHover || (this.stopAutoplay(), this.isTimerPaused = !0)
1387
- },
1388
- _autoplayOnMouseLeave: function() {
1389
- this.settings.autoplay === !0 && this.isTimerRunning === !1 && "stop" !== this.settings.autoplayOnHover && (this.startAutoplay(), this.isTimerPaused = !1)
1390
- },
1391
- startAutoplay: function() {
1392
- var a = this;
1393
- this.isTimerRunning = !0, this.autoplayTimer = setTimeout(function() {
1394
- "normal" === a.settings.autoplayDirection ? a.nextSlide() : "backwards" === a.settings.autoplayDirection && a.previousSlide()
1395
- }, this.settings.autoplayDelay)
1396
- },
1397
- stopAutoplay: function() {
1398
- this.isTimerRunning = !1, clearTimeout(this.autoplayTimer)
1399
- },
1400
- destroyAutoplay: function() {
1401
- clearTimeout(this.autoplayTimer), this.off("update." + c), this.off("gotoSlide." + c), this.off("mouseenter." + c), this.off("mouseleave." + c)
1402
- },
1403
- autoplayDefaults: {
1404
- autoplay: !0,
1405
- autoplayDelay: 5e3,
1406
- autoplayDirection: "normal",
1407
- autoplayOnHover: "pause"
1408
- }
1409
- };
1410
- b.SliderPro.addModule("Autoplay", d)
1411
- }(window, jQuery),
1412
- function(a, b) {
1413
- "use strict";
1414
- var c = "Keyboard." + b.SliderPro.namespace,
1415
- d = {
1416
- initKeyboard: function() {
1417
- var a = this,
1418
- d = !1;
1419
- this.settings.keyboard !== !1 && (this.$slider.on("focus." + c, function() {
1420
- d = !0
1421
- }), this.$slider.on("blur." + c, function() {
1422
- d = !1
1423
- }), b(document).on("keydown." + this.uniqueId + "." + c, function(b) {
1424
- (a.settings.keyboardOnlyOnFocus !== !0 || d !== !1) && (37 === b.which ? a.previousSlide() : 39 === b.which ? a.nextSlide() : 13 === b.which && a.$slider.find(".sp-slide").eq(a.selectedSlideIndex).find(".sp-image-container a")[0].click())
1425
- }))
1426
- },
1427
- destroyKeyboard: function() {
1428
- this.$slider.off("focus." + c), this.$slider.off("blur." + c), b(document).off("keydown." + this.uniqueId + "." + c)
1429
- },
1430
- keyboardDefaults: {
1431
- keyboard: !0,
1432
- keyboardOnlyOnFocus: !1
1433
- }
1434
- };
1435
- b.SliderPro.addModule("Keyboard", d)
1436
- }(window, jQuery),
1437
- function(a, b) {
1438
- "use strict";
1439
- var c = "FullScreen." + b.SliderPro.namespace,
1440
- d = {
1441
- isFullScreen: !1,
1442
- $fullScreenButton: null,
1443
- sizeBeforeFullScreen: {},
1444
- initFullScreen: function() {
1445
- (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) && this.on("update." + c, b.proxy(this._fullScreenOnUpdate, this))
1446
- },
1447
- _fullScreenOnUpdate: function() {
1448
- this.settings.fullScreen === !0 && null === this.$fullScreenButton ? this._addFullScreen() : this.settings.fullScreen === !1 && null !== this.$fullScreenButton && this._removeFullScreen(), this.settings.fullScreen === !0 && (this.settings.fadeFullScreen === !0 ? this.$fullScreenButton.addClass("sp-fade-full-screen") : this.settings.fadeFullScreen === !1 && this.$fullScreenButton.removeClass("sp-fade-full-screen"))
1449
- },
1450
- _addFullScreen: function() {
1451
- this.$fullScreenButton = b('<div class="sp-full-screen-button"></div>').appendTo(this.$slider), this.$fullScreenButton.on("click." + c, b.proxy(this._onFullScreenButtonClick, this)), document.addEventListener("fullscreenchange", b.proxy(this._onFullScreenChange, this)), document.addEventListener("mozfullscreenchange", b.proxy(this._onFullScreenChange, this)), document.addEventListener("webkitfullscreenchange", b.proxy(this._onFullScreenChange, this)), document.addEventListener("MSFullscreenChange", b.proxy(this._onFullScreenChange, this))
1452
- },
1453
- _removeFullScreen: function() {
1454
- null !== this.$fullScreenButton && (this.$fullScreenButton.off("click." + c), this.$fullScreenButton.remove(), this.$fullScreenButton = null, document.removeEventListener("fullscreenchange", this._onFullScreenChange), document.removeEventListener("mozfullscreenchange", this._onFullScreenChange), document.removeEventListener("webkitfullscreenchange", this._onFullScreenChange), document.removeEventListener("MSFullscreenChange", this._onFullScreenChange))
1455
- },
1456
- _onFullScreenButtonClick: function() {
1457
- this.isFullScreen === !1 ? this.instance.requestFullScreen ? this.instance.requestFullScreen() : this.instance.mozRequestFullScreen ? this.instance.mozRequestFullScreen() : this.instance.webkitRequestFullScreen ? this.instance.webkitRequestFullScreen() : this.instance.msRequestFullscreen && this.instance.msRequestFullscreen() : document.exitFullScreen ? document.exitFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen()
1458
- },
1459
- _onFullScreenChange: function() {
1460
- this.isFullScreen = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement ? !0 : !1, this.isFullScreen === !0 ? (this.sizeBeforeFullScreen = {
1461
- forceSize: this.settings.forceSize,
1462
- autoHeight: this.settings.autoHeight
1463
- }, this.$slider.addClass("sp-full-screen"), this.settings.forceSize = "fullWindow", this.settings.autoHeight = !1) : (this.$slider.css("margin", ""), this.$slider.removeClass("sp-full-screen"), this.settings.forceSize = this.sizeBeforeFullScreen.forceSize, this.settings.autoHeight = this.sizeBeforeFullScreen.autoHeight), this.resize()
1464
- },
1465
- destroyFullScreen: function() {
1466
- this.off("update." + c), this._removeFullScreen()
1467
- },
1468
- fullScreenDefaults: {
1469
- fullScreen: !1,
1470
- fadeFullScreen: !0
1471
- }
1472
- };
1473
- b.SliderPro.addModule("FullScreen", d)
1474
- }(window, jQuery),
1475
- function(a, b) {
1476
- "use strict";
1477
- var c = "Buttons." + b.SliderPro.namespace,
1478
- d = {
1479
- $buttons: null,
1480
- initButtons: function() {
1481
- this.on("update." + c, b.proxy(this._buttonsOnUpdate, this))
1482
- },
1483
- _buttonsOnUpdate: function() {
1484
- this.$buttons = this.$slider.find(".sp-buttons"), this.settings.buttons === !0 && this.getTotalSlides() > 1 && 0 === this.$buttons.length ? this._createButtons() : this.settings.buttons === !0 && this.getTotalSlides() !== this.$buttons.find(".sp-button").length && 0 !== this.$buttons.length ? this._adjustButtons() : (this.settings.buttons === !1 || this.getTotalSlides() <= 1 && 0 !== this.$buttons.length) && this._removeButtons()
1485
- },
1486
- _createButtons: function() {
1487
- var a = this;
1488
- this.$buttons = b('<div class="sp-buttons"></div>').appendTo(this.$slider);
1489
- for (var d = 0; d < this.getTotalSlides(); d++) b('<div class="sp-button"></div>').appendTo(this.$buttons);
1490
- this.$buttons.on("click." + c, ".sp-button", function() {
1491
- a.gotoSlide(b(this).index())
1492
- }), this.$buttons.find(".sp-button").eq(this.selectedSlideIndex).addClass("sp-selected-button"), this.on("gotoSlide." + c, function(b) {
1493
- a.$buttons.find(".sp-selected-button").removeClass("sp-selected-button"), a.$buttons.find(".sp-button").eq(b.index).addClass("sp-selected-button")
1494
- }), this.$slider.addClass("sp-has-buttons")
1495
- },
1496
- _adjustButtons: function() {
1497
- this.$buttons.empty();
1498
- for (var a = 0; a < this.getTotalSlides(); a++) b('<div class="sp-button"></div>').appendTo(this.$buttons);
1499
- this.$buttons.find(".sp-selected-button").removeClass("sp-selected-button"), this.$buttons.find(".sp-button").eq(this.selectedSlideIndex).addClass("sp-selected-button")
1500
- },
1501
- _removeButtons: function() {
1502
- this.$buttons.off("click." + c, ".sp-button"), this.off("gotoSlide." + c), this.$buttons.remove(), this.$slider.removeClass("sp-has-buttons")
1503
- },
1504
- destroyButtons: function() {
1505
- this._removeButtons(), this.off("update." + c)
1506
- },
1507
- buttonsDefaults: {
1508
- buttons: !0
1509
- }
1510
- };
1511
- b.SliderPro.addModule("Buttons", d)
1512
- }(window, jQuery),
1513
- function(a, b) {
1514
- "use strict";
1515
- var c = "Arrows." + b.SliderPro.namespace,
1516
- d = {
1517
- $arrows: null,
1518
- $previousArrow: null,
1519
- $nextArrow: null,
1520
- initArrows: function() {
1521
- this.on("update." + c, b.proxy(this._arrowsOnUpdate, this)), this.on("gotoSlide." + c, b.proxy(this._checkArrowsVisibility, this))
1522
- },
1523
- _arrowsOnUpdate: function() {
1524
- var a = this;
1525
- this.settings.arrows === !0 && null === this.$arrows ? (this.$arrows = b('<div class="sp-arrows"></div>').appendTo(this.$slidesContainer), this.$previousArrow = b('<div class="sp-arrow sp-previous-arrow"></div>').appendTo(this.$arrows), this.$nextArrow = b('<div class="sp-arrow sp-next-arrow"></div>').appendTo(this.$arrows), this.$previousArrow.on("click." + c, function() {
1526
- a.previousSlide()
1527
- }), this.$nextArrow.on("click." + c, function() {
1528
- a.nextSlide()
1529
- }), this._checkArrowsVisibility()) : this.settings.arrows === !1 && null !== this.$arrows && this._removeArrows(), this.settings.arrows === !0 && (this.settings.fadeArrows === !0 ? this.$arrows.addClass("sp-fade-arrows") : this.settings.fadeArrows === !1 && this.$arrows.removeClass("sp-fade-arrows"))
1530
- },
1531
- _checkArrowsVisibility: function() {
1532
- this.settings.arrows !== !1 && this.settings.loop !== !0 && (0 === this.selectedSlideIndex ? this.$previousArrow.css("display", "none") : this.$previousArrow.css("display", "block"), this.selectedSlideIndex === this.getTotalSlides() - 1 ? this.$nextArrow.css("display", "none") : this.$nextArrow.css("display", "block"))
1533
- },
1534
- _removeArrows: function() {
1535
- null !== this.$arrows && (this.$previousArrow.off("click." + c), this.$nextArrow.off("click." + c), this.$arrows.remove(), this.$arrows = null)
1536
- },
1537
- destroyArrows: function() {
1538
- this._removeArrows(), this.off("update." + c), this.off("gotoSlide." + c)
1539
- },
1540
- arrowsDefaults: {
1541
- arrows: !1,
1542
- fadeArrows: !0
1543
- }
1544
- };
1545
- b.SliderPro.addModule("Arrows", d)
1546
- }(window, jQuery),
1547
- function(a, b) {
1548
- "use strict";
1549
- var c = "ThumbnailTouchSwipe." + b.SliderPro.namespace,
1550
- d = {
1551
- isThumbnailTouchSupport: !1,
1552
- thumbnailTouchStartPoint: {
1553
- x: 0,
1554
- y: 0
1555
- },
1556
- thumbnailTouchEndPoint: {
1557
- x: 0,
1558
- y: 0
1559
- },
1560
- thumbnailTouchDistance: {
1561
- x: 0,
1562
- y: 0
1563
- },
1564
- thumbnailTouchStartPosition: 0,
1565
- isThumbnailTouchMoving: !1,
1566
- isThumbnailTouchSwipe: !1,
1567
- thumbnailTouchSwipeEvents: {
1568
- startEvent: "",
1569
- moveEvent: "",
1570
- endEvent: ""
1571
- },
1572
- initThumbnailTouchSwipe: function() {
1573
- this.on("update." + c, b.proxy(this._thumbnailTouchSwipeOnUpdate, this))
1574
- },
1575
- _thumbnailTouchSwipeOnUpdate: function() {
1576
- this.isThumbnailScroller !== !1 && (this.settings.thumbnailTouchSwipe === !0 && this.isThumbnailTouchSwipe === !1 && (this.isThumbnailTouchSwipe = !0, this.isThumbnailTouchSupport = "ontouchstart" in a, this.isThumbnailTouchSupport === !0 ? (this.thumbnailTouchSwipeEvents.startEvent = "touchstart", this.thumbnailTouchSwipeEvents.moveEvent = "touchmove", this.thumbnailTouchSwipeEvents.endEvent = "touchend") : (this.thumbnailTouchSwipeEvents.startEvent = "mousedown", this.thumbnailTouchSwipeEvents.moveEvent = "mousemove", this.thumbnailTouchSwipeEvents.endEvent = "mouseup"), this.$thumbnails.on(this.thumbnailTouchSwipeEvents.startEvent + "." + c, b.proxy(this._onThumbnailTouchStart, this)), this.$thumbnails.on("dragstart." + c, function(a) {
1577
- a.preventDefault()
1578
- }), this.$thumbnails.addClass("sp-grab")), b.each(this.thumbnails, function(a, b) {
1579
- b.off("thumbnailClick")
1580
- }))
1581
- },
1582
- _onThumbnailTouchStart: function(a) {
1583
- if (!(b(a.target).closest(".sp-selectable").length >= 1)) {
1584
- var d = this.isThumbnailTouchSupport ? a.originalEvent.touches[0] : a.originalEvent;
1585
- this.isThumbnailTouchSupport === !1 && a.preventDefault(), b(a.target).parents(".sp-thumbnail-container").find("a").one("click." + c, function(a) {
1586
- a.preventDefault()
1587
- }), this.thumbnailTouchStartPoint.x = d.pageX || d.clientX, this.thumbnailTouchStartPoint.y = d.pageY || d.clientY, this.thumbnailTouchStartPosition = this.thumbnailsPosition, this.thumbnailTouchDistance.x = this.thumbnailTouchDistance.y = 0, this.$thumbnails.hasClass("sp-animated") && (this.isThumbnailTouchMoving = !0, this._stopThumbnailsMovement(), this.thumbnailTouchStartPosition = this.thumbnailsPosition), this.$thumbnails.on(this.thumbnailTouchSwipeEvents.moveEvent + "." + c, b.proxy(this._onThumbnailTouchMove, this)), b(document).on(this.thumbnailTouchSwipeEvents.endEvent + "." + this.uniqueId + "." + c, b.proxy(this._onThumbnailTouchEnd, this)), this.$thumbnails.removeClass("sp-grab").addClass("sp-grabbing"), this.$thumbnailsContainer.addClass("sp-swiping")
1588
- }
1589
- },
1590
- _onThumbnailTouchMove: function(a) {
1591
- var b = this.isThumbnailTouchSupport ? a.originalEvent.touches[0] : a.originalEvent;
1592
- this.isThumbnailTouchMoving = !0, this.thumbnailTouchEndPoint.x = b.pageX || b.clientX, this.thumbnailTouchEndPoint.y = b.pageY || b.clientY, this.thumbnailTouchDistance.x = this.thumbnailTouchEndPoint.x - this.thumbnailTouchStartPoint.x, this.thumbnailTouchDistance.y = this.thumbnailTouchEndPoint.y - this.thumbnailTouchStartPoint.y;
1593
- var c = "horizontal" === this.thumbnailsOrientation ? this.thumbnailTouchDistance.x : this.thumbnailTouchDistance.y,
1594
- d = "horizontal" === this.thumbnailsOrientation ? this.thumbnailTouchDistance.y : this.thumbnailTouchDistance.x;
1595
- if (Math.abs(c) > Math.abs(d)) {
1596
- if (a.preventDefault(), this.thumbnailsPosition >= 0) {
1597
- var e = -this.thumbnailTouchStartPosition;
1598
- c = e + .2 * (c - e)
1599
- } else if (this.thumbnailsPosition <= -this.thumbnailsSize + this.thumbnailsContainerSize) {
1600
- var f = this.thumbnailsSize - this.thumbnailsContainerSize + this.thumbnailTouchStartPosition;
1601
- c = -f + .2 * (c + f)
1602
- }
1603
- this._moveThumbnailsTo(this.thumbnailTouchStartPosition + c, !0)
1604
- }
1605
- },
1606
- _onThumbnailTouchEnd: function(a) {
1607
- {
1608
- var d = this;
1609
- "horizontal" === this.thumbnailsOrientation ? this.thumbnailTouchDistance.x : this.thumbnailTouchDistance.y
1610
- }
1611
- if (this.$thumbnails.off(this.thumbnailTouchSwipeEvents.moveEvent + "." + c), b(document).off(this.thumbnailTouchSwipeEvents.endEvent + "." + this.uniqueId + "." + c), this.$thumbnails.removeClass("sp-grabbing").addClass("sp-grab"), this.isThumbnailTouchMoving === !1 || this.isThumbnailTouchMoving === !0 && Math.abs(this.thumbnailTouchDistance.x) < 10 && Math.abs(this.thumbnailTouchDistance.y) < 10) {
1612
- var e = b(a.target).hasClass("sp-thumbnail-container") ? b(a.target) : b(a.target).parents(".sp-thumbnail-container"),
1613
- f = e.index();
1614
- return void(0 !== b(a.target).parents("a").length ? (b(a.target).parents("a").off("click." + c), this.$thumbnailsContainer.removeClass("sp-swiping")) : f !== this.selectedThumbnailIndex && -1 !== f && this.gotoSlide(f))
1615
- }
1616
- this.isThumbnailTouchMoving = !1, b(a.target).parents(".sp-thumbnail").one("click", function(a) {
1617
- a.preventDefault()
1618
- }), setTimeout(function() {
1619
- d.$thumbnailsContainer.removeClass("sp-swiping")
1620
- }, 1), this.thumbnailsPosition > 0 ? this._moveThumbnailsTo(0) : this.thumbnailsPosition < this.thumbnailsContainerSize - this.thumbnailsSize && this._moveThumbnailsTo(this.thumbnailsContainerSize - this.thumbnailsSize), this.trigger({
1621
- type: "thumbnailsMoveComplete"
1622
- }), b.isFunction(this.settings.thumbnailsMoveComplete) && this.settings.thumbnailsMoveComplete.call(this, {
1623
- type: "thumbnailsMoveComplete"
1624
- })
1625
- },
1626
- destroyThumbnailTouchSwipe: function() {
1627
- this.off("update." + c), this.isThumbnailScroller !== !1 && (this.$thumbnails.off(this.thumbnailTouchSwipeEvents.startEvent + "." + c), this.$thumbnails.off(this.thumbnailTouchSwipeEvents.moveEvent + "." + c), this.$thumbnails.off("dragstart." + c), b(document).off(this.thumbnailTouchSwipeEvents.endEvent + "." + this.uniqueId + "." + c), this.$thumbnails.removeClass("sp-grab"))
1628
- },
1629
- thumbnailTouchSwipeDefaults: {
1630
- thumbnailTouchSwipe: !0
1631
- }
1632
- };
1633
- b.SliderPro.addModule("ThumbnailTouchSwipe", d)
1634
- }(window, jQuery),
1635
- function(a, b) {
1636
- "use strict";
1637
- var c = "ThumbnailArrows." + b.SliderPro.namespace,
1638
- d = {
1639
- $thumbnailArrows: null,
1640
- $previousThumbnailArrow: null,
1641
- $nextThumbnailArrow: null,
1642
- initThumbnailArrows: function() {
1643
- var a = this;
1644
- this.on("update." + c, b.proxy(this._thumbnailArrowsOnUpdate, this)), this.on("sliderResize." + c + " thumbnailsMoveComplete." + c, function() {
1645
- a.isThumbnailScroller === !0 && a.settings.thumbnailArrows === !0 && a._checkThumbnailArrowsVisibility()
1646
- })
1647
- },
1648
- _thumbnailArrowsOnUpdate: function() {
1649
- var a = this;
1650
- this.isThumbnailScroller !== !1 && (this.settings.thumbnailArrows === !0 && null === this.$thumbnailArrows ? (this.$thumbnailArrows = b('<div class="sp-thumbnail-arrows"></div>').appendTo(this.$thumbnailsContainer), this.$previousThumbnailArrow = b('<div class="sp-thumbnail-arrow sp-previous-thumbnail-arrow"></div>').appendTo(this.$thumbnailArrows), this.$nextThumbnailArrow = b('<div class="sp-thumbnail-arrow sp-next-thumbnail-arrow"></div>').appendTo(this.$thumbnailArrows), this.$previousThumbnailArrow.on("click." + c, function() {
1651
- var b = Math.min(0, a.thumbnailsPosition + a.thumbnailsContainerSize);
1652
- a._moveThumbnailsTo(b)
1653
- }), this.$nextThumbnailArrow.on("click." + c, function() {
1654
- var b = Math.max(a.thumbnailsContainerSize - a.thumbnailsSize, a.thumbnailsPosition - a.thumbnailsContainerSize);
1655
- a._moveThumbnailsTo(b)
1656
- })) : this.settings.thumbnailArrows === !1 && null !== this.$thumbnailArrows && this._removeThumbnailArrows(), this.settings.thumbnailArrows === !0 && (this.settings.fadeThumbnailArrows === !0 ? this.$thumbnailArrows.addClass("sp-fade-thumbnail-arrows") : this.settings.fadeThumbnailArrows === !1 && this.$thumbnailArrows.removeClass("sp-fade-thumbnail-arrows"), this._checkThumbnailArrowsVisibility()))
1657
- },
1658
- _checkThumbnailArrowsVisibility: function() {
1659
- 0 === this.thumbnailsPosition ? this.$previousThumbnailArrow.css("display", "none") : this.$previousThumbnailArrow.css("display", "block"), this.thumbnailsPosition === this.thumbnailsContainerSize - this.thumbnailsSize ? this.$nextThumbnailArrow.css("display", "none") : this.$nextThumbnailArrow.css("display", "block")
1660
- },
1661
- _removeThumbnailArrows: function() {
1662
- null !== this.$thumbnailArrows && (this.$previousThumbnailArrow.off("click." + c), this.$nextThumbnailArrow.off("click." + c), this.$thumbnailArrows.remove(), this.$thumbnailArrows = null)
1663
- },
1664
- destroyThumbnailArrows: function() {
1665
- this._removeThumbnailArrows(), this.off("update." + c), this.off("sliderResize." + c), this.off("thumbnailsMoveComplete." + c)
1666
- },
1667
- thumbnailArrowsDefaults: {
1668
- thumbnailArrows: !1,
1669
- fadeThumbnailArrows: !0
1670
- }
1671
- };
1672
- b.SliderPro.addModule("ThumbnailArrows", d)
1673
- }(window, jQuery),
1674
- function(a, b) {
1675
- "use strict";
1676
- var c = "Video." + b.SliderPro.namespace,
1677
- d = {
1678
- initVideo: function() {
1679
- this.on("update." + c, b.proxy(this._videoOnUpdate, this)), this.on("gotoSlideComplete." + c, b.proxy(this._videoOnGotoSlideComplete, this))
1680
- },
1681
- _videoOnUpdate: function() {
1682
- var a = this;
1683
- this.$slider.find(".sp-video").not("a, [data-init]").each(function() {
1684
- var c = b(this);
1685
- a._initVideo(c)
1686
- }), this.$slider.find("a.sp-video").not("[data-preinit]").each(function() {
1687
- var c = b(this);
1688
- a._preinitVideo(c)
1689
- })
1690
- },
1691
- _initVideo: function(a) {
1692
- var d = this;
1693
- a.attr("data-init", !0).videoController(), a.on("videoPlay." + c, function() {
1694
- "stopAutoplay" === d.settings.playVideoAction && "undefined" != typeof d.stopAutoplay && (d.stopAutoplay(), d.settings.autoplay = !1);
1695
- var c = {
1696
- type: "videoPlay",
1697
- video: a
1698
- };
1699
- d.trigger(c), b.isFunction(d.settings.videoPlay) && d.settings.videoPlay.call(d, c)
1700
- }), a.on("videoPause." + c, function() {
1701
- "startAutoplay" === d.settings.pauseVideoAction && "undefined" != typeof d.startAutoplay && (d.startAutoplay(), d.settings.autoplay = !0);
1702
- var c = {
1703
- type: "videoPause",
1704
- video: a
1705
- };
1706
- d.trigger(c), b.isFunction(d.settings.videoPause) && d.settings.videoPause.call(d, c)
1707
- }), a.on("videoEnded." + c, function() {
1708
- "startAutoplay" === d.settings.endVideoAction && "undefined" != typeof d.startAutoplay ? (d.startAutoplay(), d.settings.autoplay = !0) : "nextSlide" === d.settings.endVideoAction ? d.nextSlide() : "replayVideo" === d.settings.endVideoAction && a.videoController("replay");
1709
- var c = {
1710
- type: "videoEnd",
1711
- video: a
1712
- };
1713
- d.trigger(c), b.isFunction(d.settings.videoEnd) && d.settings.videoEnd.call(d, c)
1714
- })
1715
- },
1716
- _preinitVideo: function(a) {
1717
- var d = this;
1718
- a.attr("data-preinit", !0), a.on("click." + c, function(c) {
1719
- if (!d.$slider.hasClass("sp-swiping")) {
1720
- c.preventDefault();
1721
- var e, f, g, h, i, j, k, l = a.attr("href"),
1722
- m = a.children("img").attr("width"),
1723
- n = a.children("img").attr("height"); - 1 !== l.indexOf("youtube") || -1 !== l.indexOf("youtu.be") ? f = "youtube" : -1 !== l.indexOf("vimeo") && (f = "vimeo"), g = "youtube" === f ? /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/ : /http:\/\/(www\.)?vimeo.com\/(\d+)/, h = l.match(g), i = h[2], j = "youtube" === f ? "http://www.youtube.com/embed/" + i + "?enablejsapi=1&wmode=opaque" : "http://player.vimeo.com/video/" + i + "?api=1", k = l.split("?")[1], "undefined" != typeof k && (k = k.split("&"), b.each(k, function(a, b) {
1724
- -1 === b.indexOf(i) && (j += "&" + b)
1725
- })), e = b("<iframe></iframe>").attr({
1726
- src: j,
1727
- width: m,
1728
- height: n,
1729
- "class": a.attr("class"),
1730
- frameborder: 0
1731
- }).insertBefore(a), d._initVideo(e), e.videoController("play"), a.css("display", "none")
1732
- }
1733
- })
1734
- },
1735
- _videoOnGotoSlideComplete: function(a) {
1736
- var b = this.$slides.find(".sp-slide").eq(a.previousIndex).find(".sp-video[data-init]");
1737
- if (-1 !== a.previousIndex && 0 !== b.length && ("stopVideo" === this.settings.leaveVideoAction ? b.videoController("stop") : "pauseVideo" === this.settings.leaveVideoAction ? b.videoController("pause") : "removeVideo" === this.settings.leaveVideoAction && (0 !== b.siblings("a.sp-video").length ? (b.siblings("a.sp-video").css("display", ""), b.videoController("destroy"), b.remove()) : b.videoController("stop"))), "playVideo" === this.settings.reachVideoAction) {
1738
- var d = this.$slides.find(".sp-slide").eq(a.index).find(".sp-video[data-init]"),
1739
- e = this.$slides.find(".sp-slide").eq(a.index).find(".sp-video[data-preinit]");
1740
- 0 !== d.length ? d.videoController("play") : 0 !== e.length && e.trigger("click." + c)
1741
- }
1742
- },
1743
- destroyVideo: function() {
1744
- this.$slider.find(".sp-video[ data-preinit ]").each(function() {
1745
- var a = b(this);
1746
- a.removeAttr("data-preinit"), a.off("click." + c)
1747
- }), this.$slider.find(".sp-video[ data-init ]").each(function() {
1748
- var a = b(this);
1749
- a.removeAttr("data-init"), a.off("Video"), a.videoController("destroy")
1750
- }), this.off("update." + c), this.off("gotoSlideComplete." + c)
1751
- },
1752
- videoDefaults: {
1753
- reachVideoAction: "none",
1754
- leaveVideoAction: "pauseVideo",
1755
- playVideoAction: "stopAutoplay",
1756
- pauseVideoAction: "none",
1757
- endVideoAction: "none",
1758
- videoPlay: function() {},
1759
- videoPause: function() {},
1760
- videoEnd: function() {}
1761
- }
1762
- };
1763
- b.SliderPro.addModule("Video", d)
1764
- }(window, jQuery),
1765
- function(a) {
1766
- "use strict";
1767
- var b = window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? !0 : !1,
1768
- c = function(b, c) {
1769
- this.$video = a(b), this.options = c, this.settings = {}, this.player = null, this._init()
1770
- };
1771
- c.prototype = {
1772
- _init: function() {
1773
- this.settings = a.extend({}, this.defaults, this.options);
1774
- var b = this,
1775
- c = a.VideoController.players,
1776
- d = this.$video.attr("id");
1777
- for (var e in c)
1778
- if ("undefined" != typeof c[e] && c[e].isType(this.$video)) {
1779
- this.player = new c[e](this.$video);
1780
- break
1781
- }
1782
- if (null !== this.player) {
1783
- var f = ["ready", "start", "play", "pause", "ended"];
1784
- a.each(f, function(c, e) {
1785
- var f = "video" + e.charAt(0).toUpperCase() + e.slice(1);
1786
- b.player.on(e, function() {
1787
- b.trigger({
1788
- type: f,
1789
- video: d
1790
- }), a.isFunction(b.settings[f]) && b.settings[f].call(b, {
1791
- type: f,
1792
- video: d
1793
- })
1794
- })
1795
- })
1796
- }
1797
- },
1798
- play: function() {
1799
- b === !0 && this.player.isStarted() === !1 || "playing" === this.player.getState() || this.player.play()
1800
- },
1801
- stop: function() {
1802
- b === !0 && this.player.isStarted() === !1 || "stopped" === this.player.getState() || this.player.stop()
1803
- },
1804
- pause: function() {
1805
- b === !0 && this.player.isStarted() === !1 || "paused" === this.player.getState() || this.player.pause()
1806
- },
1807
- replay: function() {
1808
- (b !== !0 || this.player.isStarted() !== !1) && this.player.replay()
1809
- },
1810
- on: function(a, b) {
1811
- return this.$video.on(a, b)
1812
- },
1813
- off: function(a) {
1814
- return this.$video.off(a)
1815
- },
1816
- trigger: function(a) {
1817
- return this.$video.triggerHandler(a)
1818
- },
1819
- destroy: function() {
1820
- this.player.isStarted() === !0 && this.stop(), this.player.off("ready"), this.player.off("start"), this.player.off("play"), this.player.off("pause"), this.player.off("ended"), this.$video.removeData("videoController")
1821
- },
1822
- defaults: {
1823
- videoReady: function() {},
1824
- videoStart: function() {},
1825
- videoPlay: function() {},
1826
- videoPause: function() {},
1827
- videoEnded: function() {}
1828
- }
1829
- }, a.VideoController = {
1830
- players: {},
1831
- addPlayer: function(a, b) {
1832
- this.players[a] = b
1833
- }
1834
- }, a.fn.videoController = function(b) {
1835
- var d = Array.prototype.slice.call(arguments, 1);
1836
- return this.each(function() {
1837
- if ("undefined" == typeof a(this).data("videoController")) {
1838
- var e = new c(this, b);
1839
- a(this).data("videoController", e)
1840
- } else if ("undefined" != typeof b) {
1841
- var f = a(this).data("videoController");
1842
- "function" == typeof f[b] ? f[b].apply(f, d) : a.error(b + " does not exist in videoController.")
1843
- }
1844
- })
1845
- };
1846
- var d = function(b) {
1847
- this.$video = b, this.player = null, this.ready = !1, this.started = !1, this.state = "", this.events = a({}), this._init()
1848
- };
1849
- d.prototype = {
1850
- _init: function() {},
1851
- play: function() {},
1852
- pause: function() {},
1853
- stop: function() {},
1854
- replay: function() {},
1855
- isType: function() {},
1856
- isReady: function() {
1857
- return this.ready
1858
- },
1859
- isStarted: function() {
1860
- return this.started
1861
- },
1862
- getState: function() {
1863
- return this.state
1864
- },
1865
- on: function(a, b) {
1866
- return this.events.on(a, b)
1867
- },
1868
- off: function(a) {
1869
- return this.events.off(a)
1870
- },
1871
- trigger: function(a) {
1872
- return this.events.triggerHandler(a)
1873
- }
1874
- };
1875
- var e = {
1876
- youtubeAPIAdded: !1,
1877
- youtubeVideos: []
1878
- },
1879
- f = function(b) {
1880
- this.init = !1;
1881
- var c = window.YT && window.YT.Player;
1882
- if ("undefined" != typeof c) d.call(this, b);
1883
- else if (e.youtubeVideos.push({
1884
- video: b,
1885
- scope: this
1886
- }), e.youtubeAPIAdded === !1) {
1887
- e.youtubeAPIAdded = !0;
1888
- var f = document.createElement("script");
1889
- f.src = "http://www.youtube.com/player_api";
1890
- var g = document.getElementsByTagName("script")[0];
1891
- g.parentNode.insertBefore(f, g), window.onYouTubePlayerAPIReady = function() {
1892
- a.each(e.youtubeVideos, function(a, b) {
1893
- d.call(b.scope, b.video)
1894
- })
1895
- }
1896
- }
1897
- };
1898
- f.prototype = new d, f.prototype.constructor = f, a.VideoController.addPlayer("YoutubeVideo", f), f.isType = function(a) {
1899
- if (a.is("iframe")) {
1900
- var b = a.attr("src");
1901
- if (-1 !== b.indexOf("youtube.com") || -1 !== b.indexOf("youtu.be")) return !0
1902
- }
1903
- return !1
1904
- }, f.prototype._init = function() {
1905
- this.init = !0, this._setup()
1906
- }, f.prototype._setup = function() {
1907
- var a = this;
1908
- this.player = new YT.Player(this.$video[0], {
1909
- events: {
1910
- onReady: function() {
1911
- a.trigger({
1912
- type: "ready"
1913
- }), a.ready = !0
1914
- },
1915
- onStateChange: function(b) {
1916
- switch (b.data) {
1917
- case YT.PlayerState.PLAYING:
1918
- a.started === !1 && (a.started = !0, a.trigger({
1919
- type: "start"
1920
- })), a.state = "playing", a.trigger({
1921
- type: "play"
1922
- });
1923
- break;
1924
- case YT.PlayerState.PAUSED:
1925
- a.state = "paused", a.trigger({
1926
- type: "pause"
1927
- });
1928
- break;
1929
- case YT.PlayerState.ENDED:
1930
- a.state = "ended", a.trigger({
1931
- type: "ended"
1932
- })
1933
- }
1934
- }
1935
- }
1936
- })
1937
- }, f.prototype.play = function() {
1938
- var a = this;
1939
- if (this.ready === !0) this.player.playVideo();
1940
- else var b = setInterval(function() {
1941
- a.ready === !0 && (clearInterval(b), a.player.playVideo())
1942
- }, 100)
1943
- }, f.prototype.pause = function() {
1944
- b === !0 ? this.stop() : this.player.pauseVideo()
1945
- }, f.prototype.stop = function() {
1946
- this.player.seekTo(1), this.player.stopVideo(), this.state = "stopped"
1947
- }, f.prototype.replay = function() {
1948
- this.player.seekTo(1), this.player.playVideo()
1949
- }, f.prototype.on = function(a, b) {
1950
- var c = this;
1951
- if (this.init === !0) d.prototype.on.call(this, a, b);
1952
- else var e = setInterval(function() {
1953
- c.init === !0 && (clearInterval(e), d.prototype.on.call(c, a, b))
1954
- }, 100)
1955
- };
1956
- var g = {
1957
- vimeoAPIAdded: !1,
1958
- vimeoVideos: []
1959
- },
1960
- h = function(b) {
1961
- if (this.init = !1, "undefined" != typeof window.Froogaloop) d.call(this, b);
1962
- else if (g.vimeoVideos.push({
1963
- video: b,
1964
- scope: this
1965
- }), g.vimeoAPIAdded === !1) {
1966
- g.vimeoAPIAdded = !0;
1967
- var c = document.createElement("script");
1968
- c.src = "http://a.vimeocdn.com/js/froogaloop2.min.js";
1969
- var e = document.getElementsByTagName("script")[0];
1970
- e.parentNode.insertBefore(c, e);
1971
- var f = setInterval(function() {
1972
- "undefined" != typeof window.Froogaloop && (clearInterval(f), a.each(g.vimeoVideos, function(a, b) {
1973
- d.call(b.scope, b.video)
1974
- }))
1975
- }, 100)
1976
- }
1977
- };
1978
- h.prototype = new d, h.prototype.constructor = h, a.VideoController.addPlayer("VimeoVideo", h), h.isType = function(a) {
1979
- if (a.is("iframe")) {
1980
- var b = a.attr("src");
1981
- if (-1 !== b.indexOf("vimeo.com")) return !0
1982
- }
1983
- return !1
1984
- }, h.prototype._init = function() {
1985
- this.init = !0, this._setup()
1986
- }, h.prototype._setup = function() {
1987
- var a = this;
1988
- this.player = $f(this.$video[0]), this.player.addEvent("ready", function() {
1989
- a.ready = !0, a.trigger({
1990
- type: "ready"
1991
- }), a.player.addEvent("play", function() {
1992
- a.started === !1 && (a.started = !0, a.trigger({
1993
- type: "start"
1994
- })), a.state = "playing", a.trigger({
1995
- type: "play"
1996
- })
1997
- }), a.player.addEvent("pause", function() {
1998
- a.state = "paused", a.trigger({
1999
- type: "pause"
2000
- })
2001
- }), a.player.addEvent("finish", function() {
2002
- a.state = "ended", a.trigger({
2003
- type: "ended"
2004
- })
2005
- })
2006
- })
2007
- }, h.prototype.play = function() {
2008
- var a = this;
2009
- if (this.ready === !0) this.player.api("play");
2010
- else var b = setInterval(function() {
2011
- a.ready === !0 && (clearInterval(b), a.player.api("play"))
2012
- }, 100)
2013
- }, h.prototype.pause = function() {
2014
- this.player.api("pause")
2015
- }, h.prototype.stop = function() {
2016
- this.player.api("seekTo", 0), this.player.api("pause"), this.state = "stopped"
2017
- }, h.prototype.replay = function() {
2018
- this.player.api("seekTo", 0), this.player.api("play")
2019
- }, h.prototype.on = function(a, b) {
2020
- var c = this;
2021
- if (this.init === !0) d.prototype.on.call(this, a, b);
2022
- else var e = setInterval(function() {
2023
- c.init === !0 && (clearInterval(e), d.prototype.on.call(c, a, b))
2024
- }, 100)
2025
- };
2026
- var i = function(a) {
2027
- d.call(this, a)
2028
- };
2029
- i.prototype = new d, i.prototype.constructor = i, a.VideoController.addPlayer("HTML5Video", i), i.isType = function(a) {
2030
- return a.is("video") && a.hasClass("video-js") === !1 && a.hasClass("sublime") === !1 ? !0 : !1
2031
- }, i.prototype._init = function() {
2032
- var a = this;
2033
- this.player = this.$video[0], this.ready = !0, this.player.addEventListener("play", function() {
2034
- a.started === !1 && (a.started = !0, a.trigger({
2035
- type: "start"
2036
- })), a.state = "playing", a.trigger({
2037
- type: "play"
2038
- })
2039
- }), this.player.addEventListener("pause", function() {
2040
- a.state = "paused", a.trigger({
2041
- type: "pause"
2042
- })
2043
- }), this.player.addEventListener("ended", function() {
2044
- a.state = "ended", a.trigger({
2045
- type: "ended"
2046
- })
2047
- })
2048
- }, i.prototype.play = function() {
2049
- this.player.play()
2050
- }, i.prototype.pause = function() {
2051
- this.player.pause()
2052
- }, i.prototype.stop = function() {
2053
- this.player.currentTime = 0, this.player.pause(), this.state = "stopped"
2054
- }, i.prototype.replay = function() {
2055
- this.player.currentTime = 0, this.player.play()
2056
- };
2057
- var j = function(a) {
2058
- d.call(this, a)
2059
- };
2060
- j.prototype = new d, j.prototype.constructor = j, a.VideoController.addPlayer("VideoJSVideo", j), j.isType = function(a) {
2061
- return "undefined" == typeof a.attr("data-videojs-id") && !a.hasClass("video-js") || "undefined" == typeof videojs ? !1 : !0
2062
- }, j.prototype._init = function() {
2063
- var a = this,
2064
- b = this.$video.attr(this.$video.hasClass("video-js") ? "id" : "data-videojs-id");
2065
- this.player = videojs(b), this.player.ready(function() {
2066
- a.ready = !0, a.trigger({
2067
- type: "ready"
2068
- }), a.player.on("play", function() {
2069
- a.started === !1 && (a.started = !0, a.trigger({
2070
- type: "start"
2071
- })), a.state = "playing", a.trigger({
2072
- type: "play"
2073
- })
2074
- }), a.player.on("pause", function() {
2075
- a.state = "paused", a.trigger({
2076
- type: "pause"
2077
- })
2078
- }), a.player.on("ended", function() {
2079
- a.state = "ended", a.trigger({
2080
- type: "ended"
2081
- })
2082
- })
2083
- })
2084
- }, j.prototype.play = function() {
2085
- this.player.play()
2086
- }, j.prototype.pause = function() {
2087
- this.player.pause()
2088
- }, j.prototype.stop = function() {
2089
- this.player.currentTime(0), this.player.pause(), this.state = "stopped"
2090
- }, j.prototype.replay = function() {
2091
- this.player.currentTime(0), this.player.play()
2092
- };
2093
- var k = function(a) {
2094
- d.call(this, a)
2095
- };
2096
- k.prototype = new d, k.prototype.constructor = k, a.VideoController.addPlayer("SublimeVideo", k), k.isType = function(a) {
2097
- return a.hasClass("sublime") && "undefined" != typeof sublime ? !0 : !1
2098
- }, k.prototype._init = function() {
2099
- var a = this;
2100
- sublime.ready(function() {
2101
- a.player = sublime.player(a.$video.attr("id")), a.ready = !0, a.trigger({
2102
- type: "ready"
2103
- }), a.player.on("play", function() {
2104
- a.started === !1 && (a.started = !0, a.trigger({
2105
- type: "start"
2106
- })), a.state = "playing", a.trigger({
2107
- type: "play"
2108
- })
2109
- }), a.player.on("pause", function() {
2110
- a.state = "paused", a.trigger({
2111
- type: "pause"
2112
- })
2113
- }), a.player.on("stop", function() {
2114
- a.state = "stopped", a.trigger({
2115
- type: "stop"
2116
- })
2117
- }), a.player.on("end", function() {
2118
- a.state = "ended", a.trigger({
2119
- type: "ended"
2120
- })
2121
- })
2122
- })
2123
- }, k.prototype.play = function() {
2124
- this.player.play()
2125
- }, k.prototype.pause = function() {
2126
- this.player.pause()
2127
- }, k.prototype.stop = function() {
2128
- this.player.stop()
2129
- }, k.prototype.replay = function() {
2130
- this.player.stop(), this.player.play()
2131
- };
2132
- var l = function(a) {
2133
- d.call(this, a)
2134
- };
2135
- l.prototype = new d, l.prototype.constructor = l, a.VideoController.addPlayer("JWPlayerVideo", l), l.isType = function(a) {
2136
- return "undefined" == typeof a.attr("data-jwplayer-id") && !a.hasClass("jwplayer") && 0 === a.find("object[data*='jwplayer']").length || "undefined" == typeof jwplayer ? !1 : !0
2137
- }, l.prototype._init = function() {
2138
- var a, b = this;
2139
- this.$video.hasClass("jwplayer") ? a = this.$video.attr("id") : "undefined" != typeof this.$video.attr("data-jwplayer-id") ? a = this.$video.attr("data-jwplayer-id") : 0 !== this.$video.find("object[data*='jwplayer']").length && (a = this.$video.find("object").attr("id")), this.player = jwplayer(a), this.player.onReady(function() {
2140
- b.ready = !0, b.trigger({
2141
- type: "ready"
2142
- }), b.player.onPlay(function() {
2143
- b.started === !1 && (b.started = !0, b.trigger({
2144
- type: "start"
2145
- })), b.state = "playing", b.trigger({
2146
- type: "play"
2147
- })
2148
- }), b.player.onPause(function() {
2149
- b.state = "paused", b.trigger({
2150
- type: "pause"
2151
- })
2152
- }), b.player.onComplete(function() {
2153
- b.state = "ended", b.trigger({
2154
- type: "ended"
2155
- })
2156
- })
2157
- })
2158
- }, l.prototype.play = function() {
2159
- this.player.play(!0)
2160
- }, l.prototype.pause = function() {
2161
- this.player.pause(!0)
2162
- }, l.prototype.stop = function() {
2163
- this.player.stop(), this.state = "stopped"
2164
- }, l.prototype.replay = function() {
2165
- this.player.seek(0), this.player.play(!0)
2166
- }
2167
- }(jQuery);