j1-template 2021.2.4 → 2021.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09dbfff70a16ed74df238081b060f13508ec9fe23389ee21f9658caa5c0cc6df'
4
- data.tar.gz: f5e2167db6af04253321eebd10bf8b727ff2b0d501a99a84f8f88225d260e0dc
3
+ metadata.gz: 6c3932c4a5b4e39fc50c1382fbd810380d0c86bae03335ae127cf77134c1eef0
4
+ data.tar.gz: 75fe96704e5c071ef461fd56cd1d9da641c33429886dc7193ed879024f9c9bb9
5
5
  SHA512:
6
- metadata.gz: 0e6eb46994768e0ff33d7f408de15daf377b5f5b5473b7dd5a674a4451e15a10b2718b0faabe56338c0f89e3aff4aa4e721c9a1b4afbe4275085be397f36febf
7
- data.tar.gz: 4c36317c41ecd6ab66cd2f76515c9272b296e1834f66a6273094f299240e3b5b563fa31f59861c877b41e7fe5e026bc9ac0f693a69b0824d122c75e9a2b748a9
6
+ metadata.gz: b8c55f92c35f501797f6afef77e9aef2febc725abd04c6823d364cc9b28a1ec3d3362e2b51a3ba88210c465f8f11901ab47821cbda544df097da57e14d35276d
7
+ data.tar.gz: 680b669b2414889796575cd8a3cac157b8d2ec63222e8cb73a37799428ace01ce0ff3770f2ded6306f215514b1890a755cfd4628bc011197e2c28493facf5b74
@@ -26,6 +26,12 @@
26
26
  {% comment %} Main
27
27
  -------------------------------------------------------------------------------- {% endcomment %}
28
28
 
29
+ <script data-ad-client="{{publisher_id}}"
30
+ async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
31
+ </script>
32
+
33
+ {% comment %} to be checked
34
+ --------------------------------------------------------------------------------
29
35
  <script data-ad-client="{{publisher_id}}"
30
36
  $(document).ready(function() {
31
37
  var dependencies_met_page_finished = setInterval (function () {
@@ -35,6 +41,7 @@
35
41
  }
36
42
  }, 25); // END dependencies_met_page_finished
37
43
  </script>
44
+ -------------------------------------------------------------------------------- {% endcomment %}
38
45
 
39
46
  {% comment %} to be checked
40
47
  --------------------------------------------------------------------------------
@@ -157,29 +157,37 @@
157
157
  if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) {
158
158
  if (isVideo.youtube) {
159
159
  if (_this.core.s.loadYoutubeThumbnail) {
160
- thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
160
+ // jadams, 2021-10-27: disabled, loading always configured thumbImg
161
+ // thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
162
+ thumbImg = thumb;
161
163
  } else {
162
- thumbImg = thumb;
164
+ thumbImg = thumb;
163
165
  }
164
166
  } else if (isVideo.vimeo) {
165
167
  if (_this.core.s.loadVimeoThumbnail) {
166
- thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
167
- vimeoId = isVideo.vimeo[1];
168
+ // jadams, 2021-10-27: disabled, loading thumbImg this ways fails
169
+ // thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
170
+ // vimeoId = isVideo.vimeo[1];
171
+ thumbImg = thumb;
168
172
  } else {
169
- thumbImg = thumb;
173
+ thumbImg = thumb;
170
174
  }
171
175
  } else if (isVideo.dailymotion) {
172
176
  if (_this.core.s.loadDailymotionThumbnail) {
173
- thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
177
+ // jadams, 2021-10-27: disabled, loading always configured thumbImg
178
+ // thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
179
+ thumbImg = thumb;
174
180
  } else {
175
- thumbImg = thumb;
181
+ thumbImg = thumb;
176
182
  }
177
183
  }
178
184
  } else {
179
185
  thumbImg = thumb;
180
186
  }
181
187
 
182
- thumbList += '<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
188
+ // jadams, 2021-10-27: removed unclear data-vimeo-id
189
+ // thumbList += '<div ="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
190
+ thumbList += '<div class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
183
191
  vimeoId = '';
184
192
  }
185
193
 
data/lib/j1/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module J1
2
- VERSION = '2021.2.4'
2
+ VERSION = '2021.2.5'
3
3
  end
@@ -53,7 +53,7 @@ gem 'jekyll', '~> 4.2'
53
53
 
54
54
  # Theme Rubies, default: J1 Template (NOT used for the development system)
55
55
  #
56
- gem 'j1-template', '~> 2021.2.4'
56
+ gem 'j1-template', '~> 2021.2.5'
57
57
 
58
58
  # ------------------------------------------------------------------------------
59
59
  # PRODUCTION: Gem needed for the Jekyll and J1 prod environment
@@ -53,7 +53,7 @@ environment: development
53
53
  # ------------------------------------------------------------------------------
54
54
  # Sets the build version of J1 Template Gem
55
55
  #
56
- version: 2021.2.4
56
+ version: 2021.2.5
57
57
 
58
58
  # version
59
59
  # ------------------------------------------------------------------------------
@@ -433,7 +433,7 @@ end::tables[]
433
433
  // -----------------------------------------------------------------------------
434
434
  tag::products[]
435
435
  :j1--license: MIT License
436
- :j1--version: 2021.2.4
436
+ :j1--version: 2021.2.5
437
437
  :j1--site-name: Jekyll One
438
438
  end::products[]
439
439
 
@@ -364,6 +364,6 @@ end
364
364
 
365
365
  module Jekyll
366
366
  module J1LunrSearch
367
- VERSION = '2021.2.4'
367
+ VERSION = '2021.2.5'
368
368
  end
369
369
  end
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "j1_starter",
4
- "version": "2021.2.4",
4
+ "version": "2021.2.5",
5
5
  "description": "J1 Template Starter Web",
6
6
  "homepage": "https://your.site",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2021.2.4",
4
+ "version": "2021.2.5",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2021.2.4",
4
+ "version": "2021.2.5",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j1-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 2021.2.4
4
+ version: 2021.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - juergen_jekyll_one
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -1159,8 +1159,6 @@ files:
1159
1159
  - assets/themes/j1/modules/lightGallery/js/modules/lg-share.min.js
1160
1160
  - assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.js
1161
1161
  - assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.min.js
1162
- - assets/themes/j1/modules/lightGallery/js/modules/lg-video.js
1163
- - assets/themes/j1/modules/lightGallery/js/modules/lg-video.min.js
1164
1162
  - assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.js
1165
1163
  - assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.min.js
1166
1164
  - assets/themes/j1/modules/lightbox/LICENSE
@@ -1813,7 +1811,6 @@ files:
1813
1811
  - lib/starter_web/assets/images/modules/patterns/1x1.png
1814
1812
  - lib/starter_web/assets/images/modules/patterns/gridtile.png
1815
1813
  - lib/starter_web/assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png
1816
- - lib/starter_web/assets/images/pages/features/percentage_global_mobile_tr.jpg
1817
1814
  - lib/starter_web/assets/images/pages/modals/01_frame_modal.jpg
1818
1815
  - lib/starter_web/assets/images/pages/modals/02_site_modal.jpg
1819
1816
  - lib/starter_web/assets/images/pages/modals/03_central_modal.jpg
@@ -1,342 +0,0 @@
1
- /*! lg-video - v1.2.2 - 2018-05-01
2
- * http://sachinchoolur.github.io/lightGallery
3
- * Copyright (c) 2018 Sachin N; Licensed GPLv3 */
4
-
5
- (function (root, factory) {
6
- if (typeof define === 'function' && define.amd) {
7
- // AMD. Register as an anonymous module unless amdModuleId is set
8
- define(['jquery'], function (a0) {
9
- return (factory(a0));
10
- });
11
- } else if (typeof module === 'object' && module.exports) {
12
- // Node. Does not work with strict CommonJS, but
13
- // only CommonJS-like environments that support module.exports,
14
- // like Node.
15
- module.exports = factory(require('jquery'));
16
- } else {
17
- factory(root["jQuery"]);
18
- }
19
- }(this, function ($) {
20
-
21
- (function() {
22
-
23
- 'use strict';
24
-
25
- var defaults = {
26
- videoMaxWidth: '855px',
27
-
28
- autoplayFirstVideo: true,
29
-
30
- youtubePlayerParams: false,
31
- vimeoPlayerParams: false,
32
- dailymotionPlayerParams: false,
33
- vkPlayerParams: false,
34
-
35
- videojs: false,
36
- videojsOptions: {}
37
- };
38
-
39
- var Video = function(element) {
40
-
41
- this.core = $(element).data('lightGallery');
42
-
43
- this.$el = $(element);
44
- this.core.s = $.extend({}, defaults, this.core.s);
45
- this.videoLoaded = false;
46
-
47
- this.init();
48
-
49
- return this;
50
- };
51
-
52
- Video.prototype.init = function() {
53
- var _this = this;
54
-
55
- // Event triggered when video url found without poster
56
- _this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
57
-
58
- // Set max width for video
59
- _this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
60
-
61
- if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {
62
- _this.core.$el.on('onSlideClick.lg.tm', function() {
63
- var $el = _this.core.$slide.eq(_this.core.index);
64
- _this.loadVideoOnclick($el);
65
- });
66
- } else {
67
-
68
- // For IE 9 and bellow
69
- _this.core.$slide.on('click.lg', function() {
70
- _this.loadVideoOnclick($(this));
71
- });
72
- }
73
-
74
- _this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
75
-
76
- _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
77
- _this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
78
- });
79
-
80
- if (_this.core.s.autoplayFirstVideo) {
81
- _this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
82
- if (!_this.core.lGalleryOn) {
83
- var $el = _this.core.$slide.eq(index);
84
- setTimeout(function () {
85
- _this.loadVideoOnclick($el);
86
- }, 100);
87
- }
88
- });
89
- }
90
- };
91
-
92
- Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
93
- var video = '';
94
- var autoplay = 1;
95
- var a = '';
96
- var isVideo = this.core.isVideo(src, index) || {};
97
-
98
- // Enable autoplay based on setting for first video if poster doesn't exist
99
- if (noPoster) {
100
- if (this.videoLoaded) {
101
- autoplay = 0;
102
- } else {
103
- autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;
104
- }
105
- }
106
-
107
- if (isVideo.youtube) {
108
-
109
- a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
110
- if (this.core.s.youtubePlayerParams) {
111
- a = a + '&' + $.param(this.core.s.youtubePlayerParams);
112
- }
113
-
114
- video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
115
-
116
- } else if (isVideo.vimeo) {
117
-
118
- a = '?autoplay=' + autoplay + '&api=1';
119
- if (this.core.s.vimeoPlayerParams) {
120
- a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
121
- }
122
-
123
- video = '<iframe class="lg-video-object lg-vimeo ' + addClass + '" width="560" height="315" src="//player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
124
-
125
- } else if (isVideo.dailymotion) {
126
-
127
- a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
128
- if (this.core.s.dailymotionPlayerParams) {
129
- a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
130
- }
131
-
132
- video = '<iframe class="lg-video-object lg-dailymotion ' + addClass + '" width="560" height="315" src="//www.dailymotion.com/embed/video/' + isVideo.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
133
-
134
- } else if (isVideo.html5) {
135
- var fL = html.substring(0, 1);
136
- if (fL === '.' || fL === '#') {
137
- html = $(html).html();
138
- }
139
-
140
- video = html;
141
-
142
- } else if (isVideo.vk) {
143
-
144
- a = '&autoplay=' + autoplay;
145
- if (this.core.s.vkPlayerParams) {
146
- a = a + '&' + $.param(this.core.s.vkPlayerParams);
147
- }
148
-
149
- video = '<iframe class="lg-video-object lg-vk ' + addClass + '" width="560" height="315" src="//vk.com/video_ext.php?' + isVideo.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>';
150
-
151
- }
152
-
153
- return video;
154
- };
155
-
156
- Video.prototype.loadVideoOnclick = function($el){
157
-
158
- var _this = this;
159
- // check slide has poster
160
- if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
161
-
162
- // check already video element present
163
- if (!$el.hasClass('lg-has-video')) {
164
-
165
- $el.addClass('lg-video-playing lg-has-video');
166
-
167
- var _src;
168
- var _html;
169
- var _loadVideo = function(_src, _html) {
170
-
171
- $el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
172
-
173
- if (_html) {
174
- if (_this.core.s.videojs) {
175
- try {
176
- videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
177
- this.play();
178
- });
179
- } catch (e) {
180
- console.error('Make sure you have included videojs');
181
- }
182
- } else {
183
- _this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
184
- }
185
- }
186
-
187
- };
188
-
189
- if (_this.core.s.dynamic) {
190
-
191
- _src = _this.core.s.dynamicEl[_this.core.index].src;
192
- _html = _this.core.s.dynamicEl[_this.core.index].html;
193
-
194
- _loadVideo(_src, _html);
195
-
196
- } else {
197
-
198
- _src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');
199
- _html = _this.core.$items.eq(_this.core.index).attr('data-html');
200
-
201
- _loadVideo(_src, _html);
202
-
203
- }
204
-
205
- var $tempImg = $el.find('.lg-object');
206
- $el.find('.lg-video').append($tempImg);
207
-
208
- // @todo loading icon for html5 videos also
209
- // for showing the loading indicator while loading video
210
- if (!$el.find('.lg-video-object').hasClass('lg-html5')) {
211
- $el.removeClass('lg-complete');
212
- $el.find('.lg-video-object').on('load.lg error.lg', function() {
213
- $el.addClass('lg-complete');
214
- });
215
- }
216
-
217
- } else {
218
-
219
- var youtubePlayer = $el.find('.lg-youtube').get(0);
220
- var vimeoPlayer = $el.find('.lg-vimeo').get(0);
221
- var dailymotionPlayer = $el.find('.lg-dailymotion').get(0);
222
- var html5Player = $el.find('.lg-html5').get(0);
223
- if (youtubePlayer) {
224
- youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
225
- } else if (vimeoPlayer) {
226
- try {
227
- $f(vimeoPlayer).api('play');
228
- } catch (e) {
229
- console.error('Make sure you have included froogaloop2 js');
230
- }
231
- } else if (dailymotionPlayer) {
232
- dailymotionPlayer.contentWindow.postMessage('play', '*');
233
-
234
- } else if (html5Player) {
235
- if (_this.core.s.videojs) {
236
- try {
237
- videojs(html5Player).play();
238
- } catch (e) {
239
- console.error('Make sure you have included videojs');
240
- }
241
- } else {
242
- html5Player.play();
243
- }
244
- }
245
-
246
- $el.addClass('lg-video-playing');
247
-
248
- }
249
- }
250
- };
251
-
252
- Video.prototype.destroy = function() {
253
- this.videoLoaded = false;
254
- };
255
-
256
- function onHasVideo(event, index, src, html) {
257
- /*jshint validthis:true */
258
- var _this = this;
259
- _this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
260
- if (html) {
261
- if (_this.core.s.videojs) {
262
- try {
263
- videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
264
- if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
265
- this.play();
266
- }
267
- });
268
- } catch (e) {
269
- console.error('Make sure you have included videojs');
270
- }
271
- } else {
272
- if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
273
- _this.core.$slide.eq(index).find('.lg-html5').get(0).play();
274
- }
275
- }
276
- }
277
- }
278
-
279
- function onAferAppendSlide(event, index) {
280
- /*jshint validthis:true */
281
- var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');
282
- if (!$videoCont.hasClass('lg-has-iframe')) {
283
- $videoCont.css('max-width', this.core.s.videoMaxWidth);
284
- this.videoLoaded = true;
285
- }
286
- }
287
-
288
- function onBeforeSlide(event, prevIndex, index) {
289
- /*jshint validthis:true */
290
- var _this = this;
291
-
292
- var $videoSlide = _this.core.$slide.eq(prevIndex);
293
- var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
294
- var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
295
- var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
296
- var vkPlayer = $videoSlide.find('.lg-vk').get(0);
297
- var html5Player = $videoSlide.find('.lg-html5').get(0);
298
- if (youtubePlayer) {
299
- youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
300
- } else if (vimeoPlayer) {
301
- try {
302
- $f(vimeoPlayer).api('pause');
303
- } catch (e) {
304
- console.error('Make sure you have included froogaloop2 js');
305
- }
306
- } else if (dailymotionPlayer) {
307
- dailymotionPlayer.contentWindow.postMessage('pause', '*');
308
-
309
- } else if (html5Player) {
310
- if (_this.core.s.videojs) {
311
- try {
312
- videojs(html5Player).pause();
313
- } catch (e) {
314
- console.error('Make sure you have included videojs');
315
- }
316
- } else {
317
- html5Player.pause();
318
- }
319
- } if (vkPlayer) {
320
- $(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
321
- }
322
-
323
- var _src;
324
- if (_this.core.s.dynamic) {
325
- _src = _this.core.s.dynamicEl[index].src;
326
- } else {
327
- _src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');
328
-
329
- }
330
-
331
- var _isVideo = _this.core.isVideo(_src, index) || {};
332
- if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {
333
- _this.core.$outer.addClass('lg-hide-download');
334
- }
335
-
336
- }
337
-
338
- $.fn.lightGallery.modules.video = Video;
339
-
340
- })();
341
-
342
- }));
@@ -1,5 +0,0 @@
1
- /*! lg-video - v1.2.2 - 2018-05-01
2
- * http://sachinchoolur.github.io/lightGallery
3
- * Copyright (c) 2018 Sachin N; Licensed GPLv3 */
4
-
5
- !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(a,b,c,d){var e=this;if(e.core.$slide.eq(b).find(".lg-video").append(e.loadVideo(c,"lg-object",!0,b,d)),d)if(e.core.s.videojs)try{videojs(e.core.$slide.eq(b).find(".lg-html5").get(0),e.core.s.videojsOptions,function(){!e.videoLoaded&&e.core.s.autoplayFirstVideo&&this.play()})}catch(a){console.error("Make sure you have included videojs")}else!e.videoLoaded&&e.core.s.autoplayFirstVideo&&e.core.$slide.eq(b).find(".lg-html5").get(0).play()}function c(a,b){var c=this.core.$slide.eq(b).find(".lg-video-cont");c.hasClass("lg-has-iframe")||(c.css("max-width",this.core.s.videoMaxWidth),this.videoLoaded=!0)}function d(b,c,d){var e=this,f=e.core.$slide.eq(c),g=f.find(".lg-youtube").get(0),h=f.find(".lg-vimeo").get(0),i=f.find(".lg-dailymotion").get(0),j=f.find(".lg-vk").get(0),k=f.find(".lg-html5").get(0);if(g)g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*");else if(h)try{$f(h).api("pause")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(i)i.contentWindow.postMessage("pause","*");else if(k)if(e.core.s.videojs)try{videojs(k).pause()}catch(a){console.error("Make sure you have included videojs")}else k.pause();j&&a(j).attr("src",a(j).attr("src").replace("&autoplay","&noplay"));var l;l=e.core.s.dynamic?e.core.s.dynamicEl[d].src:e.core.$items.eq(d).attr("href")||e.core.$items.eq(d).attr("data-src");var m=e.core.isVideo(l,d)||{};(m.youtube||m.vimeo||m.dailymotion||m.vk)&&e.core.$outer.addClass("lg-hide-download")}var e={videoMaxWidth:"855px",autoplayFirstVideo:!0,youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1,videojsOptions:{}},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.videoLoaded=!1,this.init(),this};f.prototype.init=function(){var e=this;e.core.$el.on("hasVideo.lg.tm",b.bind(this)),e.core.$el.on("onAferAppendSlide.lg.tm",c.bind(this)),e.core.doCss()&&e.core.$items.length>1&&(e.core.s.enableSwipe||e.core.s.enableDrag)?e.core.$el.on("onSlideClick.lg.tm",function(){var a=e.core.$slide.eq(e.core.index);e.loadVideoOnclick(a)}):e.core.$slide.on("click.lg",function(){e.loadVideoOnclick(a(this))}),e.core.$el.on("onBeforeSlide.lg.tm",d.bind(this)),e.core.$el.on("onAfterSlide.lg.tm",function(a,b){e.core.$slide.eq(b).removeClass("lg-video-playing")}),e.core.s.autoplayFirstVideo&&e.core.$el.on("onAferAppendSlide.lg.tm",function(a,b){if(!e.core.lGalleryOn){var c=e.core.$slide.eq(b);setTimeout(function(){e.loadVideoOnclick(c)},100)}})},f.prototype.loadVideo=function(b,c,d,e,f){var g="",h=1,i="",j=this.core.isVideo(b,e)||{};if(d&&(h=this.videoLoaded?0:this.core.s.autoplayFirstVideo?1:0),j.youtube)i="?wmode=opaque&autoplay="+h+"&enablejsapi=1",this.core.s.youtubePlayerParams&&(i=i+"&"+a.param(this.core.s.youtubePlayerParams)),g='<iframe class="lg-video-object lg-youtube '+c+'" width="560" height="315" src="//www.youtube.com/embed/'+j.youtube[1]+i+'" frameborder="0" allowfullscreen></iframe>';else if(j.vimeo)i="?autoplay="+h+"&api=1",this.core.s.vimeoPlayerParams&&(i=i+"&"+a.param(this.core.s.vimeoPlayerParams)),g='<iframe class="lg-video-object lg-vimeo '+c+'" width="560" height="315" src="//player.vimeo.com/video/'+j.vimeo[1]+i+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';else if(j.dailymotion)i="?wmode=opaque&autoplay="+h+"&api=postMessage",this.core.s.dailymotionPlayerParams&&(i=i+"&"+a.param(this.core.s.dailymotionPlayerParams)),g='<iframe class="lg-video-object lg-dailymotion '+c+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+j.dailymotion[1]+i+'" frameborder="0" allowfullscreen></iframe>';else if(j.html5){var k=f.substring(0,1);"."!==k&&"#"!==k||(f=a(f).html()),g=f}else j.vk&&(i="&autoplay="+h,this.core.s.vkPlayerParams&&(i=i+"&"+a.param(this.core.s.vkPlayerParams)),g='<iframe class="lg-video-object lg-vk '+c+'" width="560" height="315" src="//vk.com/video_ext.php?'+j.vk[1]+i+'" frameborder="0" allowfullscreen></iframe>');return g},f.prototype.loadVideoOnclick=function(a){var b=this;if(a.find(".lg-object").hasClass("lg-has-poster")&&a.find(".lg-object").is(":visible"))if(a.hasClass("lg-has-video")){var c=a.find(".lg-youtube").get(0),d=a.find(".lg-vimeo").get(0),e=a.find(".lg-dailymotion").get(0),f=a.find(".lg-html5").get(0);if(c)c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*");else if(d)try{$f(d).api("play")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(e)e.contentWindow.postMessage("play","*");else if(f)if(b.core.s.videojs)try{videojs(f).play()}catch(a){console.error("Make sure you have included videojs")}else f.play();a.addClass("lg-video-playing")}else{a.addClass("lg-video-playing lg-has-video");var g,h,i=function(c,d){if(a.find(".lg-video").append(b.loadVideo(c,"",!1,b.core.index,d)),d)if(b.core.s.videojs)try{videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0),b.core.s.videojsOptions,function(){this.play()})}catch(a){console.error("Make sure you have included videojs")}else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play()};b.core.s.dynamic?(g=b.core.s.dynamicEl[b.core.index].src,h=b.core.s.dynamicEl[b.core.index].html,i(g,h)):(g=b.core.$items.eq(b.core.index).attr("href")||b.core.$items.eq(b.core.index).attr("data-src"),h=b.core.$items.eq(b.core.index).attr("data-html"),i(g,h));var j=a.find(".lg-object");a.find(".lg-video").append(j),a.find(".lg-video-object").hasClass("lg-html5")||(a.removeClass("lg-complete"),a.find(".lg-video-object").on("load.lg error.lg",function(){a.addClass("lg-complete")}))}},f.prototype.destroy=function(){this.videoLoaded=!1},a.fn.lightGallery.modules.video=f}()});