Photo Gallery by WD – Responsive Photo Gallery - Version 1.5.77

Version Description

  • Added: Select gallery/gallery group type on preview.
  • Fixed: XSS vulnerability.
  • Fixed: Lightbox close button on mobile.
  • Fixed: Gallery group preview image stretched.
  • Fixed: Adding image with dot in tag name.
  • Fixed: Warnings in filemanager.
  • Fixed: Image table header style on editing gallery.
  • Fixed: Bulk rotate.
  • Fixed: Create thumbnail for svg images.
Download this release

Release Info

Developer 10web
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.5.77
Comparing to
See all releases

Code changes from version 1.5.76 to 1.5.77

admin/controllers/Themes.php CHANGED
@@ -324,7 +324,6 @@ class ThemesController_bwg {
324
  'square' => __('Square', BWG()->prefix),
325
  );
326
 
327
-
328
  $params = array(
329
  'id' => $id,
330
  'row' => $row,
324
  'square' => __('Square', BWG()->prefix),
325
  );
326
 
 
327
  $params = array(
328
  'id' => $id,
329
  'row' => $row,
admin/models/AddTags.php CHANGED
@@ -43,9 +43,9 @@ class AddTagsModel_bwg {
43
  if ( !$total ) {
44
  $query .= ' ORDER BY `' . $orderby . '` ' .$order;
45
  if (!$all) {
46
- $query .= ' LIMIT %d, %d';
47
- $prepareArgs[] = $page_num;
48
- $prepareArgs[] = $page_per;
49
  }
50
  }
51
 
43
  if ( !$total ) {
44
  $query .= ' ORDER BY `' . $orderby . '` ' .$order;
45
  if (!$all) {
46
+ $query .= ' LIMIT %d, %d';
47
+ $prepareArgs[] = $page_num;
48
+ $prepareArgs[] = $page_per;
49
  }
50
  }
51
 
admin/models/Albumsgalleries.php CHANGED
@@ -47,7 +47,6 @@ class AlbumsgalleriesModel_bwg {
47
  return $wpdb->get_var( $wpdb->prepare($query, $prepareArgs) );
48
  }
49
  $rows = $wpdb->get_results( $wpdb->prepare($query, $prepareArgs) );
50
-
51
  return $rows;
52
  }
53
 
47
  return $wpdb->get_var( $wpdb->prepare($query, $prepareArgs) );
48
  }
49
  $rows = $wpdb->get_results( $wpdb->prepare($query, $prepareArgs) );
 
50
  return $rows;
51
  }
52
 
admin/models/Galleries.php CHANGED
@@ -1135,17 +1135,13 @@ class GalleriesModel_bwg {
1135
  imagedestroy($thumb_rotate);
1136
  }
1137
  }
1138
- $resolution_thumb = isset($image_data->resolution_thumb) ? $image_data->resolution_thumb : '';
1139
- if ( $resolution_thumb == '' ) {
1140
- $resolution_thumb = WDWLibrary::get_thumb_size($image_data->thumb_url);
1141
- }
1142
  if ( $resolution_thumb != '' ) {
1143
- $res = explode('x', $resolution_thumb);
1144
- $resolution_thumb = $res[1] . "x" . $res[0];
1145
  WDWLibrary::update_thumb_dimansions($resolution_thumb, "id = $image_data->id");
1146
  }
1147
  }
1148
- WDWLibrary::update_image_modified_date($where);
1149
 
1150
  return 22;
1151
  }
@@ -1242,7 +1238,7 @@ class GalleriesModel_bwg {
1242
  }
1243
  }
1244
  }
1245
- WDWLibrary::update_image_modified_date($where);
1246
 
1247
  return 24;
1248
  }
1135
  imagedestroy($thumb_rotate);
1136
  }
1137
  }
1138
+ $resolution_thumb = WDWLibrary::get_thumb_size($image_data->thumb_url);
1139
+
 
 
1140
  if ( $resolution_thumb != '' ) {
 
 
1141
  WDWLibrary::update_thumb_dimansions($resolution_thumb, "id = $image_data->id");
1142
  }
1143
  }
1144
+ WDWLibrary::update_image_modified_date($where, $prepareArgs);
1145
 
1146
  return 22;
1147
  }
1238
  }
1239
  }
1240
  }
1241
+ WDWLibrary::update_image_modified_date($where, $prepareArgs);
1242
 
1243
  return 24;
1244
  }
admin/views/Albums.php CHANGED
@@ -170,6 +170,23 @@ class AlbumsView_bwg extends AdminView_bwg {
170
  wp_enqueue_script('thickbox');
171
  $row = $params['row'];
172
  $enable_wp_editor = isset(BWG()->options->enable_wp_editor) ? BWG()->options->enable_wp_editor : 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  ?>
174
  <div class="bwg-page-header wd-list-view-header">
175
  <div class="wd-page-title wd-header wd-list-view-header-left">
@@ -178,17 +195,31 @@ class AlbumsView_bwg extends AdminView_bwg {
178
  <input type="text" id="name" name="name" value="<?php echo !empty($row->name) ? esc_attr( $row->name ) : ''; ?>">
179
  </div>
180
  <div class="bwg-page-actions">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  <?php
182
  if ( $params['shortcode_id'] ) {
183
  require BWG()->plugin_dir . '/framework/howto/howto.php';
184
  }
185
  ?>
186
- <button class="tw-button-primary button-large" onclick="if (spider_check_required('name', 'Title')) {return false;}; spider_set_input_value('task', 'save')">
187
- <?php echo ($params['id']) ? __('Update', BWG()->prefix) : __('Publish', BWG()->prefix); ?>
188
- </button>
189
- <?php if ($params['id'] && $params['preview_action']) { ?>
190
- <a class="tw-button-secondary tw-preview-button button-large" href="<?php echo $params['preview_action']; ?>" target="_blank"><?php _e('Preview', BWG()->prefix); ?></a>
191
- <?php } ?>
192
  </div>
193
  </div>
194
  <?php
@@ -248,33 +279,33 @@ class AlbumsView_bwg extends AdminView_bwg {
248
  <div class="wd-table-col-50">
249
  <div class="wd-box-section">
250
  <div class="wd-box-content">
251
- <div class="wd-group">
252
- <label class="wd-label"><?php _e('Author', BWG()->prefix); ?></label>
253
- <span><?php echo esc_html($row->author); ?></span>
254
- </div>
255
- <div class="wd-group">
256
- <label class="wd-label" for="slug"><?php _e('Slug', BWG()->prefix); ?></label>
257
- <input type="text" id="slug" name="slug" value="<?php echo esc_attr($row->slug); ?>">
258
- <input type="hidden" id="old_slug" name="old_slug" value="<?php echo esc_attr($row->slug); ?>">
259
- </div>
260
- <div class="wd-group">
261
- <label class="wd-label" for="description"><?php _e('Description', BWG()->prefix); ?> </label>
262
- <?php
263
- if ( user_can_richedit() && $enable_wp_editor ) {
264
- wp_editor(esc_html($row->description), 'description', array(
265
- 'teeny' => TRUE,
266
- 'textarea_name' => 'description',
267
- 'media_buttons' => FALSE,
268
- 'textarea_rows' => 5,
269
- ));
270
- }
271
- else {
272
- ?>
273
  <textarea cols="36" rows="5" id="description" name="description"
274
  class="wd-resize-vertical"><?php echo esc_html($row->description); ?></textarea>
275
- <?php
276
- }
277
- ?>
278
  </div>
279
  </div>
280
  </div>
170
  wp_enqueue_script('thickbox');
171
  $row = $params['row'];
172
  $enable_wp_editor = isset(BWG()->options->enable_wp_editor) ? BWG()->options->enable_wp_editor : 0;
173
+
174
+ /* Preview Section - set album_galleries types */
175
+ $demo_url_for_free = "https://demo.10web.io/photo-gallery/";
176
+ $get_album_gallery_types = array(
177
+ 'album_compact_preview' => array(
178
+ 'title' => __('Compact', BWG()->prefix),
179
+ 'preview_url' => add_query_arg('type', 'album_compact_preview', $params['preview_action']),
180
+ ),
181
+ 'album_masonry_preview' => array(
182
+ 'title' => __('Masonry', BWG()->prefix) . (!BWG()->is_pro ? '<span class="pro_btn">' . __('Premium', BWG()->prefix) . '</span>' : ''),
183
+ 'preview_url' => !BWG()->is_pro ? $demo_url_for_free : add_query_arg('type', 'album_masonry_preview', $params['preview_action']),
184
+ ),
185
+ 'album_extended_preview' => array(
186
+ 'title' => __('Extended', BWG()->prefix),
187
+ 'preview_url' => add_query_arg('type', 'album_extended_preview', $params['preview_action']),
188
+ ),
189
+ );
190
  ?>
191
  <div class="bwg-page-header wd-list-view-header">
192
  <div class="wd-page-title wd-header wd-list-view-header-left">
195
  <input type="text" id="name" name="name" value="<?php echo !empty($row->name) ? esc_attr( $row->name ) : ''; ?>">
196
  </div>
197
  <div class="bwg-page-actions">
198
+ <button class="tw-button-primary button-large" onclick="if (spider_check_required('name', 'Title')) {return false;}; spider_set_input_value('task', 'save')">
199
+ <?php echo ($params['id']) ? __('Update', BWG()->prefix) : __('Publish', BWG()->prefix); ?>
200
+ </button>
201
+
202
+ <?php /* Preview Section */
203
+ if ( $params['id'] && $params['preview_action'] ) { ?>
204
+ <div class="tw-button-secondary bwg-preview-button " id ="bwg-preview-button" onclick="bwg_preview_section(this);"><?php _e('Preview', BWG()->prefix); ?></div>
205
+ <div class="bwg-preview-section album">
206
+ <p><?php _e('Preview gallery group in:', BWG()->prefix); ?></p>
207
+ <?php foreach ( $get_album_gallery_types as $key => $value ) { ?>
208
+ <div class="bwg-preview-gallery-type" onclick="window.open('<?php echo $value['preview_url']; ?>')">
209
+ <div class="bwg-preview-gallery-type-icon"></div>
210
+ <div class="bwg-preview-gallery-type-title">
211
+ <?php echo $value["title"]; ?>
212
+ </div>
213
+ </div>
214
+ <?php } ?>
215
+ </div>
216
+ <?php } ?>
217
+
218
  <?php
219
  if ( $params['shortcode_id'] ) {
220
  require BWG()->plugin_dir . '/framework/howto/howto.php';
221
  }
222
  ?>
 
 
 
 
 
 
223
  </div>
224
  </div>
225
  <?php
279
  <div class="wd-table-col-50">
280
  <div class="wd-box-section">
281
  <div class="wd-box-content">
282
+ <div class="wd-group">
283
+ <label class="wd-label"><?php _e('Author', BWG()->prefix); ?></label>
284
+ <span><?php echo esc_html($row->author); ?></span>
285
+ </div>
286
+ <div class="wd-group">
287
+ <label class="wd-label" for="slug"><?php _e('Slug', BWG()->prefix); ?></label>
288
+ <input type="text" id="slug" name="slug" value="<?php echo esc_attr($row->slug); ?>">
289
+ <input type="hidden" id="old_slug" name="old_slug" value="<?php echo esc_attr($row->slug); ?>">
290
+ </div>
291
+ <div class="wd-group">
292
+ <label class="wd-label" for="description"><?php _e('Description', BWG()->prefix); ?> </label>
293
+ <?php
294
+ if ( user_can_richedit() && $enable_wp_editor ) {
295
+ wp_editor(esc_html($row->description), 'description', array(
296
+ 'teeny' => TRUE,
297
+ 'textarea_name' => 'description',
298
+ 'media_buttons' => FALSE,
299
+ 'textarea_rows' => 5,
300
+ ));
301
+ }
302
+ else {
303
+ ?>
304
  <textarea cols="36" rows="5" id="description" name="description"
305
  class="wd-resize-vertical"><?php echo esc_html($row->description); ?></textarea>
306
+ <?php
307
+ }
308
+ ?>
309
  </div>
310
  </div>
311
  </div>
admin/views/Galleries.php CHANGED
@@ -185,6 +185,40 @@ class GalleriesView_bwg extends AdminView_bwg {
185
  $row = $params['row'];
186
  $current_id = $params['id'];
187
  $enable_wp_editor = isset(BWG()->options->enable_wp_editor) ? BWG()->options->enable_wp_editor : 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  ?>
189
  <div class="gal-msg wd-hide">
190
  <?php
@@ -206,23 +240,35 @@ class GalleriesView_bwg extends AdminView_bwg {
206
  <input type="text" id="name" name="name" class="bwg_requried" value="<?php echo !empty($row->name) ? $row->name : ''; ?>">
207
  </div>
208
  <div class="bwg-page-actions">
209
- <?php
210
- if ( $params['shortcode_id'] ) {
211
- require BWG()->plugin_dir . '/framework/howto/howto.php';
212
- }
213
- ?>
214
- <button class="tw-button-primary button-large" onclick="if (spider_check_required('name', 'Title') || bwg_check_instagram_gallery_input('<?php echo BWG()->options->instagram_access_token ?>') ) {return false;};
215
- spider_set_input_value('task', 'save');
216
- spider_set_input_value('ajax_task', '');
217
- spider_set_input_value('bulk-action-selector-top', '-1');
218
- spider_ajax_save('<?php echo BWG()->prefix . '_gallery'; ?>');return false;">
219
- <?php echo ($params['id']) ? __('Update', BWG()->prefix) : __('Publish', BWG()->prefix); ?>
220
- </button>
221
- <?php if ( $params['id'] && $params['preview_action'] ) { ?>
222
- <a href="<?php echo $params['preview_action'] ?>" target="_blank" class="tw-button-secondary">
223
- <?php _e('Preview', BWG()->prefix); ?>
224
- </a>
225
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
226
  </div>
227
  </div>
228
  <?php
@@ -406,9 +452,7 @@ class GalleriesView_bwg extends AdminView_bwg {
406
  <a href="<?php echo $params['add_images_action']; ?>" id="add_image_bwg" onclick="jQuery('#loading_div').show();jQuery( '#paged' ).val( 1 );jQuery( '#ajax_task' ).val( 'ajax_apply' );
407
  spider_ajax_save( 'bwg_gallery' );" class="button button-primary button-large thickbox thickbox-preview"
408
  title="<?php _e("Add Images", BWG()->prefix); ?>" onclick="return false;"
409
- style="margin-bottom:5px; <?php if ( $params['gallery_type'] != '' ) {
410
- echo 'display:none';
411
- } ?>">
412
  <?php _e('Add Images', BWG()->prefix); ?>
413
  </a>
414
  <input type="button" id="import_image_bwg" class="button button-secondary button-large" onclick="<?php echo (BWG()->is_demo ? 'alert(\'' . addslashes(__('This option is disabled in demo.', BWG()->prefix)) . '\');' : 'spider_media_uploader(event, true);'); ?>return false;" value="<?php _e("Import from Media Library", BWG()->prefix); ?>" style="<?php if ( $params['gallery_type'] != '' ) { echo 'display:none';} ?>" />
@@ -418,12 +462,8 @@ class GalleriesView_bwg extends AdminView_bwg {
418
  <script>
419
  var ajax_url = "<?php echo wp_nonce_url(admin_url('admin-ajax.php'), '', 'bwg_nonce'); ?>";
420
  </script>
421
- <input id="show_add_embed" class="button button-secondary button-large" title="<?php _e('Embed Media', BWG()->prefix); ?>" style="<?php if ( $params['gallery_type'] != '' ) {
422
- echo 'display:none';
423
- } ?>" type="button" onclick="jQuery('.opacity_add_embed').show(); jQuery('#add_embed_help').hide(); return false;" value="<?php _e('Embed Media', BWG()->prefix); ?>" />
424
- <input id="show_bulk_embed" class="button button-secondary button-large" title="<?php _e('Social Bulk Embed', BWG()->prefix); ?>" style="<?php if ( $params['gallery_type'] != '' ) {
425
- echo 'display:none';
426
- } ?>" type="button" onclick="<?php echo (!BWG()->is_pro ? 'alert(\'' . addslashes(__('This option is available in Premium version', BWG()->prefix)) . '\');' : 'jQuery(\'.opacity_bulk_embed\').show();'); ?> return false;" value="<?php _e('Social Bulk Embed', BWG()->prefix); ?>" />
427
  <?php
428
  if ( is_plugin_active('image-optimizer-wd/io-wd.php') && !empty($params['rows']) ) {
429
  ?><a href="<?php echo add_query_arg(array('page' => 'iowd_settings', 'target' => 'wd_gallery'), admin_url('admin.php')); ?>" class="button button-primary button-large" target="_blank"><?php _e("Optimize Images", BWG()->prefix); ?></a><?php
185
  $row = $params['row'];
186
  $current_id = $params['id'];
187
  $enable_wp_editor = isset(BWG()->options->enable_wp_editor) ? BWG()->options->enable_wp_editor : 0;
188
+
189
+ /* Preview Section - set galleries types */
190
+ $demo_url_for_free = "https://demo.10web.io/photo-gallery/";
191
+
192
+ $get_gallery_types = array(
193
+ 'thumbnails' => array(
194
+ 'title' => __('Thumbnails', BWG()->prefix),
195
+ 'preview_url' => add_query_arg('type', 'thumbnails', $params['preview_action']),
196
+ ),
197
+ 'thumbnails_masonry' => array(
198
+ 'title' => __('Masonry', BWG()->prefix) . (!BWG()->is_pro ? '<span class="pro_btn">' . __('Premium', BWG()->prefix) . '</span>' : ''),
199
+ 'preview_url' => !BWG()->is_pro ? $demo_url_for_free : add_query_arg('type', 'thumbnails_masonry', $params['preview_action']),
200
+ ),
201
+ 'thumbnails_mosaic' => array(
202
+ 'title' => __('Mosaic', BWG()->prefix) . (!BWG()->is_pro ? '<span class="pro_btn">' . __('Premium', BWG()->prefix) . '</span>' : ''),
203
+ 'preview_url' => !BWG()->is_pro ? $demo_url_for_free.'mosaic' : add_query_arg('type', 'thumbnails_mosaic', $params['preview_action']),
204
+ ),
205
+ 'slideshow' => array(
206
+ 'title' => __('Slideshow', BWG()->prefix),
207
+ 'preview_url' => add_query_arg('type', 'slideshow', $params['preview_action']),
208
+ ),
209
+ 'image_browser' => array(
210
+ 'title' => __('Image Browser', BWG()->prefix),
211
+ 'preview_url' => add_query_arg('type', 'image_browser', $params['preview_action']),
212
+ ),
213
+ 'blog_style' => array(
214
+ 'title' => __('Blog Style', BWG()->prefix) . (!BWG()->is_pro ? '<span class="pro_btn">' . __('Premium', BWG()->prefix) . '</span>' : ''),
215
+ 'preview_url' => !BWG()->is_pro ? $demo_url_for_free.'blog-style' : add_query_arg('type', 'blog_style', $params['preview_action']),
216
+ ),
217
+ 'carousel' => array(
218
+ 'title' => __('Carousel', BWG()->prefix) . (!BWG()->is_pro ? '<span class="pro_btn">' . __('Premium', BWG()->prefix) . '</span>' : ''),
219
+ 'preview_url' => !BWG()->is_pro ? $demo_url_for_free.'carousel' : add_query_arg('type', 'carousel', $params['preview_action']),
220
+ ),
221
+ );
222
  ?>
223
  <div class="gal-msg wd-hide">
224
  <?php
240
  <input type="text" id="name" name="name" class="bwg_requried" value="<?php echo !empty($row->name) ? $row->name : ''; ?>">
241
  </div>
242
  <div class="bwg-page-actions">
243
+ <button class="tw-button-primary button-large" onclick="if (spider_check_required('name', 'Title') || bwg_check_instagram_gallery_input('<?php echo BWG()->options->instagram_access_token ?>') ) {return false;};
244
+ spider_set_input_value('task', 'save');
245
+ spider_set_input_value('ajax_task', '');
246
+ spider_set_input_value('bulk-action-selector-top', '-1');
247
+ spider_ajax_save('<?php echo BWG()->prefix . '_gallery'; ?>');return false;">
248
+ <?php echo ($params['id']) ? __('Update', BWG()->prefix) : __('Publish', BWG()->prefix); ?>
249
+ </button>
250
+
251
+ <?php /* Preview Section */
252
+ if ( $params['id'] && $params['preview_action'] ) { ?>
253
+ <div class="tw-button-secondary bwg-preview-button " onclick="bwg_preview_section(this);"><?php _e('Preview', BWG()->prefix); ?></div>
254
+ <div class="bwg-preview-section">
255
+ <p><?php _e('Preview gallery in:', BWG()->prefix); ?></p>
256
+ <?php foreach ( $get_gallery_types as $key => $value ) { ?>
257
+ <div class="bwg-preview-gallery-type" onclick="window.open('<?php echo $value['preview_url']; ?>')">
258
+ <div class="bwg-preview-gallery-type-icon"></div>
259
+ <div class="bwg-preview-gallery-type-title">
260
+ <?php echo $value["title"]; ?>
261
+ </div>
262
+ </div>
263
+ <?php } ?>
264
+ </div>
265
+ <?php } ?>
266
+
267
+ <?php
268
+ if ( $params['shortcode_id'] ) {
269
+ require BWG()->plugin_dir . '/framework/howto/howto.php';
270
+ }
271
+ ?>
272
  </div>
273
  </div>
274
  <?php
452
  <a href="<?php echo $params['add_images_action']; ?>" id="add_image_bwg" onclick="jQuery('#loading_div').show();jQuery( '#paged' ).val( 1 );jQuery( '#ajax_task' ).val( 'ajax_apply' );
453
  spider_ajax_save( 'bwg_gallery' );" class="button button-primary button-large thickbox thickbox-preview"
454
  title="<?php _e("Add Images", BWG()->prefix); ?>" onclick="return false;"
455
+ style="margin-bottom:5px; <?php if ( $params['gallery_type'] != '' ) { echo 'display:none'; } ?>">
 
 
456
  <?php _e('Add Images', BWG()->prefix); ?>
457
  </a>
458
  <input type="button" id="import_image_bwg" class="button button-secondary button-large" onclick="<?php echo (BWG()->is_demo ? 'alert(\'' . addslashes(__('This option is disabled in demo.', BWG()->prefix)) . '\');' : 'spider_media_uploader(event, true);'); ?>return false;" value="<?php _e("Import from Media Library", BWG()->prefix); ?>" style="<?php if ( $params['gallery_type'] != '' ) { echo 'display:none';} ?>" />
462
  <script>
463
  var ajax_url = "<?php echo wp_nonce_url(admin_url('admin-ajax.php'), '', 'bwg_nonce'); ?>";
464
  </script>
465
+ <input id="show_add_embed" class="button button-secondary button-large" title="<?php _e('Embed Media', BWG()->prefix); ?>" style="<?php if ( $params['gallery_type'] != '' ) { echo 'display:none'; } ?>" type="button" onclick="jQuery('.opacity_add_embed').show(); jQuery('#add_embed_help').hide(); return false;" value="<?php _e('Embed Media', BWG()->prefix); ?>" />
466
+ <input id="show_bulk_embed" class="button button-secondary button-large" title="<?php _e('Social Bulk Embed', BWG()->prefix); ?>" style="<?php if ( $params['gallery_type'] != '' ) { echo 'display:none'; } ?>" type="button" onclick="<?php echo (!BWG()->is_pro ? 'alert(\'' . addslashes(__('This option is available in Premium version', BWG()->prefix)) . '\');' : 'jQuery(\'.opacity_bulk_embed\').show();'); ?> return false;" value="<?php _e('Social Bulk Embed', BWG()->prefix); ?>" />
 
 
 
 
467
  <?php
468
  if ( is_plugin_active('image-optimizer-wd/io-wd.php') && !empty($params['rows']) ) {
469
  ?><a href="<?php echo add_query_arg(array('page' => 'iowd_settings', 'target' => 'wd_gallery'), admin_url('admin.php')); ?>" class="button button-primary button-large" target="_blank"><?php _e("Optimize Images", BWG()->prefix); ?></a><?php
css/bwg_frontend.css CHANGED
@@ -17,6 +17,7 @@ figure.zoom img {
17
  transition: opacity 0.5s;
18
  display: block;
19
  }
 
20
  div[id^="bwg_container"] p {
21
  padding: 0 !important;
22
  margin: 0 !important;
@@ -172,6 +173,11 @@ div[id^="bwg_container"] div[id^="bwg_container"] .bwg_img_clear {
172
  z-index: 11100;
173
  }
174
 
 
 
 
 
 
175
  #spider_popup_left {
176
  left: 0;
177
  }
17
  transition: opacity 0.5s;
18
  display: block;
19
  }
20
+
21
  div[id^="bwg_container"] p {
22
  padding: 0 !important;
23
  margin: 0 !important;
173
  z-index: 11100;
174
  }
175
 
176
+ .spider_popup_close_fullscreen {
177
+ margin: 10px 7px;
178
+ right: 7px;
179
+ }
180
+
181
  #spider_popup_left {
182
  left: 0;
183
  }
css/bwg_tables.css CHANGED
@@ -40,8 +40,8 @@
40
  line-height: 19px;
41
  letter-spacing: 0;
42
  color: #32373C;
43
- color: #32373C;
44
  font-weight: 600;
 
45
  }
46
  .tw-button-secondary:hover {
47
  box-shadow: 0px 4px 8px #323A4524;
@@ -1152,6 +1152,8 @@ textarea.bwg_popup_input {
1152
  float: right;
1153
  width: 55%;
1154
  text-align: end;
 
 
1155
  }
1156
  .bwg-clear {
1157
  content: '';
@@ -2451,12 +2453,14 @@ form.bwg_form {
2451
  }
2452
 
2453
  .wd-list-view-header h1.bwg-heading {
2454
- padding-top:5px;
 
2455
  }
2456
 
2457
  .wd-list-view-header .wd-list-view-header-left {
2458
  display: flex;
2459
  justify-content: space-between;
 
2460
  margin-top: 30px;
2461
  flex-grow: 1;
2462
  }
@@ -2481,7 +2485,7 @@ form.bwg_form {
2481
  .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .page-title-action{
2482
  background: #2160B5 0% 0% no-repeat padding-box;
2483
  border-radius: 4px;
2484
- padding: 9px 20px;
2485
  font-size: 14px;
2486
  line-height: 19px;
2487
  font-weight: 600;
@@ -2490,15 +2494,15 @@ form.bwg_form {
2490
  text-decoration: none;
2491
  cursor: pointer;
2492
  position: relative;
2493
- top: 9px;
2494
- margin-right: 10px;
2495
  }
2496
 
2497
  .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .page-title-action:hover {
2498
  background-color: #104891;
2499
  }
2500
 
2501
- .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .bwg-howto-button,.bwg-page-actions .bwg-howto-button {
 
2502
  background: #F8F8F8 0% 0% no-repeat padding-box;
2503
  border: 1px solid #DEDEDE;
2504
  border-radius: 4px;
@@ -2511,6 +2515,24 @@ form.bwg_form {
2511
  cursor: pointer;
2512
  }
2513
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2514
  .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .bwg-howto-button:hover,
2515
  .bwg-page-actions .bwg-howto-button:hover {
2516
  box-shadow: 0px 4px 8px #323A4524;
@@ -2585,6 +2607,144 @@ a.wd-list-view-ask-question {
2585
 
2586
  /* End new header design */
2587
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2588
  /* Search box */
2589
 
2590
  .wd-form .list-search-box {
@@ -2727,10 +2887,13 @@ a.wd-list-view-ask-question {
2727
  border-top-color: #E5E5E5;
2728
  }
2729
 
 
 
 
2730
  .wd-form table.fixed thead a {
2731
  color: #323A45;
2732
  }
2733
- .wd-form table.fixed tbody a{
2734
  color: #2160b5;
2735
  }
2736
  .wd-form table.fixed tbody .row-actions span.trash a {
@@ -3269,7 +3432,7 @@ bwg-gallery-ul {
3269
  width: 100%;
3270
  margin-left: 14px;
3271
  }
3272
- .pro_btn {
3273
  position: relative;
3274
  top: 0px;
3275
  left: 0px;
@@ -3636,26 +3799,6 @@ bwg-gallery-ul {
3636
  right: -62px;
3637
  height: 72px;
3638
  }
3639
- .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons {
3640
- display: flex;
3641
- justify-content: flex-end;
3642
- }
3643
- .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .page-title-action {
3644
- padding: 9px 10px;
3645
- margin: 0 18px 0 0;
3646
- top: 0;
3647
- }
3648
- .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .bwg-howto-button {
3649
- padding: 9px 26px;
3650
- }
3651
- .bwg-page-actions .bwg-howto-button {
3652
- display: block;
3653
- margin: 10px;
3654
- }
3655
- .bwg-page-actions {
3656
- float: left;
3657
- width: unset;
3658
- }
3659
  .wd-form .list-search-box input[type=search] {
3660
  height: 27px;
3661
  padding: 8px 14px 8px 40px;
@@ -3695,6 +3838,49 @@ bwg-gallery-ul {
3695
  }
3696
  }
3697
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3698
  .wd-button,
3699
  .tw-button-primary,
3700
  .tw-button-secondary,
40
  line-height: 19px;
41
  letter-spacing: 0;
42
  color: #32373C;
 
43
  font-weight: 600;
44
+ display: inline-block;
45
  }
46
  .tw-button-secondary:hover {
47
  box-shadow: 0px 4px 8px #323A4524;
1152
  float: right;
1153
  width: 55%;
1154
  text-align: end;
1155
+ margin-bottom: 3px;
1156
+ position: relative;
1157
  }
1158
  .bwg-clear {
1159
  content: '';
2453
  }
2454
 
2455
  .wd-list-view-header h1.bwg-heading {
2456
+ padding-top: 5px;
2457
+ display: block;
2458
  }
2459
 
2460
  .wd-list-view-header .wd-list-view-header-left {
2461
  display: flex;
2462
  justify-content: space-between;
2463
+ align-items: flex-end;
2464
  margin-top: 30px;
2465
  flex-grow: 1;
2466
  }
2485
  .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .page-title-action{
2486
  background: #2160B5 0% 0% no-repeat padding-box;
2487
  border-radius: 4px;
2488
+ padding: 8px 15px;
2489
  font-size: 14px;
2490
  line-height: 19px;
2491
  font-weight: 600;
2494
  text-decoration: none;
2495
  cursor: pointer;
2496
  position: relative;
2497
+ top: 0px;
 
2498
  }
2499
 
2500
  .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .page-title-action:hover {
2501
  background-color: #104891;
2502
  }
2503
 
2504
+ .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .bwg-howto-button,
2505
+ .bwg-page-actions .bwg-howto-button {
2506
  background: #F8F8F8 0% 0% no-repeat padding-box;
2507
  border: 1px solid #DEDEDE;
2508
  border-radius: 4px;
2515
  cursor: pointer;
2516
  }
2517
 
2518
+ .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .bwg-howto-button,
2519
+ .bwg-page-actions .bwg-howto-button {
2520
+ padding: 8px 15px 8px 40px;
2521
+ position: relative;
2522
+ float:none;
2523
+ }
2524
+ .wd-list-view-header-buttons .bwg-howto-button:before,
2525
+ .bwg-page-actions .bwg-howto-button:before {
2526
+ content: "";
2527
+ background: url(images/button_plus.svg) no-repeat 5px ;
2528
+ background-position: 5px;
2529
+ background-color: #323A45;
2530
+ border-radius: 50%;
2531
+ position: absolute;
2532
+ padding: 9px;
2533
+ left: 15px;
2534
+ top: 9px;
2535
+ }
2536
  .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons .bwg-howto-button:hover,
2537
  .bwg-page-actions .bwg-howto-button:hover {
2538
  box-shadow: 0px 4px 8px #323A4524;
2607
 
2608
  /* End new header design */
2609
 
2610
+ /* Preview button and section new design */
2611
+ .bwg-preview-section {
2612
+ width: 246px;
2613
+ z-index: 99;
2614
+ top: 47px;
2615
+ right: 182px;
2616
+ text-align: left;
2617
+ border-radius: 8px;
2618
+ padding: 18px 0px 15px 20px;
2619
+ position: absolute;
2620
+ border: 1px solid #DDDDDD;
2621
+ background-color: #FFFFFF;
2622
+ box-shadow: 0px 5px 20px #E5E6E8CC;
2623
+ display: none;
2624
+ }
2625
+ .bwg-preview-section.album {
2626
+ right:225px;
2627
+ }
2628
+
2629
+ .bwg-preview-section p {
2630
+ margin: 0;
2631
+ opacity: 0.5;
2632
+ color: #323A45;
2633
+ font-size: 13px;
2634
+ line-height: normal;
2635
+ letter-spacing: 0.11px;
2636
+ }
2637
+
2638
+ .bwg-preview-section .bwg-preview-gallery-type {
2639
+ border-bottom: 1px solid #32373C0D;
2640
+ display: flex;
2641
+ flex-wrap: nowrap;
2642
+ flex-direction: row;
2643
+ align-items: center;
2644
+ position: relative;
2645
+ padding: 8px 0;
2646
+ clear: both;
2647
+ cursor: pointer;
2648
+ }
2649
+ .bwg-preview-section .bwg-preview-gallery-type:last-child {
2650
+ border-bottom: none;
2651
+ padding-bottom: 0;
2652
+ }
2653
+
2654
+ .bwg-preview-section .bwg-preview-gallery-type .bwg-preview-gallery-type-title {
2655
+ font-weight: 700;
2656
+ font-size: 14px;
2657
+ cursor: pointer;
2658
+ color: #323A45;
2659
+ text-decoration: none;
2660
+ }
2661
+
2662
+ .bwg-preview-section .bwg-preview-gallery-type .bwg-preview-gallery-type-title:after {
2663
+ content: "\2197";
2664
+ position: absolute;
2665
+ font-size: 12px;
2666
+ cursor: pointer;
2667
+ color: #323A45;
2668
+ opacity: 0.2;
2669
+ right: 20px;
2670
+ top: 20px;
2671
+ }
2672
+ .bwg-preview-section .bwg-preview-gallery-type .bwg-preview-gallery-type-title:hover:after {
2673
+ opacity: 0.5;
2674
+ }
2675
+
2676
+ .bwg-preview-section .bwg-preview-gallery-type .pro_btn {
2677
+ top: 19px;
2678
+ left: 120px;
2679
+ padding: 2px 8px;
2680
+ }
2681
+
2682
+ .bwg-preview-section .bwg-preview-gallery-type .bwg-preview-gallery-type-icon {
2683
+ width: 47px;
2684
+ height: 40px;
2685
+ margin-right: 10px;
2686
+ background-size: cover;
2687
+ background-repeat: no-repeat;
2688
+ background-position: center;
2689
+ }
2690
+ .bwg-preview-gallery-type:nth-child(2) .bwg-preview-gallery-type-icon {
2691
+ background-image: url(../images/thumbnails.svg);
2692
+ }
2693
+
2694
+ .bwg-preview-gallery-type:nth-child(3) .pro_btn { left: 120px; }
2695
+ .bwg-preview-gallery-type:nth-child(3) .bwg-preview-gallery-type-icon {
2696
+ background-image: url(../images/thumbnails_masonry.svg);
2697
+ }
2698
+
2699
+ .bwg-preview-gallery-type:nth-child(4) .pro_btn { left: 109px; }
2700
+ .bwg-preview-gallery-type:nth-child(4) .bwg-preview-gallery-type-icon {
2701
+ background-image: url(../images/thumbnails_mosaic.svg);
2702
+ }
2703
+
2704
+ .bwg-preview-gallery-type:nth-child(5) .bwg-preview-gallery-type-icon {
2705
+ background-image: url(../images/slideshow.svg);
2706
+ }
2707
+
2708
+ .bwg-preview-gallery-type:nth-child(6) .bwg-preview-gallery-type-icon {
2709
+ background-image: url(../images/image_browser.svg);
2710
+ }
2711
+
2712
+ .bwg-preview-gallery-type:nth-child(7) .pro_btn { left: 128px; }
2713
+ .bwg-preview-gallery-type:nth-child(7) .bwg-preview-gallery-type-icon {
2714
+ background-image: url(../images/blog_style.svg);
2715
+ }
2716
+
2717
+ .bwg-preview-gallery-type:nth-child(8) .pro_btn { left: 119px; }
2718
+ .bwg-preview-gallery-type:nth-child(8) .bwg-preview-gallery-type-icon {
2719
+ background-image: url(../images/carousel.svg);
2720
+ }
2721
+
2722
+ .bwg-preview-section.album .bwg-preview-gallery-type:nth-child(2) .bwg-preview-gallery-type-icon {
2723
+ background-image: url(../images/album_compact_preview.svg);
2724
+ }
2725
+ .bwg-preview-section.album .bwg-preview-gallery-type:nth-child(4) .bwg-preview-gallery-type-icon {
2726
+ background-image: url(../images/album_extended_preview.svg);
2727
+ }
2728
+
2729
+ .bwg-preview-button {
2730
+ margin-right: -4px;
2731
+ position: relative;
2732
+ padding: 8px 34px 8px 14px;
2733
+ }
2734
+ .bwg-preview-button:before,
2735
+ .bwg-preview-button.active:before{
2736
+ position: absolute;
2737
+ font-size: 8px;
2738
+ right: 10px;
2739
+ top: 9px;
2740
+ }
2741
+ .bwg-preview-button:before {
2742
+ content: "\25BC";
2743
+ }
2744
+ .bwg-preview-button.active:before {
2745
+ content: "\25B2";
2746
+ }
2747
+
2748
  /* Search box */
2749
 
2750
  .wd-form .list-search-box {
2887
  border-top-color: #E5E5E5;
2888
  }
2889
 
2890
+ .wd-form table.fixed thead {
2891
+ display: table-caption;
2892
+ }
2893
  .wd-form table.fixed thead a {
2894
  color: #323A45;
2895
  }
2896
+ .wd-form table.fixed tbody a {
2897
  color: #2160b5;
2898
  }
2899
  .wd-form table.fixed tbody .row-actions span.trash a {
3432
  width: 100%;
3433
  margin-left: 14px;
3434
  }
3435
+ .bwg_select_gallery_type .pro_btn {
3436
  position: relative;
3437
  top: 0px;
3438
  left: 0px;
3799
  right: -62px;
3800
  height: 72px;
3801
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3802
  .wd-form .list-search-box input[type=search] {
3803
  height: 27px;
3804
  padding: 8px 14px 8px 40px;
3838
  }
3839
  }
3840
 
3841
+ @media screen and (max-width: 655px) {
3842
+ .wd-list-view-header .wd-list-view-header-left {
3843
+ align-items: flex-start;
3844
+ flex-grow: 0;
3845
+ flex-wrap: wrap;
3846
+ flex-direction: column;
3847
+ }
3848
+ .wd-list-view-header .wd-list-view-header-left .wd-page-title.wd-header {
3849
+ margin-left: 5px;
3850
+ }
3851
+ .wd-list-view-header .wd-list-view-header-left .wd-list-view-header-buttons {
3852
+ margin-top: 20px;
3853
+ }
3854
+ .wd-list-view-header-left .bwg-page-actions {
3855
+ margin-top: 20px;
3856
+ text-align: start;
3857
+ }
3858
+ .bwg-preview-section {
3859
+ top: 42px;
3860
+ left: 0;
3861
+ right: auto;
3862
+ }
3863
+ }
3864
+
3865
+ @media screen and (max-width: 440px) {
3866
+ .wd-howto-divider-vertical-two {
3867
+ display: none;
3868
+ }
3869
+ .bwg-page-actions .bwg-howto-button {
3870
+ display: block;
3871
+ margin-top: 10px;
3872
+ }
3873
+ .wd-list-view-header .bwg-howto-button {
3874
+ display: block;
3875
+ margin-top: 20px;
3876
+ margin-left: 5px;
3877
+ }
3878
+ .bwg-page-header.wd-list-view-header .bwg-howto-button {
3879
+ margin-top: 10px;
3880
+ margin-left: 0px;
3881
+ }
3882
+ }
3883
+
3884
  .wd-button,
3885
  .tw-button-primary,
3886
  .tw-button-secondary,
css/free_trial_banner.css DELETED
@@ -1,219 +0,0 @@
1
- .tenweb_free_trial_banner {
2
- background: transparent linear-gradient(99deg, #008A62 0%, #23B536 100%) 0% 0% no-repeat padding-box;
3
- margin: 40px 0px -20px 0px;
4
- position: relative;
5
- width:100%;
6
- }
7
-
8
- #tenweb_free_trial_banner_close:before {
9
- content: "\2715";
10
- position: absolute;
11
- top: 12px; right: 15px;
12
- cursor: pointer;
13
- font-size: 13px;
14
- color: #fff;
15
- }
16
- #tenweb_free_trial_banner_close:hover:before {
17
- opacity: 70%;
18
- }
19
-
20
- .tenweb_free_trial_banner_container {
21
- width: 60%;
22
- display: flex;
23
- flex-direction: row;
24
- justify-content: space-between;
25
- align-items: center;
26
- margin:10px auto;
27
- }
28
-
29
- .tenweb_free_trial_banner_img {
30
- flex-basis: 19%;
31
- height: 117px;
32
- background-image: url(images/free_trial_banner.png);
33
- background-repeat: no-repeat;
34
- background-position: center;
35
- background-size: contain;
36
- }
37
-
38
- .tenweb_free_trial_banner_info {
39
- flex-basis: 62%;
40
- }
41
-
42
- .tenweb_free_trial_banner_info .tenweb_icon {
43
- background-image: url(images/tenweb_icon.svg);
44
- background-repeat: no-repeat;
45
- background-position: center;
46
- background-size: contain;
47
- margin: 0 0 8px;
48
- width: 80px;
49
- height: 22px;
50
- }
51
-
52
- .tenweb_free_trial_banner_info p {
53
- letter-spacing: 0.13px;
54
- line-height: normal;
55
- font-size: 16px;
56
- font-weight: 700;
57
- margin:0 0 10px 0;
58
- color: #fff;
59
- }
60
-
61
- .tenweb_free_trial_banner_info > div span {
62
- font-size: 14px;
63
- letter-spacing: 0px;
64
- line-height: normal;
65
- font-weight: 500;
66
- margin-right: 10px;
67
- color: #fff;
68
- }
69
-
70
- .tenweb_free_trial_banner_info > div span:before {
71
- content: "\2022";
72
- width: 5px;
73
- height: 5px;
74
- color:#DB9D2D;
75
- margin-right: 5px;
76
- }
77
-
78
- .tenweb_free_trial_banner_button {
79
- flex-basis: 23%;
80
- }
81
-
82
- .tenweb_free_trial_banner_button .ftb-button {
83
- color: #fff;
84
- border-radius: 25px;
85
- font-size: 14px;
86
- letter-spacing: 0.12px;
87
- font-weight: 500;
88
- line-height: 19px;
89
- padding: 11px 45px;
90
- text-decoration: none;
91
- display: inline-block;
92
- text-transform: uppercase;
93
- border: 1px solid #F8C332;
94
- background-color: #F8C332;
95
- }
96
-
97
- .tenweb_free_trial_banner_button .ftb-button:hover,
98
- .tenweb_free_trial_banner_button .ftb-button:focus {
99
- background-color: #f9bb11;
100
- border: 1px solid #f9bb11;
101
- box-shadow: none;
102
- outline:none;
103
- }
104
-
105
- @media screen and (max-width: 1640px) {
106
- .tenweb_free_trial_banner_container {
107
- width: 80%;
108
- }
109
- }
110
- @media screen and (max-width: 1380px) {
111
- .tenweb_free_trial_banner_container {
112
- width: 90%;
113
- }
114
- }
115
- @media screen and (max-width: 1280px) {
116
- .tenweb_free_trial_banner {
117
- max-width: 1062px;
118
- margin: 40px 0px -20px 0px;
119
- }
120
- .tenweb_free_trial_banner_container {
121
- width: 99%;
122
- }
123
- .tenweb_free_trial_banner_img {
124
- flex-basis: 20%;
125
- }
126
- .tenweb_free_trial_banner_info {
127
- flex-basis: 65%;
128
- }
129
- .tenweb_free_trial_banner_button {
130
- flex-basis: 23%;
131
- }
132
- }
133
- @media screen and (max-width: 1170px) {
134
- .tenweb_free_trial_banner_img {
135
- flex-basis: 19%;
136
- }
137
- .tenweb_free_trial_banner_info {
138
- flex-basis: 72%;
139
- }
140
- .tenweb_free_trial_banner_info p {
141
- font-size: 13px;
142
- }
143
- .tenweb_free_trial_banner_info > div span {
144
- font-size: 12px;
145
- }
146
- .tenweb_free_trial_banner_button .ftb-button {
147
- padding: 8px 30px;
148
- }
149
- }
150
-
151
- @media screen and (max-width: 1023px) {
152
- .tenweb_free_trial_banner_container {
153
- padding: 18px 22px;
154
- }
155
- .tenweb_free_trial_banner_img {
156
- display: none;
157
- }
158
- .tenweb_free_trial_banner_info {
159
- flex-basis: 75%;
160
- }
161
- .tenweb_free_trial_banner_info p {
162
- letter-spacing: 0.11px;
163
- font-size: 13px;
164
- }
165
- .tenweb_free_trial_banner_info > div span {
166
- font-size: 12px;
167
- }
168
- .tenweb_free_trial_banner_button {
169
- flex-basis: 27%;
170
- }
171
- }
172
-
173
- @media screen and (max-width: 730px) {
174
- .tenweb_free_trial_banner_container {
175
- flex-direction: column;
176
- text-align: center;
177
- padding: 0 15px;
178
- width: 90%;
179
- }
180
- .tenweb_free_trial_banner_container > div {
181
- flex-basis: 100%;
182
- }
183
- .tenweb_free_trial_banner_info .tenweb_icon {
184
- margin: 0 auto 5px;
185
- }
186
- .tenweb_free_trial_banner_container>div.tenweb_free_trial_banner_info {
187
- margin: 15px auto;
188
- }
189
- .tenweb_free_trial_banner_info p {
190
- font-size: 14px;
191
- }
192
- .tenweb_free_trial_banner_info .tenweb_info_sec {
193
- display:flex;
194
- flex-wrap: wrap;
195
- justify-content: center;
196
- }
197
- .tenweb_free_trial_banner_info .tenweb_info_sec span:nth-child(1) {
198
- order: 1;
199
- }
200
- .tenweb_free_trial_banner_info .tenweb_info_sec span:nth-child(2) {
201
- order: 4;
202
- }
203
- .tenweb_free_trial_banner_info .tenweb_info_sec span:nth-child(3) {
204
- order: 3;
205
- }
206
- .tenweb_free_trial_banner_info .tenweb_info_sec span:nth-child(4) {
207
- order: 2;
208
- }
209
- .tenweb_free_trial_banner_info > div span {
210
- margin-right: 7px;
211
- margin-bottom: 5px;
212
- }
213
- .tenweb_free_trial_banner_info > div span:before {
214
- margin-right: 4px;
215
- }
216
- .tenweb_free_trial_banner_container>div.tenweb_free_trial_banner_button {
217
- margin: 0 auto 15px;
218
- }
219
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/images/button_plus.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="7.758" height="7.758" viewBox="0 0 7.758 7.758"><defs><style>.a{fill:#fff;}</style></defs><path class="a" d="M8.651,3.929H5.784a.169.169,0,0,1-.169-.169V.893H3.929V3.76a.169.169,0,0,1-.169.169H.893V5.615H3.76a.169.169,0,0,1,.169.169V8.651H5.615V5.784a.169.169,0,0,1,.169-.169H8.651Zm0,0" transform="translate(-0.893 -0.893)"/></svg>
css/images/free_trial_banner.png DELETED
Binary file
css/images/tenweb_icon.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="80.46" height="22" viewBox="0 0 80.46 22"><defs><style>.a{fill:#fff;}</style></defs><g transform="translate(-259.999 -328)"><path class="a" d="M10.892,21.861.142,11.111a.494.494,0,0,1,0-.693,2.281,2.281,0,0,1,3.207,0L10.83,17.9a.49.49,0,0,0,.689,0l4.213-4.213a2.281,2.281,0,0,1,3.207,0,.519.519,0,0,1,.062.755l-7.419,7.419a.49.49,0,0,1-.343.139A.5.5,0,0,1,10.892,21.861Zm53.413-5.376A4.287,4.287,0,0,1,62.8,15.48a4.035,4.035,0,0,1-.879-1.509,6.464,6.464,0,0,1-.252-1.887,5.147,5.147,0,0,1,.376-2.074A5.2,5.2,0,0,1,62.986,8.5a3.952,3.952,0,0,1,1.384-.878,4.634,4.634,0,0,1,1.571-.317,3.891,3.891,0,0,1,3.017,1.2,4.775,4.775,0,0,1,1.13,3.458v.5a1.413,1.413,0,0,1-.062.5H64.243A1.781,1.781,0,0,0,65,14.223a2.928,2.928,0,0,0,1.76.438,10.481,10.481,0,0,0,1.384-.124,4.934,4.934,0,0,0,1.13-.314l.314,2.074a3.075,3.075,0,0,1-.565.189l-.754.186a3.578,3.578,0,0,1-.878.127,4.8,4.8,0,0,1-.944.063A5.652,5.652,0,0,1,64.305,16.486Zm.882-6.979a3.7,3.7,0,0,0-.5.376,1.629,1.629,0,0,0-.314.568c-.065.252-.127.44-.19.627h3.458a2.28,2.28,0,0,0-.127-.627,2.587,2.587,0,0,0-.314-.568,1,1,0,0,0-.5-.376,1.385,1.385,0,0,0-.754-.124A2.748,2.748,0,0,0,65.187,9.507ZM74.8,16.672c-.313-.062-.692-.062-1.006-.124l-.944-.19c-.314-.062-.565-.124-.816-.186V3.6l2.577-.44V7.623a4.833,4.833,0,0,1,.882-.317A4.945,4.945,0,0,1,76.5,7.183a4.783,4.783,0,0,1,1.7.313,4.623,4.623,0,0,1,1.254.944,4.8,4.8,0,0,1,.758,1.508,7.6,7.6,0,0,1,.248,2.074,6.308,6.308,0,0,1-.314,1.949,3.865,3.865,0,0,1-.941,1.509,3.624,3.624,0,0,1-1.447.941,6.435,6.435,0,0,1-2.012.316A4.589,4.589,0,0,1,74.8,16.672Zm.5-7.037a1.893,1.893,0,0,0-.627.248v4.654c.124,0,.313.062.5.062h.63a1.947,1.947,0,0,0,1.571-.692,3.873,3.873,0,0,0,.5-1.947c0-1.635-.627-2.453-1.822-2.453A3.08,3.08,0,0,0,75.307,9.635ZM37.214,15.1a7.841,7.841,0,0,1-1.133-4.587A10.819,10.819,0,0,1,36.4,7.872a6.117,6.117,0,0,1,.879-1.947,3.606,3.606,0,0,1,1.384-1.2,4.04,4.04,0,0,1,1.76-.441,3.628,3.628,0,0,1,3.141,1.575,8.217,8.217,0,0,1,1.068,4.65A7.842,7.842,0,0,1,43.5,15.1a3.924,3.924,0,0,1-6.286,0Zm2.325-8.3a2.035,2.035,0,0,0-.5.82,3.748,3.748,0,0,0-.251,1.258,13.234,13.234,0,0,0-.062,1.633,13.286,13.286,0,0,0,.062,1.633,5.6,5.6,0,0,0,.251,1.26,2.038,2.038,0,0,0,.5.816,1.2,1.2,0,0,0,.816.314,1.334,1.334,0,0,0,.819-.314,2.072,2.072,0,0,0,.5-.816,6.666,6.666,0,0,0,.252-1.26,12.8,12.8,0,0,0,.062-1.633,13.829,13.829,0,0,0-.062-1.633,6.574,6.574,0,0,0-.252-1.258,2.069,2.069,0,0,0-.5-.82,1.208,1.208,0,0,0-.819-.313A1.336,1.336,0,0,0,39.539,6.8ZM55.5,16.548c-.376-1.068-.816-2.264-1.192-3.458s-.754-2.387-1.133-3.645c-.376,1.2-.754,2.387-1.068,3.645s-.754,2.328-1.13,3.458H48.529q-.945-2.734-1.7-5.846c-.5-2.074-1.006-4.086-1.381-6.035h2.89c.124.692.251,1.381.378,2.074.124.755.252,1.447.438,2.2.127.755.316,1.444.441,2.135a13.7,13.7,0,0,0,.5,1.888c.19-.565.379-1.133.627-1.76.189-.63.379-1.258.568-1.888s.376-1.257.5-1.822.314-1.13.438-1.571h2.328c.124.441.314,1.005.438,1.571.189.565.316,1.194.5,1.822s.379,1.258.568,1.888.376,1.2.565,1.76c.124-.565.314-1.2.441-1.888s.314-1.38.441-2.135.248-1.447.376-2.2.252-1.447.376-2.074h2.766c-.376,2.012-.879,4.023-1.381,6.035-.5,2.073-1.068,3.958-1.7,5.846Zm-25.458,0V7.937a6.289,6.289,0,0,1-1.13.627,9.8,9.8,0,0,1-1.257.5L26.9,7.119c.313-.127.692-.316,1.006-.44.376-.19.692-.379,1.068-.566a9.356,9.356,0,0,0,1.006-.692,9.657,9.657,0,0,0,.819-.755h1.822V16.548ZM10.327,15.057a1.328,1.328,0,0,1,0-1.95l1.7-1.7a.488.488,0,0,0-.062-.631L10.138,8.957a1.447,1.447,0,0,1,0-1.949l.062-.063a1.333,1.333,0,0,1,1.949,0l3.772,3.771a.5.5,0,0,1,0,.693l-3.648,3.647a1.33,1.33,0,0,1-1.946,0ZM7.12,11.913a1.449,1.449,0,0,1,0-1.951,1.331,1.331,0,0,1,1.946,0l.63.631a.493.493,0,0,1,0,.692l-.63.628a1.326,1.326,0,0,1-1.946,0Zm11.818-.27L11.395,4.1a.492.492,0,0,0-.692,0L6.49,8.313a2.272,2.272,0,0,1-3.2,0,.791.791,0,0,1,.124-.752L10.83.142a.488.488,0,0,1,.689,0L22.207,10.892a.5.5,0,0,1,0,.693l-.065.058a2.266,2.266,0,0,1-3.2,0Z" transform="translate(259.999 328)"/></g></svg>
 
css/styles.min.css CHANGED
@@ -1 +1 @@
1
- .bwg_image_wrap figure{margin:0;padding:0}figure.zoom{background-position:50% 50%;background-size:200%;position:relative;width:auto;overflow:hidden;cursor:zoom-in}figure.zoom img:hover{opacity:0}figure.zoom img{transition:opacity .5s;display:block}div[id^=bwg_container] p{padding:0!important;margin:0!important}div[id^=bwg_container] img{box-shadow:none!important}div[id^=bwg_container] *{margin:0}div[id^=bwg_container] .SumoSelect.open>.CaptionCont,div[id^=bwg_container] .SumoSelect:focus>.CaptionCont,div[id^=bwg_container] .SumoSelect:hover>.CaptionCont,div[id^=bwg_container] .SumoSelect>.CaptionCont{border:none;box-shadow:none}#bwg_tag_wrap{background-color:#fff;width:100%;font-family:inherit;margin:0 -5px 20px 0;z-index:200;position:relative}.bwg_search_loupe_container,.bwg_search_reset_container{font-size:18px;color:#ccc;cursor:pointer;position:relative}#bwg_tag_container p{text-align:center}#bwg_tag_container{border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;width:256px;float:right}#spider_popup_wrap a{border:none;box-shadow:none}div[id^=bwg_container].bwg_container .bwg-a{border:none;box-shadow:none!important;outline:0;font-size:0;line-height:normal;cursor:pointer;text-decoration:none}div[id^=bwg_container].bwg_container .bwg-masonry-thumb-description,div[id^=bwg_container].bwg_container .bwg-thumb-description{cursor:auto}div[id^=bwg_container] div[id^=bwg_container] .bwg_img_clear{max-height:none!important;max-width:none!important;padding:0!important}.tag_cloud_link{font-size:inherit!important}@media print{#spider_popup_left,#spider_popup_right,.bwg_image_info,[class^=bwg_slideshow_title_text_],[id^=bwg_slideshow_play_pause_],[id^=spider_slideshow_left_],[id^=spider_slideshow_right_]{background:0 0}}.bwg_spider_popup_loading,.footer-list-block .bwp_gallery .bwg_spider_popup_loading,.footer-list-block .bwp_gallery_tags .bwg_spider_popup_loading{background-image:url(../images/ajax_loader.png);background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:30px 30px;border:none!important;display:none;height:30px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:30px;z-index:10102}.bwg_filmstrip_thumbnail_img{max-width:none!important}.dashicons-arrow-down-alt2:before{content:"\f347";height:100%;display:inline-block}.footer-list-block .bwp_gallery .spider_popup_overlay,.footer-list-block .bwp_gallery_tags .spider_popup_overlay,.spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.bwp_gallery_tags div[id^=bwg_container] li{border:none}.spider_popup_close,.spider_popup_close_fullscreen{-moz-box-sizing:content-box!important;box-sizing:content-box!important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}#spider_popup_left{left:0}#spider_popup_right{right:0}#spider_popup_left:hover,#spider_popup_right:hover{visibility:visible}#spider_popup_left:hover span{left:20px}#spider_popup_right:hover span{left:auto;right:20px}#spider_popup_left,#spider_popup_right{background:transparent url(../images/blank.gif) repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#bwg_image_container #spider_popup_left,#bwg_image_container #spider_popup_right{width:25%}#spider_popup_left-ico,#spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.bwg_captcha_refresh{background-image:url(../images/captcha_refresh.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%;border-width:0;cursor:pointer;display:inline-block;height:20px;width:20px;margin:0;padding:0;vertical-align:middle}.bwg_captcha_input{vertical-align:middle;width:75px!important}.bwg_captcha_img{cursor:pointer;margin:0 5px 0 5px;vertical-align:middle}.bwg_comment_error{color:red;display:block}.bwg_comment_waiting_message{display:none}.bwg_image_hit_container1,.bwg_image_info_container1,.bwg_image_rate_container1{height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_rate_container1{display:none}.bwg_image_hit_container2,.bwg_image_info_container2,.bwg_image_rate_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_hit_spun,.bwg_image_info_spun,.bwg_image_rate_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.bwg_image_hit,.bwg_image_info,.bwg_image_rate{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.bwg_image_rate{z-index:999!important}@media screen and (max-width:465px){.bwg_ctrl_btn_container{height:auto!important}}.bwg_search_container_1{display:inline-block;width:100%;text-align:right;margin:0 5px 20px 0;background-color:rgba(0,0,0,0)}.bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;box-shadow:0 0 3px 1px #ccc;background-color:#fff;border:1px solid #ccc;max-width:100%}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;margin-right:45px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_loupe_container{display:inline-block;margin-right:1px;vertical-align:middle;float:right}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_reset_container{margin-right:5px;vertical-align:middle;float:right}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_reset,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{display:block;font-size:10px;color:#323a45;cursor:pointer;line-height:inherit!important}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{font-size:12px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{color:#070707;outline:0;border:none;box-shadow:none;background:0 0;padding:3px 5px;font-family:inherit;width:100%}.bwg_order_cont .SumoSelect{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;padding:0 10px}.SumoSelect>.optWrapper>.options li.opt{border:none;text-align:left}.bwg_order_cont .SumoSelect .CaptionCont{text-align:left}.bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%;margin:0 5px 20px 0}#bwg_tag_container .SumoSelect,.bwg_order_cont .SumoSelect{display:inline-table}#bwg_tag_container .SumoSelect ul.options,.bwg_order_cont .SumoSelect ul.options{margin:0;padding:0!important}#bwg_tag_container .SumoSelect li,.bwg_order_cont .SumoSelect li{list-style:none}#bwg_tag_container .SumoSelect.open .search-txt{padding:0 8px;height:100%}#bwg_tag_container .SumoSelect>.optWrapper>.options li label{margin:0}.bwg_order_label{border:none;box-shadow:none;color:#bbb;font-family:inherit;font-weight:700;outline:0}.bwg_order{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;text-align:left}.wd_error{color:#ccc;font-size:initial}div[id^=bwg_container] .bwg_download_gallery{text-align:right;margin-top:10px}div[id^=bwg_container] .bwg_download_gallery a{color:#4a4a4a;font-size:25px;text-decoration:none}div[id^=bwg_container] .bwg_download_gallery a:hover{color:#7d7d7d}div[id^=bwg_container] .bwg-border-box *{-moz-box-sizing:border-box;box-sizing:border-box}.bwg-flex{display:flex}.bwg-width-100{width:100%;max-width:100%}.bwg-flex-column{flex-direction:column}.bwg-flex-row{flex-direction:row;flex-wrap:wrap}.bwg-container{font-size:0;width:100%;max-width:100%;display:flex;flex-direction:row;flex-wrap:wrap}.bwg-item{display:flex;flex-direction:column;cursor:pointer}.bwg-item0{overflow:hidden;z-index:100}.bwg-item0:hover{background:0 0!important;backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;opacity:1;z-index:102;position:relative}.bwg-item1{overflow:hidden;width:100%;position:relative}.bwg-item2{top:0;left:0;bottom:0;right:0;width:100%;height:100%}.bwg-item2{position:absolute}.bwg-ecommerce1,.bwg-title1{opacity:1;text-align:center;width:100%}.bwg-ecommerce1{text-align:right}.bwg-title2{width:100%;word-wrap:break-word}.bwg-item0:hover .bwg-ecommerce1,.bwg-item0:hover .bwg-title1{left:0!important;opacity:1!important}.bwg-play-icon1{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center}.bwg_loading_div_1{position:absolute;width:100%;height:100%;z-index:115;text-align:center;vertical-align:middle;top:0}.bwg_load_more_ajax_loading{width:100%;z-index:115;text-align:center;vertical-align:middle;position:relative;height:30px}.bwg_loading_div_2{display:table;vertical-align:middle;width:100%;height:100%;background-color:#fff;opacity:.95}.bwg_loading_div_3{display:table-cell;text-align:center;position:relative;vertical-align:middle}.bwg_spider_ajax_loading{border:none!important;display:inline-block;text-align:center;position:relative;vertical-align:middle;background-image:url(../images/ajax_loader.png);float:none;width:30px;height:30px;background-size:30px 30px}.bwg-hidden{visibility:hidden}.bwg_container{position:relative;margin:20px auto}.bwg_inst_play_btn_cont,.bwg_inst_play_btn_cont .bwg_inst_play{display:block}.hidden{display:none}.bwg-loading{width:100%;height:100%;opacity:.95;position:absolute;background-image:url(../images/ajax_loader.png);background-position:center;background-repeat:no-repeat;background-size:50px;z-index:100100;top:0;left:0}#bwg_download{display:inline-block}#bwg_download.hidden{display:none}.bwg_thumbnail.bwg_container .search_line.bwg_tag_select_view{min-height:50px;-webkit-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);-moz-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);box-shadow:0 5px 7px -5px rgba(0,0,0,.16);margin-bottom:10px;display:inline-block;width:100%}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:left;display:table-cell;text-align:left;vertical-align:middle}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap #bwg_tag_container,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select{border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .search_tags_container{width:25%;min-width:120px;max-width:180px;margin-right:20px;border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px;float:left;height:30px;padding:0;cursor:pointer;background:#fff}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select,.bwg_thumbnail.bwg_container .search_line .placeholder,.bwg_thumbnail.bwg_container .search_line .search-txt,.bwg_thumbnail.bwg_container .search_line .select-all,.bwg_thumbnail.bwg_container .search_line.SumoSelect .opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-weight:400;font-family:Ubuntu;margin:0;border:none}.bwg_thumbnail.bwg_container .search_line .select-all label{margin-bottom:0;line-height:13px}.bwg_thumbnail.bwg_container .search_line .SumoSelect ul.options:not(:empty){padding:15px 0 0 10px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect{padding:0 10px;width:initial;height:inherit;cursor:pointer;display:block;border:none;box-shadow:none;border-radius:0;max-width:100%;background-color:transparent;line-height:inherit;vertical-align:bottom}.bwg_thumbnail.bwg_container .search_line .bwg_search_input_container{height:30px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100%);margin:0;overflow:hidden}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{height:30px;padding:0 10px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100% - 64px);display:inline-table}.bwg_thumbnail.bwg_container .search_line .CaptionCont span{display:block!important;vertical-align:middle;color:#323a45!important;font-size:12px;text-transform:uppercase;font-family:Ubuntu;cursor:pointer;line-height:29px;max-width:calc(100% - 20px)}.bwg_thumbnail .search_tags{cursor:pointer}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all>span,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt span{margin-left:-35px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:25px}.bwg_thumbnail .bwg_search_input::-webkit-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input::-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu;line-height:30px}.bwg_thumbnail .bwg_search_input:-ms-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input:-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .search-txt::-webkit-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title{width:calc(100% - 20px);height:29px;text-align:center;display:inline-block;background:#fff;position:absolute;top:.5px;left:10px;white-space:nowrap;border-radius:15px;color:#4e4e4e;text-transform:uppercase;overflow:hidden}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title span{line-height:28px}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container{line-height:29px;display:inline-block;top:0;margin-right:10px;vertical-align:middle;float:none;padding-top:0;font-size:12px;font-family:Ubuntug}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container1{margin-left:0;float:left;top:0;line-height:30px;width:auto;height:30px;margin-left:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_reset_container{right:0;top:0;line-height:30px;width:11px;height:30px;margin-right:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:right;width:30%;min-width:120px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1 .bwg_search_container_2{width:100%!important;float:right}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all{padding:0 0 3px 35px!important;height:13px;line-height:13px;margin-bottom:15px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt{margin-bottom:15px;padding:0;list-style:none;color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{font-family:Ubuntu;font-size:12px;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background:0 0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;font-weight:400;margin-bottom:0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont{height:inherit;border:transparent;background:inherit;width:100%;cursor:pointer;max-height:calc(100% - 2px)}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label{margin:0;line-height:100%;cursor:pointer;width:20px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i{line-height:100%;height:100%}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.closed:before,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.opened:before{color:#323a45;font-size:10px;line-height:30px}.bwg_thumbnail.bwg_container .search_line .bwg_reset{position:absolute}.bwg_thumbnail.bwg_container .search_line .no-match{font-family:Ubuntu;font-size:12px;color:#323a45;padding:5px 25px!important;text-align:center}.bwg_thumbnail.bwg_container .search_line .search-txt{border:transparent;background:0 0;padding:4px 0!important;height:100%}.bwg_thumbnail.bwg_container .search_line .search-txt:focus{box-shadow:none}.bwg_thumbnail.bwg_container .search_line .bwg_order.SumoUnder{display:none}.bwg_slideshow_image_container{position:absolute}.bwg_slideshow_image_container>div>div{display:table;margin:0 auto}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_] img[id^=bwg_slideshow_image_]{display:inline-block}.bwg_thumbnail #bwg_tag_container p{text-align:left}.bwg_thumbnail .bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;background-color:#fff;max-width:100%;box-shadow:none;border:.5px solid rgba(0,0,0,.15);border-radius:15px}.bwg_thumbnail .bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;text-align:center}.bwg_thumbnail .SumoSelect>.optWrapper>.options li.opt:hover{background-color:transparent}.bwg-zoom-effect .bwg-zoom-effect-overlay{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0;-webkit-transition:all .45s ease-in-out;transition:all .45s ease-in-out}.bwg-zoom-effect-overlay{display:flex;align-items:center;justify-content:center}.bwg-zoom-effect:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@media (min-width:480px){.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.bwg_thumbnails_masonry .bwg-masonry-thumbnails{overflow:hidden}.bwg_thumbnails_masonry .bwg-masonry-thumbnails .bwg-item{box-sizing:border-box}.bwg-masonry-horizontal{flex-direction:row}.bwg-masonry-horizontal-parent{overflow-x:scroll;overflow-y:hidden}.bwg-masonry-horizontal-container{width:fit-content}.bwg-item.bwg-empty-item{border:0!important;padding:0!important}.bwg-background{background-color:rgba(0,0,0,0);position:relative;width:100%}.bwg-background .wd_error{color:#323a45;font-weight:700}div[id^=bwg_container] .bwg-carousel{margin:0 auto}.bwg_carousel_preload{background-image:url(../images/ajax_loader.png);background-size:50px!important;background-repeat:no-repeat;background-color:#fff;background-position:center}.bwg_container.bwg_carousel *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_]{position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_image_container_]{display:inline-block;position:absolute;text-align:center;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_] div{display:table;margin:0 auto}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_image_]{padding:0!important;display:inline-block;float:none!important;margin:4px!important;position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_],.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_]:hover{text-decoration:none;margin:4px;display:block;position:relative;z-index:17}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel-cont-child{max-width:100%;position:relative;overflow:hidden;height:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel-image{border:0;position:absolute;display:block;max-width:none;padding:0!important;margin:0!important;float:none!important;vertical-align:middle;height:100%;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel{position:relative;max-width:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature]{position:absolute;display:block;overflow:hidden;cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature] [class^=bwg_carousel-caption] [class^=bwg_carousel_title_text_]{text-decoration:none;position:absolute;z-index:15;display:inline-block;width:75%;top:0;text-align:center;word-wrap:break-word;word-break:break-word}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{bottom:38%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:0%;z-index:13;visibility:visible}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{right:0;left:auto;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left]{left:20px;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_video_hide]{width:100%;height:100%;position:absolute;z-index:22}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_] span,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:inline-table;line-height:0;margin-top:-15px;position:absolute;top:55%}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_]:hover,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]:hover{cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]{bottom:0;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:medium none;position:absolute;height:inherit;width:30%;left:35%;z-index:13}.bwg_container.bwg_carousel .bwg_carousel_play_pause:hover .bwg_carousel_play_pause-ico{display:inline-block!important}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]:hover span{position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_] span{display:flex;justify-content:center;align-items:center}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico{display:none!important;cursor:pointer;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico:hover{display:inline-block;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_]{padding:0!important;float:none!important;width:100%;height:100%;vertical-align:middle;position:relative;display:table;background-color:#000;text-align:center}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_video_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;position:relative;display:table-cell;background-color:#000;text-align:center}.bwg_thumbnail.bwg_container{padding:0 1px}.bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive{display:inline-block}body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_order_cont,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_search_container_1,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .search_tags_container{width:100%;margin:0 0 10px 0;text-align:center;max-width:100%}.search_line .SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:26px}.bwg_container.bwg_blog_style .fluid-width-video-wrapper,.bwg_container.bwg_carousel .fluid-width-video-wrapper,.bwg_container.bwg_image_browser .fluid-width-video-wrapper{width:100%;position:unset!important;padding:0!important}.bwg_inst_play_btn_cont{width:100%;height:100%;position:absolute;z-index:1;cursor:pointer;top:0}.bwg_inst_play{position:absolute;width:50px;height:50px;background-position:center center;background-repeat:no-repeat;background-size:cover;transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-webkit-transition:background-image .2s ease-out;top:0;left:0;right:0;bottom:0;margin:auto}.bwg_inst_play:hover{background-position:center center;background-repeat:no-repeat;background-size:cover}.spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.spider_popup_wrap{display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.bwg_popup_image{width:auto;vertical-align:middle;display:inline-block}.bwg_slider img{display:inline-block}.bwg_popup_embed{width:100%;height:100%;vertical-align:middle;text-align:center;display:table}.bwg_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.bwg_toggle_btn{margin:0;padding:0}.bwg_ctrl_btn_container{position:absolute;width:100%;z-index:10150}.bwg_btn_container.bwg_no_ctrl_btn .bwg_ctrl_btn_container{min-height:40px;background:0 0}.bwg_toggle_container{cursor:pointer;left:50%;line-height:0;position:absolute;text-align:center;z-index:10150}#spider_popup_left-ico span,#spider_popup_right-ico span,.spider_popup_close span{display:table-cell;text-align:center;vertical-align:middle}.bwg_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.bwg_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_comment_wrap,.bwg_ecommerce_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.bwg_comment_container,.bwg_ecommerce_container{-moz-box-sizing:border-box;height:100%;overflow:hidden;position:absolute;top:0;z-index:10103}#bwg_ecommerce{padding:10px}.bwg_ecommerce_body{background:0 0!important;border:none!important}.pge_tabs{list-style-type:none;margin:0;padding:0;background:0 0!important}.pge_tabs li a,.pge_tabs li a:hover,.pge_tabs li.pge_active a{text-decoration:none;display:block;width:100%;outline:0!important;padding:8px 5px!important;font-weight:700;font-size:13px}.pge_add_to_cart a{padding:5px 10px;text-decoration:none!important;display:block}.pge_add_to_cart{margin:5px 0 15px}.pge_add_to_cart_title{font-size:17px;padding:5px}.pge_add_to_cart div:first-child{float:left}.pge_add_to_cart div:last-child{float:right;margin-top:4px}.pge_add_to_cart:after,.pge_tabs:after{clear:both;content:"";display:table}#downloads table tr td,#downloads table tr th{padding:6px 10px!important;text-transform:none!important}.bwg_comments input[type=submit],.bwg_ecommerce_panel input[type=button]{cursor:pointer;font-size:15px;width:100%;margin-bottom:5px}.bwg_comments,.bwg_ecommerce_panel{bottom:0;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.bwg_comments{height:100%}.bwg_comment_body_p,.bwg_comments p{margin:5px!important;text-align:left;word-wrap:break-word;word-break:break-all}.bwg_ecommerce_panel p{padding:5px!important;text-align:left;word-wrap:break-word;word-break:break-all;margin:0!important}.bwg_comments .bwg-submit-disabled{opacity:.5}.bwg_comments textarea{height:120px;resize:vertical}.bwg_comment_delete_btn{color:#7a7a7a;cursor:pointer;float:right;font-size:14px;margin:2px}.bwg_comments_close,.bwg_ecommerce_close{cursor:pointer;line-height:0;position:relative;font-size:13px;margin:5px;z-index:10150}.bwg_ecommerce_panel a:hover{text-decoration:underline}.bwg_comment_textarea::-webkit-scrollbar{width:4px}.bwg_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}.bwg_ctrl_btn_container a,.bwg_ctrl_btn_container a:hover{text-decoration:none}.bwg_facebook:hover{color:#3b5998}.bwg_twitter:hover{color:#4099fb}.bwg_pinterest:hover{color:#cb2027}.bwg_tumblr:hover{color:#2f5070}.bwg_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.bwg_filmstrip_container{position:absolute;z-index:10150}.bwg_filmstrip{overflow:hidden;position:absolute;z-index:10106}.bwg_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.bwg_filmstrip_thumbnail{position:relative;background:0 0;float:left;cursor:pointer;overflow:hidden}.bwg_filmstrip_thumbnail .bwg_filmstrip_thumbnail_img_wrap{overflow:hidden}.bwg_thumb_active{opacity:1}.bwg_filmstrip_thumbnail_img{display:block;opacity:1}.bwg_filmstrip_left{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_filmstrip_right{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bwg_watermark_container{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_watermark_container>div{display:table;margin:0 auto}.bwg_watermark_spun{display:table-cell;overflow:hidden;position:relative}.bwg_watermark_image{margin:4px;position:relative;z-index:10141}.bwg_watermark_text,.bwg_watermark_text:hover{text-decoration:none;margin:4px;position:relative;z-index:10141}.bwg_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.bwg_slide_bg{margin:0 auto;width:inherit;height:inherit}.bwg_slider{height:inherit;width:inherit}.bwg_popup_image_spun{height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.bwg_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}.bwg_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.bwg_gridlet{opacity:1;position:absolute}.bwg_image_info::-webkit-scrollbar{width:4px}.bwg_image_info::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_image_info::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}#bwg_rate_form .bwg_hint{margin:0 5px;display:none}.bwg_star{display:inline-block;width:unset!important}.bwg_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}#bwg_comment_form label{display:block;font-weight:700;margin-top:17px;text-transform:uppercase}#bwg_comment_form .bwg-privacy-policy-box label{text-transform:unset;word-break:break-word}.bwg_popup_image_spun .bwg_popup_image_spun1{width:inherit;height:inherit}.bwg_popup_image_spun1 .bwg_popup_image_spun2{vertical-align:middle;text-align:center;height:100%}#embed_conteiner{table-layout:fixed;height:100%}#opacity_div{background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#loading_div{text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}#ecommerce_ajax_loading{position:absolute}#ecommerce_opacity_div{display:none;background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#ecommerce_loading_div{display:none;text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg_ecommerce_panel.bwg_popup_sidebar_panel.bwg_popup_sidebar{text-align:left}#ajax_loading{position:absolute}@media (max-width:480px){.bwg_image_count_container{display:none}.bwg_image_title,.bwg_image_title *{font-size:12px}.bwg_image_description,.bwg_image_description *{font-size:10px}}@media (pointer:none),(pointer:coarse){#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-masonry-thumbnails .bwg-title1,#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-standard-thumbnails .bwg-title1,.bwg-mosaic-thumbnails{opacity:1!important}.bwg-zoom-effect .bwg-zoom-effect-overlay,.bwg-zoom-effect-overlay>span{opacity:1!important;background-color:unset!important}}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_] *{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_]{border-collapse:collapse;display:table;position:relative;text-align:center;margin:auto}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_image_]{display:inline-block;padding:0!important;margin:0!important;float:none!important;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_embed_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;display:inline-block;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_]{position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause{bottom:0;cursor:pointer;display:table;height:inherit;outline:medium none;position:absolute;width:30%;left:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span[id^=bwg_slideshow_play_pause-ico_]{display:inline-block!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span{position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]{display:none!important;cursor:pointer;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]:hover{display:inline-block;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]{left:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{right:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover span{left:auto!important;right:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover span{left:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_] span,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_],div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]:hover{cursor:pointer}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_container_]{display:table;position:absolute;text-align:center;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_container_]{position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] .bwg_slideshow_filmstrip{overflow:hidden;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnails_]{margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnail_]{position:relative;background:0 0;cursor:pointer;float:left;overflow:hidden}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_thumb_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_filmstrip_thumbnail_img_]{display:block;opacity:1;padding:0!important}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_left_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_right_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_none_selectable_]{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_title_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_description_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_image_]{padding:0!important;float:none!important;margin:4px!important;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_]:hover{text-decoration:none;margin:4px;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_title_text_]{text-decoration:none;position:relative;z-index:11;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_description_text_]{text-decoration:none;position:relative;z-index:15;margin:5px;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_]{display:table-cell;margin:0 auto;position:absolute;vertical-align:middle;width:100%;height:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_bg_]{margin:0 auto;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slider_]{height:inherit;width:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun_]{width:inherit;height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;z-index:2}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_second_spun_]{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_grid_]{display:none;height:100%;overflow:hidden;position:absolute;width:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_gridlet_]{opacity:1;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_]{display:inline-block;position:relative;cursor:pointer;overflow:hidden;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_container_]{display:block;overflow:hidden;position:absolute;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_thumbnails_]{left:0;font-size:0;margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun1_]{display:table;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun2_]{display:table-cell;vertical-align:middle;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_mosaic_play_icon_spun_]{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center;left:0}.lazy_loader{background-image:url(../images/ajax_loader.png);background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg-container-temp0{visibility:hidden!important;position:absolute!important}.bwg_image_browser .pagination-links{display:flex;padding:0}.bwg_image_browser .pagination-links_col1{flex-grow:3;text-align:left}.bwg_image_browser .pagination-links_col2{flex-grow:4;text-align:center}.bwg_image_browser .pagination-links_col3{flex-grow:3;text-align:right}.bwg_current_page[type=number]{width:35px;display:inline-block;-moz-appearance:textfield;line-height:normal!important}.bwg_current_page::-webkit-inner-spin-button,.bwg_current_page::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bwg_container .bwg_tag_button_view_container{display:flex;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-bottom:45px;position:relative;padding-top:3px;flex-wrap:wrap;overflow:hidden;clear:both}.bwg_container .bwg_tag_button_view_container button{cursor:pointer}.bwg_container .bwg_tag_button_view_container button.active{cursor:default}.bwg_container .bwg_tag_button_view_container .verLine{min-height:26px;margin:0 15px}.bwg_container .bwg_tag_button_see_all{margin-bottom:70px;position:relative;display:none}.bwg_container .bwg_tag_button_see_all .see_all_tags{text-transform:uppercase;position:absolute;padding:10px 25px;font-weight:600;cursor:pointer;left:47%;top:-23px}.bwg_container .bwg_tag_button_see_all .see_all_tags span{display:inline-block;line-height:normal;text-align:center;border-radius:50%;margin-right:10px;font-weight:500;color:#fff;height:18px;width:18px}.bwg_addThis{position:absolute;left:10px;top:10px;z-index:9999}
1
+ .bwg_image_wrap figure{margin:0;padding:0}figure.zoom{background-position:50% 50%;background-size:200%;position:relative;width:auto;overflow:hidden;cursor:zoom-in}figure.zoom img:hover{opacity:0}figure.zoom img{transition:opacity .5s;display:block}div[id^=bwg_container] p{padding:0!important;margin:0!important}div[id^=bwg_container] img{box-shadow:none!important}div[id^=bwg_container] *{margin:0}div[id^=bwg_container] .SumoSelect.open>.CaptionCont,div[id^=bwg_container] .SumoSelect:focus>.CaptionCont,div[id^=bwg_container] .SumoSelect:hover>.CaptionCont,div[id^=bwg_container] .SumoSelect>.CaptionCont{border:none;box-shadow:none}#bwg_tag_wrap{background-color:#fff;width:100%;font-family:inherit;margin:0 -5px 20px 0;z-index:200;position:relative}.bwg_search_loupe_container,.bwg_search_reset_container{font-size:18px;color:#ccc;cursor:pointer;position:relative}#bwg_tag_container p{text-align:center}#bwg_tag_container{border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;width:256px;float:right}#spider_popup_wrap a{border:none;box-shadow:none}div[id^=bwg_container].bwg_container .bwg-a{border:none;box-shadow:none!important;outline:0;font-size:0;line-height:normal;cursor:pointer;text-decoration:none}div[id^=bwg_container].bwg_container .bwg-masonry-thumb-description,div[id^=bwg_container].bwg_container .bwg-thumb-description{cursor:auto}div[id^=bwg_container] div[id^=bwg_container] .bwg_img_clear{max-height:none!important;max-width:none!important;padding:0!important}.tag_cloud_link{font-size:inherit!important}@media print{#spider_popup_left,#spider_popup_right,.bwg_image_info,[class^=bwg_slideshow_title_text_],[id^=bwg_slideshow_play_pause_],[id^=spider_slideshow_left_],[id^=spider_slideshow_right_]{background:0 0}}.bwg_spider_popup_loading,.footer-list-block .bwp_gallery .bwg_spider_popup_loading,.footer-list-block .bwp_gallery_tags .bwg_spider_popup_loading{background-image:url(../images/ajax_loader.png);background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:30px 30px;border:none!important;display:none;height:30px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:30px;z-index:10102}.bwg_filmstrip_thumbnail_img{max-width:none!important}.dashicons-arrow-down-alt2:before{content:"\f347";height:100%;display:inline-block}.footer-list-block .bwp_gallery .spider_popup_overlay,.footer-list-block .bwp_gallery_tags .spider_popup_overlay,.spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.bwp_gallery_tags div[id^=bwg_container] li{border:none}.spider_popup_close,.spider_popup_close_fullscreen{-moz-box-sizing:content-box!important;box-sizing:content-box!important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}.spider_popup_close_fullscreen{margin:10px 7px;right:7px}#spider_popup_left{left:0}#spider_popup_right{right:0}#spider_popup_left:hover,#spider_popup_right:hover{visibility:visible}#spider_popup_left:hover span{left:20px}#spider_popup_right:hover span{left:auto;right:20px}#spider_popup_left,#spider_popup_right{background:transparent url(../images/blank.gif) repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#bwg_image_container #spider_popup_left,#bwg_image_container #spider_popup_right{width:25%}#spider_popup_left-ico,#spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.bwg_captcha_refresh{background-image:url(../images/captcha_refresh.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%;border-width:0;cursor:pointer;display:inline-block;height:20px;width:20px;margin:0;padding:0;vertical-align:middle}.bwg_captcha_input{vertical-align:middle;width:75px!important}.bwg_captcha_img{cursor:pointer;margin:0 5px 0 5px;vertical-align:middle}.bwg_comment_error{color:red;display:block}.bwg_comment_waiting_message{display:none}.bwg_image_hit_container1,.bwg_image_info_container1,.bwg_image_rate_container1{height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_rate_container1{display:none}.bwg_image_hit_container2,.bwg_image_info_container2,.bwg_image_rate_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_hit_spun,.bwg_image_info_spun,.bwg_image_rate_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.bwg_image_hit,.bwg_image_info,.bwg_image_rate{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.bwg_image_rate{z-index:999!important}@media screen and (max-width:465px){.bwg_ctrl_btn_container{height:auto!important}}.bwg_search_container_1{display:inline-block;width:100%;text-align:right;margin:0 5px 20px 0;background-color:rgba(0,0,0,0)}.bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;box-shadow:0 0 3px 1px #ccc;background-color:#fff;border:1px solid #ccc;max-width:100%}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;margin-right:45px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_loupe_container{display:inline-block;margin-right:1px;vertical-align:middle;float:right}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_reset_container{margin-right:5px;vertical-align:middle;float:right}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_reset,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{display:block;font-size:10px;color:#323a45;cursor:pointer;line-height:inherit!important}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{font-size:12px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{color:#070707;outline:0;border:none;box-shadow:none;background:0 0;padding:3px 5px;font-family:inherit;width:100%}.bwg_order_cont .SumoSelect{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;padding:0 10px}.SumoSelect>.optWrapper>.options li.opt{border:none;text-align:left}.bwg_order_cont .SumoSelect .CaptionCont{text-align:left}.bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%;margin:0 5px 20px 0}#bwg_tag_container .SumoSelect,.bwg_order_cont .SumoSelect{display:inline-table}#bwg_tag_container .SumoSelect ul.options,.bwg_order_cont .SumoSelect ul.options{margin:0;padding:0!important}#bwg_tag_container .SumoSelect li,.bwg_order_cont .SumoSelect li{list-style:none}#bwg_tag_container .SumoSelect.open .search-txt{padding:0 8px;height:100%}#bwg_tag_container .SumoSelect>.optWrapper>.options li label{margin:0}.bwg_order_label{border:none;box-shadow:none;color:#bbb;font-family:inherit;font-weight:700;outline:0}.bwg_order{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;text-align:left}.wd_error{color:#ccc;font-size:initial}div[id^=bwg_container] .bwg_download_gallery{text-align:right;margin-top:10px}div[id^=bwg_container] .bwg_download_gallery a{color:#4a4a4a;font-size:25px;text-decoration:none}div[id^=bwg_container] .bwg_download_gallery a:hover{color:#7d7d7d}div[id^=bwg_container] .bwg-border-box *{-moz-box-sizing:border-box;box-sizing:border-box}.bwg-flex{display:flex}.bwg-width-100{width:100%;max-width:100%}.bwg-flex-column{flex-direction:column}.bwg-flex-row{flex-direction:row;flex-wrap:wrap}.bwg-container{font-size:0;width:100%;max-width:100%;display:flex;flex-direction:row;flex-wrap:wrap}.bwg-item{display:flex;flex-direction:column;cursor:pointer}.bwg-item0{overflow:hidden;z-index:100}.bwg-item0:hover{background:0 0!important;backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;opacity:1;z-index:102;position:relative}.bwg-item1{overflow:hidden;width:100%;position:relative}.bwg-item2{top:0;left:0;bottom:0;right:0;width:100%;height:100%}.bwg-item2{position:absolute}.bwg-ecommerce1,.bwg-title1{opacity:1;text-align:center;width:100%}.bwg-ecommerce1{text-align:right}.bwg-title2{width:100%;word-wrap:break-word}.bwg-item0:hover .bwg-ecommerce1,.bwg-item0:hover .bwg-title1{left:0!important;opacity:1!important}.bwg-play-icon1{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center}.bwg_loading_div_1{position:absolute;width:100%;height:100%;z-index:115;text-align:center;vertical-align:middle;top:0}.bwg_load_more_ajax_loading{width:100%;z-index:115;text-align:center;vertical-align:middle;position:relative;height:30px}.bwg_loading_div_2{display:table;vertical-align:middle;width:100%;height:100%;background-color:#fff;opacity:.95}.bwg_loading_div_3{display:table-cell;text-align:center;position:relative;vertical-align:middle}.bwg_spider_ajax_loading{border:none!important;display:inline-block;text-align:center;position:relative;vertical-align:middle;background-image:url(../images/ajax_loader.png);float:none;width:30px;height:30px;background-size:30px 30px}.bwg-hidden{visibility:hidden}.bwg_container{position:relative;margin:20px auto}.bwg_inst_play_btn_cont,.bwg_inst_play_btn_cont .bwg_inst_play{display:block}.hidden{display:none}.bwg-loading{width:100%;height:100%;opacity:.95;position:absolute;background-image:url(../images/ajax_loader.png);background-position:center;background-repeat:no-repeat;background-size:50px;z-index:100100;top:0;left:0}#bwg_download{display:inline-block}#bwg_download.hidden{display:none}.bwg_thumbnail.bwg_container .search_line.bwg_tag_select_view{min-height:50px;-webkit-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);-moz-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);box-shadow:0 5px 7px -5px rgba(0,0,0,.16);margin-bottom:10px;display:inline-block;width:100%}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:left;display:table-cell;text-align:left;vertical-align:middle}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap #bwg_tag_container,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select{border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .search_tags_container{width:25%;min-width:120px;max-width:180px;margin-right:20px;border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px;float:left;height:30px;padding:0;cursor:pointer;background:#fff}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select,.bwg_thumbnail.bwg_container .search_line .placeholder,.bwg_thumbnail.bwg_container .search_line .search-txt,.bwg_thumbnail.bwg_container .search_line .select-all,.bwg_thumbnail.bwg_container .search_line.SumoSelect .opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-weight:400;font-family:Ubuntu;margin:0;border:none}.bwg_thumbnail.bwg_container .search_line .select-all label{margin-bottom:0;line-height:13px}.bwg_thumbnail.bwg_container .search_line .SumoSelect ul.options:not(:empty){padding:15px 0 0 10px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect{padding:0 10px;width:initial;height:inherit;cursor:pointer;display:block;border:none;box-shadow:none;border-radius:0;max-width:100%;background-color:transparent;line-height:inherit;vertical-align:bottom}.bwg_thumbnail.bwg_container .search_line .bwg_search_input_container{height:30px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100%);margin:0;overflow:hidden}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{height:30px;padding:0 10px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100% - 64px);display:inline-table}.bwg_thumbnail.bwg_container .search_line .CaptionCont span{display:block!important;vertical-align:middle;color:#323a45!important;font-size:12px;text-transform:uppercase;font-family:Ubuntu;cursor:pointer;line-height:29px;max-width:calc(100% - 20px)}.bwg_thumbnail .search_tags{cursor:pointer}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all>span,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt span{margin-left:-35px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:25px}.bwg_thumbnail .bwg_search_input::-webkit-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input::-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu;line-height:30px}.bwg_thumbnail .bwg_search_input:-ms-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input:-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .search-txt::-webkit-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title{width:calc(100% - 20px);height:29px;text-align:center;display:inline-block;background:#fff;position:absolute;top:.5px;left:10px;white-space:nowrap;border-radius:15px;color:#4e4e4e;text-transform:uppercase;overflow:hidden}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title span{line-height:28px}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container{line-height:29px;display:inline-block;top:0;margin-right:10px;vertical-align:middle;float:none;padding-top:0;font-size:12px;font-family:Ubuntug}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container1{margin-left:0;float:left;top:0;line-height:30px;width:auto;height:30px;margin-left:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_reset_container{right:0;top:0;line-height:30px;width:11px;height:30px;margin-right:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:right;width:30%;min-width:120px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1 .bwg_search_container_2{width:100%!important;float:right}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all{padding:0 0 3px 35px!important;height:13px;line-height:13px;margin-bottom:15px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt{margin-bottom:15px;padding:0;list-style:none;color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{font-family:Ubuntu;font-size:12px;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background:0 0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;font-weight:400;margin-bottom:0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont{height:inherit;border:transparent;background:inherit;width:100%;cursor:pointer;max-height:calc(100% - 2px)}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label{margin:0;line-height:100%;cursor:pointer;width:20px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i{line-height:100%;height:100%}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.closed:before,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.opened:before{color:#323a45;font-size:10px;line-height:30px}.bwg_thumbnail.bwg_container .search_line .bwg_reset{position:absolute}.bwg_thumbnail.bwg_container .search_line .no-match{font-family:Ubuntu;font-size:12px;color:#323a45;padding:5px 25px!important;text-align:center}.bwg_thumbnail.bwg_container .search_line .search-txt{border:transparent;background:0 0;padding:4px 0!important;height:100%}.bwg_thumbnail.bwg_container .search_line .search-txt:focus{box-shadow:none}.bwg_thumbnail.bwg_container .search_line .bwg_order.SumoUnder{display:none}.bwg_slideshow_image_container{position:absolute}.bwg_slideshow_image_container>div>div{display:table;margin:0 auto}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_] img[id^=bwg_slideshow_image_]{display:inline-block}.bwg_thumbnail #bwg_tag_container p{text-align:left}.bwg_thumbnail .bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;background-color:#fff;max-width:100%;box-shadow:none;border:.5px solid rgba(0,0,0,.15);border-radius:15px}.bwg_thumbnail .bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;text-align:center}.bwg_thumbnail .SumoSelect>.optWrapper>.options li.opt:hover{background-color:transparent}.bwg-zoom-effect .bwg-zoom-effect-overlay{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0;-webkit-transition:all .45s ease-in-out;transition:all .45s ease-in-out}.bwg-zoom-effect-overlay{display:flex;align-items:center;justify-content:center}.bwg-zoom-effect:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@media (min-width:480px){.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.bwg_thumbnails_masonry .bwg-masonry-thumbnails{overflow:hidden}.bwg_thumbnails_masonry .bwg-masonry-thumbnails .bwg-item{box-sizing:border-box}.bwg-masonry-horizontal{flex-direction:row}.bwg-masonry-horizontal-parent{overflow-x:scroll;overflow-y:hidden}.bwg-masonry-horizontal-container{width:fit-content}.bwg-item.bwg-empty-item{border:0!important;padding:0!important}.bwg-background{background-color:rgba(0,0,0,0);position:relative;width:100%}.bwg-background .wd_error{color:#323a45;font-weight:700}div[id^=bwg_container] .bwg-carousel{margin:0 auto}.bwg_carousel_preload{background-image:url(../images/ajax_loader.png);background-size:50px!important;background-repeat:no-repeat;background-color:#fff;background-position:center}.bwg_container.bwg_carousel *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_]{position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_image_container_]{display:inline-block;position:absolute;text-align:center;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_] div{display:table;margin:0 auto}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_image_]{padding:0!important;display:inline-block;float:none!important;margin:4px!important;position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_],.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_]:hover{text-decoration:none;margin:4px;display:block;position:relative;z-index:17}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel-cont-child{max-width:100%;position:relative;overflow:hidden;height:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel-image{border:0;position:absolute;display:block;max-width:none;padding:0!important;margin:0!important;float:none!important;vertical-align:middle;height:100%;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel{position:relative;max-width:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature]{position:absolute;display:block;overflow:hidden;cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature] [class^=bwg_carousel-caption] [class^=bwg_carousel_title_text_]{text-decoration:none;position:absolute;z-index:15;display:inline-block;width:75%;top:0;text-align:center;word-wrap:break-word;word-break:break-word}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{bottom:38%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:0%;z-index:13;visibility:visible}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{right:0;left:auto;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left]{left:20px;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_video_hide]{width:100%;height:100%;position:absolute;z-index:22}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_] span,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:inline-table;line-height:0;margin-top:-15px;position:absolute;top:55%}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_]:hover,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]:hover{cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]{bottom:0;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:medium none;position:absolute;height:inherit;width:30%;left:35%;z-index:13}.bwg_container.bwg_carousel .bwg_carousel_play_pause:hover .bwg_carousel_play_pause-ico{display:inline-block!important}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]:hover span{position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_] span{display:flex;justify-content:center;align-items:center}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico{display:none!important;cursor:pointer;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico:hover{display:inline-block;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_]{padding:0!important;float:none!important;width:100%;height:100%;vertical-align:middle;position:relative;display:table;background-color:#000;text-align:center}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_video_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;position:relative;display:table-cell;background-color:#000;text-align:center}.bwg_thumbnail.bwg_container{padding:0 1px}.bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive{display:inline-block}body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_order_cont,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_search_container_1,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .search_tags_container{width:100%;margin:0 0 10px 0;text-align:center;max-width:100%}.search_line .SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:26px}.bwg_container.bwg_blog_style .fluid-width-video-wrapper,.bwg_container.bwg_carousel .fluid-width-video-wrapper,.bwg_container.bwg_image_browser .fluid-width-video-wrapper{width:100%;position:unset!important;padding:0!important}.bwg_inst_play_btn_cont{width:100%;height:100%;position:absolute;z-index:1;cursor:pointer;top:0}.bwg_inst_play{position:absolute;width:50px;height:50px;background-position:center center;background-repeat:no-repeat;background-size:cover;transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-webkit-transition:background-image .2s ease-out;top:0;left:0;right:0;bottom:0;margin:auto}.bwg_inst_play:hover{background-position:center center;background-repeat:no-repeat;background-size:cover}.spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.spider_popup_wrap{display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.bwg_popup_image{width:auto;vertical-align:middle;display:inline-block}.bwg_slider img{display:inline-block}.bwg_popup_embed{width:100%;height:100%;vertical-align:middle;text-align:center;display:table}.bwg_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.bwg_toggle_btn{margin:0;padding:0}.bwg_ctrl_btn_container{position:absolute;width:100%;z-index:10150}.bwg_btn_container.bwg_no_ctrl_btn .bwg_ctrl_btn_container{min-height:40px;background:0 0}.bwg_toggle_container{cursor:pointer;left:50%;line-height:0;position:absolute;text-align:center;z-index:10150}#spider_popup_left-ico span,#spider_popup_right-ico span,.spider_popup_close span{display:table-cell;text-align:center;vertical-align:middle}.bwg_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.bwg_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_comment_wrap,.bwg_ecommerce_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.bwg_comment_container,.bwg_ecommerce_container{-moz-box-sizing:border-box;height:100%;overflow:hidden;position:absolute;top:0;z-index:10103}#bwg_ecommerce{padding:10px}.bwg_ecommerce_body{background:0 0!important;border:none!important}.pge_tabs{list-style-type:none;margin:0;padding:0;background:0 0!important}.pge_tabs li a,.pge_tabs li a:hover,.pge_tabs li.pge_active a{text-decoration:none;display:block;width:100%;outline:0!important;padding:8px 5px!important;font-weight:700;font-size:13px}.pge_add_to_cart a{padding:5px 10px;text-decoration:none!important;display:block}.pge_add_to_cart{margin:5px 0 15px}.pge_add_to_cart_title{font-size:17px;padding:5px}.pge_add_to_cart div:first-child{float:left}.pge_add_to_cart div:last-child{float:right;margin-top:4px}.pge_add_to_cart:after,.pge_tabs:after{clear:both;content:"";display:table}#downloads table tr td,#downloads table tr th{padding:6px 10px!important;text-transform:none!important}.bwg_comments input[type=submit],.bwg_ecommerce_panel input[type=button]{cursor:pointer;font-size:15px;width:100%;margin-bottom:5px}.bwg_comments,.bwg_ecommerce_panel{bottom:0;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.bwg_comments{height:100%}.bwg_comment_body_p,.bwg_comments p{margin:5px!important;text-align:left;word-wrap:break-word;word-break:break-all}.bwg_ecommerce_panel p{padding:5px!important;text-align:left;word-wrap:break-word;word-break:break-all;margin:0!important}.bwg_comments .bwg-submit-disabled{opacity:.5}.bwg_comments textarea{height:120px;resize:vertical}.bwg_comment_delete_btn{color:#7a7a7a;cursor:pointer;float:right;font-size:14px;margin:2px}.bwg_comments_close,.bwg_ecommerce_close{cursor:pointer;line-height:0;position:relative;font-size:13px;margin:5px;z-index:10150}.bwg_ecommerce_panel a:hover{text-decoration:underline}.bwg_comment_textarea::-webkit-scrollbar{width:4px}.bwg_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}.bwg_ctrl_btn_container a,.bwg_ctrl_btn_container a:hover{text-decoration:none}.bwg_facebook:hover{color:#3b5998}.bwg_twitter:hover{color:#4099fb}.bwg_pinterest:hover{color:#cb2027}.bwg_tumblr:hover{color:#2f5070}.bwg_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.bwg_filmstrip_container{position:absolute;z-index:10150}.bwg_filmstrip{overflow:hidden;position:absolute;z-index:10106}.bwg_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.bwg_filmstrip_thumbnail{position:relative;background:0 0;float:left;cursor:pointer;overflow:hidden}.bwg_filmstrip_thumbnail .bwg_filmstrip_thumbnail_img_wrap{overflow:hidden}.bwg_thumb_active{opacity:1}.bwg_filmstrip_thumbnail_img{display:block;opacity:1}.bwg_filmstrip_left{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_filmstrip_right{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bwg_watermark_container{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_watermark_container>div{display:table;margin:0 auto}.bwg_watermark_spun{display:table-cell;overflow:hidden;position:relative}.bwg_watermark_image{margin:4px;position:relative;z-index:10141}.bwg_watermark_text,.bwg_watermark_text:hover{text-decoration:none;margin:4px;position:relative;z-index:10141}.bwg_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.bwg_slide_bg{margin:0 auto;width:inherit;height:inherit}.bwg_slider{height:inherit;width:inherit}.bwg_popup_image_spun{height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.bwg_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}.bwg_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.bwg_gridlet{opacity:1;position:absolute}.bwg_image_info::-webkit-scrollbar{width:4px}.bwg_image_info::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_image_info::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}#bwg_rate_form .bwg_hint{margin:0 5px;display:none}.bwg_star{display:inline-block;width:unset!important}.bwg_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}#bwg_comment_form label{display:block;font-weight:700;margin-top:17px;text-transform:uppercase}#bwg_comment_form .bwg-privacy-policy-box label{text-transform:unset;word-break:break-word}.bwg_popup_image_spun .bwg_popup_image_spun1{width:inherit;height:inherit}.bwg_popup_image_spun1 .bwg_popup_image_spun2{vertical-align:middle;text-align:center;height:100%}#embed_conteiner{table-layout:fixed;height:100%}#opacity_div{background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#loading_div{text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}#ecommerce_ajax_loading{position:absolute}#ecommerce_opacity_div{display:none;background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#ecommerce_loading_div{display:none;text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg_ecommerce_panel.bwg_popup_sidebar_panel.bwg_popup_sidebar{text-align:left}#ajax_loading{position:absolute}@media (max-width:480px){.bwg_image_count_container{display:none}.bwg_image_title,.bwg_image_title *{font-size:12px}.bwg_image_description,.bwg_image_description *{font-size:10px}}@media (pointer:none),(pointer:coarse){#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-masonry-thumbnails .bwg-title1,#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-standard-thumbnails .bwg-title1,.bwg-mosaic-thumbnails{opacity:1!important}.bwg-zoom-effect .bwg-zoom-effect-overlay,.bwg-zoom-effect-overlay>span{opacity:1!important;background-color:unset!important}}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_] *{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_]{border-collapse:collapse;display:table;position:relative;text-align:center;margin:auto}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_image_]{display:inline-block;padding:0!important;margin:0!important;float:none!important;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_embed_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;display:inline-block;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_]{position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause{bottom:0;cursor:pointer;display:table;height:inherit;outline:medium none;position:absolute;width:30%;left:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span[id^=bwg_slideshow_play_pause-ico_]{display:inline-block!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span{position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]{display:none!important;cursor:pointer;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]:hover{display:inline-block;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]{left:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{right:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover span{left:auto!important;right:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover span{left:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_] span,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_],div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]:hover{cursor:pointer}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_container_]{display:table;position:absolute;text-align:center;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_container_]{position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] .bwg_slideshow_filmstrip{overflow:hidden;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnails_]{margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnail_]{position:relative;background:0 0;cursor:pointer;float:left;overflow:hidden}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_thumb_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_filmstrip_thumbnail_img_]{display:block;opacity:1;padding:0!important}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_left_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_right_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_none_selectable_]{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_title_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_description_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_image_]{padding:0!important;float:none!important;margin:4px!important;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_]:hover{text-decoration:none;margin:4px;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_title_text_]{text-decoration:none;position:relative;z-index:11;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_description_text_]{text-decoration:none;position:relative;z-index:15;margin:5px;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_]{display:table-cell;margin:0 auto;position:absolute;vertical-align:middle;width:100%;height:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_bg_]{margin:0 auto;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slider_]{height:inherit;width:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun_]{width:inherit;height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;z-index:2}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_second_spun_]{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_grid_]{display:none;height:100%;overflow:hidden;position:absolute;width:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_gridlet_]{opacity:1;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_]{display:inline-block;position:relative;cursor:pointer;overflow:hidden;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_container_]{display:block;overflow:hidden;position:absolute;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_thumbnails_]{left:0;font-size:0;margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun1_]{display:table;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun2_]{display:table-cell;vertical-align:middle;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_mosaic_play_icon_spun_]{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center;left:0}.lazy_loader{background-image:url(../images/ajax_loader.png);background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg-container-temp0{visibility:hidden!important;position:absolute!important}.bwg_image_browser .pagination-links{display:flex;padding:0}.bwg_image_browser .pagination-links_col1{flex-grow:3;text-align:left}.bwg_image_browser .pagination-links_col2{flex-grow:4;text-align:center}.bwg_image_browser .pagination-links_col3{flex-grow:3;text-align:right}.bwg_current_page[type=number]{width:35px;display:inline-block;-moz-appearance:textfield;line-height:normal!important}.bwg_current_page::-webkit-inner-spin-button,.bwg_current_page::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bwg_container .bwg_tag_button_view_container{display:flex;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-bottom:45px;position:relative;padding-top:3px;flex-wrap:wrap;overflow:hidden;clear:both}.bwg_container .bwg_tag_button_view_container button{cursor:pointer}.bwg_container .bwg_tag_button_view_container button.active{cursor:default}.bwg_container .bwg_tag_button_view_container .verLine{min-height:26px;margin:0 15px}.bwg_container .bwg_tag_button_see_all{margin-bottom:70px;position:relative;display:none}.bwg_container .bwg_tag_button_see_all .see_all_tags{text-transform:uppercase;position:absolute;padding:10px 25px;font-weight:600;cursor:pointer;left:47%;top:-23px}.bwg_container .bwg_tag_button_see_all .see_all_tags span{display:inline-block;line-height:normal;text-align:center;border-radius:50%;margin-right:10px;font-weight:500;color:#fff;height:18px;width:18px}.bwg_addThis{position:absolute;left:10px;top:10px;z-index:9999}
filemanager/UploadHandler.php CHANGED
@@ -50,7 +50,6 @@ class bwg_UploadHandler {
50
  );
51
 
52
  function __construct( $options = NULL, $initialize = TRUE, $error_messages = NULL ) {
53
-
54
  $this->options = array(
55
  'media_library_folder' => 'imported_from_media_libray' . '/',
56
  'script_url' => $this->get_full_url() . '/',
@@ -201,7 +200,7 @@ class bwg_UploadHandler {
201
  return $url . '&download=1';
202
  }
203
  $version_path = empty($version) ? '' : rawurlencode($version) . '/';
204
- $file_path = !empty($file->path) ? $file->path : '';
205
  $url = $this->options['upload_url'] . $this->get_user_path() . $file_path . $version_path . rawurlencode($file->name);
206
 
207
  return $url;
@@ -451,16 +450,17 @@ class bwg_UploadHandler {
451
  if ( $exif === FALSE ) {
452
  return;
453
  }
454
- if ( $exif['ExposureProgram'] == 7 ) {
 
455
  /* 7 for portrait. */
456
- if ( $exif['Orientation'] == 6 ) {
457
  return;
458
  }
459
  $rotate = 270;
460
  }
461
  else {
462
  /* 8 for landscape. */
463
- if ( $exif['Orientation'] == 1 ) {
464
  return;
465
  }
466
  $rotate = 0;
@@ -501,23 +501,23 @@ class bwg_UploadHandler {
501
  protected function handle_image_file( $file_path, $file ) {
502
  $failed_versions = array();
503
 
504
- foreach ( $this->options['image_versions'] as $version => $options ) {
505
- if ( $this->create_scaled_image($file->name, $version, $options) ) {
506
- if ( $version === '' && $this->options['orient_image'] ) {
507
- // Rotate only base size image (not thumb and original).
508
- $this->orient_image($file);
509
- }
510
- if ( !empty($version) ) {
511
- $file->{$version . '_url'} = $this->get_download_url($file, $version);
512
- }
513
- else {
514
- $file->size = $this->get_file_size($file_path, TRUE);
515
- }
516
  }
517
  else {
518
- $failed_versions[] = $version;
519
  }
520
  }
 
 
 
 
521
 
522
 
523
  switch ( count($failed_versions) ) {
@@ -531,38 +531,39 @@ class bwg_UploadHandler {
531
  }
532
 
533
  if ( !$file->error ) {
534
- global $wpdb;
535
- $file->filename = str_replace("_", " ", substr($file->name, 0, strrpos($file->name, '.')));
536
- $file_ex = explode('.', $file->name);
537
- $file->type = strtolower(end($file_ex));
538
- $file->thumb = $file->name;
539
- $file->size = (int) ($file->size / 1024) . ' KB';
540
- // ini_set('allow_url_fopen',1);
 
541
  $image_info = @getimagesize(htmlspecialchars_decode($file->url, ENT_COMPAT | ENT_QUOTES));
542
- if ( $file->type == 'svg' ) {
543
- $size = $this->get_svg_size($file->dir . $file->name);
544
- if ( !empty($size) ) {
545
- $file->resolution = $size['width'] . " x " . $size['height'] . " px ";
546
- }
547
- else {
548
- $file->resolution = "";
549
- }
550
- }
551
- else {
552
- $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
553
- }
554
- if ( BWG()->options->read_metadata ) {
555
- $meta = WDWLibrary::read_image_metadata($file->dir . '/.original/' . $file->name);
556
- $file->alt = ($meta['title']) ? $meta['title'] : str_replace("_", " ", $file->filename);
557
- $file->credit = isset($meta['credit']) ? $meta['credit'] : '';
558
- $file->aperture = isset($meta['aperture']) ? $meta['aperture'] : '';
559
- $file->camera = isset($meta['camera']) ? $meta['camera'] : '';
560
- $file->caption = isset($meta['caption']) ? $meta['caption'] : '';
561
- $file->iso = isset($meta['iso']) ? $meta['iso'] : '';
562
- $file->orientation = isset($meta['orientation']) ? $meta['orientation'] : '';
563
- $file->copyright = isset($meta['copyright']) ? $meta['copyright'] : '';
564
- $file->tags = isset($meta['tags']) ? $meta['tags'] : '';
565
- }
566
  $wpdb->insert($wpdb->prefix . 'bwg_file_paths', $this->set_file_info($file));
567
  }
568
  }
@@ -642,10 +643,10 @@ class bwg_UploadHandler {
642
  $file->url = $this->get_download_url($file);
643
  list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
644
  if ( $this->options['max_width'] && $this->options['max_height'] ) {
645
- // Zip Upload.
646
  $this->create_scaled_image($file->name, 'main', $this->options);
647
  }
648
- if ( is_int($img_width) ) {
 
649
  $file->error = FALSE;
650
  $this->handle_image_file($ex_file, $file);
651
  }
@@ -717,16 +718,16 @@ class bwg_UploadHandler {
717
 
718
  if ( $type == 'svg' ) {
719
  $size = $this->get_svg_size($file->dir.$file->name);
720
- if( !empty($size) ) {
721
- $file->resolution = $size['width'] . " x " . $size['height'] . " px ";
722
- $file->resolution_thumb = $size['width'] . "x" . $size['height'];
723
- } else {
724
- $file->resolution = "";
725
- $file->resolution_thumb = "";
726
- }
727
  } else {
728
- $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
729
- $file->resolution_thumb = WDWLibrary::get_thumb_size($file->thumb_url);
730
  }
731
  if ( BWG()->options->read_metadata ) {
732
  $meta = WDWLibrary::read_image_metadata($upload_dir . '.original/' . $file->name);
@@ -783,8 +784,7 @@ class bwg_UploadHandler {
783
  }
784
 
785
  $file_size = $this->get_file_size($file_path, $append_file);
786
-
787
- if (strpos($type, 'svg') || $file_size === $file->size ) {
788
  // Do not compare size if the file is svg (for the reason when script is deleted from file).
789
  if ( $this->options['max_width'] && $this->options['max_height'] ) {
790
  // Upload.
@@ -1101,31 +1101,31 @@ class bwg_UploadHandler {
1101
  $data['author'] = get_current_user_id();
1102
 
1103
  if ( $data['type'] == 'svg') {
1104
- $size = $this->get_svg_size($info->dir.$data['name']);
1105
- if( !empty($size['width']) && !empty($size['height']) ) {
1106
- $data['resolution'] = $size['width'] . " x " . $size['height'] . " px ";
1107
- $data['resolution_thumb'] = $size['width'] . "x" . $size['height'];
1108
- } else {
1109
- $data['resolution'] = WDWLibrary::get('upload_img_width') . " x " . WDWLibrary::get('upload_img_height') . " px ";
1110
- $data['resolution_thumb'] = WDWLibrary::get('upload_thumb_width') . "x" . WDWLibrary::get('upload_thumb_height');
1111
- }
1112
  } else {
1113
- $data['resolution'] = isset($info->resolution) ? $info->resolution : '';
1114
- $resolution_thumb = WDWLibrary::get_thumb_size("/" . $data['thumb']);
1115
- if ( $resolution_thumb == '' && !empty($data['resolution']) ) {
1116
- $temp = explode(" ", $data['resolution']);
1117
- $resolution_thumb = $temp[0] . "x" . $temp[2];
1118
- }
1119
- $data['resolution_thumb'] = $resolution_thumb;
1120
 
1121
- $data['credit'] = isset($info->credit) ? $this->mime_decode($info->credit, $iconv_mime_decode_function_exist) : '';
1122
- $data['aperture'] = isset($info->aperture) ? $this->mime_decode($info->aperture, $iconv_mime_decode_function_exist) : '';
1123
- $data['camera'] = isset($info->camera) ? $this->mime_decode($info->camera, $iconv_mime_decode_function_exist) : '';
1124
- $data['caption'] = isset($info->caption) ? $this->mime_decode($info->caption, $iconv_mime_decode_function_exist) : '';
1125
- $data['iso'] = isset($info->iso) ? $this->mime_decode($info->iso, $iconv_mime_decode_function_exist) : '';
1126
- $data['orientation'] = isset($info->orientation) ? $info->orientation : '';
1127
- $data['copyright'] = isset($info->copyright) ? $this->mime_decode($info->copyright, $iconv_mime_decode_function_exist) : '';
1128
- $data['tags'] = isset($info->tags) ? $this->mime_decode($info->tags, $iconv_mime_decode_function_exist) : '';
1129
 
1130
  }
1131
 
@@ -1135,7 +1135,7 @@ class bwg_UploadHandler {
1135
  private function mime_decode($value, $function_exist) {
1136
 
1137
  if ( $value && $function_exist ) {
1138
- $value = iconv_mime_decode($value, 2, 'UTF-8');
1139
  }
1140
  return $value;
1141
 
50
  );
51
 
52
  function __construct( $options = NULL, $initialize = TRUE, $error_messages = NULL ) {
 
53
  $this->options = array(
54
  'media_library_folder' => 'imported_from_media_libray' . '/',
55
  'script_url' => $this->get_full_url() . '/',
200
  return $url . '&download=1';
201
  }
202
  $version_path = empty($version) ? '' : rawurlencode($version) . '/';
203
+ $file_path = !empty($file->path) ? $file->path . '/' : '';
204
  $url = $this->options['upload_url'] . $this->get_user_path() . $file_path . $version_path . rawurlencode($file->name);
205
 
206
  return $url;
450
  if ( $exif === FALSE ) {
451
  return;
452
  }
453
+
454
+ if ( !empty($exif) && !empty($exif['ExposureProgram']) && $exif['ExposureProgram'] == 7 ) {
455
  /* 7 for portrait. */
456
+ if ( !empty($exif['Orientation']) && $exif['Orientation'] == 6 ) {
457
  return;
458
  }
459
  $rotate = 270;
460
  }
461
  else {
462
  /* 8 for landscape. */
463
+ if ( !empty($exif['Orientation']) && $exif['Orientation'] == 1 ) {
464
  return;
465
  }
466
  $rotate = 0;
501
  protected function handle_image_file( $file_path, $file ) {
502
  $failed_versions = array();
503
 
504
+ foreach ( $this->options['image_versions'] as $version => $options ) {
505
+ if ( $this->create_scaled_image($file->name, $version, $options) ) {
506
+ if ( $version === '' && $this->options['orient_image'] ) {
507
+ // Rotate only base size image (not thumb and original).
508
+ $this->orient_image($file);
509
+ }
510
+ if ( !empty($version) ) {
511
+ $file->{$version . '_url'} = $this->get_download_url($file, $version);
 
 
 
 
512
  }
513
  else {
514
+ $file->size = $this->get_file_size($file_path, TRUE);
515
  }
516
  }
517
+ else {
518
+ $failed_versions[] = $version;
519
+ }
520
+ }
521
 
522
 
523
  switch ( count($failed_versions) ) {
531
  }
532
 
533
  if ( !$file->error ) {
534
+ global $wpdb;
535
+ $file->filename = str_replace("_", " ", substr($file->name, 0, strrpos($file->name, '.')));
536
+ $file_ex = explode('.', $file->name);
537
+ $file->type = strtolower(end($file_ex));
538
+ $file->thumb = $file->name;
539
+ $file->size = (int) ($file->size / 1024) . ' KB';
540
+ $file->url = (isset($file->url) && $file->url !== '') ? $file->url : $this->get_download_url($file);
541
+ // ini_set('allow_url_fopen',1);
542
  $image_info = @getimagesize(htmlspecialchars_decode($file->url, ENT_COMPAT | ENT_QUOTES));
543
+ if ( $file->type == 'svg' ) {
544
+ $size = $this->get_svg_size($file->dir . $file->name);
545
+ if ( !empty($size) ) {
546
+ $file->resolution = $size['width'] . " x " . $size['height'] . " px ";
547
+ }
548
+ else {
549
+ $file->resolution = "";
550
+ }
551
+ }
552
+ else {
553
+ $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
554
+ }
555
+ if ( BWG()->options->read_metadata ) {
556
+ $meta = WDWLibrary::read_image_metadata($file->dir . '/.original/' . $file->name);
557
+ $file->alt = ($meta['title']) ? $meta['title'] : str_replace("_", " ", $file->filename);
558
+ $file->credit = isset($meta['credit']) ? $meta['credit'] : '';
559
+ $file->aperture = isset($meta['aperture']) ? $meta['aperture'] : '';
560
+ $file->camera = isset($meta['camera']) ? $meta['camera'] : '';
561
+ $file->caption = isset($meta['caption']) ? $meta['caption'] : '';
562
+ $file->iso = isset($meta['iso']) ? $meta['iso'] : '';
563
+ $file->orientation = isset($meta['orientation']) ? $meta['orientation'] : '';
564
+ $file->copyright = isset($meta['copyright']) ? $meta['copyright'] : '';
565
+ $file->tags = isset($meta['tags']) ? $meta['tags'] : '';
566
+ }
567
  $wpdb->insert($wpdb->prefix . 'bwg_file_paths', $this->set_file_info($file));
568
  }
569
  }
643
  $file->url = $this->get_download_url($file);
644
  list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
645
  if ( $this->options['max_width'] && $this->options['max_height'] ) {
 
646
  $this->create_scaled_image($file->name, 'main', $this->options);
647
  }
648
+ // Zip Upload.
649
+ if ( is_int($img_width) || $extension == 'svg') {
650
  $file->error = FALSE;
651
  $this->handle_image_file($ex_file, $file);
652
  }
718
 
719
  if ( $type == 'svg' ) {
720
  $size = $this->get_svg_size($file->dir.$file->name);
721
+ if( !empty($size) ) {
722
+ $file->resolution = $size['width'] . " x " . $size['height'] . " px ";
723
+ $file->resolution_thumb = $size['width'] . "x" . $size['height'];
724
+ } else {
725
+ $file->resolution = "";
726
+ $file->resolution_thumb = "";
727
+ }
728
  } else {
729
+ $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
730
+ $file->resolution_thumb = WDWLibrary::get_thumb_size($file->thumb_url);
731
  }
732
  if ( BWG()->options->read_metadata ) {
733
  $meta = WDWLibrary::read_image_metadata($upload_dir . '.original/' . $file->name);
784
  }
785
 
786
  $file_size = $this->get_file_size($file_path, $append_file);
787
+ if ( strpos($type, 'svg') || $file_size === $file->size ) {
 
788
  // Do not compare size if the file is svg (for the reason when script is deleted from file).
789
  if ( $this->options['max_width'] && $this->options['max_height'] ) {
790
  // Upload.
1101
  $data['author'] = get_current_user_id();
1102
 
1103
  if ( $data['type'] == 'svg') {
1104
+ $size = $this->get_svg_size($info->dir.$data['name']);
1105
+ if( !empty($size['width']) && !empty($size['height']) ) {
1106
+ $data['resolution'] = $size['width'] . " x " . $size['height'] . " px ";
1107
+ $data['resolution_thumb'] = $size['width'] . "x" . $size['height'];
1108
+ } else {
1109
+ $data['resolution'] = WDWLibrary::get('upload_img_width') . " x " . WDWLibrary::get('upload_img_height') . " px ";
1110
+ $data['resolution_thumb'] = WDWLibrary::get('upload_thumb_width') . "x" . WDWLibrary::get('upload_thumb_height');
1111
+ }
1112
  } else {
1113
+ $data['resolution'] = isset($info->resolution) ? $info->resolution : '';
1114
+ $resolution_thumb = WDWLibrary::get_thumb_size("/" . $data['thumb']);
1115
+ if ( $resolution_thumb == '' && !empty($data['resolution']) ) {
1116
+ $temp = explode(" ", $data['resolution']);
1117
+ $resolution_thumb = $temp[0] . "x" . $temp[2];
1118
+ }
1119
+ $data['resolution_thumb'] = $resolution_thumb;
1120
 
1121
+ $data['credit'] = isset($info->credit) ? $this->mime_decode($info->credit, $iconv_mime_decode_function_exist) : '';
1122
+ $data['aperture'] = isset($info->aperture) ? $this->mime_decode($info->aperture, $iconv_mime_decode_function_exist) : '';
1123
+ $data['camera'] = isset($info->camera) ? $this->mime_decode($info->camera, $iconv_mime_decode_function_exist) : '';
1124
+ $data['caption'] = isset($info->caption) ? $this->mime_decode($info->caption, $iconv_mime_decode_function_exist) : '';
1125
+ $data['iso'] = isset($info->iso) ? $this->mime_decode($info->iso, $iconv_mime_decode_function_exist) : '';
1126
+ $data['orientation'] = isset($info->orientation) ? $info->orientation : '';
1127
+ $data['copyright'] = isset($info->copyright) ? $this->mime_decode($info->copyright, $iconv_mime_decode_function_exist) : '';
1128
+ $data['tags'] = isset($info->tags) ? $this->mime_decode($info->tags, $iconv_mime_decode_function_exist) : '';
1129
 
1130
  }
1131
 
1135
  private function mime_decode($value, $function_exist) {
1136
 
1137
  if ( $value && $function_exist ) {
1138
+ $value = iconv_mime_decode($value, 2, 'UTF-8');
1139
  }
1140
  return $value;
1141
 
filemanager/model.php CHANGED
@@ -61,19 +61,21 @@ class FilemanagerModel {
61
 
62
  $query = ' SELECT * FROM `' . $wpdb->prefix . 'bwg_file_paths`';
63
  $query .= ' WHERE `path` = "%s"';
64
- $prepareArgs = array($dir);
 
65
  if ( !current_user_can('manage_options') && BWG()->options->image_role ) {
66
  $query .= " AND `author`= %d";
67
  $prepareArgs[] = get_current_user_id();
68
  }
69
  if ( $search ) {
70
- $query .= ' AND ((filename LIKE %s) OR (alt LIKE %s)) ';
71
- $prepareArgs[] = "%" . $search . "%";
72
- $prepareArgs[] = "%" . $search . "%";
73
  }
74
  if ( $orderby == 'size') {
75
  $orderby = 'CAST('. $orderby .' AS unsigned)';
76
  }
 
77
  $query .= ' ORDER BY `is_dir` DESC, '. $orderby . ' ' . $order;
78
  // Get total num rows.
79
  $results['page_per'] = $page_per;
@@ -83,13 +85,15 @@ class FilemanagerModel {
83
  $prepareArgs[] = $page_mix;
84
  $prepareArgs[] = $page_per;
85
  $items = $wpdb->get_results($wpdb->prepare($query, $prepareArgs), 'ARRAY_A');
 
86
  if ( empty($items) && empty($search) ) {
87
  $params['dir'] = BWG()->upload_dir . $dir;
88
  $params['path'] = $dir;
89
  $this->files_parsing_db( $params );
90
- $items = $wpdb->get_results($query, 'ARRAY_A');
91
  $results['num_rows'] = $wpdb->get_var( $wpdb->prepare(str_replace('SELECT *', 'SELECT COUNT(*)', $query),$prepareArgs) );
92
  }
 
93
  if ( !empty($items) ) {
94
  foreach( $items as $item ) {
95
  $thumb = BWG()->plugin_url . $item['thumb'];
@@ -184,7 +188,8 @@ class FilemanagerModel {
184
  $prepareArgs[] = "%" . $search . "%";
185
  $prepareArgs[] = "%" . $search . "%";
186
  }
187
- $query .= ' ORDER BY `is_dir` DESC, `' . $orderby . '` ' . $order;
 
188
  $items = $wpdb->get_results($wpdb->prepare($query, $prepareArgs), 'ARRAY_A');
189
  $results = array();
190
  if ( !empty($items) ) {
@@ -236,7 +241,7 @@ class FilemanagerModel {
236
  $file['filename'] = str_replace("_", " ", $name);
237
  $file['alt'] = str_replace("_", " ", $name);
238
  $file['thumb'] = '/filemanager/images/dir.png';
239
- $file['author'] = !empty($wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'")) ? $wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'") : 1;
240
  $dirs[] = $file;
241
  }
242
  else {
@@ -267,22 +272,22 @@ class FilemanagerModel {
267
  $file['orientation'] = !empty($exif['orientation']) ? $exif['orientation'] : '';
268
  $file['copyright'] = !empty($exif['copyright']) ? $exif['copyright']: '';
269
  $file['tags'] = !empty($exif['tags']) ? $exif['tags'] : '';
270
- $file['date_modified'] = date("Y-m-d H:i:s", filemtime($item));
271
- $file['author'] = !empty($wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'")) ? $wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'") : 1;
272
- $files[] = $file;
273
- }
274
- }
275
- $data = array_merge($dirs,$files);
276
- $insert = 0;
277
- $tbl = $wpdb->prefix . 'bwg_file_paths';
278
- if( !empty($params['refresh']) ) {
279
- $wpdb->delete($tbl, array('path' => $path ), array('%s') );
280
- }
281
- foreach( $data as $val ) {
282
- $insert = $wpdb->insert($tbl, $val );
283
- }
284
- return $insert;
285
- }
286
  }
287
 
288
  /**
61
 
62
  $query = ' SELECT * FROM `' . $wpdb->prefix . 'bwg_file_paths`';
63
  $query .= ' WHERE `path` = "%s"';
64
+ $prepareArgs = array($dir);
65
+
66
  if ( !current_user_can('manage_options') && BWG()->options->image_role ) {
67
  $query .= " AND `author`= %d";
68
  $prepareArgs[] = get_current_user_id();
69
  }
70
  if ( $search ) {
71
+ $query .= ' AND ((filename LIKE %s) OR (alt LIKE %s)) ';
72
+ $prepareArgs[] = "%" . $search . "%";
73
+ $prepareArgs[] = "%" . $search . "%";
74
  }
75
  if ( $orderby == 'size') {
76
  $orderby = 'CAST('. $orderby .' AS unsigned)';
77
  }
78
+
79
  $query .= ' ORDER BY `is_dir` DESC, '. $orderby . ' ' . $order;
80
  // Get total num rows.
81
  $results['page_per'] = $page_per;
85
  $prepareArgs[] = $page_mix;
86
  $prepareArgs[] = $page_per;
87
  $items = $wpdb->get_results($wpdb->prepare($query, $prepareArgs), 'ARRAY_A');
88
+
89
  if ( empty($items) && empty($search) ) {
90
  $params['dir'] = BWG()->upload_dir . $dir;
91
  $params['path'] = $dir;
92
  $this->files_parsing_db( $params );
93
+ $items = $wpdb->get_results($wpdb->prepare($query, $prepareArgs), 'ARRAY_A');
94
  $results['num_rows'] = $wpdb->get_var( $wpdb->prepare(str_replace('SELECT *', 'SELECT COUNT(*)', $query),$prepareArgs) );
95
  }
96
+
97
  if ( !empty($items) ) {
98
  foreach( $items as $item ) {
99
  $thumb = BWG()->plugin_url . $item['thumb'];
188
  $prepareArgs[] = "%" . $search . "%";
189
  $prepareArgs[] = "%" . $search . "%";
190
  }
191
+
192
+ $query .= ' ORDER BY `is_dir` DESC, ' . $orderby . ' ' . $order;
193
  $items = $wpdb->get_results($wpdb->prepare($query, $prepareArgs), 'ARRAY_A');
194
  $results = array();
195
  if ( !empty($items) ) {
241
  $file['filename'] = str_replace("_", " ", $name);
242
  $file['alt'] = str_replace("_", " ", $name);
243
  $file['thumb'] = '/filemanager/images/dir.png';
244
+ $file['author'] = !empty($wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'")) ? $wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'") : 1;
245
  $dirs[] = $file;
246
  }
247
  else {
272
  $file['orientation'] = !empty($exif['orientation']) ? $exif['orientation'] : '';
273
  $file['copyright'] = !empty($exif['copyright']) ? $exif['copyright']: '';
274
  $file['tags'] = !empty($exif['tags']) ? $exif['tags'] : '';
275
+ $file['date_modified'] = date("Y-m-d H:i:s", filemtime($item));
276
+ $file['author'] = !empty($wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'")) ? $wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'") : 1;
277
+ $files[] = $file;
278
+ }
279
+ }
280
+ $data = array_merge($dirs,$files);
281
+ $insert = 0;
282
+ $tbl = $wpdb->prefix . 'bwg_file_paths';
283
+ if ( !empty($params['refresh']) ) {
284
+ $wpdb->delete($tbl, array( 'path' => $path ), array( '%s'));
285
+ }
286
+ foreach ( $data as $val ) {
287
+ $insert = $wpdb->insert($tbl, $val);
288
+ }
289
+ return $insert;
290
+ }
291
  }
292
 
293
  /**
framework/WDWLibrary.php CHANGED
@@ -1373,27 +1373,32 @@ class WDWLibrary {
1373
  $options = new WD_BWG_Options();
1374
  if ( $options->built_in_watermark_type != 'none' ) {
1375
  $prepareArgs = array();
 
1376
  if ( $gallery_id ) {
1377
  $where = ' `gallery_id`=%d';
1378
  $prepareArgs[] = $gallery_id;
 
1379
  if ( $image_id ) {
1380
  $where .= ' AND `id`=%d';
1381
  $prepareArgs[] = $image_id;
 
1382
  }
1383
  } else {
1384
  $where = 1;
1385
  }
1386
  //$where = (($gallery_id) ? ' `gallery_id`=' . $gallery_id . ($image_id ? ' AND `id`=' . $image_id : '') : 1);
1387
  $search = WDWLibrary::get( 's', '' );
1388
- if ( $search ) {
1389
  $where .= ' AND `filename` LIKE "%s"';
1390
  $prepareArgs[] = "%" . $search . "%";
 
1391
  }
1392
  $limitstart = '';
1393
  if ( !$limit ) {
1394
  $limitstart = ' LIMIT 50 OFFSET %d';
1395
  $prepareArgs[] = $limit;
1396
  }
 
1397
  $images = $wpdb->get_results( $wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where . $limitstart, $prepareArgs) );
1398
 
1399
  if ( !empty( $images ) ) {
@@ -1416,7 +1421,7 @@ class WDWLibrary {
1416
  }
1417
  break;
1418
  }
1419
- self::update_image_modified_date( $where );
1420
  }
1421
  }
1422
  else {
@@ -1579,10 +1584,12 @@ class WDWLibrary {
1579
  $width = BWG()->options->upload_img_width;
1580
  global $wpdb;
1581
  $prepareArgs = array();
 
1582
  $where = ($gallery_id) ? ' `gallery_id` = ' . $gallery_id : 1;
1583
  if ( $gallery_id ) {
1584
  $where = ' `gallery_id` = %d';
1585
  $prepareArgs[] = $gallery_id;
 
1586
  } else {
1587
  $where = 1;
1588
  }
@@ -1590,6 +1597,7 @@ class WDWLibrary {
1590
  if ( $search ) {
1591
  $where .= ' AND `filename` LIKE %s';
1592
  $prepareArgs[] = "%" . $search . "%";
 
1593
  }
1594
  $limitstart = '';
1595
  if ( !$limit ) {
@@ -1605,7 +1613,7 @@ class WDWLibrary {
1605
  self::recover_image( $image, $thumb_width, $width, ($gallery_id == 0 ? 'option_page' : 'gallery_page') );
1606
  }
1607
  }
1608
- self::update_image_modified_date( $where );
1609
  }
1610
 
1611
  /**
@@ -1676,6 +1684,7 @@ class WDWLibrary {
1676
  }
1677
 
1678
  public static function recover_image_size($width_orig, $height_orig, $width, $original_image, $filename) {
 
1679
  $percent = $width_orig / $width;
1680
  $height = $height_orig / $percent;
1681
  $original_image->resize($width, $height, false);
@@ -2347,6 +2356,7 @@ class WDWLibrary {
2347
 
2348
  public static function update_bwg_tag($term_id) {
2349
  $old_tag = self::get('old_tag','');
 
2350
  // Create custom post (type is tag).
2351
  $term = get_term($term_id, 'bwg_tag');
2352
  $custom_post_params = array(
@@ -2462,7 +2472,12 @@ class WDWLibrary {
2462
  $newPrepareArgs = $prepareArgs;
2463
  array_unshift($newPrepareArgs , $time);
2464
  $update = $wpdb->query( $wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `modified_date` = "%d" WHERE ' . $where, $newPrepareArgs) );
2465
- $items = $wpdb->get_results( $wpdb->prepare('SELECT `gallery_id`, `thumb_url` FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where, $prepareArgs) );
 
 
 
 
 
2466
  if ( !empty($items) ) {
2467
  $thumbs_str = '';
2468
  foreach ( $items as $item ) {
@@ -2470,8 +2485,8 @@ class WDWLibrary {
2470
  }
2471
  $thumbs_str = rtrim($thumbs_str,',');
2472
 
2473
- $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_gallery` SET `modified_date` = "' . time() . '" WHERE `preview_image` IN (' . $thumbs_str . ') OR `random_preview_image` IN (' . $thumbs_str . ')', array('%d','%s','%s')));
2474
- $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_album` SET `modified_date` = "' . time() . '" WHERE `preview_image` IN (' . $thumbs_str . ') OR `random_preview_image` IN (' . $thumbs_str . ')', array('%d','%s','%s')));
2475
  }
2476
 
2477
  return array('status' => $update, 'modified_date' => $time );
1373
  $options = new WD_BWG_Options();
1374
  if ( $options->built_in_watermark_type != 'none' ) {
1375
  $prepareArgs = array();
1376
+ $modified_date_prepare_args = array();
1377
  if ( $gallery_id ) {
1378
  $where = ' `gallery_id`=%d';
1379
  $prepareArgs[] = $gallery_id;
1380
+ $modified_date_prepare_args[] = $gallery_id;
1381
  if ( $image_id ) {
1382
  $where .= ' AND `id`=%d';
1383
  $prepareArgs[] = $image_id;
1384
+ $modified_date_prepare_args[] = $image_id;
1385
  }
1386
  } else {
1387
  $where = 1;
1388
  }
1389
  //$where = (($gallery_id) ? ' `gallery_id`=' . $gallery_id . ($image_id ? ' AND `id`=' . $image_id : '') : 1);
1390
  $search = WDWLibrary::get( 's', '' );
1391
+ if ( !empty($search) ) {
1392
  $where .= ' AND `filename` LIKE "%s"';
1393
  $prepareArgs[] = "%" . $search . "%";
1394
+ $modified_date_prepare_args[] = "%" . $search . "%";
1395
  }
1396
  $limitstart = '';
1397
  if ( !$limit ) {
1398
  $limitstart = ' LIMIT 50 OFFSET %d';
1399
  $prepareArgs[] = $limit;
1400
  }
1401
+
1402
  $images = $wpdb->get_results( $wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where . $limitstart, $prepareArgs) );
1403
 
1404
  if ( !empty( $images ) ) {
1421
  }
1422
  break;
1423
  }
1424
+ self::update_image_modified_date( $where, $modified_date_prepare_args );
1425
  }
1426
  }
1427
  else {
1584
  $width = BWG()->options->upload_img_width;
1585
  global $wpdb;
1586
  $prepareArgs = array();
1587
+ $modified_date_prepare_args = array();
1588
  $where = ($gallery_id) ? ' `gallery_id` = ' . $gallery_id : 1;
1589
  if ( $gallery_id ) {
1590
  $where = ' `gallery_id` = %d';
1591
  $prepareArgs[] = $gallery_id;
1592
+ $modified_date_prepare_args[] = $gallery_id;
1593
  } else {
1594
  $where = 1;
1595
  }
1597
  if ( $search ) {
1598
  $where .= ' AND `filename` LIKE %s';
1599
  $prepareArgs[] = "%" . $search . "%";
1600
+ $modified_date_prepare_args[] = "%" . $search . "%";
1601
  }
1602
  $limitstart = '';
1603
  if ( !$limit ) {
1613
  self::recover_image( $image, $thumb_width, $width, ($gallery_id == 0 ? 'option_page' : 'gallery_page') );
1614
  }
1615
  }
1616
+ self::update_image_modified_date( $where, $modified_date_prepare_args );
1617
  }
1618
 
1619
  /**
1684
  }
1685
 
1686
  public static function recover_image_size($width_orig, $height_orig, $width, $original_image, $filename) {
1687
+ if( $width == 0 ) return;
1688
  $percent = $width_orig / $width;
1689
  $height = $height_orig / $percent;
1690
  $original_image->resize($width, $height, false);
2356
 
2357
  public static function update_bwg_tag($term_id) {
2358
  $old_tag = self::get('old_tag','');
2359
+
2360
  // Create custom post (type is tag).
2361
  $term = get_term($term_id, 'bwg_tag');
2362
  $custom_post_params = array(
2472
  $newPrepareArgs = $prepareArgs;
2473
  array_unshift($newPrepareArgs , $time);
2474
  $update = $wpdb->query( $wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `modified_date` = "%d" WHERE ' . $where, $newPrepareArgs) );
2475
+
2476
+ if( !empty($prepareArgs) ) {
2477
+ $items = $wpdb->get_results($wpdb->prepare('SELECT `gallery_id`, `thumb_url` FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where, $prepareArgs));
2478
+ } else {
2479
+ $items = $wpdb->get_results('SELECT `gallery_id`, `thumb_url` FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where);
2480
+ }
2481
  if ( !empty($items) ) {
2482
  $thumbs_str = '';
2483
  foreach ( $items as $item ) {
2485
  }
2486
  $thumbs_str = rtrim($thumbs_str,',');
2487
 
2488
+ $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_gallery` SET `modified_date` = %d WHERE `preview_image` IN (%s) OR `random_preview_image` IN (%s)', array(time(), $thumbs_str, $thumbs_str)));
2489
+ $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_album` SET `modified_date` = %d WHERE `preview_image` IN (%s) OR `random_preview_image` IN (%s)', array(time(), $thumbs_str, $thumbs_str)));
2490
  }
2491
 
2492
  return array('status' => $update, 'modified_date' => $time );
framework/WD_BWG_Theme.php CHANGED
@@ -564,6 +564,7 @@ class WD_BWG_Theme {
564
  public $tags_but_see_all_border_s = "solid";
565
  public $tags_but_see_all_border_c = "E5E5E5";
566
  public $tags_but_see_all_border_r = "20px";
 
567
  public function __construct($id = 0, $reset = false, $predefined_version = false, $active_tab = 'Thumbnail') {
568
  if ( !$id || $predefined_version ) {
569
  unset($this->id);
@@ -1163,6 +1164,7 @@ class WD_BWG_Theme {
1163
  }
1164
  }
1165
  }
 
1166
  /**
1167
  * Get prefix of theme fields object
1168
  *
@@ -1213,6 +1215,7 @@ class WD_BWG_Theme {
1213
  $obj_start = 'tags_';
1214
  break;
1215
  }
 
1216
  return $obj_start;
1217
  }
1218
 
564
  public $tags_but_see_all_border_s = "solid";
565
  public $tags_but_see_all_border_c = "E5E5E5";
566
  public $tags_but_see_all_border_r = "20px";
567
+
568
  public function __construct($id = 0, $reset = false, $predefined_version = false, $active_tab = 'Thumbnail') {
569
  if ( !$id || $predefined_version ) {
570
  unset($this->id);
1164
  }
1165
  }
1166
  }
1167
+
1168
  /**
1169
  * Get prefix of theme fields object
1170
  *
1215
  $obj_start = 'tags_';
1216
  break;
1217
  }
1218
+
1219
  return $obj_start;
1220
  }
1221
 
framework/howto/howto.php CHANGED
@@ -135,6 +135,13 @@ wp_print_scripts('jquery-ui-tabs');
135
  margin-top: 20px;
136
  width: 100%;
137
  }
 
 
 
 
 
 
 
138
  #wd_howto_container .wd-howto-divider-vertical {
139
  border: #0000000d 1px solid;
140
  width: 0;
@@ -405,7 +412,12 @@ wp_print_scripts('jquery-ui-tabs');
405
  </div>
406
  </div>
407
  </div>
408
- <button type="button" class="tw-button-secondary button-large bwg-howto-button" onclick="wd_how_to_use(); return false;">
409
- <?php _e('How to use', BWG()->prefix); ?>
410
- </button>
 
 
 
 
 
411
  <?php
135
  margin-top: 20px;
136
  width: 100%;
137
  }
138
+ .wd-howto-divider-vertical-two {
139
+ border: #0000000d 1px solid;
140
+ display: inline;
141
+ margin: 0 10px;
142
+ height: 25px;
143
+ width: 0;
144
+ }
145
  #wd_howto_container .wd-howto-divider-vertical {
146
  border: #0000000d 1px solid;
147
  width: 0;
412
  </div>
413
  </div>
414
  </div>
415
+ <?php
416
+ if ( isset($_GET['page']) ) {
417
+ $get_gallery_type = basename(stripslashes(WDWLibrary::get('page','','sanitize_text_field','GET')));
418
+ }
419
+ $howto_title = ($get_gallery_type != "albums_bwg") ? __('Insert Gallery To', BWG()->prefix) : __('Insert Gallery Group To', BWG()->prefix);
420
+ ?>
421
+ <div class="wd-howto-divider-vertical-two"></div>
422
+ <button type="button" class="tw-button-secondary button-large bwg-howto-button" onclick="wd_how_to_use(); return false;"> <?php echo $howto_title; ?> </button>
423
  <?php
frontend/controllers/BWGControllerGalleryBox.php CHANGED
@@ -2,8 +2,8 @@
2
  class BWGControllerGalleryBox {
3
  public function execute() {
4
  $ajax_task = WDWLibrary::get('ajax_task');
5
- if (method_exists($this, $ajax_task)) {
6
- $this->$ajax_task();
7
  }
8
  else {
9
  $this->display();
2
  class BWGControllerGalleryBox {
3
  public function execute() {
4
  $ajax_task = WDWLibrary::get('ajax_task');
5
+ if ( method_exists($this, $ajax_task) ) {
6
+ $this->$ajax_task();
7
  }
8
  else {
9
  $this->display();
frontend/models/model.php CHANGED
@@ -194,7 +194,7 @@ class BWGModelSite {
194
 
195
  $row->preview_image = WDWLibrary::image_url_version( $row->preview_image, $row->modified_date );
196
  }
197
- if ( !empty( $row->random_preview_image ) ) {
198
  $row->resolution_thumb = WDWLibrary::get_thumb_size( $row->random_preview_image );
199
  if ( $row->resolution_thumb == "" ) {
200
  $row->resolution_thumb = $this->get_album_preview_thumb_dimensions( $row->random_preview_image );
194
 
195
  $row->preview_image = WDWLibrary::image_url_version( $row->preview_image, $row->modified_date );
196
  }
197
+ if ( !empty( $row->random_preview_image ) && empty( $row->preview_image ) ) {
198
  $row->resolution_thumb = WDWLibrary::get_thumb_size( $row->random_preview_image );
199
  if ( $row->resolution_thumb == "" ) {
200
  $row->resolution_thumb = $this->get_album_preview_thumb_dimensions( $row->random_preview_image );
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -252,7 +252,6 @@ class BWGViewGalleryBox {
252
  .spider_popup_close_fullscreen {
253
  color: #<?php echo $theme_row->lightbox_close_btn_full_color; ?>;
254
  font-size: <?php echo $theme_row->lightbox_close_btn_size; ?>px;
255
- right: 7px;
256
  }
257
  #spider_popup_left-ico,
258
  #spider_popup_right-ico {
@@ -1353,6 +1352,8 @@ class BWGViewGalleryBox {
1353
  'current_image_key' => $current_image_key,
1354
  'slideshow_effect_duration' => $params['popup_effect_duration'],
1355
  'current_image_id' => $current_image_id,
 
 
1356
  'lightbox_rate_stars_count' => $theme_row->lightbox_rate_stars_count,
1357
  'lightbox_rate_size' => $theme_row->lightbox_rate_size,
1358
  'lightbox_rate_icon' => $theme_row->lightbox_rate_icon,
252
  .spider_popup_close_fullscreen {
253
  color: #<?php echo $theme_row->lightbox_close_btn_full_color; ?>;
254
  font-size: <?php echo $theme_row->lightbox_close_btn_size; ?>px;
 
255
  }
256
  #spider_popup_left-ico,
257
  #spider_popup_right-ico {
1352
  'current_image_key' => $current_image_key,
1353
  'slideshow_effect_duration' => $params['popup_effect_duration'],
1354
  'current_image_id' => $current_image_id,
1355
+ 'lightbox_close_btn_right' => (int) $theme_row->lightbox_close_btn_right,
1356
+ 'lightbox_close_btn_top' => (int) $theme_row->lightbox_close_btn_top,
1357
  'lightbox_rate_stars_count' => $theme_row->lightbox_rate_stars_count,
1358
  'lightbox_rate_size' => $theme_row->lightbox_rate_size,
1359
  'lightbox_rate_icon' => $theme_row->lightbox_rate_icon,
frontend/views/view.php CHANGED
@@ -404,7 +404,7 @@ class BWGViewSite {
404
  ob_start();
405
  ?>
406
  #bwg_search_container_1_<?php echo $current_view; ?> {
407
- max-width: <?php echo $search_box_width; ?>px;
408
  }
409
  <?php
410
  $inline_style = ob_get_clean();
@@ -573,46 +573,46 @@ class BWGViewSite {
573
  else {
574
  echo '<style>' . $inline_style . '</style>';
575
  }
576
- if ( $theme_row->tags_view == 1 ) { ?>
577
- <div class="bwg_tags_container_<?php echo $current_view; ?>" >
578
- <div class="search_tags_container">
579
- <select class="search_tags" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" multiple="multiple">
580
- <?php
581
- foreach ( $tags_rows as $tags_row ) {
582
- $selected = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'selected="selected"' : ''; ?>
583
- <option value="<?php echo $tags_row->term_id ?>" <?php echo $selected; ?>><?php echo $tags_row->name ?></option>
584
- <?php
585
- }
586
- ?>
587
- </select>
588
- </div>
589
- <?php
590
- }
591
- else { ?>
592
- <div class="bwg_tags_container_<?php echo $current_view; ?>">
593
- <div class="bwg_tag_button_view_container" >
594
- <button type="button" class="bwg_all_tags active" data-filter="All Tags"><?php echo __('All Tags', BWG()->prefix);?></button><div class="verLine"></div>
595
- <?php
596
- foreach ( $tags_rows as $tags_row ) {
597
- $active = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'active' : '';
598
- ?>
599
- <button type="button" class="bwg_tags_filter_buttons <?php echo $active ?>" data-filter="<?php echo $tags_row->name ?>" value="<?php echo $tags_row->term_id; ?>" ><?php echo $tags_row->name ?></button>
600
- <?php
601
- }
602
- ?>
603
- </div>
604
- <div class="bwg_tag_button_see_all"><div class="see_all_tags show"><span>&#43;</span><?php echo __('see all tags', BWG()->prefix);?></div></div>
605
- <?php
606
- } ?>
607
- <input type="hidden" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" value="<?php echo $get_filter_teg ?>" />
608
- <input type="hidden" class="current_view" value="<?php echo $current_view; ?>" />
609
- <input type="hidden" class="form_id" value="<?php echo $form_id; ?>" />
610
- <input type="hidden" class="cur_gal_id" value="<?php echo $cur_gal_id; ?>" />
611
- <input type="hidden" class="album_gallery_id" value="<?php echo $album_gallery_id; ?>" />
612
- <input type="hidden" class="type" value="<?php echo $type; ?>" />
613
- <input type="hidden" class="show_bottom_tag" value="<?php echo $show_bottom_tag; ?>" />
614
- </div>
615
- <?php
616
  }
617
  }
618
 
@@ -644,60 +644,60 @@ class BWGViewSite {
644
  ?>
645
  /*pagination styles*/
646
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> {
647
- text-align: <?php echo $theme_row->page_nav_align; ?>;
648
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
649
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
650
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
651
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
652
- margin: 6px 0 4px;
653
- display: block;
654
  }
655
  @media only screen and (max-width : 320px) {
656
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .displaying-num_<?php echo $current_view; ?> {
657
- display: none;
658
  }
659
  }
660
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .displaying-num_<?php echo $current_view; ?> {
661
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
662
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
663
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
664
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
665
- margin-right: 10px;
666
- vertical-align: middle;
667
  }
668
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .paging-input_<?php echo $current_view; ?> {
669
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
670
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
671
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
672
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
673
- vertical-align: middle;
674
  }
675
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a.disabled,
676
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a.disabled:hover,
677
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a.disabled:focus,
678
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> input.bwg_current_page {
679
- cursor: default;
680
- color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
681
  }
682
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a,
683
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> input.bwg_current_page {
684
- cursor: pointer;
685
  text-align: center;
686
- font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
687
- font-family: <?php echo $theme_row->page_nav_font_style; ?>;
688
- font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
689
- color: #<?php echo $theme_row->page_nav_font_color; ?>;
690
- text-decoration: none;
691
- padding: <?php echo $theme_row->page_nav_padding; ?>;
692
- margin: <?php echo $theme_row->page_nav_margin; ?>;
693
- border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
694
- border-style: <?php echo $theme_row->page_nav_border_style; ?>;
695
- border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
696
- border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
697
- background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
698
- opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
699
- box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
700
- <?php echo ($theme_row->page_nav_button_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
701
  }
702
  <?php
703
  if ( !$params['pagination_default_style'] && $pagination_style == 'image_browser' ) {
@@ -730,7 +730,7 @@ class BWGViewSite {
730
  .bwg_image_browser#bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a {
731
  padding: 0% 11% !important;
732
  }
733
- #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> {
734
  background-color: rgba(<?php echo $image_browser_images_conteiner['red']; ?>, <?php echo $image_browser_images_conteiner['green']; ?>, <?php echo $image_browser_images_conteiner['blue']; ?>, <?php echo number_format($theme_row->image_browser_full_transparent / 100, 2, ".", ""); ?>);
735
  margin-top: 0;
736
  }
@@ -814,19 +814,19 @@ class BWGViewSite {
814
  <a class="bwg-a <?php echo $first_page; ?>" title="<?php echo __('Go to the first page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $first_button; ?></a>
815
  <a class="bwg-a <?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number - 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $previous_button; ?></a>
816
  </span>
817
- <span class="pagination-links_col2">
818
  <input type="number" class="bwg_current_page" name="bwg_current_page" value="<?php echo $page_number; ?>" data-url-info="page_number_<?php echo $current_view; ?>" onkeypress="return bwg_change_page_<?php echo $current_view; ?>(event, this)" min="1" oninput="validity.valid||(value='')" />
819
  <?php echo __('of', BWG()->prefix); ?>
820
- <span class="total-pages_<?php echo $current_view; ?>">
821
- <?php echo $items_county; ?>
822
- </span>
823
- </span>
824
  <span class="pagination-links_col3">
825
  <a class="bwg-a <?php echo $next_page ?>" title="<?php echo __('Go to the next page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number + 1 <= $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number + 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $next_button; ?></a>
826
  <a class="bwg-a <?php echo $last_page ?>" title="<?php echo __('Go to the last page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number < $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $items_county ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $last_button; ?></a>
827
  </span>
828
- </span>
829
- <?php
830
  }
831
  ?>
832
  </div>
@@ -867,6 +867,7 @@ class BWGViewSite {
867
  <?php
868
  }
869
  }
 
870
  $page_number = WDWLibrary::get('page_number_' . $current_view, 1, 'intval');
871
  $scroll_to_top = $pagination == 1 ? 1 : 0;
872
  ?>
@@ -912,7 +913,7 @@ class BWGViewSite {
912
  bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0, '', '', load_more, '', <?php echo $scroll_to_top; ?>);
913
  }
914
 
915
- <?php if ( BWG()->options->front_ajax != "1" ) { ?>
916
  jQuery('.<?php echo $first_page; ?>').on('click', function () {
917
  spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2, 'numeric');
918
  return false;
404
  ob_start();
405
  ?>
406
  #bwg_search_container_1_<?php echo $current_view; ?> {
407
+ max-width: <?php echo $search_box_width; ?>px;
408
  }
409
  <?php
410
  $inline_style = ob_get_clean();
573
  else {
574
  echo '<style>' . $inline_style . '</style>';
575
  }
576
+ if ( $theme_row->tags_view == 1 ) { ?>
577
+ <div class="bwg_tags_container_<?php echo $current_view; ?>" >
578
+ <div class="search_tags_container">
579
+ <select class="search_tags" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" multiple="multiple">
580
+ <?php
581
+ foreach ( $tags_rows as $tags_row ) {
582
+ $selected = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'selected="selected"' : ''; ?>
583
+ <option value="<?php echo $tags_row->term_id ?>" <?php echo $selected; ?>><?php echo $tags_row->name ?></option>
584
+ <?php
585
+ }
586
+ ?>
587
+ </select>
588
+ </div>
589
+ <?php
590
+ }
591
+ else { ?>
592
+ <div class="bwg_tags_container_<?php echo $current_view; ?>">
593
+ <div class="bwg_tag_button_view_container" >
594
+ <button type="button" class="bwg_all_tags active" data-filter="All Tags"><?php echo __('All Tags', BWG()->prefix);?></button><div class="verLine"></div>
595
+ <?php
596
+ foreach ( $tags_rows as $tags_row ) {
597
+ $active = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'active' : '';
598
+ ?>
599
+ <button type="button" class="bwg_tags_filter_buttons <?php echo $active ?>" data-filter="<?php echo $tags_row->name ?>" value="<?php echo $tags_row->term_id; ?>" ><?php echo $tags_row->name ?></button>
600
+ <?php
601
+ }
602
+ ?>
603
+ </div>
604
+ <div class="bwg_tag_button_see_all"><div class="see_all_tags show"><span>&#43;</span><?php echo __('see all tags', BWG()->prefix);?></div></div>
605
+ <?php
606
+ } ?>
607
+ <input type="hidden" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" value="<?php echo $get_filter_teg ?>" />
608
+ <input type="hidden" class="current_view" value="<?php echo $current_view; ?>" />
609
+ <input type="hidden" class="form_id" value="<?php echo $form_id; ?>" />
610
+ <input type="hidden" class="cur_gal_id" value="<?php echo $cur_gal_id; ?>" />
611
+ <input type="hidden" class="album_gallery_id" value="<?php echo $album_gallery_id; ?>" />
612
+ <input type="hidden" class="type" value="<?php echo $type; ?>" />
613
+ <input type="hidden" class="show_bottom_tag" value="<?php echo $show_bottom_tag; ?>" />
614
+ </div>
615
+ <?php
616
  }
617
  }
618
 
644
  ?>
645
  /*pagination styles*/
646
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> {
647
+ text-align: <?php echo $theme_row->page_nav_align; ?>;
648
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
649
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
650
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
651
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
652
+ margin: 6px 0 4px;
653
+ display: block;
654
  }
655
  @media only screen and (max-width : 320px) {
656
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .displaying-num_<?php echo $current_view; ?> {
657
+ display: none;
658
  }
659
  }
660
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .displaying-num_<?php echo $current_view; ?> {
661
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
662
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
663
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
664
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
665
+ margin-right: 10px;
666
+ vertical-align: middle;
667
  }
668
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .paging-input_<?php echo $current_view; ?> {
669
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
670
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
671
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
672
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
673
+ vertical-align: middle;
674
  }
675
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a.disabled,
676
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a.disabled:hover,
677
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a.disabled:focus,
678
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> input.bwg_current_page {
679
+ cursor: default;
680
+ color: rgba(<?php echo $rgb_page_nav_font_color['red']; ?>, <?php echo $rgb_page_nav_font_color['green']; ?>, <?php echo $rgb_page_nav_font_color['blue']; ?>, 0.5);
681
  }
682
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a,
683
  #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> input.bwg_current_page {
684
+ cursor: pointer;
685
  text-align: center;
686
+ font-size: <?php echo $theme_row->page_nav_font_size; ?>px;
687
+ font-family: <?php echo $theme_row->page_nav_font_style; ?>;
688
+ font-weight: <?php echo $theme_row->page_nav_font_weight; ?>;
689
+ color: #<?php echo $theme_row->page_nav_font_color; ?>;
690
+ text-decoration: none;
691
+ padding: <?php echo $theme_row->page_nav_padding; ?>;
692
+ margin: <?php echo $theme_row->page_nav_margin; ?>;
693
+ border-radius: <?php echo $theme_row->page_nav_border_radius; ?>;
694
+ border-style: <?php echo $theme_row->page_nav_border_style; ?>;
695
+ border-width: <?php echo $theme_row->page_nav_border_width; ?>px;
696
+ border-color: #<?php echo $theme_row->page_nav_border_color; ?>;
697
+ background-color: #<?php echo $theme_row->page_nav_button_bg_color; ?>;
698
+ opacity: <?php echo number_format($theme_row->page_nav_button_bg_transparent / 100, 2, ".", ""); ?>;
699
+ box-shadow: <?php echo $theme_row->page_nav_box_shadow; ?>;
700
+ <?php echo ($theme_row->page_nav_button_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
701
  }
702
  <?php
703
  if ( !$params['pagination_default_style'] && $pagination_style == 'image_browser' ) {
730
  .bwg_image_browser#bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> a {
731
  padding: 0% 11% !important;
732
  }
733
+ #bwg_container1_<?php echo $current_view; ?> #bwg_container2_<?php echo $current_view; ?> .tablenav-pages_<?php echo $current_view; ?> {
734
  background-color: rgba(<?php echo $image_browser_images_conteiner['red']; ?>, <?php echo $image_browser_images_conteiner['green']; ?>, <?php echo $image_browser_images_conteiner['blue']; ?>, <?php echo number_format($theme_row->image_browser_full_transparent / 100, 2, ".", ""); ?>);
735
  margin-top: 0;
736
  }
814
  <a class="bwg-a <?php echo $first_page; ?>" title="<?php echo __('Go to the first page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $first_button; ?></a>
815
  <a class="bwg-a <?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number - 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $previous_button; ?></a>
816
  </span>
817
+ <span class="pagination-links_col2">
818
  <input type="number" class="bwg_current_page" name="bwg_current_page" value="<?php echo $page_number; ?>" data-url-info="page_number_<?php echo $current_view; ?>" onkeypress="return bwg_change_page_<?php echo $current_view; ?>(event, this)" min="1" oninput="validity.valid||(value='')" />
819
  <?php echo __('of', BWG()->prefix); ?>
820
+ <span class="total-pages_<?php echo $current_view; ?>">
821
+ <?php echo $items_county; ?>
822
+ </span>
823
+ </span>
824
  <span class="pagination-links_col3">
825
  <a class="bwg-a <?php echo $next_page ?>" title="<?php echo __('Go to the next page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number + 1 <= $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number + 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $next_button; ?></a>
826
  <a class="bwg-a <?php echo $last_page ?>" title="<?php echo __('Go to the last page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number < $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $items_county ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $last_button; ?></a>
827
  </span>
828
+ </span>
829
+ <?php
830
  }
831
  ?>
832
  </div>
867
  <?php
868
  }
869
  }
870
+
871
  $page_number = WDWLibrary::get('page_number_' . $current_view, 1, 'intval');
872
  $scroll_to_top = $pagination == 1 ? 1 : 0;
873
  ?>
913
  bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0, '', '', load_more, '', <?php echo $scroll_to_top; ?>);
914
  }
915
 
916
+ <?php if ( BWG()->options->front_ajax != "1" ) { ?>
917
  jQuery('.<?php echo $first_page; ?>').on('click', function () {
918
  spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2, 'numeric');
919
  return false;
js/bwg.js CHANGED
@@ -98,6 +98,7 @@ jQuery( function () {
98
  jQuery("#Tags_2").show();
99
  }
100
  });
 
101
  bwg_change_theme_tab_item();
102
  bwg_filters();
103
  bwg_toggle_postbox();
@@ -324,10 +325,14 @@ function change( view_type ) {
324
 
325
  /* Load gallery images */
326
  function bwg_lazy_load_gallery() {
 
 
327
  jQuery( ".gallery_image_thumb" ).each( function () {
328
  var currImg = jQuery( this );
329
  var src = currImg.attr( "data-src" );
330
- if ( typeof src != "undefined" && src.length > 0 ) {
 
 
331
  currImg.attr( "src", src );
332
  currImg.removeAttr( "data-src" );
333
  currImg.on( "load", function () {
@@ -992,9 +997,9 @@ function bwg_add_tag( image_id, tagIds, titles ) {
992
  tag_ids = tag_ids + tagIds[ i ] + ',';
993
  var html = jQuery( "#" + image_id + "_tag_temptagid" ).clone().html();
994
  /* Remove white spaces from keywords to set as id and remove prefix.*/
995
- var id = tagIds[ i ].replace( /\s+/g, '_' ).replace( 'bwg_', '' ).replace( /\(/g, "" ).replace( /\)/g, "" ).replace( /,/g, "" ).replace( /\//g, "" ).replace( /&amp;/g, "" ).replace( /&/g, "" ).replace( /@/g, "" ).replace( /'/g, "39" ).replace( /"/g, "34" ).replace( /!/g, "" ).replace(".", "");
996
- html = html.replace( /temptagid/g, id )
997
- .replace( /temptagname/g, titles[ i ] );
998
  jQuery( "#tags_div_" + image_id ).append( "<div class='tag_div' id='" + image_id + "_tag_" + id + "'>" );
999
  jQuery( "#" + image_id + "_tag_" + id ).html( html );
1000
 
@@ -1657,26 +1662,25 @@ function spider_media_uploader( e, multiple ) {
1657
  filesSelectedML.push( image_url );
1658
  }
1659
  jQuery( '#loading_div' ).show();
1660
-
1661
- postImageUrls( filesSelectedML, function ( success, result ) {
1662
- jQuery( '#loading_div' ).hide();
1663
  if ( success ) {
1664
- jQuery( ".bwg-type-allowed" ).remove();
1665
  for ( var i in result ) {
1666
- if ( result[ i ].error ) {
1667
- add_ajax_msg( bwg_objectL10B.only_the_following_types_are_allowed, 'error' );
1668
  }
1669
- result[ i ].alt = attachment[ i ].alt ? attachment[ i ].alt : attachment[ i ].title;
1670
  result[i].alt = bwg_media_name_clean(result[i].alt);
1671
- result[ i ].description = attachment[ i ].description;
1672
  result[i].description = bwg_media_name_clean(result[i].description);
1673
  }
1674
- bwg_add_image( result );
1675
  }
1676
  else {
1677
- alert( bwg_objectL10B.import_failed );
1678
  }
1679
- } );
1680
 
1681
  function postImageUrls( imageUrls, callback, index, results ) {
1682
  var imagesChunkLength = 50;
@@ -1955,8 +1959,8 @@ function bwg_add_image( files ) {
1955
  jQuery( '#images_table' ).find( '.wd-image-actions' ).remove();
1956
  html = jQuery( ".wd-template" ).clone().html();
1957
  }
1958
- var name = files[ i ][ 'name' ].substr( 0, files[ i ][ 'name' ].lastIndexOf( '.' ) ) || files[ i ][ 'name' ];
1959
- var filename = files[ i ][ 'filename' ];
1960
  if ( name != "" ) {
1961
  filename = name;
1962
  }
@@ -1990,7 +1994,6 @@ function bwg_add_image( files ) {
1990
  else {
1991
  html = html.replace(/tempalt/g, files[i]['alt']);
1992
  }
1993
-
1994
  var description = files[ i ][ 'description' ] ? files[ i ][ 'description' ] : '';
1995
  if ( jQuery( "#tbody_arr" ).data( "meta" ) == 1 && !is_embed ) {
1996
  description += files[ i ][ 'description' ] ? '\n' : '';
@@ -2017,6 +2020,7 @@ function bwg_add_image( files ) {
2017
  /* Add prefix to keywords to differ from other tags on save.*/
2018
  var tagsIds = [];
2019
  for ( var i in tagsTitles ) {
 
2020
  tagsIds[ i ] = 'bwg_' + tagsTitles[ i ];
2021
  }
2022
  /* Add titles instead of ids.*/
@@ -2861,6 +2865,7 @@ function which_key_is_pressed( $object ) {
2861
  return ($object.key);
2862
  }
2863
  }
 
2864
  function bwg_media_name_clean( str ) {
2865
  var matchs = ['%', '&', '+', '^'];
2866
  var replace = ['', '', '', ''];
@@ -2868,4 +2873,35 @@ function bwg_media_name_clean( str ) {
2868
  str = str.replace(matchs[i], replace[i]);
2869
  }
2870
  return str;
2871
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  jQuery("#Tags_2").show();
99
  }
100
  });
101
+
102
  bwg_change_theme_tab_item();
103
  bwg_filters();
104
  bwg_toggle_postbox();
325
 
326
  /* Load gallery images */
327
  function bwg_lazy_load_gallery() {
328
+ var d = new Date();
329
+ var n = d.getTime();
330
  jQuery( ".gallery_image_thumb" ).each( function () {
331
  var currImg = jQuery( this );
332
  var src = currImg.attr( "data-src" );
333
+ src = src.split('?bwg=');
334
+ if ( typeof src != "undefined" && src.length > 0 && typeof src[0] !== 'undefined') {
335
+ src = src[0]+'?bwg='+n;
336
  currImg.attr( "src", src );
337
  currImg.removeAttr( "data-src" );
338
  currImg.on( "load", function () {
997
  tag_ids = tag_ids + tagIds[ i ] + ',';
998
  var html = jQuery( "#" + image_id + "_tag_temptagid" ).clone().html();
999
  /* Remove white spaces from keywords to set as id and remove prefix.*/
1000
+ var id = tagIds[ i ].replaceAll( /\s+/g, '_' ).replaceAll( 'bwg_', '' ).replaceAll( /\(/g, "" ).replaceAll( /\)/g, "" ).replaceAll( /,/g, "" ).replaceAll( /\//g, "" ).replaceAll( /&amp;/g, "" ).replaceAll( /&/g, "" ).replaceAll( /@/g, "" ).replaceAll( /'/g, "39" ).replaceAll( /"/g, "34" ).replaceAll( /!/g, "" ).replaceAll(".", "");
1001
+ html = html.replaceAll( /temptagid/g, id )
1002
+ .replaceAll( /temptagname/g, titles[ i ] );
1003
  jQuery( "#tags_div_" + image_id ).append( "<div class='tag_div' id='" + image_id + "_tag_" + id + "'>" );
1004
  jQuery( "#" + image_id + "_tag_" + id ).html( html );
1005
 
1662
  filesSelectedML.push( image_url );
1663
  }
1664
  jQuery( '#loading_div' ).show();
1665
+ postImageUrls(filesSelectedML, function ( success, result ) {
1666
+ jQuery('#loading_div').hide();
 
1667
  if ( success ) {
1668
+ jQuery(".bwg-type-allowed").remove();
1669
  for ( var i in result ) {
1670
+ if ( result[i].error ) {
1671
+ add_ajax_msg(bwg_objectL10B.only_the_following_types_are_allowed, 'error');
1672
  }
1673
+ result[i].alt = attachment[i].alt ? attachment[i].alt : attachment[i].title;
1674
  result[i].alt = bwg_media_name_clean(result[i].alt);
1675
+ result[i].description = attachment[i].description;
1676
  result[i].description = bwg_media_name_clean(result[i].description);
1677
  }
1678
+ bwg_add_image(result);
1679
  }
1680
  else {
1681
+ alert(bwg_objectL10B.import_failed);
1682
  }
1683
+ });
1684
 
1685
  function postImageUrls( imageUrls, callback, index, results ) {
1686
  var imagesChunkLength = 50;
1959
  jQuery( '#images_table' ).find( '.wd-image-actions' ).remove();
1960
  html = jQuery( ".wd-template" ).clone().html();
1961
  }
1962
+ var name = files[i]['name'].substr( 0, files[i]['name'].lastIndexOf( '.' ) ) || files[i]['name'];
1963
+ var filename = files[i]['filename'];
1964
  if ( name != "" ) {
1965
  filename = name;
1966
  }
1994
  else {
1995
  html = html.replace(/tempalt/g, files[i]['alt']);
1996
  }
 
1997
  var description = files[ i ][ 'description' ] ? files[ i ][ 'description' ] : '';
1998
  if ( jQuery( "#tbody_arr" ).data( "meta" ) == 1 && !is_embed ) {
1999
  description += files[ i ][ 'description' ] ? '\n' : '';
2020
  /* Add prefix to keywords to differ from other tags on save.*/
2021
  var tagsIds = [];
2022
  for ( var i in tagsTitles ) {
2023
+ tagsTitles[i] = tagsTitles[i].replaceAll( /\s+/g, '_' ).replaceAll( 'bwg_', '' ).replaceAll( /\(/g, "" ).replaceAll( /\)/g, "" ).replaceAll( /,/g, "" ).replaceAll( /\//g, "" ).replaceAll( /&amp;/g, "" ).replaceAll( /&/g, "" ).replaceAll( /@/g, "" ).replaceAll( /'/g, "39" ).replaceAll( /"/g, "34" ).replaceAll( /!/g, "" ).replaceAll(".", "");
2024
  tagsIds[ i ] = 'bwg_' + tagsTitles[ i ];
2025
  }
2026
  /* Add titles instead of ids.*/
2865
  return ($object.key);
2866
  }
2867
  }
2868
+
2869
  function bwg_media_name_clean( str ) {
2870
  var matchs = ['%', '&', '+', '^'];
2871
  var replace = ['', '', '', ''];
2873
  str = str.replace(matchs[i], replace[i]);
2874
  }
2875
  return str;
2876
+ }
2877
+
2878
+ /**
2879
+ * Preview Section in Gallery and Gallery Group
2880
+ *
2881
+ * show section after click on Preview button
2882
+ * hide section after click on Preview button or some place on window
2883
+ *
2884
+ * */
2885
+ function bwg_preview_section(current) {
2886
+ var bwg_preview_button = jQuery(current);
2887
+ var bwg_preview_section = bwg_preview_button.next(".bwg-preview-section");
2888
+ bwg_preview_button.toggleClass("active");
2889
+ if ( bwg_preview_button.hasClass("active")) {
2890
+ bwg_preview_section.show();
2891
+ } else {
2892
+ bwg_preview_section.hide();
2893
+ }
2894
+ }
2895
+ jQuery(document).mouseup(function(e){
2896
+ var bwg_preview_section = jQuery(".bwg-preview-section");
2897
+ var bwg_preview_button = jQuery(".bwg-preview-button");
2898
+ if ( bwg_preview_button.is(e.target) && bwg_preview_button.has(e.target).length === 0 ) {
2899
+ return;
2900
+ }
2901
+ if ( !bwg_preview_section.is(e.target) && bwg_preview_section.has(e.target).length === 0 ){
2902
+ bwg_preview_section.hide();
2903
+ if ( bwg_preview_button.hasClass("active")) {
2904
+ bwg_preview_button.removeClass("active");
2905
+ }
2906
+ }
2907
+ });
js/bwg_frontend.js CHANGED
@@ -91,8 +91,9 @@ function bwg_main_ready(container) {
91
 
92
  /* If there is error (empty gallery).*/
93
  if ( container.find(".wd_error").length > 0 ) {
94
- bwg_container_loaded(bwg);
95
- }
 
96
  var last_container = container.find(".bwg-container");
97
  if ( container.data("is-album") === 'album' ) {
98
  var gallery_type = 'thumbnails';
@@ -100,6 +101,7 @@ function bwg_main_ready(container) {
100
  else {
101
  var gallery_type = container.data("gallery-type");
102
  }
 
103
  bwg_document_ready(container);
104
  switch ( gallery_type) {
105
  case "thumbnails":
@@ -147,11 +149,13 @@ function bwg_tags_button_section_visibility() {
147
  var current_view = bwg_container.find('.current_view').val();
148
  var show_bottom_tag = bwg_container.find('.show_bottom_tag').val();
149
  var tags_button_filter = bwg_container.find('.bwg_tags_container_' + current_view + ' .bwg_tag_button_view_container');
 
150
  if ( tags_button_filter.length ) {
151
  var tags_button_filter_full = tags_button_filter[0].scrollHeight;
152
  }
153
  var visible_buttons_minheight = tags_button_filter.find('.bwg_tags_filter_buttons').outerHeight(true);
154
  var visible_buttons_maxheight = parseInt( (tags_button_filter.find('.bwg_tags_filter_buttons').outerHeight(true) * 2 ) + 3 );
 
155
  if( tags_button_filter_full > visible_buttons_maxheight ) {
156
  tags_button_filter.css({
157
  'min-height':visible_buttons_minheight,
@@ -169,8 +173,10 @@ function bwg_tags_button_section_visibility() {
169
  });
170
  tags_button_filter.next('.bwg_tag_button_see_all').hide();
171
  }
 
172
  var see_all_button_width = (tags_button_filter.next().find('.see_all_tags').width() / 2) ;
173
  tags_button_filter.next().find('.see_all_tags').attr('style', 'margin-left: -'+ see_all_button_width +'px');
 
174
  tags_button_filter.next().find('.see_all_tags').off("click").on('click', function () {
175
  if ( jQuery(this).hasClass("show") ) {
176
  jQuery(this).removeClass("show").addClass("hide").html("<span>&#8722;</span>" + bwg_objectsL10n.bwg_tag_see_less);
@@ -282,16 +288,16 @@ function bwg_blog_style_resize() {
282
  function bwg_blog_style_onload() {
283
  jQuery(".bwg_blog_style").each(function () {
284
  bwg = jQuery(this).attr('data-bwg');
285
- var data_right_click = jQuery("#bwg_blog_style_"+bwg);
286
  jQuery('.bwg_embed_frame_16x9_'+bwg).each(function (e) {
287
- /* Conflict with Sydney Theme */
288
- if ( jQuery('.bwg_blog_style_image_' + bwg).find('.fluid-width-video-wrapper').length ) {
289
- jQuery('.fluid-width-video-wrapper').removeAttr('style');
290
- var content = jQuery(this).parents('.bwg_blog_style_image_' + bwg).find('.fluid-width-video-wrapper').contents();
291
- jQuery(this).parents('.fluid-width-video-wrapper').replaceWith(content);
292
- }
293
- jQuery(this).width(jQuery(this).parents('.bwg_blog_style_image_' + bwg).width());
294
- jQuery(this).height(jQuery(this).width() * 0.5625);
295
  });
296
 
297
  jQuery('.bwg_embed_frame_instapost_'+bwg).each(function (e) {
@@ -372,19 +378,20 @@ function bwg_carousel_focus() {
372
  });
373
  }
374
 
 
375
  /**
376
  * @param {boolean} isAll do you need to stop all slideshows?.
377
  */
378
  function bwg_slideshow_blur(isAll) {
379
- jQuery(".bwg_slideshow").each(function () {
380
  bwg = jQuery(this).attr('data-bwg');
381
- if (isAll || !jQuery('.bwg_slideshow[data-bwg=' + bwg + ']')[0].offsetHeight) {
382
- if (jQuery("#bwg_slideshow_image_container_" + bwg).length) {
383
- bwg_params[bwg] = JSON.parse(jQuery("#bwg_slideshow_image_container_" + bwg).attr("data-params"));
384
- bwg_params[bwg]['event_stack'] = [];
385
- window.clearInterval(window['bwg_playInterval' + bwg]);
386
- }
387
  }
 
388
  });
389
  }
390
 
@@ -402,6 +409,7 @@ function bwg_carousel_blur( isAll ) {
402
  });
403
  }
404
 
 
405
  /**
406
  * @param {number} bwg.
407
  */
@@ -920,6 +928,7 @@ function bwg_key_press(that) {
920
  jQuery(that).parent().find('.bwg_search_loupe_container1').removeClass("bwg-hidden");
921
  }
922
 
 
923
  function bwg_all_thumnails_loaded(that) {
924
  var thumbnails_count = 0;
925
  var thumbnails_loaded = jQuery(that).find("img").length;
@@ -1095,15 +1104,15 @@ function bwg_thumbnail(that) {
1095
 
1096
  function bwg_thumbnail_masonry(that) {
1097
  bwg = jQuery(that).attr("data-bwg");
1098
- var type = "#bwg_thumbnails_masonry_"+bwg;
1099
- if(jQuery("#bwg_album_masonry_"+bwg).length) {
1100
- type = "#bwg_album_masonry_"+bwg;
1101
  }
1102
- if(jQuery(".bwg-container-temp"+bwg).length === 0) {
1103
  jQuery(type).clone().appendTo("#bwg_container3_" + bwg).removeAttr("id").removeClass("bwg-container-" + bwg).addClass("bwg-container-temp" + bwg);
1104
- jQuery(".bwg-container-temp"+bwg).empty();
1105
  }
1106
- var temp = jQuery(".bwg-container-temp"+bwg);
1107
  var cont = jQuery(type);
1108
 
1109
  var container = temp;
@@ -1111,7 +1120,6 @@ function bwg_thumbnail_masonry(that) {
1111
 
1112
  container.find('.bwg-empty-item').remove();
1113
  var masonry_type = container.data("masonry-type");
1114
-
1115
  if ('horizontal' == masonry_type) {
1116
  var thumb_height = container.data( "thumbnail-height" );
1117
  var max_count = container.data( "max-count" );
@@ -1127,7 +1135,6 @@ function bwg_thumbnail_masonry(that) {
1127
  } );
1128
  var container_width = Math.max.apply( Math, column_widths );
1129
  container.width( container_width );
1130
-
1131
  /* Equalize all rows. */
1132
  for ( i = 0; i < max_count; i++ ) {
1133
  if ( column_widths[i] < container_width ) {
@@ -1177,6 +1184,7 @@ function bwg_thumbnail_masonry(that) {
1177
  /* Use getBoundingClientRect instead of jQuery.height() to avoid rounding. */
1178
  column_heights[order] += jQuery( this )[0].getBoundingClientRect().height;
1179
  } );
 
1180
  var container_height = Math.max.apply( Math, column_heights );
1181
 
1182
  /* Equalize all columns. */
@@ -1494,26 +1502,26 @@ function bwg_thumbnail_mosaic_logic( container ) {
1494
  }
1495
 
1496
  function bwg_thumbnail_mosaic(that) {
1497
- var container = jQuery(that);
1498
- var dfd = jQuery.Deferred();
1499
- dfd.done( [bwg_thumbnail_mosaic_logic] )
1500
- .done( function(container) {
1501
- if ( container.data('mosaic-thumb-transition') != '1' ) {
1502
- jQuery('.bwg_mosaic_thumb_spun_' + bwg).css({
1503
- 'transition': 'all 0.3s ease 0s',
1504
- '-webkit-transition': 'all 0.3s ease 0s'
1505
- });
1506
- }
1507
- /*IMPORTANT!*/
1508
- var bwg = container.data('bwg');
1509
- jQuery(".bwg_mosaic_thumbnails_" + bwg).css({visibility: 'visible'});
1510
- jQuery(".tablenav-pages_" + bwg).css({visibility: 'visible'});
1511
- bwg_container_loaded(bwg);
1512
- jQuery(".bwg_mosaic_thumb_"+bwg).removeClass("bwg-hidden");
1513
- jQuery("#bwg_mosaic_thumbnails_div_"+bwg).removeClass("bwg-hidden");
1514
- });
1515
-
1516
- dfd.resolve(container);
1517
 
1518
  if (container.attr('data-image-title') == 'hover') {
1519
  var padding_px = parseInt(container.attr('data-thumb-padding')) / 2;
@@ -1542,22 +1550,22 @@ function bwg_thumbnail_mosaic(that) {
1542
 
1543
  function bwg_mosaic_title_on_hover(bwg, container, border_and_padding) {
1544
  jQuery(".bwg-mosaic-thumb-span").on("mouseenter", function() {
1545
- var img_w = jQuery(this).children(".bwg_mosaic_thumb_" + bwg).width();
1546
- jQuery(this).find(".bwg_mosaic_title_spun1_" + bwg).width(img_w);
1547
- jQuery(this).find(".bwg_mosaic_title_spun1_" + bwg).css({
1548
- 'opacity': 1,
1549
- 'max-height' : 'calc(100% - ' + 2 * border_and_padding + 'px)',
1550
- 'overflow' : 'hidden'
1551
- });
1552
  });
1553
- jQuery(".bwg-mosaic-thumb-span").on("mouseleave", function() {
1554
- jQuery(this).find(".bwg_mosaic_title_spun1_" + bwg).css({
1555
- 'opacity' : 0,
1556
- 'padding' : container.attr('data-title-margin'),
1557
- 'max-height' : 'calc(100% - ' + 2 * border_and_padding + 'px)',
1558
- 'overflow' : 'hidden'
1559
- });
1560
  });
 
1561
  }
1562
 
1563
  function bwg_mosaic_ajax(bwg, tot_cccount_mosaic_ajax) {
@@ -2716,19 +2724,19 @@ function bwg_change_each_watermark_container(width, height, bwg) {
2716
  jQuery(".bwg"+source+"_watermark" + defix).css({display: ''});
2717
 
2718
  if( typeof bwg === 'undefined' || bwg === '' ) {
2719
- /* Set watermark image size.*/
2720
- var comment_container_width = 0;
2721
- if (jQuery(".bwg_comment_container").hasClass("bwg_open") || jQuery(".bwg_ecommerce_container").hasClass("bwg_open")) {
2722
- comment_container_width = gallery_box_data['lightbox_comment_width'];
2723
- }
2724
- if (width <= (jQuery(window).width() - comment_container_width)) {
2725
- jQuery(".bwg_watermark_image").css({
2726
- width: ((jQuery(".spider_popup_wrap").width() - comment_container_width) * gallery_box_data['watermark_font_size'] / gallery_box_data['image_width'])
2727
- });
2728
- jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({
2729
- fontSize: ((jQuery(".spider_popup_wrap").width() - comment_container_width) * gallery_box_data['watermark_font_size'] / gallery_box_data['image_width'])
2730
- });
2731
- }
2732
  } else {
2733
  jQuery(".bwg" + source + "_title_spun" + defix).width(width);
2734
  jQuery(".bwg" + source + "_title_spun" + defix).height(height);
@@ -2759,33 +2767,33 @@ function bwg_set_filmstrip_pos( filmStripWidth, bwg, data ) {
2759
  var top_bottom_space = parseInt(jQuery(".bwg_filmstrip_thumbnails").attr('data-all-images-top-bottom-space'));
2760
  var right_left_space = parseInt(jQuery(".bwg_filmstrip_thumbnails").attr('data-all-images-right-left-space'));
2761
  if( typeof bwg === 'undefined' || bwg === '' ) { /* for lightbox */
2762
- if ( gallery_box_data['outerWidth_or_outerHeight'] == 'outerWidth' ) {
2763
- var selectedImagePos = -bwg_current_filmstrip_pos - (jQuery(".bwg_filmstrip_thumbnail").outerWidth(true)) / 2;
2764
- } else if ( gallery_box_data['outerWidth_or_outerHeight'] == 'outerHeight' ) {
2765
- var selectedImagePos = -bwg_current_filmstrip_pos - (jQuery(".bwg_filmstrip_thumbnail").outerHeight(true)) / 2;
2766
- }
2767
- if ( gallery_box_data['width_or_height'] == 'width' ) {
2768
- var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_filmstrip_thumbnails").width(), selectedImagePos + filmStripWidth / 2));
2769
- } else if (gallery_box_data['width_or_height'] == 'height') {
2770
- var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_filmstrip_thumbnails").height(), selectedImagePos + filmStripWidth / 2));
2771
- }
2772
  } else { /* for slideshow */
2773
- if (bwg_params[bwg]['width_or_height'] == 'width') {
2774
- var selectedImagePos = -bwg_params[bwg]['bwg_current_filmstrip_pos'] - (jQuery(".bwg_slideshow_filmstrip_thumbnail" + defix).width() + bwg_params[bwg]['filmstrip_thumb_margin_hor']) / 2;
2775
- var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails" + defix).width(), selectedImagePos + filmStripWidth / 2));
2776
- }
2777
- else {
2778
- var selectedImagePos = -bwg_params[bwg]['bwg_current_filmstrip_pos'] - (jQuery(".bwg_slideshow_filmstrip_thumbnail" + defix).height() + bwg_params[bwg]['filmstrip_thumb_margin_hor']) / 2;
2779
- var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails" + defix).height(), selectedImagePos + filmStripWidth / 2));
2780
- }
2781
  }
2782
 
2783
- if ( imagesContainerLeft + right_left_space > 0 ) {
2784
- right_left_space = 0;
2785
- }
2786
- if ( imagesContainerLeft + top_bottom_space > 0 ) {
2787
- top_bottom_space = 0;
2788
- }
2789
 
2790
  if( left_or_top == 'left' ) {
2791
  jQuery(".bwg"+source+"_filmstrip_thumbnails" + defix).animate({
@@ -3212,10 +3220,10 @@ function bwg_popup_resize_slidshow( bwg ) {
3212
  jQuery(".bwg_slideshow_image_container_"+bwg).css({height: ((parent_width) * bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width'] - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? bwg_params[bwg]['slideshow_filmstrip_height'] : 0))});
3213
  jQuery(".bwg_slideshow_image_"+bwg).css({
3214
  cssText: "max-width: " + (parent_width - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? 0 : bwg_params[bwg]['slideshow_filmstrip_width'])) + "px !important; max-height: " + (parent_width * (bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width']) - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? bwg_params[bwg]['slideshow_filmstrip_height'] : 0) - 1) + "px !important;"
3215
- });
3216
  jQuery(".bwg_slideshow_embed_"+bwg).css({
3217
  cssText: "width: " + (parent_width - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? 0 : bwg_params[bwg]['slideshow_filmstrip_width']) ) + "px !important; height: " + (parent_width * (bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width']) - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? bwg_params[bwg]['slideshow_filmstrip_height'] : 0) - 1) + "px !important;"
3218
- });
3219
  bwg_resize_instagram_post( bwg );
3220
  /* Set watermark container size.*/
3221
  bwg_change_watermark_container( bwg );
@@ -3226,16 +3234,16 @@ function bwg_popup_resize_slidshow( bwg ) {
3226
  jQuery(".bwg_slideshow_filmstrip_container_"+bwg).css({height: (parent_width * bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width'])});
3227
  jQuery(".bwg_slideshow_filmstrip_"+bwg).css({height: (parent_width * bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width'] - 40)});
3228
  }
3229
- jQuery(".bwg_slideshow_dots_container_"+bwg).css({width: (parent_width)});
3230
- jQuery("#bwg_slideshow_play_pause-ico_"+bwg).css({fontSize: ((parent_width) * bwg_params[bwg]['slideshow_play_pause_btn_size'] / bwg_params[bwg]['image_width'])});
3231
- jQuery(".bwg_slideshow_watermark_image_"+bwg).css({maxWidth: ((parent_width) * bwg_params[bwg]['watermark_width'] / bwg_params[bwg]['image_width']), maxHeight: ((parent_width) * bwg_params[bwg]['watermark_height'] / bwg_params[bwg]['image_width'])});
3232
- jQuery(".bwg_slideshow_watermark_text_"+bwg+", .bwg_slideshow_watermark_text_"+bwg+":hover").css({fontSize: ((parent_width) * bwg_params[bwg]['watermark_font_size'] / bwg_params[bwg]['image_width'])});
3233
- jQuery(".bwg_slideshow_title_text_"+bwg).css({fontSize: ((parent_width) * 2 * bwg_params[bwg]['slideshow_title_font_size'] / bwg_params[bwg]['image_width'])});
3234
- jQuery(".bwg_slideshow_description_text_"+bwg).css({fontSize: ((parent_width) * 2 * bwg_params[bwg]['slideshow_description_font_size'] / bwg_params[bwg]['image_width'])});
3235
- jQuery(".bwg_slideshow_image_"+bwg).css({'display':'inline-block'});
3236
  }
3237
  if (data[parseInt(jQuery("#bwg_current_image_key_"+bwg).val())]["is_embed_video"]) {
3238
- jQuery("#bwg_slideshow_play_pause_"+bwg).css({display: 'none'});
3239
  }
3240
  else {
3241
  jQuery("#bwg_slideshow_play_pause_"+bwg).css({display: ''});
@@ -3263,41 +3271,41 @@ function bwg_change_image(current_key, key, data, from_effect, bwg) {
3263
 
3264
  function bwg_resize_instagram_post( bwg ) {
3265
  if ( typeof bwg !== 'undefined' && bwg !== '' ) { /* SLIDESHOW */
3266
- if (jQuery(".inner_instagram_iframe_bwg_embed_frame_"+bwg).length) {
3267
- var post_width = jQuery(".bwg_slideshow_embed_"+bwg).width();
3268
- var post_height = jQuery(".bwg_slideshow_embed_").height();
3269
- jQuery(".inner_instagram_iframe_bwg_embed_frame_"+bwg).each(function() {
3270
- var parent_container = jQuery(this).parent();
3271
- if (post_height / (parseInt(parent_container.attr('data-height')) + 96) < post_width / parseInt(parent_container.attr('data-width'))) {
3272
- parent_container.height(post_height);
3273
- parent_container.width((parent_container.height() - 96) * parent_container.attr('data-width') / parent_container.attr('data-height') + 16);
3274
- }
3275
- else {
3276
- parent_container.width(post_width);
3277
- parent_container.height((parent_container.width() - 16) * parent_container.attr('data-height') / parent_container.attr('data-width') + 96);
3278
- }
3279
- });
3280
- bwg_change_watermark_container( bwg );
3281
- }
3282
  } else { /* LIGHTBOX */
3283
- if (jQuery('.inner_instagram_iframe_bwg_embed_frame').length) {
3284
- var post_width = jQuery(".bwg_image_container").width();
3285
- var post_height = jQuery(".bwg_image_container").height();
3286
- var FeedbackSocialProofHeight = 176;
3287
- jQuery('.inner_instagram_iframe_bwg_embed_frame').each(function() {
3288
- var parent_container = jQuery(this).parent();
3289
- if (post_height / (parseInt(parent_container.attr('data-height')) + FeedbackSocialProofHeight) < post_width / parseInt(parent_container.attr('data-width'))) {
3290
- parent_container.height(post_height);
3291
- parent_container.width((parent_container.height() - FeedbackSocialProofHeight) * parent_container.attr('data-width') / parent_container.attr('data-height') + 16);
3292
- }
3293
- else {
3294
- parent_container.width(post_width);
3295
- parent_container.height((parent_container.width() - 16) * parent_container.attr('data-height') / parent_container.attr('data-width') + 96);
3296
- }
3297
- parent_container.css({top: 0.5 * (post_height - parent_container.height())});
3298
- });
3299
- bwg_change_watermark_container();
3300
- }
3301
  }
3302
  }
3303
 
@@ -3316,22 +3324,22 @@ function bwg_play( data, bwg ) {
3316
  bwg_change_image( parseInt(jQuery("#bwg_current_image_key_"+bwg).val()), (parseInt(jQuery("#bwg_current_image_key_"+bwg).val()) + iterator) % data.length, data, '', bwg )
3317
  }, bwg_params[bwg]['slideshow_interval'] * 1000);
3318
  } else {
3319
- window.clearInterval(gallery_box_data['bwg_playInterval']);
3320
- gallery_box_data['bwg_playInterval'] = setInterval(function () {
3321
- /* Stop play of lightbox if comment was opened*/
3322
- if ( jQuery(".bwg_comment_container").hasClass("bwg_open") || (jQuery(".bwg_play_pause").length && jQuery(".bwg_play_pause").hasClass("bwg-icon-play"))) {
3323
- return;
3324
- }
3325
 
3326
- if (typeof data != 'undefined' && typeof data[(parseInt(jQuery('#bwg_current_image_key').val()) + 1)] == 'undefined') {
3327
- if (gallery_box_data['enable_loop'] == 1) {
3328
- /* Wrap around.*/
3329
- bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0);
3330
- }
3331
- return;
3332
  }
3333
- bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1)
3334
- }, gallery_box_data['slideshow_interval'] * 1000);
 
 
3335
  }
3336
  }
3337
 
@@ -3342,8 +3350,8 @@ function bwg_image_browser( bwg ) {
3342
  jQuery('#bwg_embed_frame_instapost_' + bwg).width(jQuery('#bwg_embed_frame_16x9_' + bwg).parents('.image_browser_image_buttons_' + bwg).width());
3343
  /* Conflict with Sydney Theme */
3344
  if ( jQuery('.image_browser_images_conteiner_' + bwg).find('.fluid-width-video-wrapper').length ) {
3345
- var content = jQuery('.image_browser_images_conteiner_' + bwg).find('.fluid-width-video-wrapper').contents();
3346
- jQuery('.image_browser_images_conteiner_' + bwg).find('.fluid-width-video-wrapper').replaceWith(content);
3347
  }
3348
  /* 16 is 2*padding inside iframe */
3349
  /* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
@@ -3382,7 +3390,7 @@ function bwg_image_browser( bwg ) {
3382
  */
3383
  function bwg_disable_right_click( container ) {
3384
  container.bind( "contextmenu", function () {
3385
- return false;
3386
  });
3387
  container.css( 'webkitTouchCallout', 'none' );
3388
- }
91
 
92
  /* If there is error (empty gallery).*/
93
  if ( container.find(".wd_error").length > 0 ) {
94
+ bwg_container_loaded(bwg);
95
+ }
96
+
97
  var last_container = container.find(".bwg-container");
98
  if ( container.data("is-album") === 'album' ) {
99
  var gallery_type = 'thumbnails';
101
  else {
102
  var gallery_type = container.data("gallery-type");
103
  }
104
+
105
  bwg_document_ready(container);
106
  switch ( gallery_type) {
107
  case "thumbnails":
149
  var current_view = bwg_container.find('.current_view').val();
150
  var show_bottom_tag = bwg_container.find('.show_bottom_tag').val();
151
  var tags_button_filter = bwg_container.find('.bwg_tags_container_' + current_view + ' .bwg_tag_button_view_container');
152
+
153
  if ( tags_button_filter.length ) {
154
  var tags_button_filter_full = tags_button_filter[0].scrollHeight;
155
  }
156
  var visible_buttons_minheight = tags_button_filter.find('.bwg_tags_filter_buttons').outerHeight(true);
157
  var visible_buttons_maxheight = parseInt( (tags_button_filter.find('.bwg_tags_filter_buttons').outerHeight(true) * 2 ) + 3 );
158
+
159
  if( tags_button_filter_full > visible_buttons_maxheight ) {
160
  tags_button_filter.css({
161
  'min-height':visible_buttons_minheight,
173
  });
174
  tags_button_filter.next('.bwg_tag_button_see_all').hide();
175
  }
176
+
177
  var see_all_button_width = (tags_button_filter.next().find('.see_all_tags').width() / 2) ;
178
  tags_button_filter.next().find('.see_all_tags').attr('style', 'margin-left: -'+ see_all_button_width +'px');
179
+
180
  tags_button_filter.next().find('.see_all_tags').off("click").on('click', function () {
181
  if ( jQuery(this).hasClass("show") ) {
182
  jQuery(this).removeClass("show").addClass("hide").html("<span>&#8722;</span>" + bwg_objectsL10n.bwg_tag_see_less);
288
  function bwg_blog_style_onload() {
289
  jQuery(".bwg_blog_style").each(function () {
290
  bwg = jQuery(this).attr('data-bwg');
291
+ var data_right_click = jQuery("#bwg_blog_style_"+bwg);
292
  jQuery('.bwg_embed_frame_16x9_'+bwg).each(function (e) {
293
+ /* Conflict with Sydney Theme */
294
+ if ( jQuery('.bwg_blog_style_image_' + bwg).find('.fluid-width-video-wrapper').length ) {
295
+ jQuery('.fluid-width-video-wrapper').removeAttr('style');
296
+ var content = jQuery(this).parents('.bwg_blog_style_image_' + bwg).find('.fluid-width-video-wrapper').contents();
297
+ jQuery(this).parents('.fluid-width-video-wrapper').replaceWith(content);
298
+ }
299
+ jQuery(this).width(jQuery(this).parents('.bwg_blog_style_image_' + bwg).width());
300
+ jQuery(this).height(jQuery(this).width() * 0.5625);
301
  });
302
 
303
  jQuery('.bwg_embed_frame_instapost_'+bwg).each(function (e) {
378
  });
379
  }
380
 
381
+
382
  /**
383
  * @param {boolean} isAll do you need to stop all slideshows?.
384
  */
385
  function bwg_slideshow_blur(isAll) {
386
+ jQuery(".bwg_slideshow").each(function () {
387
  bwg = jQuery(this).attr('data-bwg');
388
+ if (isAll || !jQuery('.bwg_slideshow[data-bwg=' + bwg + ']')[0].offsetHeight) {
389
+ if (jQuery("#bwg_slideshow_image_container_" + bwg).length) {
390
+ bwg_params[bwg] = JSON.parse(jQuery("#bwg_slideshow_image_container_" + bwg).attr("data-params"));
391
+ bwg_params[bwg]['event_stack'] = [];
392
+ window.clearInterval(window['bwg_playInterval' + bwg]);
 
393
  }
394
+ }
395
  });
396
  }
397
 
409
  });
410
  }
411
 
412
+
413
  /**
414
  * @param {number} bwg.
415
  */
928
  jQuery(that).parent().find('.bwg_search_loupe_container1').removeClass("bwg-hidden");
929
  }
930
 
931
+
932
  function bwg_all_thumnails_loaded(that) {
933
  var thumbnails_count = 0;
934
  var thumbnails_loaded = jQuery(that).find("img").length;
1104
 
1105
  function bwg_thumbnail_masonry(that) {
1106
  bwg = jQuery(that).attr("data-bwg");
1107
+ var type = "#bwg_thumbnails_masonry_" + bwg;
1108
+ if ( jQuery("#bwg_album_masonry_" + bwg ).length) {
1109
+ type = "#bwg_album_masonry_" + bwg;
1110
  }
1111
+ if( jQuery(".bwg-container-temp" + bwg ).length === 0) {
1112
  jQuery(type).clone().appendTo("#bwg_container3_" + bwg).removeAttr("id").removeClass("bwg-container-" + bwg).addClass("bwg-container-temp" + bwg);
1113
+ jQuery(".bwg-container-temp" + bwg).empty();
1114
  }
1115
+ var temp = jQuery(".bwg-container-temp" + bwg);
1116
  var cont = jQuery(type);
1117
 
1118
  var container = temp;
1120
 
1121
  container.find('.bwg-empty-item').remove();
1122
  var masonry_type = container.data("masonry-type");
 
1123
  if ('horizontal' == masonry_type) {
1124
  var thumb_height = container.data( "thumbnail-height" );
1125
  var max_count = container.data( "max-count" );
1135
  } );
1136
  var container_width = Math.max.apply( Math, column_widths );
1137
  container.width( container_width );
 
1138
  /* Equalize all rows. */
1139
  for ( i = 0; i < max_count; i++ ) {
1140
  if ( column_widths[i] < container_width ) {
1184
  /* Use getBoundingClientRect instead of jQuery.height() to avoid rounding. */
1185
  column_heights[order] += jQuery( this )[0].getBoundingClientRect().height;
1186
  } );
1187
+
1188
  var container_height = Math.max.apply( Math, column_heights );
1189
 
1190
  /* Equalize all columns. */
1502
  }
1503
 
1504
  function bwg_thumbnail_mosaic(that) {
1505
+ var container = jQuery(that);
1506
+ var dfd = jQuery.Deferred();
1507
+ dfd.done( [bwg_thumbnail_mosaic_logic] )
1508
+ .done( function(container) {
1509
+ if ( container.data('mosaic-thumb-transition') != '1' ) {
1510
+ jQuery('.bwg_mosaic_thumb_spun_' + bwg).css({
1511
+ 'transition': 'all 0.3s ease 0s',
1512
+ '-webkit-transition': 'all 0.3s ease 0s'
1513
+ });
1514
+ }
1515
+ /*IMPORTANT!*/
1516
+ var bwg = container.data('bwg');
1517
+ jQuery(".bwg_mosaic_thumbnails_" + bwg).css({visibility: 'visible'});
1518
+ jQuery(".tablenav-pages_" + bwg).css({visibility: 'visible'});
1519
+ bwg_container_loaded(bwg);
1520
+ jQuery(".bwg_mosaic_thumb_"+bwg).removeClass("bwg-hidden");
1521
+ jQuery("#bwg_mosaic_thumbnails_div_"+bwg).removeClass("bwg-hidden");
1522
+ });
1523
+
1524
+ dfd.resolve(container);
1525
 
1526
  if (container.attr('data-image-title') == 'hover') {
1527
  var padding_px = parseInt(container.attr('data-thumb-padding')) / 2;
1550
 
1551
  function bwg_mosaic_title_on_hover(bwg, container, border_and_padding) {
1552
  jQuery(".bwg-mosaic-thumb-span").on("mouseenter", function() {
1553
+ var img_w = jQuery(this).children(".bwg_mosaic_thumb_" + bwg).width();
1554
+ jQuery(this).find(".bwg_mosaic_title_spun1_" + bwg).width(img_w);
1555
+ jQuery(this).find(".bwg_mosaic_title_spun1_" + bwg).css({
1556
+ 'opacity': 1,
1557
+ 'max-height' : 'calc(100% - ' + 2 * border_and_padding + 'px)',
1558
+ 'overflow' : 'hidden'
 
1559
  });
1560
+ });
1561
+ jQuery(".bwg-mosaic-thumb-span").on("mouseleave", function() {
1562
+ jQuery(this).find(".bwg_mosaic_title_spun1_" + bwg).css({
1563
+ 'opacity' : 0,
1564
+ 'padding' : container.attr('data-title-margin'),
1565
+ 'max-height' : 'calc(100% - ' + 2 * border_and_padding + 'px)',
1566
+ 'overflow' : 'hidden'
1567
  });
1568
+ });
1569
  }
1570
 
1571
  function bwg_mosaic_ajax(bwg, tot_cccount_mosaic_ajax) {
2724
  jQuery(".bwg"+source+"_watermark" + defix).css({display: ''});
2725
 
2726
  if( typeof bwg === 'undefined' || bwg === '' ) {
2727
+ /* Set watermark image size.*/
2728
+ var comment_container_width = 0;
2729
+ if (jQuery(".bwg_comment_container").hasClass("bwg_open") || jQuery(".bwg_ecommerce_container").hasClass("bwg_open")) {
2730
+ comment_container_width = gallery_box_data['lightbox_comment_width'];
2731
+ }
2732
+ if (width <= (jQuery(window).width() - comment_container_width)) {
2733
+ jQuery(".bwg_watermark_image").css({
2734
+ width: ((jQuery(".spider_popup_wrap").width() - comment_container_width) * gallery_box_data['watermark_font_size'] / gallery_box_data['image_width'])
2735
+ });
2736
+ jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({
2737
+ fontSize: ((jQuery(".spider_popup_wrap").width() - comment_container_width) * gallery_box_data['watermark_font_size'] / gallery_box_data['image_width'])
2738
+ });
2739
+ }
2740
  } else {
2741
  jQuery(".bwg" + source + "_title_spun" + defix).width(width);
2742
  jQuery(".bwg" + source + "_title_spun" + defix).height(height);
2767
  var top_bottom_space = parseInt(jQuery(".bwg_filmstrip_thumbnails").attr('data-all-images-top-bottom-space'));
2768
  var right_left_space = parseInt(jQuery(".bwg_filmstrip_thumbnails").attr('data-all-images-right-left-space'));
2769
  if( typeof bwg === 'undefined' || bwg === '' ) { /* for lightbox */
2770
+ if ( gallery_box_data['outerWidth_or_outerHeight'] == 'outerWidth' ) {
2771
+ var selectedImagePos = -bwg_current_filmstrip_pos - (jQuery(".bwg_filmstrip_thumbnail").outerWidth(true)) / 2;
2772
+ } else if ( gallery_box_data['outerWidth_or_outerHeight'] == 'outerHeight' ) {
2773
+ var selectedImagePos = -bwg_current_filmstrip_pos - (jQuery(".bwg_filmstrip_thumbnail").outerHeight(true)) / 2;
2774
+ }
2775
+ if ( gallery_box_data['width_or_height'] == 'width' ) {
2776
+ var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_filmstrip_thumbnails").width(), selectedImagePos + filmStripWidth / 2));
2777
+ } else if (gallery_box_data['width_or_height'] == 'height') {
2778
+ var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_filmstrip_thumbnails").height(), selectedImagePos + filmStripWidth / 2));
2779
+ }
2780
  } else { /* for slideshow */
2781
+ if (bwg_params[bwg]['width_or_height'] == 'width') {
2782
+ var selectedImagePos = -bwg_params[bwg]['bwg_current_filmstrip_pos'] - (jQuery(".bwg_slideshow_filmstrip_thumbnail" + defix).width() + bwg_params[bwg]['filmstrip_thumb_margin_hor']) / 2;
2783
+ var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails" + defix).width(), selectedImagePos + filmStripWidth / 2));
2784
+ }
2785
+ else {
2786
+ var selectedImagePos = -bwg_params[bwg]['bwg_current_filmstrip_pos'] - (jQuery(".bwg_slideshow_filmstrip_thumbnail" + defix).height() + bwg_params[bwg]['filmstrip_thumb_margin_hor']) / 2;
2787
+ var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails" + defix).height(), selectedImagePos + filmStripWidth / 2));
2788
+ }
2789
  }
2790
 
2791
+ if ( imagesContainerLeft + right_left_space > 0 ) {
2792
+ right_left_space = 0;
2793
+ }
2794
+ if ( imagesContainerLeft + top_bottom_space > 0 ) {
2795
+ top_bottom_space = 0;
2796
+ }
2797
 
2798
  if( left_or_top == 'left' ) {
2799
  jQuery(".bwg"+source+"_filmstrip_thumbnails" + defix).animate({
3220
  jQuery(".bwg_slideshow_image_container_"+bwg).css({height: ((parent_width) * bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width'] - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? bwg_params[bwg]['slideshow_filmstrip_height'] : 0))});
3221
  jQuery(".bwg_slideshow_image_"+bwg).css({
3222
  cssText: "max-width: " + (parent_width - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? 0 : bwg_params[bwg]['slideshow_filmstrip_width'])) + "px !important; max-height: " + (parent_width * (bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width']) - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? bwg_params[bwg]['slideshow_filmstrip_height'] : 0) - 1) + "px !important;"
3223
+ });
3224
  jQuery(".bwg_slideshow_embed_"+bwg).css({
3225
  cssText: "width: " + (parent_width - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? 0 : bwg_params[bwg]['slideshow_filmstrip_width']) ) + "px !important; height: " + (parent_width * (bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width']) - (bwg_params[bwg]['filmstrip_direction'] == 'horizontal' ? bwg_params[bwg]['slideshow_filmstrip_height'] : 0) - 1) + "px !important;"
3226
+ });
3227
  bwg_resize_instagram_post( bwg );
3228
  /* Set watermark container size.*/
3229
  bwg_change_watermark_container( bwg );
3234
  jQuery(".bwg_slideshow_filmstrip_container_"+bwg).css({height: (parent_width * bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width'])});
3235
  jQuery(".bwg_slideshow_filmstrip_"+bwg).css({height: (parent_width * bwg_params[bwg]['image_height'] / bwg_params[bwg]['image_width'] - 40)});
3236
  }
3237
+ jQuery(".bwg_slideshow_dots_container_"+bwg).css({width: (parent_width)});
3238
+ jQuery("#bwg_slideshow_play_pause-ico_"+bwg).css({fontSize: ((parent_width) * bwg_params[bwg]['slideshow_play_pause_btn_size'] / bwg_params[bwg]['image_width'])});
3239
+ jQuery(".bwg_slideshow_watermark_image_"+bwg).css({maxWidth: ((parent_width) * bwg_params[bwg]['watermark_width'] / bwg_params[bwg]['image_width']), maxHeight: ((parent_width) * bwg_params[bwg]['watermark_height'] / bwg_params[bwg]['image_width'])});
3240
+ jQuery(".bwg_slideshow_watermark_text_"+bwg+", .bwg_slideshow_watermark_text_"+bwg+":hover").css({fontSize: ((parent_width) * bwg_params[bwg]['watermark_font_size'] / bwg_params[bwg]['image_width'])});
3241
+ jQuery(".bwg_slideshow_title_text_"+bwg).css({fontSize: ((parent_width) * 2 * bwg_params[bwg]['slideshow_title_font_size'] / bwg_params[bwg]['image_width'])});
3242
+ jQuery(".bwg_slideshow_description_text_"+bwg).css({fontSize: ((parent_width) * 2 * bwg_params[bwg]['slideshow_description_font_size'] / bwg_params[bwg]['image_width'])});
3243
+ jQuery(".bwg_slideshow_image_"+bwg).css({'display':'inline-block'});
3244
  }
3245
  if (data[parseInt(jQuery("#bwg_current_image_key_"+bwg).val())]["is_embed_video"]) {
3246
+ jQuery("#bwg_slideshow_play_pause_"+bwg).css({display: 'none'});
3247
  }
3248
  else {
3249
  jQuery("#bwg_slideshow_play_pause_"+bwg).css({display: ''});
3271
 
3272
  function bwg_resize_instagram_post( bwg ) {
3273
  if ( typeof bwg !== 'undefined' && bwg !== '' ) { /* SLIDESHOW */
3274
+ if (jQuery(".inner_instagram_iframe_bwg_embed_frame_"+bwg).length) {
3275
+ var post_width = jQuery(".bwg_slideshow_embed_"+bwg).width();
3276
+ var post_height = jQuery(".bwg_slideshow_embed_").height();
3277
+ jQuery(".inner_instagram_iframe_bwg_embed_frame_"+bwg).each(function() {
3278
+ var parent_container = jQuery(this).parent();
3279
+ if (post_height / (parseInt(parent_container.attr('data-height')) + 96) < post_width / parseInt(parent_container.attr('data-width'))) {
3280
+ parent_container.height(post_height);
3281
+ parent_container.width((parent_container.height() - 96) * parent_container.attr('data-width') / parent_container.attr('data-height') + 16);
3282
+ }
3283
+ else {
3284
+ parent_container.width(post_width);
3285
+ parent_container.height((parent_container.width() - 16) * parent_container.attr('data-height') / parent_container.attr('data-width') + 96);
3286
+ }
3287
+ });
3288
+ bwg_change_watermark_container( bwg );
3289
+ }
3290
  } else { /* LIGHTBOX */
3291
+ if (jQuery('.inner_instagram_iframe_bwg_embed_frame').length) {
3292
+ var post_width = jQuery(".bwg_image_container").width();
3293
+ var post_height = jQuery(".bwg_image_container").height();
3294
+ var FeedbackSocialProofHeight = 176;
3295
+ jQuery('.inner_instagram_iframe_bwg_embed_frame').each(function() {
3296
+ var parent_container = jQuery(this).parent();
3297
+ if (post_height / (parseInt(parent_container.attr('data-height')) + FeedbackSocialProofHeight) < post_width / parseInt(parent_container.attr('data-width'))) {
3298
+ parent_container.height(post_height);
3299
+ parent_container.width((parent_container.height() - FeedbackSocialProofHeight) * parent_container.attr('data-width') / parent_container.attr('data-height') + 16);
3300
+ }
3301
+ else {
3302
+ parent_container.width(post_width);
3303
+ parent_container.height((parent_container.width() - 16) * parent_container.attr('data-height') / parent_container.attr('data-width') + 96);
3304
+ }
3305
+ parent_container.css({top: 0.5 * (post_height - parent_container.height())});
3306
+ });
3307
+ bwg_change_watermark_container();
3308
+ }
3309
  }
3310
  }
3311
 
3324
  bwg_change_image( parseInt(jQuery("#bwg_current_image_key_"+bwg).val()), (parseInt(jQuery("#bwg_current_image_key_"+bwg).val()) + iterator) % data.length, data, '', bwg )
3325
  }, bwg_params[bwg]['slideshow_interval'] * 1000);
3326
  } else {
3327
+ window.clearInterval(gallery_box_data['bwg_playInterval']);
3328
+ gallery_box_data['bwg_playInterval'] = setInterval(function () {
3329
+ /* Stop play of lightbox if comment was opened*/
3330
+ if ( jQuery(".bwg_comment_container").hasClass("bwg_open") || (jQuery(".bwg_play_pause").length && jQuery(".bwg_play_pause").hasClass("bwg-icon-play"))) {
3331
+ return;
3332
+ }
3333
 
3334
+ if (typeof data != 'undefined' && typeof data[(parseInt(jQuery('#bwg_current_image_key').val()) + 1)] == 'undefined') {
3335
+ if (gallery_box_data['enable_loop'] == 1) {
3336
+ /* Wrap around.*/
3337
+ bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0);
 
 
3338
  }
3339
+ return;
3340
+ }
3341
+ bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1)
3342
+ }, gallery_box_data['slideshow_interval'] * 1000);
3343
  }
3344
  }
3345
 
3350
  jQuery('#bwg_embed_frame_instapost_' + bwg).width(jQuery('#bwg_embed_frame_16x9_' + bwg).parents('.image_browser_image_buttons_' + bwg).width());
3351
  /* Conflict with Sydney Theme */
3352
  if ( jQuery('.image_browser_images_conteiner_' + bwg).find('.fluid-width-video-wrapper').length ) {
3353
+ var content = jQuery('.image_browser_images_conteiner_' + bwg).find('.fluid-width-video-wrapper').contents();
3354
+ jQuery('.image_browser_images_conteiner_' + bwg).find('.fluid-width-video-wrapper').replaceWith(content);
3355
  }
3356
  /* 16 is 2*padding inside iframe */
3357
  /* 96 is 2*padding(top) + 1*padding(bottom) + 40(footer) + 32(header) */
3390
  */
3391
  function bwg_disable_right_click( container ) {
3392
  container.bind( "contextmenu", function () {
3393
+ return false;
3394
  });
3395
  container.css( 'webkitTouchCallout', 'none' );
3396
+ }
js/bwg_gallery_box.js CHANGED
@@ -70,9 +70,15 @@ function gallery_box_ready() {
70
  gallery_box_data['bwg_transition_duration'] = bwg_transition_duration;
71
  gallery_box_data['bwg_trans_in_progress'] = false;
72
 
73
- if ((jQuery("#spider_popup_wrap").width() >= jQuery(window).width()) || (jQuery("#spider_popup_wrap").height() >= jQuery(window).height())) {
74
- jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
 
 
 
 
 
75
  }
 
76
  /* Stop autoplay.*/
77
  window.clearInterval(bwg_playInterval);
78
  /* Set watermark container size.*/
@@ -419,6 +425,7 @@ function gallery_box_ready() {
419
  }
420
  });
421
  });
 
422
  /* Open/close comments.*/
423
  jQuery(".bwg_comment, .bwg_comments_close_btn").on(bwg_click, function() { bwg_comment() });
424
  /* Open/close ecommerce.*/
@@ -626,7 +633,7 @@ function gallery_box_ready() {
626
  jQuery(".bwg_resize-full").hide();
627
  jQuery(".bwg_fullscreen").attr("class", "bwg-icon-compress bwg_ctrl_btn bwg_fullscreen");
628
  jQuery(".bwg_fullscreen").attr("title", bwg_objectsL10n.bwg_exit_fullscreen);
629
- jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
630
  }
631
  }
632
  }
@@ -1781,7 +1788,7 @@ function bwg_open_with_fullscreen() {
1781
  }
1782
  jQuery(".bwg_resize-full").attr("class", "bwg-icon-compress bwg_ctrl_btn bwg_resize-full");
1783
  jQuery(".bwg_resize-full").attr("title", bwg_objectsL10n.bwg_restore);
1784
- jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1785
  }
1786
 
1787
  function bwg_resize_full() {
@@ -1901,7 +1908,7 @@ function bwg_resize_full() {
1901
  }
1902
  jQuery(".bwg_resize-full").attr("class", "bwg-icon-compress bwg_ctrl_btn bwg_resize-full");
1903
  jQuery(".bwg_resize-full").attr("title", bwg_objectsL10n.bwg_restore);
1904
- jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1905
  }
1906
  setTimeout(function () {
1907
  bwg_info_height_set();
@@ -2030,14 +2037,21 @@ function bwg_popup_resize_lightbox() {
2030
  /* Set watermark container size.*/
2031
  bwg_resize_instagram_post();
2032
  bwg_change_watermark_container();
2033
- if (!(!(window.innerHeight > gallery_box_data['image_height'] - 2 * gallery_box_data['lightbox_close_btn_top']) || !(jQuery(window).width() >= gallery_box_data['image_width'] - 2 * gallery_box_data['lightbox_close_btn_right']) || !(gallery_box_data['open_with_fullscreen'] != 1))) {
2034
- jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
2035
- }
2036
- else {
2037
- if (!(!(jQuery("#spider_popup_wrap").width() < jQuery(window).width()) || !(jQuery("#spider_popup_wrap").height() < jQuery(window).height()))) {
2038
- jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
 
 
 
 
 
 
2039
  }
2040
  }
 
2041
  var bwg_ctrl_btn_container_height = jQuery(".bwg_ctrl_btn_container").height();
2042
  if ( gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' ) {
2043
  if (jQuery(".bwg_toggle_container i").hasClass('bwg-icon-caret-down')) {
70
  gallery_box_data['bwg_transition_duration'] = bwg_transition_duration;
71
  gallery_box_data['bwg_trans_in_progress'] = false;
72
 
73
+ /* Change close button position to IN LIGHTBOX,
74
+ if lightbox width/height is smaller than window
75
+ and if the button by default is out of lightbox.*/
76
+ if ( (jQuery("#spider_popup_wrap").width() >= jQuery(window).width()
77
+ || jQuery("#spider_popup_wrap").height() >= jQuery(window).height())
78
+ && parseInt(jQuery(".spider_popup_close").css("right")) < 0 ) {
79
+ jQuery(".spider_popup_close").attr("class", "spider_popup_close_fullscreen");
80
  }
81
+
82
  /* Stop autoplay.*/
83
  window.clearInterval(bwg_playInterval);
84
  /* Set watermark container size.*/
425
  }
426
  });
427
  });
428
+
429
  /* Open/close comments.*/
430
  jQuery(".bwg_comment, .bwg_comments_close_btn").on(bwg_click, function() { bwg_comment() });
431
  /* Open/close ecommerce.*/
633
  jQuery(".bwg_resize-full").hide();
634
  jQuery(".bwg_fullscreen").attr("class", "bwg-icon-compress bwg_ctrl_btn bwg_fullscreen");
635
  jQuery(".bwg_fullscreen").attr("title", bwg_objectsL10n.bwg_exit_fullscreen);
636
+ jQuery(".spider_popup_close").attr("class", "spider_popup_close_fullscreen");
637
  }
638
  }
639
  }
1788
  }
1789
  jQuery(".bwg_resize-full").attr("class", "bwg-icon-compress bwg_ctrl_btn bwg_resize-full");
1790
  jQuery(".bwg_resize-full").attr("title", bwg_objectsL10n.bwg_restore);
1791
+ jQuery(".spider_popup_close").attr("class", "spider_popup_close_fullscreen");
1792
  }
1793
 
1794
  function bwg_resize_full() {
1908
  }
1909
  jQuery(".bwg_resize-full").attr("class", "bwg-icon-compress bwg_ctrl_btn bwg_resize-full");
1910
  jQuery(".bwg_resize-full").attr("title", bwg_objectsL10n.bwg_restore);
1911
+ jQuery(".spider_popup_close").attr("class", "spider_popup_close_fullscreen");
1912
  }
1913
  setTimeout(function () {
1914
  bwg_info_height_set();
2037
  /* Set watermark container size.*/
2038
  bwg_resize_instagram_post();
2039
  bwg_change_watermark_container();
2040
+
2041
+ /* Change close button position to IN LIGHTBOX,
2042
+ if fullscreen lightbox is disabled,
2043
+ lightbox width/height is smaller than window
2044
+ and the button by default is out of lightbox.*/
2045
+ if ( gallery_box_data['open_with_fullscreen'] != 1 ) {
2046
+ if ( (gallery_box_data['lightbox_close_btn_right'] < 0 && jQuery("#spider_popup_wrap").width() - 2 * gallery_box_data['lightbox_close_btn_right'] >= jQuery(window).width())
2047
+ || (gallery_box_data['lightbox_close_btn_top'] < 0 && jQuery("#spider_popup_wrap").height() - 2 * gallery_box_data['lightbox_close_btn_top'] >= jQuery(window).height()) ) {
2048
+ jQuery(".spider_popup_close").attr("class", "spider_popup_close_fullscreen");
2049
+ }
2050
+ else {
2051
+ jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
2052
  }
2053
  }
2054
+
2055
  var bwg_ctrl_btn_container_height = jQuery(".bwg_ctrl_btn_container").height();
2056
  if ( gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' ) {
2057
  if (jQuery(".bwg_toggle_container i").hasClass('bwg-icon-caret-down')) {
js/free_trial_banner.js DELETED
@@ -1,18 +0,0 @@
1
- function tenweb_free_trial_banner_close() {
2
- jQuery.ajax( {
3
- type: "POST",
4
- url: ajaxurl,
5
- data: { action:"bwg_free_trial_banner" },
6
- success: function ( response ) {
7
- if ( response == "True" ) {
8
- jQuery(".tenweb_free_trial_banner").remove();
9
- }
10
- },
11
- } );
12
- }
13
- /* Hide Banner on fix date */
14
- var current = new Date();
15
- var banner_expiry = new Date("May 28 2021 00:00:00");
16
- if ( current.getTime() > banner_expiry.getTime() ) {
17
- tenweb_free_trial_banner_close();
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery.fullscreen-0.4.1.min.js CHANGED
@@ -54,10 +54,10 @@ function native(obj, name) {
54
  return void 0;
55
  }var ua = navigator.userAgent;
56
  var fsEnabled = native('fullscreenEnabled');
57
- var IS_ANDROID_CHROME = ua.indexOf('Android') !== -1 && ua.indexOf('Chrome') !== -1;
58
- var IS_NATIVELY_SUPPORTED =
59
  !IS_ANDROID_CHROME &&
60
- defined(native('fullscreenElement')) &&
61
  (!defined(fsEnabled) || fsEnabled === true);
62
 
63
  var version = $.fn.jquery.split('.');
@@ -245,8 +245,8 @@ extend(FullScreenFallback, FullScreenAbstract, {
245
  element: function() {
246
  return this.__isFullScreen ? this._fullScreenElement : null;
247
  }
248
- });$.fullscreen = IS_NATIVELY_SUPPORTED
249
- ? new FullScreenNative()
250
  : new FullScreenFallback();
251
 
252
  $.fn.fullscreen = function(options) {
54
  return void 0;
55
  }var ua = navigator.userAgent;
56
  var fsEnabled = native('fullscreenEnabled');
57
+ var IS_ANDROID_CHROME = ua.indexOf('Android') !== -1 && ua.indexOf('Chrome') !== -1;
58
+ var IS_NATIVELY_SUPPORTED =
59
  !IS_ANDROID_CHROME &&
60
+ defined(native('fullscreenElement')) &&
61
  (!defined(fsEnabled) || fsEnabled === true);
62
 
63
  var version = $.fn.jquery.split('.');
245
  element: function() {
246
  return this.__isFullScreen ? this._fullScreenElement : null;
247
  }
248
+ });$.fullscreen = IS_NATIVELY_SUPPORTED
249
+ ? new FullScreenNative()
250
  : new FullScreenFallback();
251
 
252
  $.fn.fullscreen = function(options) {
js/jquery.lazy.js ADDED
@@ -0,0 +1,872 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery & Zepto Lazy - v1.7.10
3
+ * http://jquery.eisbehr.de/lazy/
4
+ *
5
+ * Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
6
+ *
7
+ * Dual licensed under the MIT and GPL-2.0 licenses:
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ * http://www.gnu.org/licenses/gpl-2.0.html
10
+ *
11
+ * $("img.lazy").lazy();
12
+ */
13
+
14
+ ;(function(window, undefined) {
15
+ "use strict";
16
+
17
+ // noinspection JSUnresolvedVariable
18
+ /**
19
+ * library instance - here and not in construct to be shorter in minimization
20
+ * @return void
21
+ */
22
+ var $ = window.jQuery || window.Zepto,
23
+
24
+ /**
25
+ * unique plugin instance id counter
26
+ * @type {number}
27
+ */
28
+ lazyInstanceId = 0,
29
+
30
+ /**
31
+ * helper to register window load for jQuery 3
32
+ * @type {boolean}
33
+ */
34
+ windowLoaded = false;
35
+
36
+ /**
37
+ * make lazy available to jquery - and make it a bit more case-insensitive :)
38
+ * @access public
39
+ * @type {function}
40
+ * @param {object} settings
41
+ * @return {LazyPlugin}
42
+ */
43
+ $.fn.Lazy = $.fn.lazy = function(settings) {
44
+ return new LazyPlugin(this, settings);
45
+ };
46
+
47
+ /**
48
+ * helper to add plugins to lazy prototype configuration
49
+ * @access public
50
+ * @type {function}
51
+ * @param {string|Array} names
52
+ * @param {string|Array|function} [elements]
53
+ * @param {function} loader
54
+ * @return void
55
+ */
56
+ $.Lazy = $.lazy = function(names, elements, loader) {
57
+ // make second parameter optional
58
+ if ($.isFunction(elements)) {
59
+ loader = elements;
60
+ elements = [];
61
+ }
62
+
63
+ // exit here if parameter is not a callable function
64
+ if (!$.isFunction(loader)) {
65
+ return;
66
+ }
67
+
68
+ // make parameters an array of names to be sure
69
+ names = $.isArray(names) ? names : [names];
70
+ elements = $.isArray(elements) ? elements : [elements];
71
+
72
+ var config = LazyPlugin.prototype.config,
73
+ forced = config._f || (config._f = {});
74
+
75
+ // add the loader plugin for every name
76
+ for (var i = 0, l = names.length; i < l; i++) {
77
+ if (config[names[i]] === undefined || $.isFunction(config[names[i]])) {
78
+ config[names[i]] = loader;
79
+ }
80
+ }
81
+
82
+ // add forced elements loader
83
+ for (var c = 0, a = elements.length; c < a; c++) {
84
+ forced[elements[c]] = names[0];
85
+ }
86
+ };
87
+
88
+ /**
89
+ * contains all logic and the whole element handling
90
+ * is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance
91
+ * @access private
92
+ * @type {function}
93
+ * @param {LazyPlugin} instance
94
+ * @param {object} config
95
+ * @param {object|Array} items
96
+ * @param {object} events
97
+ * @param {string} namespace
98
+ * @return void
99
+ */
100
+ function _executeLazy(instance, config, items, events, namespace) {
101
+ /**
102
+ * a helper to trigger the 'onFinishedAll' callback after all other events
103
+ * @access private
104
+ * @type {number}
105
+ */
106
+ var _awaitingAfterLoad = 0,
107
+
108
+ /**
109
+ * visible content width
110
+ * @access private
111
+ * @type {number}
112
+ */
113
+ _actualWidth = -1,
114
+
115
+ /**
116
+ * visible content height
117
+ * @access private
118
+ * @type {number}
119
+ */
120
+ _actualHeight = -1,
121
+
122
+ /**
123
+ * determine possibly detected high pixel density
124
+ * @access private
125
+ * @type {boolean}
126
+ */
127
+ _isRetinaDisplay = false,
128
+
129
+ /**
130
+ * dictionary entry for better minimization
131
+ * @access private
132
+ * @type {string}
133
+ */
134
+ _afterLoad = 'afterLoad',
135
+
136
+ /**
137
+ * dictionary entry for better minimization
138
+ * @access private
139
+ * @type {string}
140
+ */
141
+ _load = 'load',
142
+
143
+ /**
144
+ * dictionary entry for better minimization
145
+ * @access private
146
+ * @type {string}
147
+ */
148
+ _error = 'error',
149
+
150
+ /**
151
+ * dictionary entry for better minimization
152
+ * @access private
153
+ * @type {string}
154
+ */
155
+ _img = 'img',
156
+
157
+ /**
158
+ * dictionary entry for better minimization
159
+ * @access private
160
+ * @type {string}
161
+ */
162
+ _src = 'src',
163
+
164
+ /**
165
+ * dictionary entry for better minimization
166
+ * @access private
167
+ * @type {string}
168
+ */
169
+ _srcset = 'srcset',
170
+
171
+ /**
172
+ * dictionary entry for better minimization
173
+ * @access private
174
+ * @type {string}
175
+ */
176
+ _sizes = 'sizes',
177
+
178
+ /**
179
+ * dictionary entry for better minimization
180
+ * @access private
181
+ * @type {string}
182
+ */
183
+ _backgroundImage = 'background-image';
184
+
185
+ /**
186
+ * initialize plugin
187
+ * bind loading to events or set delay time to load all items at once
188
+ * @access private
189
+ * @return void
190
+ */
191
+ function _initialize() {
192
+ // detect actual device pixel ratio
193
+ // noinspection JSUnresolvedVariable
194
+ _isRetinaDisplay = window.devicePixelRatio > 1;
195
+
196
+ // prepare all initial items
197
+ items = _prepareItems(items);
198
+
199
+ // if delay time is set load all items at once after delay time
200
+ if (config.delay >= 0) {
201
+ setTimeout(function() {
202
+ _lazyLoadItems(true);
203
+ }, config.delay);
204
+ }
205
+
206
+ // if no delay is set or combine usage is active bind events
207
+ if (config.delay < 0 || config.combined) {
208
+ // create unique event function
209
+ events.e = _throttle(config.throttle, function(event) {
210
+ // reset detected window size on resize event
211
+ if (event.type === 'resize') {
212
+ _actualWidth = _actualHeight = -1;
213
+ }
214
+
215
+ // execute 'lazy magic'
216
+ _lazyLoadItems(event.all);
217
+ });
218
+
219
+ // create function to add new items to instance
220
+ events.a = function(additionalItems) {
221
+ additionalItems = _prepareItems(additionalItems);
222
+ items.push.apply(items, additionalItems);
223
+ };
224
+
225
+ // create function to get all instance items left
226
+ events.g = function() {
227
+ // filter loaded items before return in case internal filter was not running until now
228
+ return (items = $(items).filter(function() {
229
+ return !$(this).data(config.loadedName);
230
+ }));
231
+ };
232
+
233
+ // create function to force loading elements
234
+ events.f = function(forcedItems) {
235
+ for (var i = 0; i < forcedItems.length; i++) {
236
+ // only handle item if available in current instance
237
+ // use a compare function, because Zepto can't handle object parameter for filter
238
+ // var item = items.filter(forcedItems[i]);
239
+ /* jshint loopfunc: true */
240
+ var item = items.filter(function() {
241
+ return this === forcedItems[i];
242
+ });
243
+
244
+ if (item.length) {
245
+ _lazyLoadItems(false, item);
246
+ }
247
+ }
248
+ };
249
+
250
+ // load initial items
251
+ _lazyLoadItems();
252
+
253
+ // bind lazy load functions to scroll and resize event
254
+ // noinspection JSUnresolvedVariable
255
+ $(config.appendScroll).on('scroll.' + namespace + ' resize.' + namespace, events.e);
256
+ }
257
+ }
258
+
259
+ /**
260
+ * prepare items before handle them
261
+ * @access private
262
+ * @param {Array|object|jQuery} items
263
+ * @return {Array|object|jQuery}
264
+ */
265
+ function _prepareItems(items) {
266
+ // fetch used configurations before loops
267
+ var defaultImage = config.defaultImage,
268
+ placeholder = config.placeholder,
269
+ imageBase = config.imageBase,
270
+ srcsetAttribute = config.srcsetAttribute,
271
+ loaderAttribute = config.loaderAttribute,
272
+ forcedTags = config._f || {};
273
+
274
+ // filter items and only add those who not handled yet and got needed attributes available
275
+ items = $(items).filter(function() {
276
+ var element = $(this),
277
+ tag = _getElementTagName(this);
278
+
279
+ return !element.data(config.handledName) &&
280
+ (element.attr(config.attribute) || element.attr(srcsetAttribute) || element.attr(loaderAttribute) || forcedTags[tag] !== undefined);
281
+ })
282
+
283
+ // append plugin instance to all elements
284
+ .data('plugin_' + config.name, instance);
285
+
286
+ for (var i = 0, l = items.length; i < l; i++) {
287
+ var element = $(items[i]),
288
+ tag = _getElementTagName(items[i]),
289
+ elementImageBase = element.attr(config.imageBaseAttribute) || imageBase;
290
+
291
+ // generate and update source set if an image base is set
292
+ if (tag === _img && elementImageBase && element.attr(srcsetAttribute)) {
293
+ element.attr(srcsetAttribute, _getCorrectedSrcSet(element.attr(srcsetAttribute), elementImageBase));
294
+ }
295
+
296
+ // add loader to forced element types
297
+ if (forcedTags[tag] !== undefined && !element.attr(loaderAttribute)) {
298
+ element.attr(loaderAttribute, forcedTags[tag]);
299
+ }
300
+
301
+ // set default image on every element without source
302
+ if (tag === _img && defaultImage && !element.attr(_src)) {
303
+ element.attr(_src, defaultImage);
304
+ }
305
+
306
+ // set placeholder on every element without background image
307
+ else if (tag !== _img && placeholder && (!element.css(_backgroundImage) || element.css(_backgroundImage) === 'none')) {
308
+ element.css(_backgroundImage, "url('" + placeholder + "')");
309
+ }
310
+ }
311
+
312
+ return items;
313
+ }
314
+
315
+ /**
316
+ * the 'lazy magic' - check all items
317
+ * @access private
318
+ * @param {boolean} [allItems]
319
+ * @param {object} [forced]
320
+ * @return void
321
+ */
322
+ function _lazyLoadItems(allItems, forced) {
323
+ // skip if no items where left
324
+ if (!items.length) {
325
+ // destroy instance if option is enabled
326
+ if (config.autoDestroy) {
327
+ // noinspection JSUnresolvedFunction
328
+ instance.destroy();
329
+ }
330
+
331
+ return;
332
+ }
333
+
334
+ var elements = forced || items,
335
+ loadTriggered = false,
336
+ imageBase = config.imageBase || '',
337
+ srcsetAttribute = config.srcsetAttribute,
338
+ handledName = config.handledName;
339
+
340
+ // loop all available items
341
+ for (var i = 0; i < elements.length; i++) {
342
+ // item is at least in loadable area
343
+ if (allItems || forced || _isInLoadableArea(elements[i])) {
344
+ var element = $(elements[i]),
345
+ tag = _getElementTagName(elements[i]),
346
+ attribute = element.attr(config.attribute),
347
+ elementImageBase = element.attr(config.imageBaseAttribute) || imageBase,
348
+ customLoader = element.attr(config.loaderAttribute);
349
+
350
+ // is not already handled
351
+ if (!element.data(handledName) &&
352
+ // and is visible or visibility doesn't matter
353
+ (!config.visibleOnly || element.is(':visible')) && (
354
+ // and image source or source set attribute is available
355
+ (attribute || element.attr(srcsetAttribute)) && (
356
+ // and is image tag where attribute is not equal source or source set
357
+ (tag === _img && (elementImageBase + attribute !== element.attr(_src) || element.attr(srcsetAttribute) !== element.attr(_srcset))) ||
358
+ // or is non image tag where attribute is not equal background
359
+ (tag !== _img && elementImageBase + attribute !== element.css(_backgroundImage))
360
+ ) ||
361
+ // or custom loader is available
362
+ customLoader))
363
+ {
364
+ // mark element always as handled as this point to prevent double handling
365
+ loadTriggered = true;
366
+ element.data(handledName, true);
367
+
368
+ // load item
369
+ _handleItem(element, tag, elementImageBase, customLoader);
370
+ }
371
+ }
372
+ }
373
+
374
+ // when something was loaded remove them from remaining items
375
+ if (loadTriggered) {
376
+ items = $(items).filter(function() {
377
+ return !$(this).data(handledName);
378
+ });
379
+ }
380
+ }
381
+
382
+ /**
383
+ * load the given element the lazy way
384
+ * @access private
385
+ * @param {object} element
386
+ * @param {string} tag
387
+ * @param {string} imageBase
388
+ * @param {function} [customLoader]
389
+ * @return void
390
+ */
391
+ function _handleItem(element, tag, imageBase, customLoader) {
392
+ // increment count of items waiting for after load
393
+ ++_awaitingAfterLoad;
394
+
395
+ // extended error callback for correct 'onFinishedAll' handling
396
+ var errorCallback = function() {
397
+ _triggerCallback('onError', element);
398
+ _reduceAwaiting();
399
+
400
+ // prevent further callback calls
401
+ errorCallback = $.noop;
402
+ };
403
+
404
+ // trigger function before loading image
405
+ _triggerCallback('beforeLoad', element);
406
+
407
+ // fetch all double used data here for better code minimization
408
+ var srcAttribute = config.attribute,
409
+ srcsetAttribute = config.srcsetAttribute,
410
+ sizesAttribute = config.sizesAttribute,
411
+ retinaAttribute = config.retinaAttribute,
412
+ removeAttribute = config.removeAttribute,
413
+ loadedName = config.loadedName,
414
+ elementRetina = element.attr(retinaAttribute);
415
+
416
+ // handle custom loader
417
+ if (customLoader) {
418
+ // on load callback
419
+ var loadCallback = function() {
420
+ // remove attribute from element
421
+ if (removeAttribute) {
422
+ element.removeAttr(config.loaderAttribute);
423
+ }
424
+
425
+ // mark element as loaded
426
+ element.data(loadedName, true);
427
+
428
+ // call after load event
429
+ _triggerCallback(_afterLoad, element);
430
+
431
+ // remove item from waiting queue and possibly trigger finished event
432
+ // it's needed to be asynchronous to run after filter was in _lazyLoadItems
433
+ setTimeout(_reduceAwaiting, 1);
434
+
435
+ // prevent further callback calls
436
+ loadCallback = $.noop;
437
+ };
438
+
439
+ // bind error event to trigger callback and reduce waiting amount
440
+ element.off(_error).one(_error, errorCallback)
441
+
442
+ // bind after load callback to element
443
+ .one(_load, loadCallback);
444
+
445
+ // trigger custom loader and handle response
446
+ if (!_triggerCallback(customLoader, element, function(response) {
447
+ if(response) {
448
+ element.off(_load);
449
+ loadCallback();
450
+ }
451
+ else {
452
+ element.off(_error);
453
+ errorCallback();
454
+ }
455
+ })) {
456
+ element.trigger(_error);
457
+ }
458
+ }
459
+
460
+ // handle images
461
+ else {
462
+ // create image object
463
+ var imageObj = $(new Image());
464
+
465
+ // bind error event to trigger callback and reduce waiting amount
466
+ imageObj.one(_error, errorCallback)
467
+
468
+ // bind after load callback to image
469
+ .one(_load, function() {
470
+ // remove element from view
471
+ element.hide();
472
+
473
+ // set image back to element
474
+ // do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
475
+ if (tag === _img) {
476
+ element.attr(_sizes, imageObj.attr(_sizes))
477
+ .attr(_srcset, imageObj.attr(_srcset))
478
+ .attr(_src, imageObj.attr(_src));
479
+ }
480
+ else {
481
+ element.css(_backgroundImage, "url('" + imageObj.attr(_src) + "')");
482
+ }
483
+
484
+ // bring it back with some effect!
485
+ element[config.effect](config.effectTime);
486
+
487
+ // remove attribute from element
488
+ if (removeAttribute) {
489
+ element.removeAttr(srcAttribute + ' ' + srcsetAttribute + ' ' + retinaAttribute + ' ' + config.imageBaseAttribute);
490
+
491
+ // only remove 'sizes' attribute, if it was a custom one
492
+ if (sizesAttribute !== _sizes) {
493
+ element.removeAttr(sizesAttribute);
494
+ }
495
+ }
496
+
497
+ // mark element as loaded
498
+ element.data(loadedName, true);
499
+
500
+ // call after load event
501
+ _triggerCallback(_afterLoad, element);
502
+
503
+ // cleanup image object
504
+ imageObj.remove();
505
+
506
+ // remove item from waiting queue and possibly trigger finished event
507
+ _reduceAwaiting();
508
+ });
509
+
510
+ // set sources
511
+ // do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
512
+ var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || '';
513
+ imageObj.attr(_sizes, element.attr(sizesAttribute))
514
+ .attr(_srcset, element.attr(srcsetAttribute))
515
+ .attr(_src, imageSrc ? imageBase + imageSrc : null);
516
+
517
+ // call after load even on cached image
518
+ imageObj.complete && imageObj.trigger(_load); // jshint ignore : line
519
+ }
520
+ }
521
+
522
+ /**
523
+ * check if the given element is inside the current viewport or threshold
524
+ * @access private
525
+ * @param {object} element
526
+ * @return {boolean}
527
+ */
528
+ function _isInLoadableArea(element) {
529
+ var elementBound = element.getBoundingClientRect(),
530
+ direction = config.scrollDirection,
531
+ threshold = config.threshold,
532
+ vertical = // check if element is in loadable area from top
533
+ ((_getActualHeight() + threshold) > elementBound.top) &&
534
+ // check if element is even in loadable are from bottom
535
+ (-threshold < elementBound.bottom),
536
+ horizontal = // check if element is in loadable area from left
537
+ ((_getActualWidth() + threshold) > elementBound.left) &&
538
+ // check if element is even in loadable area from right
539
+ (-threshold < elementBound.right);
540
+
541
+ if (direction === 'vertical') {
542
+ return vertical;
543
+ }
544
+ else if (direction === 'horizontal') {
545
+ return horizontal;
546
+ }
547
+
548
+ return vertical && horizontal;
549
+ }
550
+
551
+ /**
552
+ * receive the current viewed width of the browser
553
+ * @access private
554
+ * @return {number}
555
+ */
556
+ function _getActualWidth() {
557
+ return _actualWidth >= 0 ? _actualWidth : (_actualWidth = $(window).width());
558
+ }
559
+
560
+ /**
561
+ * receive the current viewed height of the browser
562
+ * @access private
563
+ * @return {number}
564
+ */
565
+ function _getActualHeight() {
566
+ return _actualHeight >= 0 ? _actualHeight : (_actualHeight = $(window).height());
567
+ }
568
+
569
+ /**
570
+ * get lowercase tag name of an element
571
+ * @access private
572
+ * @param {object} element
573
+ * @returns {string}
574
+ */
575
+ function _getElementTagName(element) {
576
+ return element.tagName.toLowerCase();
577
+ }
578
+
579
+ /**
580
+ * prepend image base to all srcset entries
581
+ * @access private
582
+ * @param {string} srcset
583
+ * @param {string} imageBase
584
+ * @returns {string}
585
+ */
586
+ function _getCorrectedSrcSet(srcset, imageBase) {
587
+ if (imageBase) {
588
+ // trim, remove unnecessary spaces and split entries
589
+ var entries = srcset.split(',');
590
+ srcset = '';
591
+
592
+ for (var i = 0, l = entries.length; i < l; i++) {
593
+ srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : '');
594
+ }
595
+ }
596
+
597
+ return srcset;
598
+ }
599
+
600
+ /**
601
+ * helper function to throttle down event triggering
602
+ * @access private
603
+ * @param {number} delay
604
+ * @param {function} callback
605
+ * @return {function}
606
+ */
607
+ function _throttle(delay, callback) {
608
+ var timeout,
609
+ lastExecute = 0;
610
+
611
+ return function(event, ignoreThrottle) {
612
+ var elapsed = +new Date() - lastExecute;
613
+
614
+ function run() {
615
+ lastExecute = +new Date();
616
+ // noinspection JSUnresolvedFunction
617
+ callback.call(instance, event);
618
+ }
619
+
620
+ timeout && clearTimeout(timeout); // jshint ignore : line
621
+
622
+ if (elapsed > delay || !config.enableThrottle || ignoreThrottle) {
623
+ run();
624
+ }
625
+ else {
626
+ timeout = setTimeout(run, delay - elapsed);
627
+ }
628
+ };
629
+ }
630
+
631
+ /**
632
+ * reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero
633
+ * @access private
634
+ * @return void
635
+ */
636
+ function _reduceAwaiting() {
637
+ --_awaitingAfterLoad;
638
+
639
+ // if no items were left trigger finished event
640
+ if (!items.length && !_awaitingAfterLoad) {
641
+ _triggerCallback('onFinishedAll');
642
+ }
643
+ }
644
+
645
+ /**
646
+ * single implementation to handle callbacks, pass element and set 'this' to current instance
647
+ * @access private
648
+ * @param {string|function} callback
649
+ * @param {object} [element]
650
+ * @param {*} [args]
651
+ * @return {boolean}
652
+ */
653
+ function _triggerCallback(callback, element, args) {
654
+ if ((callback = config[callback])) {
655
+ // jQuery's internal '$(arguments).slice(1)' are causing problems at least on old iPads
656
+ // below is shorthand of 'Array.prototype.slice.call(arguments, 1)'
657
+ callback.apply(instance, [].slice.call(arguments, 1));
658
+ return true;
659
+ }
660
+
661
+ return false;
662
+ }
663
+
664
+ // if event driven or window is already loaded don't wait for page loading
665
+ if (config.bind === 'event' || windowLoaded) {
666
+ _initialize();
667
+ }
668
+
669
+ // otherwise load initial items and start lazy after page load
670
+ else {
671
+ // noinspection JSUnresolvedVariable
672
+ $(window).on(_load + '.' + namespace, _initialize);
673
+ }
674
+ }
675
+
676
+ /**
677
+ * lazy plugin class constructor
678
+ * @constructor
679
+ * @access private
680
+ * @param {object} elements
681
+ * @param {object} settings
682
+ * @return {object|LazyPlugin}
683
+ */
684
+ function LazyPlugin(elements, settings) {
685
+ /**
686
+ * this lazy plugin instance
687
+ * @access private
688
+ * @type {object|LazyPlugin|LazyPlugin.prototype}
689
+ */
690
+ var _instance = this,
691
+
692
+ /**
693
+ * this lazy plugin instance configuration
694
+ * @access private
695
+ * @type {object}
696
+ */
697
+ _config = $.extend({}, _instance.config, settings),
698
+
699
+ /**
700
+ * instance generated event executed on container scroll or resize
701
+ * packed in an object to be referenceable and short named because properties will not be minified
702
+ * @access private
703
+ * @type {object}
704
+ */
705
+ _events = {},
706
+
707
+ /**
708
+ * unique namespace for instance related events
709
+ * @access private
710
+ * @type {string}
711
+ */
712
+ _namespace = _config.name + '-' + (++lazyInstanceId);
713
+
714
+ // noinspection JSUndefinedPropertyAssignment
715
+ /**
716
+ * wrapper to get or set an entry from plugin instance configuration
717
+ * much smaller on minify as direct access
718
+ * @access public
719
+ * @type {function}
720
+ * @param {string} entryName
721
+ * @param {*} [value]
722
+ * @return {LazyPlugin|*}
723
+ */
724
+ _instance.config = function(entryName, value) {
725
+ if (value === undefined) {
726
+ return _config[entryName];
727
+ }
728
+
729
+ _config[entryName] = value;
730
+ return _instance;
731
+ };
732
+
733
+ // noinspection JSUndefinedPropertyAssignment
734
+ /**
735
+ * add additional items to current instance
736
+ * @access public
737
+ * @param {Array|object|string} items
738
+ * @return {LazyPlugin}
739
+ */
740
+ _instance.addItems = function(items) {
741
+ _events.a && _events.a($.type(items) === 'string' ? $(items) : items); // jshint ignore : line
742
+ return _instance;
743
+ };
744
+
745
+ // noinspection JSUndefinedPropertyAssignment
746
+ /**
747
+ * get all left items of this instance
748
+ * @access public
749
+ * @returns {object}
750
+ */
751
+ _instance.getItems = function() {
752
+ return _events.g ? _events.g() : {};
753
+ };
754
+
755
+ // noinspection JSUndefinedPropertyAssignment
756
+ /**
757
+ * force lazy to load all items in loadable area right now
758
+ * by default without throttle
759
+ * @access public
760
+ * @type {function}
761
+ * @param {boolean} [useThrottle]
762
+ * @return {LazyPlugin}
763
+ */
764
+ _instance.update = function(useThrottle) {
765
+ _events.e && _events.e({}, !useThrottle); // jshint ignore : line
766
+ return _instance;
767
+ };
768
+
769
+ // noinspection JSUndefinedPropertyAssignment
770
+ /**
771
+ * force element(s) to load directly, ignoring the viewport
772
+ * @access public
773
+ * @param {Array|object|string} items
774
+ * @return {LazyPlugin}
775
+ */
776
+ _instance.force = function(items) {
777
+ _events.f && _events.f($.type(items) === 'string' ? $(items) : items); // jshint ignore : line
778
+ return _instance;
779
+ };
780
+
781
+ // noinspection JSUndefinedPropertyAssignment
782
+ /**
783
+ * force lazy to load all available items right now
784
+ * this call ignores throttling
785
+ * @access public
786
+ * @type {function}
787
+ * @return {LazyPlugin}
788
+ */
789
+ _instance.loadAll = function() {
790
+ _events.e && _events.e({all: true}, true); // jshint ignore : line
791
+ return _instance;
792
+ };
793
+
794
+ // noinspection JSUndefinedPropertyAssignment
795
+ /**
796
+ * destroy this plugin instance
797
+ * @access public
798
+ * @type {function}
799
+ * @return undefined
800
+ */
801
+ _instance.destroy = function() {
802
+ // unbind instance generated events
803
+ // noinspection JSUnresolvedFunction, JSUnresolvedVariable
804
+ $(_config.appendScroll).off('.' + _namespace, _events.e);
805
+ // noinspection JSUnresolvedVariable
806
+ $(window).off('.' + _namespace);
807
+
808
+ // clear events
809
+ _events = {};
810
+
811
+ return undefined;
812
+ };
813
+
814
+ // start using lazy and return all elements to be chainable or instance for further use
815
+ // noinspection JSUnresolvedVariable
816
+ _executeLazy(_instance, _config, elements, _events, _namespace);
817
+ return _config.chainable ? elements : _instance;
818
+ }
819
+
820
+ /**
821
+ * settings and configuration data
822
+ * @access public
823
+ * @type {object|*}
824
+ */
825
+ LazyPlugin.prototype.config = {
826
+ // general
827
+ name : 'lazy',
828
+ chainable : true,
829
+ autoDestroy : true,
830
+ bind : 'load',
831
+ threshold : 500,
832
+ visibleOnly : false,
833
+ appendScroll : window,
834
+ scrollDirection : 'both',
835
+ imageBase : null,
836
+ defaultImage : 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
837
+ placeholder : null,
838
+ delay : -1,
839
+ combined : false,
840
+
841
+ // attributes
842
+ attribute : 'data-original',
843
+ srcsetAttribute : 'data-srcset',
844
+ sizesAttribute : 'data-sizes',
845
+ retinaAttribute : 'data-retina',
846
+ loaderAttribute : 'data-loader',
847
+ imageBaseAttribute : 'data-imagebase',
848
+ removeAttribute : true,
849
+ handledName : 'handled',
850
+ loadedName : 'loaded',
851
+
852
+ // effect
853
+ effect : 'show',
854
+ effectTime : 0,
855
+
856
+ // throttle
857
+ enableThrottle : true,
858
+ throttle : 250,
859
+
860
+ // callbacks
861
+ beforeLoad : undefined,
862
+ afterLoad : undefined,
863
+ onError : undefined,
864
+ onFinishedAll : undefined
865
+ };
866
+
867
+ // register window load event globally to prevent not loading elements
868
+ // since jQuery 3.X ready state is fully async and may be executed after 'load'
869
+ $(window).on('load', function() {
870
+ windowLoaded = true;
871
+ });
872
+ })(window);
js/scripts.min.js CHANGED
@@ -1 +1 @@
1
- var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");void 0!==e&&bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.is_pro&&1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;if(1==gallery_box_data.is_pro){1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id))}1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().left&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_zoom").on(a,function(){var e=["mousemove","touchmove"];jQuery("figure.bwg_popup_image").each(function(){var i=jQuery(this);i.hasClass("zoom")?jQuery.each(e,function(e,t){i.removeClass("zoom"),i.off(t)}):jQuery.each(e,function(e,t){i.addClass("zoom"),i.on(t,function(e){window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause");var t=e.target,i=document.querySelector("span.bwg_popup_image_spun2").clientHeight,a=document.querySelector("span.bwg_popup_image_spun2").clientWidth,r=document.querySelector("figure.zoom.bwg_popup_image").clientHeight,_=document.querySelector("figure.zoom.bwg_popup_image").clientWidth;e.offsetX?offsetX=e.offsetX:offsetX=e.targetTouches?e.targetTouches[0].pageX*(_/a):0,e.offsetY?offsetY=e.offsetY:offsetY=e.targetTouches?e.targetTouches[0].pageY*(r/i):0,x=offsetX/t.offsetWidth*100,y=offsetY/t.offsetHeight*100,t.parentNode.style.backgroundPosition=x+"% "+y+"%"})})})}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,a,r,_,s,o,l){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+a+"px; height:"+r+"px; margin-top:-"+r/2+"px; margin-left: -"+a/2+'px; ">'+e+"</div>").hide().appendTo("body");if(gallery_box_ready(),spider_showpopup(s,o,t,_,l),"undefined"!=typeof addthis){jQuery(".addthis-smartlayers").show();var i=setInterval(function(){void 0!==addthis.layers.refresh&&(clearInterval(i),addthis.layers.refresh())},100)}},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process())}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){jQuery(".addthis-smartlayers").hide(),null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();bwg_objectsL10n.is_pro&&history.pushState(history.state,null,window.location.origin+window.location.pathname+window.location.search),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i){var e={};return e.image_id=jQuery("#"+i+" input[name='image_id']").val(),e.rate=jQuery("#"+i+" input[name='score']").val(),e.ajax_task=jQuery("#rate_ajax_task").val(),jQuery.ajax({type:"POST",url:jQuery("#"+i).attr("action"),data:e,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=t.find(".cur_gal_id").val(),o=jQuery("#bwg_tag_id_"+s).val();o=o||0;var l=1==i?"&open_ecommerce=1":"",n=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";n=n||"",void 0!==a&&(r+="&gallery_id="+a);var w="",b=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==b&&!1!==b&&(w="&open_comment=1"),spider_createpopup(r+"&bwg_random_seed="+jQuery("#bwg_random_seed_"+_).val()+"&image_id="+e+"&filter_tag="+o+l+w+"&filter_search_name="+n+g,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,""==gallery_box_data.data[a].alt&&""==gallery_box_data.data[a].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show(),jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,bwg_objectsL10n.is_pro&&(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id)),jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("<span />").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("<span />").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1<r[a].filetype.indexOf("EMBED_"),n=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),g=-1<r[a].filetype.indexOf("INSTAGRAM_VIDEO"),w=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),b=jQuery(s).height(),u=jQuery(s).width(),d='<span class="bwg_popup_image_spun1" style="display: '+(l?"block":"table")+'; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:'+(l?"block":"table-cell")+'; vertical-align: middle;text-align: center;height: 100%;">';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),d+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(w?"block":"table")+'; table-layout: fixed; height: 100%;">'+(g?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),n){var h=0,m=0;b<u+88?h=(m=b)-88:m=(h=u)+88,d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":r[a].image_width,"data-height":r[a].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+h+"px; height:"+m+"px; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(w?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});d+="</span>"}else{jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden");var p=(gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()).split("?bwg")[0];gallery_box_data.popup_enable_zoom&&(d+='<figure style="max-height: '+b+"px; max-width: "+u+"px; background-image: url("+p+')" class="bwg_popup_image bwg_popup_watermark" alt="'+r[a].alt+'" />'),d+='<img style="max-height: '+b+"px; max-width: "+u+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />'}function c(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/share?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&bwg_move_filmstrip(),bwg_resize_instagram_post()}if(gallery_box_data.popup_enable_zoom?d+="</figure></span></span>":d+="</span></span>",jQuery(o).html(d),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:u,maxHeight:b,height:"auto"}),l)c();else jQuery(o).find("img").one("load",function(){c()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process()}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),window.innerHeight>gallery_box_data.image_height-2*gallery_box_data.lightbox_close_btn_top&&jQuery(window).width()>=gallery_box_data.image_width-2*gallery_box_data.lightbox_close_btn_right&&1!=gallery_box_data.open_with_fullscreen?jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"):jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<jQuery(window).height()&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen");var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)&&jQuery("#bwg_star").raty({score:function(){return jQuery(this).attr("data-score")},starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,readOnly:function(){return!!e},noRatedMsg:"Not rated yet.",click:function(t,e){jQuery("#bwg_star").hide(),jQuery("#bwg_rated").show(),spider_set_input_value("rate_ajax_task","save_rate"),jQuery.when(spider_rate_ajax_save("bwg_rate_form")).then(function(){gallery_box_data.data[a].rate=t,++gallery_box_data.data[a].rate_count;var e=parseFloat(jQuery("#bwg_star").attr("data-score"));gallery_box_data.data[a].avg_rating=e?((e+t)/2).toFixed(1):t.toFixed(1),bwg_rating(gallery_box_data.data[a].rate,gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating,gallery_box_data.current_image_key)})},starHalf:"bwg-icon-"+lightbox_rate_icon+("star"==lightbox_rate_icon?"-half":"")+"-o",starOff:"bwg-icon-"+lightbox_rate_icon+"-o",starOn:"bwg-icon-"+lightbox_rate_icon,cancelOff:"bwg-icon-minus-square-o",cancelOn:"bwg-icon-minus-square-o",cancel:!1,cancelHint:"Cancel your rating.",hints:[r,r,r,r,r],alreadyRatedMsg:parseFloat(i).toFixed(1)+"\nYou have already rated.\nVotes: "+t})}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+decodeURIComponent(t)+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<img src="'+decodeURIComponent(t)+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=">",""!=t&&(l+='<div class="inner_instagram_iframe_'+obj_class+'" frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen style="max-width: 100% !important; max-height: 100% !important; width: 100%; height: 100%; margin:0; vertical-align:middle;">'+atob(t)+"</div>"),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var n="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(n+=" "+attr+'="'+a[attr]+'"');n+=" >",""!=i&&(n+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=n+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var g="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(g+=" "+attr+'="'+a[attr]+'"');g+=" >",""!=i&&(g+='<iframe src="//www.facebook.com/video/embed?video_id='+t+'&enablejsapi=1&wmode=transparent" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=g+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var w="<iframe ";for(attr in""!=i&&(w+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');r+=w+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var b="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=b+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(u+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=u+="</div>";break;default:var d={content:""};jQuery(document).trigger("bwg_display_embed",[d,e,t,i,a]),r=d.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(ajax_url,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_main_ready(e){var t=e.data("bwg");1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),0<e.find(".wd_error").length&&bwg_container_loaded(t);var i=e.find(".bwg-container");if("album"===e.data("is-album"))var a="thumbnails";else a=e.data("gallery-type");switch(bwg_document_ready(e),a){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(i);break;case"thumbnails_mosaic":bwg_thumbnail_mosaic(i);break;case"slideshow":bwg_slideshow_ready(t);break;case"carousel":bwg_carousel_ready(t),bwg_carousel_onload(e);break;case"image_browser":bwg_image_browser_ready(e);break;case"blog_style":bwg_blog_style_ready(e)}}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_tags_button_section_visibility(){jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this),t=e.find(".current_view").val(),i=e.find(".show_bottom_tag").val(),a=e.find(".bwg_tags_container_"+t+" .bwg_tag_button_view_container");if(a.length)var r=a[0].scrollHeight;var _=a.find(".bwg_tags_filter_buttons").outerHeight(!0),s=parseInt(2*a.find(".bwg_tags_filter_buttons").outerHeight(!0)+3);s<r?(a.css({"min-height":_,"max-height":s,overflow:"hidden"}),a.next(".bwg_tag_button_see_all").show()):(a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}),a.next(".bwg_tag_button_see_all").hide());var o=a.next().find(".see_all_tags").width()/2;a.next().find(".see_all_tags").attr("style","margin-left: -"+o+"px"),a.next().find(".see_all_tags").off("click").on("click",function(){jQuery(this).hasClass("show")?(jQuery(this).removeClass("show").addClass("hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"})):jQuery(this).hasClass("hide")&&(jQuery(this).removeClass("hide").addClass("show").html("<span>&#43;</span>"+bwg_objectsL10n.bwg_tag_see_all),a.css({"min-height":_,"max-height":s,overflow:"hidden"}))}),1==i&&(jQuery(this).find(".see_all_tags").removeClass("show").addClass("hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}))})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)})})}function bwg_blog_style_onload(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg");jQuery("#bwg_blog_style_"+bwg);jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){if(jQuery(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").length){jQuery(".fluid-width-video-wrapper").removeAttr("style");var t=jQuery(this).parents(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").contents();jQuery(this).parents(".fluid-width-video-wrapper").replaceWith(t)}jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(t){var e=t.data("bwg");bwg_container_loaded(e);var i=!1;t.find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(e,t.closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(t.attr("data-image-id"),t.closest(".bwg_container"),!0),!1});var a=window.location.hash.substring(1);a&&"-1"!=a.indexOf("bwg")&&(bwg_hash_array=a.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_carousel_focus(){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery(".bwg_carousel_image_container_"+bwg).length&&jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-pause")&&bwg_params_carousel[bwg].carousel.start()})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_blur(e){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).attr("data-bwg"),!e&&jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight||jQuery(".bwg_carousel_image_container_"+bwg).length&&bwg_params_carousel[bwg].carousel.pause()})}function bwg_carousel_ready(t){bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start()})}function bwg_carousel_onload(e){var t=e.data("bwg"),i=e.find(".bwg_carousel-container"+t);i.length&&(bwg_params_carousel[t]=i.data("params"),bwg_params_carousel[t].parent_width=0,bwg_carousel_watermark(t),bwg_carousel_params(t,!1),bwg_container_loaded(t))}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;a<bwg_params_carousel[t].carousel_r_width?r=a/bwg_params_carousel[t].carousel_r_width:a=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].parent_width!=a&&(bwg_params_carousel[t].parent_width=a,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*r),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*r),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:a*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*r}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel-container"+t).css({width:a,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),bwg_params_carousel[t].carousel&&!e||(e&&bwg_params_carousel[t].carousel&&bwg_params_carousel[t].carousel.pause(),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:a*r,containerHeight:bwg_params_carousel[t].image_height*r,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*r,largeFeatureHeight:bwg_params_carousel[t].image_height*r,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})))}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(i){if(jQuery("#bwg_slideshow_image_container_"+i).length){bwg_params[i]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+i).attr("data-params")),bwg_params[i].event_stack=[],bwg_container_loaded(i);var e=bwg_params[i].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+i).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i)?(parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i))%e.length:e.length-1,e,"",i),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+i).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),parseInt(jQuery("#bwg_current_image_key_"+i).val())+bwg_iterator(i)%e.length,e,"",i),!1});var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(i),jQuery(".bwg_slideshow_watermark_"+i).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+i).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+i).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(i)},500),"horizontal"==bwg_params[i].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+i).height(jQuery(".bwg_slideshow_image_wrap_"+i).height()-bwg_params[i].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+i).width(jQuery(".bwg_slideshow_image_wrap_"+i).width()-bwg_params[i].slideshow_filmstrip_width);var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_slideshow_filmstrip_"+i).bind(a,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+i).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+i).trigger("click"),!1}),jQuery(".bwg_slideshow_filmstrip_right_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500))}),jQuery(".bwg_slideshow_filmstrip_left_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500))}),"width"==bwg_params[i].width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).width(),i):bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).height(),i),jQuery("#bwg_slideshow_play_pause_"+i).off(t).on(t,function(){jQuery(".bwg_ctrl_btn_"+i).hasClass("bwg-icon-play")?(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).play()):(window.clearInterval(window["bwg_playInterval"+i]),jQuery(".bwg_slideshow_play_pause_"+i).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-play bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).pause())}),0!=bwg_params[i].enable_slideshow_autoplay&&(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&jQuery("#bwg_audio_"+i).length&&document.getElementById("bwg_audio_"+i).play()),bwg_params[i].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),i),jQuery(".bwg_slideshow_image_"+i).removeAttr("width"),jQuery(".bwg_slideshow_image_"+i).removeAttr("height")}}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(e){var t=e.data("bwg");bwg_container_loaded(t),jQuery(".image_browser_images_conteiner_"+t).length&&(bwg_params_ib[t]=JSON.parse(jQuery(".image_browser_images_conteiner_"+t).attr("data-params")),setTimeout(function(){bwg_image_browser(t)},3))}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i<o;i++)l.push(0);_.find(".bwg-item").each(function(){var e=l.indexOf(Math.min.apply(Math,l));jQuery(this).css({height:s,order:e+1}),l[e]+=jQuery(this)[0].getBoundingClientRect().width});var n=Math.max.apply(Math,l);for(_.width(n),i=0;i<o;i++)l[i]<n&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),w=_.data("thumbnail-border"),b=_.data("thumbnail-padding"),u=(o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o<u&&(u=o);var d=_.find(".bwg-item").length;d<u&&(u=d);var h,m,p=100/u,c=[];for(i=0;i<u;i++)c.push(0);_.find(".bwg-item").each(function(){var e=c.indexOf(Math.min.apply(Math,c));if(jQuery(this).css({width:p+"%",order:e+1}),0<jQuery(this).find("img").attr("data-width").length&&0<jQuery(this).find("img").attr("data-height").length){m=jQuery(this).find("img").data("width")/jQuery(this).find("img").data("height"),h=(jQuery(this).find("img").width()-b/u)/m,title_h=this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2")||!this.querySelector("a .bwg-title2")?0:this.querySelector("a .bwg-title2").getClientRects()[0].height,desc_h=0<jQuery(this).find(".bwg-masonry-thumb-description").length?jQuery(this).find(".bwg-masonry-thumb-description").height():0;var t=title_h+desc_h;jQuery(this).height(Math.floor(h+t+2*w))}c[e]+=jQuery(this)[0].getBoundingClientRect().height});var y=Math.max.apply(Math,c);for(i=0;i<u;i++)c[i]<y&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:p+"%",order:i+1,height:y-c[i]}));_.outerWidth(u*(g+2*w)),_.height(y)}if(""!=a.html()){r.outerWidth(u*(g+2*w)),"0"!=y?(r.css("opacity","1"),r.height(y)):r.css("opacity","0"),r.empty();var f=a.html();r.append(f),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden"),jQuery(".bwg_container img").removeAttr("width").removeAttr("height")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,r=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var _=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*_;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*_;else s=_;else s=_;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),t=t*s/i,c.eq(e).height(s),c.eq(e).width(t)});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*r,n=0,g=[];g[0]=0;var w=[],b=w[0]=0;c.each(function(e){row_cum_width2=b+c.eq(e).width()+2*r,row_cum_width2-o<0?(b=row_cum_width2,g[e]=n,w[n]++):e!==c.length-1?Math.abs(b-o)>Math.abs(row_cum_width2-o)||Math.abs(b-o)<=Math.abs(row_cum_width2-o)&&0==w[n]?e!==c.length-2?(b=row_cum_width2,g[e]=n,w[n]++,w[++n]=0,b=0):(b=row_cum_width2,g[e]=n,w[n]++):(w[++n]=1,g[e]=n,b=row_cum_width2-b):(b=row_cum_width2,g[e]=n,w[n]++)});for(var u=[],d=[],h=0;h<=n;h++)u[h]=1,d[h]=l;for(h=0;h<=n;h++)b=0,c.each(function(e){g[e]==h&&(b+=c.eq(e).width())}),u[h]=C=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(O=[])[0]=0;var m=[],p=[];m[0]=0,p[0]=0;for(h=1;h<=n;h++)m[h]=m[0],p[h]=p[h-1]+d[h-1];c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[g[e]]),c.eq(e).height(i*u[g[e]]),c.eq(e).parent().css({top:p[g[e]],left:m[g[e]]}),m[g[e]]+=t*u[g[e]]+2*r,O[g[e]]=e}),jQuery("#"+i).height(p[n]+d[n]-p[0])}else{var c,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0<jQuery(".header-content-with_tab").length)f=jQuery(".header-content-with_tab").width()/4-10}else f=y;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){jQuery(this).removeAttr("style"),jQuery(this).parent().removeAttr("style");var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),c.eq(e).height(i*f/t),c.eq(e).width(f)});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var j=f+2*r<o?f:o-2*r,Q=Math.floor(o/(j+2*r)),v=[];v[0]=0;for(var x=[],k=[],C=0;C<Q;C++)k[C]=0,x[C]=0;c.each(function(e){for(var t=0,i=k[0],a=0;a<Q;a++)i>k[a]&&(i=k[a],t=a);v[e]=t,x[t]++,H=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:H,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var z=0,I=[],E=0,M=0;for(C=0;C<Q;C++)z+=j,I[C]=0,c.each(function(e){v[e]==C&&(I[C]+=c.eq(e).height())}),0!=I[C]&&(E+=j/I[C],M+=j*x[C]*2*r/I[C]);var S=0;0!=E&&(S=(z+M)/E);for(C=0;C<Q;C++)0!=I[C]&&(u[C]=(S-2*x[C]*r)/I[C]);var O,T=[];T[0]=0;for(C=1;C<=Q;C++)T[C]=T[C-1]+j*u[C-1]+2*r;var H=[];for(C=0;C<Q;C++)H[C]=0;(O=[])[0]=0,c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[v[e]]),c.eq(e).height(i*u[v[e]]),c.eq(e).parent().css({top:H[v[e]],left:T[v[e]]}),H[v[e]]+=i*u[v[e]]+2*r,O[v[e]]=e}),jQuery("#"+i).width(T[Q]).height(H[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(t.data("bwg"),t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(t,e,i){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+t).width();jQuery(this).find(".bwg_mosaic_title_spun1_"+t).width(e),jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:1,"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(document).off("click",".bwg-album").on("click",".bwg-album",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(document).on("click",".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t,i="",a="",r=(a=jQuery(e).parent().parent().hasClass("bwg_tag_buttons_view")?jQuery(e).parent().parent():jQuery(e).parent().parent().parent()).find(".current_view").val(),_=a.find(".form_id").val(),s=a.find(".cur_gal_id").val(),o=a.find(".album_gallery_id").val(),l=a.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){i=i+jQuery(e).text()+","}),""==(i=i.slice(0,-1))&&(i=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",i),jQuery(e).parent().find(".CaptionCont .placeholder").html(i);var n=jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+s).val();t="string"==typeof n&&""!==n?n.split(","):[],"object"==typeof n&&(t=n),jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+r).val(t),bwg_select_tag(r,_,s,o,l,!1)}function bwg_document_ready(i){bwg_add_lightbox(),i.data("right-click-protection")&&bwg_disable_right_click(i),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var e=i.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&e.length)for(var t=0;t<e[0].length;t++)void 0===e[0][t].attributes.selected&&(e[0][t].selected=!1);e.length&&(e.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),e.off("change").on("change",function(){bwg_filter_by_tag(this)}));var a=i.find(".cur_gal_id").val(),r=i.find(".current_view").val(),_=i.find(".bwg_tags_container_"+r+" .bwg_tag_button_view_container"),s=i.find("#bwg_tag_id_"+a),o=parseInt(2*_.find(".bwg_tags_filter_buttons").outerHeight(!0));_.length&&(_.find(".bwg_tags_filter_buttons").off("click").on("click",function(){if(!jQuery(this).hasClass("active")){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1"),""==s.val()?s.val(jQuery(this).val()):s.val(s.val()+","+jQuery(this).val()),bwg_filter_by_tag(this)}return!1}),_.find(".bwg_all_tags").off("click").on("click",function(){return jQuery(this).hasClass("active")||(s.val(""),bwg_filter_by_tag(this)),!1}),""!=s.val()&&_.find(".bwg_all_tags").removeClass("active"),s.val().split(",").forEach(function(t){_.find(".bwg_tags_filter_buttons").each(function(){if(jQuery(this).val()==t){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1")}})}),bwg_tags_button_section_visibility());var l=i.find(".bwg_order");l.length&&l.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))}),jQuery(".search_tags").on("sumo:opened",function(){var e=jQuery(this).parents(".bwg_container").height(),t=jQuery(this).parents(".bwg_container").find(".SumoSelect>.optWrapper>.options");void 0!==t&&(e-50<t.height()&&t.css("max-height",e-50));0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var n=window.location.hash.substring(1);if(n&&"-1"!=n.indexOf("bwg")){bwg_hash_array=n.replace("bwg","").split("/");var g=jQuery(".bwg_container");g&&bwg_gallery_box(bwg_hash_array[1],g,!1,bwg_hash_array[0])}bwg_resize_search_line()}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return"Enter"!=t.key||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,n,g,w){if("1"!=bwg_objectsL10n.front_ajax||!0===n){jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),"function"==typeof bwg_scroll_load_action&&jQuery(window).off("scroll",bwg_scroll_load_action),jQuery(".bwg_thumbnail .search_tags").off("sumo:closed");var b=jQuery("#"+t).data("ajax-url"),u=0;if(void 0===n)n=!1;var d,h=jQuery("#page_number_"+i).val(),m=jQuery("#bwg_search_input_"+i).val(),p={},c=jQuery("#bwg_album_breadcrumb_"+i).val();if(c&&!0!==n){var y=JSON.parse(c);if("back"==r){y.splice(-1,1);var f=y.slice(-1)[0];r=f.id,h=f.page,p["action_"+i]="back"}else"numeric"===n||s?(y.splice(-1,1),y.push({id:r,page:h,search:m})):(y.push({id:r,page:1}),h=1);p["bwg_album_breadcrumb_"+i]=JSON.stringify(y)}if(p.gallery_type=jQuery("#"+t).data("gallery-type"),p.gallery_id=jQuery("#"+t).data("gallery-id"),p.tag=jQuery("#"+t).data("tag"),p.album_id=jQuery("#"+t).data("album-id"),p.theme_id=jQuery("#"+t).data("theme-id"),p.shortcode_id=jQuery("#"+t).data("shortcode-id"),p.bwg=i,p.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(h=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(void 0===w)w=!0;if(1==w&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),p["page_number_"+i]=h,p["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),p["album_gallery_id_"+i]=r,p["type_"+i]=_,p["title_"+i]=o,p["description_"+i]=g,p["sortImagesByValue_"+i]=l,p["bwg_random_seed_"+i]=jQuery("#bwg_random_seed_"+i).val(),0<jQuery("#bwg_search_input_"+i).length&&(p["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==p["bwg_album_breadcrumb_"+i]){var j=JSON.parse(p["bwg_album_breadcrumb_"+i]);jQuery.each(j,function(e,t){p["bwg_search_"+i]="",r==t.id&&(p["bwg_search_"+i]=t.search)})}var Q=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val();return d="string"==typeof Q&&""!==Q?Q.split(","):[],"object"==typeof Q&&(d=Q),p["bwg_tag_id_"+a]=d,jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),jQuery.ajax({type:"POST",url:b,data:p,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,u=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):a=="bwg_thumbnails_masonry_"+i?jQuery(".bwg-container-temp"+i).append(jQuery(e).closest(".bwg-container-"+i).html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e)},complete:function(){jQuery("div[id^='bwg_container1_'] img").each(function(){null!=jQuery(this).attr("data-lazy-src")&&""!=jQuery(this).attr("data-lazy-src")?jQuery(this).attr("src",jQuery(this).attr("data-lazy-src")):null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),jQuery(".blog_style_image_buttons_conteiner_"+i).find(jQuery(".bwg_blog_style_img_"+i)).on("load",function(){jQuery(".bwg_blog_style_img_"+i).closest(jQuery(".blog_style_image_buttons_conteiner_"+i)).show()}),""==d&&(d=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val(d),d.forEach(function(t){jQuery(".bwg_tags_container_"+i+" .bwg_tags_filter_buttons").each(function(){var e=parseInt(2*jQuery(this).outerHeight(!0));jQuery(this).val()==t&&(jQuery(this).addClass("active"),e<jQuery(this).position().top&&jQuery(".bwg_tags_container_"+i+" .show_bottom_tag").val("1"),jQuery(".bwg_tags_container_"+i+" .bwg_all_tags").removeClass("active"))})}),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(jQuery("#bwg_container1_"+i));var e=jQuery("#bwg_container1_"+i).data("gallery-type");if(jQuery(".bwg-album-thumbnails").length){bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i)}else{switch(e){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(".bwg-container-"+i);break;case"slideshow":bwg_slideshow_ready(i);break;case"carousel":bwg_carousel_ready(i),bwg_carousel_onload(jQuery("#bwg_container1_"+i));break;case"image_browser":bwg_image_browser_ready(jQuery("#bwg_container1_"+i));break;case"blog_style":bwg_blog_style_ready(jQuery("#bwg_container1_"+i))}bwg_mosaic_ajax(i,u)}jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_16x9_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_instapost_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),jQuery("#bwg_embed_frame_16x9_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery("#bwg_embed_frame_16x9_"+i).height(.5625*jQuery("#bwg_embed_frame_16x9_"+i).width()),jQuery("#bwg_embed_frame_instapost_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery(".bwg_embed_frame_instapost_"+i).height((jQuery(".bwg_embed_frame_instapost_"+i).width()-16)*jQuery(".bwg_embed_frame_instapost_"+i).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+i).attr("data-width")+96),jQuery("#bwg_search_input_"+i).val(p["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();jQuery("#bwg_container2_"+i+" .cur_gal_id").val();""==d&&(d=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+i).val(d)}}),!1}if("back"===r)return-1==document.referrer.indexOf(window.location.host)?(str=jQuery(location).attr("href"),void window.location.replace(str.substring(0,str.indexOf("type_0")))):void window.history.back();var v=jQuery("#bwg_search_input_"+i).val(),x=jQuery(".bwg_tags_container_"+i+" .cur_gal_id").val(),k=window.location.href,C="",z=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+x).val();if(jQuery(".bwg_tags_container_"+i).parent().hasClass("bwg_tag_select_view")&&(z=z.toString()),"#"==k.substr(-1)&&(k=k.slice(0,-1)),""!==v&&void 0!==v?!1!==(C=bwg_add_url_parameter(C=bwg_remove_url_parameter("page_number_"+i,k),"bwg_search_"+i,v))&&(k=C):!1!==(C=bwg_remove_url_parameter("bwg_search_"+i,k))&&(k=C),void 0!==l&&""!==l&&!1!==(C=bwg_add_url_parameter(k,"sort_by_"+i,l))&&(k=C),null!=z&&0<z.length){var I="",E=z.split(",");jQuery.each(E,function(e){var t=",";e===E.length-1&&(t=""),I+=E[e]+t}),""!==I&&!1!==(C=bwg_add_url_parameter(k,"filter_tag_"+i,I))&&(k=C)}else!1!==(C=bwg_remove_url_parameter("filter_tag_"+i,C))&&(k=C);window.location.href=k}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery(".bwg_tags_container_"+e+" #bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,n,g){var w,b=!1,u="";if(void 0!==g&&""!==g){b=!0,bwg_params[g].bwg_trans_in_progress=!0,u="_"+g,w=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else w=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(g))return bwg_fallback(o,l,n,g);if(!bwg_testBrowser_cssTransforms3d(g))return bwg_fallback3d(o,l,n,g);function d(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+u).removeAttr("style"),jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),jQuery(".bwg_image_info").show(),jQuery(o).html(""),b){bwg_change_watermark_container(g),bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].data,t=bwg_params[g].event_stack}else{e="";gallery_box_data.bwg_trans_in_progress=!1;t=gallery_box_data.event_stack}if(void 0!==t&&0<t.length){var i=t[0].split("-");t.shift(),bwg_change_image(i[0],i[1],e,!0,g)}bwg_change_watermark_container()}b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g),jQuery(".bwg_slide_bg_"+g).css("perspective",1e3)):(gallery_box_data.bwg_trans_in_progress=!0,jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_slide_bg").css("perspective",1e3)),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(l).css({opacity:1,backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".bwg_slider"+u).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+u).css({transition:"all "+w+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+u).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(d)),0==w&&d()}function bwg_cubeH(e,t,i,a){var r=jQuery(e).width()/2;"right"==i?bwg_cube(r,r,0,0,90,0,-90,e,t,i,a):"left"==i&&bwg_cube(r,-r,0,0,-90,0,90,e,t,i,a)}function bwg_cubeV(e,t,i,a){var r=jQuery(e).height()/2;"right"==i?bwg_cube(r,0,-r,90,0,-90,0,e,t,i,a):"left"==i&&bwg_cube(r,0,r,-90,0,90,0,e,t,i,a)}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_grid(e,t,i,a,r,_,s,o,l,n,g){var w,b=!1,u="";if(event_stack=void 0!==g&&""!==g?(b=!0,bwg_params[g].bwg_trans_in_progress=!0,u="_"+g,w=bwg_params[g].bwg_transition_duration,bwg_params[g].event_stack):(w=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.event_stack),!bwg_testBrowser_cssTransitions())return bwg_fallback(o,l,n);b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+u).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+u).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"));var d=w/(e+t);var h=jQuery(o).find("img"),m=jQuery(o).find("figure"),p=(jQuery(o).find("iframe").css("opacity",0),jQuery('<span style="display: block;" />').addClass("bwg_grid"+u));jQuery(o).prepend(p);var c,y,f,j,Q,v,x,k,C,z,I,E=jQuery(".bwg_slide_bg"+u),M=h.width(),S=h.height(),O=E.width(),T=E.height(),H=Math.floor(O/e),B=Math.floor(T/t),D=O-e*H,L=Math.ceil(D/e),A=T-t*B,W=Math.ceil(A/t),R=0,F=Math.ceil((jQuery(".bwg_slide_bg"+u).width()-h.width())/2),N=void 0===h.attr("src")?"":h.attr("src");a="min-auto"===(a="auto"===a?O:a)?-O:a,r="min-auto"===(r="auto"===r?T:r)?-T:r;for(var P=0;P<e;P++){var q=0,U=Math.floor((jQuery(".bwg_slide_bg"+u).height()-h.height())/2),V=H;if(0<D){var J=L<=D?L:D;V+=J,D-=J}for(var G=0;G<t;G++){var Y=B,$=A;0<$&&(Y+=J=W<=$?W:A,$-=J),p.append((c=V,y=Y,f=q,j=U,Q=R,v=F,x=N,k=M,C=S,z=g,void 0,I=(P+G)*d,jQuery('<span class="bwg_gridlet'+u+'" />').css({display:"block",width:c,height:y,top:f,left:Q,backgroundImage:'url("'+x+'")',backgroundColor:b?jQuery(".bwg_slideshow_image_wrap_"+z).css("background-color"):jQuery(".spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:v+"px "+j+"px",backgroundSize:k+"px "+C+"px",transition:"all "+w+"ms ease-in-out "+I+"ms",transform:"none"}))),q+=Y,U-=Y}F-=V,R+=V}var X=p.children().last();function K(){if(jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),h.css("opacity",1),m.css("opacity",1),p.remove(),b){bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].event_stack,t=bwg_params[g].data}else{gallery_box_data.bwg_trans_in_progress=!1;e=gallery_box_data.event_stack,t=""}if(jQuery(".bwg_image_info").show(),jQuery(o).html(""),void 0!==e&&0<e.length){var i=e[0].split("-");e.shift(),bwg_change_image(i[0],i[1],t,!0,g)}b?bwg_change_watermark_container(g):bwg_change_watermark_container()}p.show(),h.css("opacity",0),m.css("opacity",0),p.children().first().addClass("rs-top-left"),p.children().last().addClass("rs-bottom-right"),p.children().eq(t-1).addClass("rs-bottom-left"),p.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){p.children().css({opacity:s,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+_+")"})},1),jQuery(l).css("opacity",1),jQuery(X).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(K)),0==w&&K()}function bwg_sliceH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,8,0,r,0,1,0,e,t,i,a)}function bwg_sliceV(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(10,1,0,0,r,1,0,e,t,i,a)}function bwg_slideV(e,t,i,a){if("right"==i)var r="auto";else if("left"==i)r="min-auto";bwg_grid(1,1,0,0,r,1,1,e,t,i,a)}function bwg_slideH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,1,0,r,0,1,1,e,t,i,a)}function bwg_scaleOut(e,t,i,a){bwg_grid(1,1,0,0,0,1.5,0,e,t,i,a)}function bwg_scaleIn(e,t,i,a){bwg_grid(1,1,0,0,0,.5,0,e,t,i,a)}function bwg_blockScale(e,t,i,a){bwg_grid(8,6,0,0,0,.6,0,e,t,i,a)}function bwg_kaleidoscope(e,t,i,a){bwg_grid(10,8,0,0,0,1,0,e,t,i,a)}function bwg_fan(e,t,i,a){if("right"==i)var r=45,_=100;else if("left"==i)r=-45,_=-100;bwg_grid(1,10,r,_,0,1,0,e,t,i,a)}function bwg_blindV(e,t,i,a){bwg_grid(1,8,0,0,0,.7,0,e,t,"",a)}function bwg_blindH(e,t,i,a){bwg_grid(10,1,0,0,0,.7,0,e,t,"",a)}function bwg_random(e,t,i,a){var r=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["bwg_"+r[Math.floor(Math.random()*r.length)]](e,t,i,a)}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+o&&(o=0),0<n+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+o},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+s},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}})}function bwg_filmstrip_arrows(e){var t=void 0!==e&&""!==e?"_"+e:"",i=void 0!==e&&""!==e?"_slideshow":"";if("width"==(void 0!==e&&""!==e?bwg_params[e].width_or_heigh:gallery_box_data.width_or_height))var a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).width(),r=jQuery(".bwg"+i+"_filmstrip"+t).width();else a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).height(),r=jQuery(".bwg"+i+"_filmstrip"+t).height();a<r?(jQuery(".bwg"+i+"_filmstrip_left"+t).hide(),jQuery(".bwg"+i+"_filmstrip_right"+t).hide()):(jQuery(".bwg"+i+"_filmstrip_left"+t).show(),jQuery(".bwg"+i+"_filmstrip_right"+t).show())}function bwg_move_filmstrip(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==n?(t=jQuery(".bwg"+l+"_filmstrip"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip"+o).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerHeight(!0)),s="left"==g?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+o).position().top,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top)+t),i<t||(a<Math.abs(_)?"left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}})))}function bwg_move_dots(e){var t=jQuery(".bwg_slideshow_dots_active_"+e).position().left,i=jQuery(".bwg_slideshow_dots_active_"+e).position().left+jQuery(".bwg_slideshow_dots_active_"+e).outerWidth(!0),a=jQuery(".bwg_slideshow_dots_container_"+e).outerWidth(!0),r=jQuery(".bwg_slideshow_dots_thumbnails_"+e).outerWidth(!1),_=jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left,s=Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left)+a;r<a||(t<Math.abs(_)?jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-t},{duration:500,complete:function(){}}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500,complete:function(){}}))}function bwg_testBrowser_cssTransitions(e){return bwg_testDom("Transition",e)}function bwg_testBrowser_cssTransforms3d(e){return bwg_testDom("Perspective",e)}function bwg_testDom(e,t){for(var i=["","Webkit","Moz","ms","O","Khtml"],a=i.length;a--;)if(void 0!==document.body.style[i[a]+e])return!0;return!1}function bwg_fallback(e,t,i,a){bwg_fade(e,t,i,a)}function bwg_fallback3d(e,t,i,a){bwg_sliceV(e,t,i,a)}function bwg_none(e,t,i,a){var r=void 0!==a&&""!==a?"_"+a:"";if(jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),void 0!==a&&""!==a){var _=bwg_params[a].bwg_current_key;bwg_change_watermark_container(a),jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).removeClass("bwg_slideshow_thumb_active"+r).addClass("bwg_slideshow_thumb_deactive"+r),jQuery("#bwg_filmstrip_thumbnail_"+_+r).removeClass("bwg_slideshow_thumb_deactive"+r).addClass("bwg_slideshow_thumb_active"+r),jQuery(".bwg_slideshow_dots"+r).removeClass("bwg_slideshow_dots_active"+r).addClass("bwg_slideshow_dots_deactive"+r),jQuery("#bwg_dots_"+_+r).removeClass("bwg_slideshow_dots_deactive"+r).addClass("bwg_slideshow_dots_active"+r)}else jQuery(".bwg_image_info").show(),gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),bwg_change_watermark_container()}function bwg_iterator(e){var t=1;return void 0!==e&&""!==e&&void 0!==bwg_params[e]&&1==bwg_params[e].enable_slideshow_shuffle&&(t=Math.floor((bwg_params[e].data.length-1)*Math.random()+1)),t}function bwg_change_image_slideshow(e,t,i,a,r){i=bwg_params[r].data;if(jQuery("#bwg_slideshow_image_container_"+r).find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#image_id_"+r+"_"+i[e].id).find(".bwg_fb_video").each(function(){jQuery(this).attr("src",jQuery(this).attr("src"))}),i[t]){if(jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-pause")&&bwg_play(bwg_params[r].data,r),a||(jQuery("#bwg_current_image_key_"+r).val(t),"-1"==e?e=jQuery(".bwg_slideshow_thumb_active_"+r).children("img").attr("image_key"):"-2"==e&&(e=jQuery(".bwg_slideshow_dots_active_"+r).attr("image_key"))),bwg_params[r].bwg_trans_in_progress)return void bwg_params[r].event_stack.push(e+"-"+t);var _="right";if(t<e)_="left";else if(e==t)return;jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),"width"==bwg_params[r].width_or_height?bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).width()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width):bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).height()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width),e=t,bwg_params[r].bwg_current_key=e,jQuery("#bwg_slideshow_image_"+r).attr("image_id",i[t].id),jQuery(".bwg_slideshow_title_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1<i[t].filetype.indexOf("EMBED_"),n=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),g=-1<i[t].filetype.indexOf("INSTAGRAM_VIDEO"),w=jQuery(s).height(),b=jQuery(s).width(),u='<span class="bwg_slideshow_image_spun1_'+r+'" style="display: '+(l?"block":"table")+' ;width: inherit; height: inherit;"><span class="bwg_slideshow_image_spun2_'+r+'" style="display: '+(l?"block":"table-cell")+'; vertical-align: middle; text-align: center; ">';if(l){if(u+='<span style="height: '+w+"px; width: "+b+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(u+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var d=0,h=0;w<b+88?d=(h=w)-88:h=(d=b)+88,u+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame","data-width":i[t].image_width,"data-height":i[t].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+d+"px; height:"+h+"px; vertical-align:middle; display:inline-block; position:relative;"})}else u+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});u+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var m="";"open_lightbox"==bwg_params[r].thumb_click_action?m+=' class="bwg_lightbox" data-image-id="'+i[t].id+'" data-elementor-open-lightbox="no"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(m+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),u+="<a "+m+">"}u+='<img style="max-height: '+w+"px !important; max-width: "+b+'px !important; display:inline-block;" ',u+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',u+=' id="bwg_slideshow_image_'+r+'" ',u+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}u+="</span></span>",jQuery(o).html(u),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),0<bwg_params[r].enable_slideshow_filmstrip?bwg_move_filmstrip(r):bwg_move_dots(r),i[t].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+r).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+r).css({display:""})}bwg_add_lightbox()}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=jQuery("#bwg_container1_"+e).parent();t.hasClass("elementor-tab-content")&&t.width(t.closest(".elementor-widget-wrap").width());var i=t.width(),a=bwg_params[e].data;if(i>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var r="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,_="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:r}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:_}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" :hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size})}else jQuery(".bwg_slideshow_image_wrap_"+e).css({width:i}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(i*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:"width: "+(i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(i*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e),"horizontal"==bwg_params[e].filmstrip_direction?(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({width:i}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:i-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:i}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:i*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:i*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:i*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:i*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*i*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*i*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});a[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){var t=jQuery(".bwg_slideshow_embed_"+e).width(),i=jQuery(".bwg_slideshow_embed_").height();jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+96)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=jQuery(".bwg_image_container").width(),i=jQuery(".bwg_image_container").height();jQuery(".inner_instagram_iframe_bwg_embed_frame").each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+176)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-176)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96)),e.css({top:.5*(i-e.height())})}),bwg_change_watermark_container()}}function bwg_play(t,i){if(void 0!==i&&""!==i)t=bwg_params[i].data;void 0!==i&&""!==i?(window.clearInterval(window["bwg_playInterval"+i]),window["bwg_playInterval"+i]=setInterval(function(){var e=1;1==bwg_params[i].enable_slideshow_shuffle&&(e=Math.floor((t.length-1)*Math.random()+1)),bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),(parseInt(jQuery("#bwg_current_image_key_"+i).val())+e)%t.length,t,"",i)},1e3*bwg_params[i].slideshow_interval)):(window.clearInterval(gallery_box_data.bwg_playInterval),gallery_box_data.bwg_playInterval=setInterval(function(){jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")||(void 0===t||void 0!==t[parseInt(jQuery("#bwg_current_image_key").val())+1]?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):1==gallery_box_data.enable_loop&&bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0))},1e3*gallery_box_data.slideshow_interval))}function bwg_image_browser(e){if(jQuery("#bwg_embed_frame_16x9_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery("#bwg_embed_frame_16x9_"+e).height(.5625*jQuery("#bwg_embed_frame_16x9_"+e).width()),jQuery("#bwg_embed_frame_instapost_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").length){var t=jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").contents();jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").replaceWith(t)}jQuery(".bwg_embed_frame_instapost_"+e).height((jQuery(".bwg_embed_frame_instapost_"+e).width()-16)*jQuery(".bwg_embed_frame_instapost_"+e).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+e).attr("data-width")+96);var i=jQuery(".image_browser_images_"+e).width();i<=108?jQuery(".paging-input_"+e).css("display","none"):(i<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):i<=580?(jQuery(".paging-input_"+e).css("display","inline"),jQuery(".tablenav-pages_"+e+" a").css("font-size","13px"),jQuery(".paging-input_"+e).css("margin","0% 7% 0% 7%")):(jQuery(".tablenav-pages_"+e+" a").css("font-size","15px"),jQuery(".paging-input_"+e).css("margin","0% 14% 0% 14%"),jQuery(".paging-input_"+e).css("display","inline")),jQuery(".tablenav-pages_"+e+" .next-page").css("margin","0% 0% 0% 0%"),jQuery(".tablenav-pages_"+e+" .prev-page").css("margin","0% 0% 0% 0%"))}function bwg_disable_right_click(e){e.bind("contextmenu",function(){return!1}),e.css("webkitTouchCallout","none")}jQuery(function(){function i(e){bwg_slideshow_blur(e),bwg_carousel_blur(e),0<jQuery(".bwg_play_pause").length&&window.clearInterval(gallery_box_data.bwg_playInterval)}function a(e){e&&bwg_main_ready(e),bwg_slideshow_focus(),bwg_carousel_focus(),jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")&&bwg_play(gallery_box_data.data)}var r=!1;jQuery(".bwg_container").each(function(){if(0<jQuery(this).find(".wd_error").length&&(r=!0),!r){var e=jQuery(this);if(e[0].offsetHeight)var t=0;else t=1;setInterval(function(){e[0].offsetHeight?1==t&&(t=0,a(e)):0==t&&i(!(t=1))},200)}}),r||jQuery(window).focus(function(){a()}).blur(function(){i(!0)})}),jQuery(window).on("resize",function(){setTimeout(function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),bwg_tags_button_section_visibility(),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()},0)}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
1
+ var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");void 0!==e&&bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.is_pro&&1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&parseInt(jQuery(".spider_popup_close").css("right"))<0&&jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;if(1==gallery_box_data.is_pro){1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id))}1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().left&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_zoom").on(a,function(){var e=["mousemove","touchmove"];jQuery("figure.bwg_popup_image").each(function(){var i=jQuery(this);i.hasClass("zoom")?jQuery.each(e,function(e,t){i.removeClass("zoom"),i.off(t)}):jQuery.each(e,function(e,t){i.addClass("zoom"),i.on(t,function(e){window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause");var t=e.target,i=document.querySelector("span.bwg_popup_image_spun2").clientHeight,a=document.querySelector("span.bwg_popup_image_spun2").clientWidth,r=document.querySelector("figure.zoom.bwg_popup_image").clientHeight,_=document.querySelector("figure.zoom.bwg_popup_image").clientWidth;e.offsetX?offsetX=e.offsetX:offsetX=e.targetTouches?e.targetTouches[0].pageX*(_/a):0,e.offsetY?offsetY=e.offsetY:offsetY=e.targetTouches?e.targetTouches[0].pageY*(r/i):0,x=offsetX/t.offsetWidth*100,y=offsetY/t.offsetHeight*100,t.parentNode.style.backgroundPosition=x+"% "+y+"%"})})})}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,a,r,_,s,o,l){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+a+"px; height:"+r+"px; margin-top:-"+r/2+"px; margin-left: -"+a/2+'px; ">'+e+"</div>").hide().appendTo("body");if(gallery_box_ready(),spider_showpopup(s,o,t,_,l),"undefined"!=typeof addthis){jQuery(".addthis-smartlayers").show();var i=setInterval(function(){void 0!==addthis.layers.refresh&&(clearInterval(i),addthis.layers.refresh())},100)}},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process())}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){jQuery(".addthis-smartlayers").hide(),null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();bwg_objectsL10n.is_pro&&history.pushState(history.state,null,window.location.origin+window.location.pathname+window.location.search),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i){var e={};return e.image_id=jQuery("#"+i+" input[name='image_id']").val(),e.rate=jQuery("#"+i+" input[name='score']").val(),e.ajax_task=jQuery("#rate_ajax_task").val(),jQuery.ajax({type:"POST",url:jQuery("#"+i).attr("action"),data:e,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=t.find(".cur_gal_id").val(),o=jQuery("#bwg_tag_id_"+s).val();o=o||0;var l=1==i?"&open_ecommerce=1":"",n=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";n=n||"",void 0!==a&&(r+="&gallery_id="+a);var w="",b=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==b&&!1!==b&&(w="&open_comment=1"),spider_createpopup(r+"&bwg_random_seed="+jQuery("#bwg_random_seed_"+_).val()+"&image_id="+e+"&filter_tag="+o+l+w+"&filter_search_name="+n+g,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,""==gallery_box_data.data[a].alt&&""==gallery_box_data.data[a].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show(),jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,bwg_objectsL10n.is_pro&&(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id)),jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("<span />").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("<span />").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1<r[a].filetype.indexOf("EMBED_"),n=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),g=-1<r[a].filetype.indexOf("INSTAGRAM_VIDEO"),w=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),b=jQuery(s).height(),u=jQuery(s).width(),d='<span class="bwg_popup_image_spun1" style="display: '+(l?"block":"table")+'; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:'+(l?"block":"table-cell")+'; vertical-align: middle;text-align: center;height: 100%;">';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),d+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(w?"block":"table")+'; table-layout: fixed; height: 100%;">'+(g?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),n){var h=0,m=0;b<u+88?h=(m=b)-88:m=(h=u)+88,d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":r[a].image_width,"data-height":r[a].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+h+"px; height:"+m+"px; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(w?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});d+="</span>"}else{jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden");var p=(gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()).split("?bwg")[0];gallery_box_data.popup_enable_zoom&&(d+='<figure style="max-height: '+b+"px; max-width: "+u+"px; background-image: url("+p+')" class="bwg_popup_image bwg_popup_watermark" alt="'+r[a].alt+'" />'),d+='<img style="max-height: '+b+"px; max-width: "+u+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />'}function c(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/share?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&bwg_move_filmstrip(),bwg_resize_instagram_post()}if(gallery_box_data.popup_enable_zoom?d+="</figure></span></span>":d+="</span></span>",jQuery(o).html(d),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:u,maxHeight:b,height:"auto"}),l)c();else jQuery(o).find("img").one("load",function(){c()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process()}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),1!=gallery_box_data.open_with_fullscreen&&(gallery_box_data.lightbox_close_btn_right<0&&jQuery("#spider_popup_wrap").width()-2*gallery_box_data.lightbox_close_btn_right>=jQuery(window).width()||gallery_box_data.lightbox_close_btn_top<0&&jQuery("#spider_popup_wrap").height()-2*gallery_box_data.lightbox_close_btn_top>=jQuery(window).height()?jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"):jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"));var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)&&jQuery("#bwg_star").raty({score:function(){return jQuery(this).attr("data-score")},starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,readOnly:function(){return!!e},noRatedMsg:"Not rated yet.",click:function(t,e){jQuery("#bwg_star").hide(),jQuery("#bwg_rated").show(),spider_set_input_value("rate_ajax_task","save_rate"),jQuery.when(spider_rate_ajax_save("bwg_rate_form")).then(function(){gallery_box_data.data[a].rate=t,++gallery_box_data.data[a].rate_count;var e=parseFloat(jQuery("#bwg_star").attr("data-score"));gallery_box_data.data[a].avg_rating=e?((e+t)/2).toFixed(1):t.toFixed(1),bwg_rating(gallery_box_data.data[a].rate,gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating,gallery_box_data.current_image_key)})},starHalf:"bwg-icon-"+lightbox_rate_icon+("star"==lightbox_rate_icon?"-half":"")+"-o",starOff:"bwg-icon-"+lightbox_rate_icon+"-o",starOn:"bwg-icon-"+lightbox_rate_icon,cancelOff:"bwg-icon-minus-square-o",cancelOn:"bwg-icon-minus-square-o",cancel:!1,cancelHint:"Cancel your rating.",hints:[r,r,r,r,r],alreadyRatedMsg:parseFloat(i).toFixed(1)+"\nYou have already rated.\nVotes: "+t})}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+decodeURIComponent(t)+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<img src="'+decodeURIComponent(t)+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=">",""!=t&&(l+='<div class="inner_instagram_iframe_'+obj_class+'" frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen style="max-width: 100% !important; max-height: 100% !important; width: 100%; height: 100%; margin:0; vertical-align:middle;">'+atob(t)+"</div>"),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var n="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(n+=" "+attr+'="'+a[attr]+'"');n+=" >",""!=i&&(n+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=n+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var g="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(g+=" "+attr+'="'+a[attr]+'"');g+=" >",""!=i&&(g+='<iframe src="//www.facebook.com/video/embed?video_id='+t+'&enablejsapi=1&wmode=transparent" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=g+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var w="<iframe ";for(attr in""!=i&&(w+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');r+=w+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var b="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=b+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(u+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=u+="</div>";break;default:var d={content:""};jQuery(document).trigger("bwg_display_embed",[d,e,t,i,a]),r=d.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(ajax_url,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_main_ready(e){var t=e.data("bwg");1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),0<e.find(".wd_error").length&&bwg_container_loaded(t);var i=e.find(".bwg-container");if("album"===e.data("is-album"))var a="thumbnails";else a=e.data("gallery-type");switch(bwg_document_ready(e),a){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(i);break;case"thumbnails_mosaic":bwg_thumbnail_mosaic(i);break;case"slideshow":bwg_slideshow_ready(t);break;case"carousel":bwg_carousel_ready(t),bwg_carousel_onload(e);break;case"image_browser":bwg_image_browser_ready(e);break;case"blog_style":bwg_blog_style_ready(e)}}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_tags_button_section_visibility(){jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this),t=e.find(".current_view").val(),i=e.find(".show_bottom_tag").val(),a=e.find(".bwg_tags_container_"+t+" .bwg_tag_button_view_container");if(a.length)var r=a[0].scrollHeight;var _=a.find(".bwg_tags_filter_buttons").outerHeight(!0),s=parseInt(2*a.find(".bwg_tags_filter_buttons").outerHeight(!0)+3);s<r?(a.css({"min-height":_,"max-height":s,overflow:"hidden"}),a.next(".bwg_tag_button_see_all").show()):(a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}),a.next(".bwg_tag_button_see_all").hide());var o=a.next().find(".see_all_tags").width()/2;a.next().find(".see_all_tags").attr("style","margin-left: -"+o+"px"),a.next().find(".see_all_tags").off("click").on("click",function(){jQuery(this).hasClass("show")?(jQuery(this).removeClass("show").addClass("hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"})):jQuery(this).hasClass("hide")&&(jQuery(this).removeClass("hide").addClass("show").html("<span>&#43;</span>"+bwg_objectsL10n.bwg_tag_see_all),a.css({"min-height":_,"max-height":s,overflow:"hidden"}))}),1==i&&(jQuery(this).find(".see_all_tags").removeClass("show").addClass("hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}))})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)})})}function bwg_blog_style_onload(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg");jQuery("#bwg_blog_style_"+bwg);jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){if(jQuery(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").length){jQuery(".fluid-width-video-wrapper").removeAttr("style");var t=jQuery(this).parents(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").contents();jQuery(this).parents(".fluid-width-video-wrapper").replaceWith(t)}jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(t){var e=t.data("bwg");bwg_container_loaded(e);var i=!1;t.find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(e,t.closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(t.attr("data-image-id"),t.closest(".bwg_container"),!0),!1});var a=window.location.hash.substring(1);a&&"-1"!=a.indexOf("bwg")&&(bwg_hash_array=a.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_carousel_focus(){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery(".bwg_carousel_image_container_"+bwg).length&&jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-pause")&&bwg_params_carousel[bwg].carousel.start()})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_blur(e){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).attr("data-bwg"),!e&&jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight||jQuery(".bwg_carousel_image_container_"+bwg).length&&bwg_params_carousel[bwg].carousel.pause()})}function bwg_carousel_ready(t){bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start()})}function bwg_carousel_onload(e){var t=e.data("bwg"),i=e.find(".bwg_carousel-container"+t);i.length&&(bwg_params_carousel[t]=i.data("params"),bwg_params_carousel[t].parent_width=0,bwg_carousel_watermark(t),bwg_carousel_params(t,!1),bwg_container_loaded(t))}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;a<bwg_params_carousel[t].carousel_r_width?r=a/bwg_params_carousel[t].carousel_r_width:a=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].parent_width!=a&&(bwg_params_carousel[t].parent_width=a,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*r),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*r),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:a*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*r}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel-container"+t).css({width:a,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),bwg_params_carousel[t].carousel&&!e||(e&&bwg_params_carousel[t].carousel&&bwg_params_carousel[t].carousel.pause(),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:a*r,containerHeight:bwg_params_carousel[t].image_height*r,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*r,largeFeatureHeight:bwg_params_carousel[t].image_height*r,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})))}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(i){if(jQuery("#bwg_slideshow_image_container_"+i).length){bwg_params[i]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+i).attr("data-params")),bwg_params[i].event_stack=[],bwg_container_loaded(i);var e=bwg_params[i].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+i).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i)?(parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i))%e.length:e.length-1,e,"",i),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+i).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),parseInt(jQuery("#bwg_current_image_key_"+i).val())+bwg_iterator(i)%e.length,e,"",i),!1});var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(i),jQuery(".bwg_slideshow_watermark_"+i).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+i).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+i).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(i)},500),"horizontal"==bwg_params[i].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+i).height(jQuery(".bwg_slideshow_image_wrap_"+i).height()-bwg_params[i].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+i).width(jQuery(".bwg_slideshow_image_wrap_"+i).width()-bwg_params[i].slideshow_filmstrip_width);var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_slideshow_filmstrip_"+i).bind(a,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+i).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+i).trigger("click"),!1}),jQuery(".bwg_slideshow_filmstrip_right_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500))}),jQuery(".bwg_slideshow_filmstrip_left_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500))}),"width"==bwg_params[i].width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).width(),i):bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).height(),i),jQuery("#bwg_slideshow_play_pause_"+i).off(t).on(t,function(){jQuery(".bwg_ctrl_btn_"+i).hasClass("bwg-icon-play")?(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).play()):(window.clearInterval(window["bwg_playInterval"+i]),jQuery(".bwg_slideshow_play_pause_"+i).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-play bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).pause())}),0!=bwg_params[i].enable_slideshow_autoplay&&(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&jQuery("#bwg_audio_"+i).length&&document.getElementById("bwg_audio_"+i).play()),bwg_params[i].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),i),jQuery(".bwg_slideshow_image_"+i).removeAttr("width"),jQuery(".bwg_slideshow_image_"+i).removeAttr("height")}}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(e){var t=e.data("bwg");bwg_container_loaded(t),jQuery(".image_browser_images_conteiner_"+t).length&&(bwg_params_ib[t]=JSON.parse(jQuery(".image_browser_images_conteiner_"+t).attr("data-params")),setTimeout(function(){bwg_image_browser(t)},3))}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i<o;i++)l.push(0);_.find(".bwg-item").each(function(){var e=l.indexOf(Math.min.apply(Math,l));jQuery(this).css({height:s,order:e+1}),l[e]+=jQuery(this)[0].getBoundingClientRect().width});var n=Math.max.apply(Math,l);for(_.width(n),i=0;i<o;i++)l[i]<n&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),w=_.data("thumbnail-border"),b=_.data("thumbnail-padding"),u=(o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o<u&&(u=o);var d=_.find(".bwg-item").length;d<u&&(u=d);var h,m,p=100/u,c=[];for(i=0;i<u;i++)c.push(0);_.find(".bwg-item").each(function(){var e=c.indexOf(Math.min.apply(Math,c));if(jQuery(this).css({width:p+"%",order:e+1}),0<jQuery(this).find("img").attr("data-width").length&&0<jQuery(this).find("img").attr("data-height").length){m=jQuery(this).find("img").data("width")/jQuery(this).find("img").data("height"),h=(jQuery(this).find("img").width()-b/u)/m,title_h=this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2")||!this.querySelector("a .bwg-title2")?0:this.querySelector("a .bwg-title2").getClientRects()[0].height,desc_h=0<jQuery(this).find(".bwg-masonry-thumb-description").length?jQuery(this).find(".bwg-masonry-thumb-description").height():0;var t=title_h+desc_h;jQuery(this).height(Math.floor(h+t+2*w))}c[e]+=jQuery(this)[0].getBoundingClientRect().height});var y=Math.max.apply(Math,c);for(i=0;i<u;i++)c[i]<y&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:p+"%",order:i+1,height:y-c[i]}));_.outerWidth(u*(g+2*w)),_.height(y)}if(""!=a.html()){r.outerWidth(u*(g+2*w)),"0"!=y?(r.css("opacity","1"),r.height(y)):r.css("opacity","0"),r.empty();var f=a.html();r.append(f),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden"),jQuery(".bwg_container img").removeAttr("width").removeAttr("height")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,r=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var _=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*_;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*_;else s=_;else s=_;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),t=t*s/i,c.eq(e).height(s),c.eq(e).width(t)});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*r,n=0,g=[];g[0]=0;var w=[],b=w[0]=0;c.each(function(e){row_cum_width2=b+c.eq(e).width()+2*r,row_cum_width2-o<0?(b=row_cum_width2,g[e]=n,w[n]++):e!==c.length-1?Math.abs(b-o)>Math.abs(row_cum_width2-o)||Math.abs(b-o)<=Math.abs(row_cum_width2-o)&&0==w[n]?e!==c.length-2?(b=row_cum_width2,g[e]=n,w[n]++,w[++n]=0,b=0):(b=row_cum_width2,g[e]=n,w[n]++):(w[++n]=1,g[e]=n,b=row_cum_width2-b):(b=row_cum_width2,g[e]=n,w[n]++)});for(var u=[],d=[],h=0;h<=n;h++)u[h]=1,d[h]=l;for(h=0;h<=n;h++)b=0,c.each(function(e){g[e]==h&&(b+=c.eq(e).width())}),u[h]=C=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(O=[])[0]=0;var m=[],p=[];m[0]=0,p[0]=0;for(h=1;h<=n;h++)m[h]=m[0],p[h]=p[h-1]+d[h-1];c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[g[e]]),c.eq(e).height(i*u[g[e]]),c.eq(e).parent().css({top:p[g[e]],left:m[g[e]]}),m[g[e]]+=t*u[g[e]]+2*r,O[g[e]]=e}),jQuery("#"+i).height(p[n]+d[n]-p[0])}else{var c,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0<jQuery(".header-content-with_tab").length)f=jQuery(".header-content-with_tab").width()/4-10}else f=y;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){jQuery(this).removeAttr("style"),jQuery(this).parent().removeAttr("style");var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),c.eq(e).height(i*f/t),c.eq(e).width(f)});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var j=f+2*r<o?f:o-2*r,Q=Math.floor(o/(j+2*r)),v=[];v[0]=0;for(var x=[],k=[],C=0;C<Q;C++)k[C]=0,x[C]=0;c.each(function(e){for(var t=0,i=k[0],a=0;a<Q;a++)i>k[a]&&(i=k[a],t=a);v[e]=t,x[t]++,H=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:H,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var z=0,I=[],E=0,M=0;for(C=0;C<Q;C++)z+=j,I[C]=0,c.each(function(e){v[e]==C&&(I[C]+=c.eq(e).height())}),0!=I[C]&&(E+=j/I[C],M+=j*x[C]*2*r/I[C]);var S=0;0!=E&&(S=(z+M)/E);for(C=0;C<Q;C++)0!=I[C]&&(u[C]=(S-2*x[C]*r)/I[C]);var O,T=[];T[0]=0;for(C=1;C<=Q;C++)T[C]=T[C-1]+j*u[C-1]+2*r;var H=[];for(C=0;C<Q;C++)H[C]=0;(O=[])[0]=0,c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[v[e]]),c.eq(e).height(i*u[v[e]]),c.eq(e).parent().css({top:H[v[e]],left:T[v[e]]}),H[v[e]]+=i*u[v[e]]+2*r,O[v[e]]=e}),jQuery("#"+i).width(T[Q]).height(H[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(t.data("bwg"),t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(t,e,i){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+t).width();jQuery(this).find(".bwg_mosaic_title_spun1_"+t).width(e),jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:1,"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(document).off("click",".bwg-album").on("click",".bwg-album",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(document).on("click",".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t,i="",a="",r=(a=jQuery(e).parent().parent().hasClass("bwg_tag_buttons_view")?jQuery(e).parent().parent():jQuery(e).parent().parent().parent()).find(".current_view").val(),_=a.find(".form_id").val(),s=a.find(".cur_gal_id").val(),o=a.find(".album_gallery_id").val(),l=a.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){i=i+jQuery(e).text()+","}),""==(i=i.slice(0,-1))&&(i=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",i),jQuery(e).parent().find(".CaptionCont .placeholder").html(i);var n=jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+s).val();t="string"==typeof n&&""!==n?n.split(","):[],"object"==typeof n&&(t=n),jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+r).val(t),bwg_select_tag(r,_,s,o,l,!1)}function bwg_document_ready(i){bwg_add_lightbox(),i.data("right-click-protection")&&bwg_disable_right_click(i),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var e=i.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&e.length)for(var t=0;t<e[0].length;t++)void 0===e[0][t].attributes.selected&&(e[0][t].selected=!1);e.length&&(e.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),e.off("change").on("change",function(){bwg_filter_by_tag(this)}));var a=i.find(".cur_gal_id").val(),r=i.find(".current_view").val(),_=i.find(".bwg_tags_container_"+r+" .bwg_tag_button_view_container"),s=i.find("#bwg_tag_id_"+a),o=parseInt(2*_.find(".bwg_tags_filter_buttons").outerHeight(!0));_.length&&(_.find(".bwg_tags_filter_buttons").off("click").on("click",function(){if(!jQuery(this).hasClass("active")){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1"),""==s.val()?s.val(jQuery(this).val()):s.val(s.val()+","+jQuery(this).val()),bwg_filter_by_tag(this)}return!1}),_.find(".bwg_all_tags").off("click").on("click",function(){return jQuery(this).hasClass("active")||(s.val(""),bwg_filter_by_tag(this)),!1}),""!=s.val()&&_.find(".bwg_all_tags").removeClass("active"),s.val().split(",").forEach(function(t){_.find(".bwg_tags_filter_buttons").each(function(){if(jQuery(this).val()==t){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1")}})}),bwg_tags_button_section_visibility());var l=i.find(".bwg_order");l.length&&l.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))}),jQuery(".search_tags").on("sumo:opened",function(){var e=jQuery(this).parents(".bwg_container").height(),t=jQuery(this).parents(".bwg_container").find(".SumoSelect>.optWrapper>.options");void 0!==t&&(e-50<t.height()&&t.css("max-height",e-50));0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var n=window.location.hash.substring(1);if(n&&"-1"!=n.indexOf("bwg")){bwg_hash_array=n.replace("bwg","").split("/");var g=jQuery(".bwg_container");g&&bwg_gallery_box(bwg_hash_array[1],g,!1,bwg_hash_array[0])}bwg_resize_search_line()}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return"Enter"!=t.key||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,n,g,w){if("1"!=bwg_objectsL10n.front_ajax||!0===n){jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),"function"==typeof bwg_scroll_load_action&&jQuery(window).off("scroll",bwg_scroll_load_action),jQuery(".bwg_thumbnail .search_tags").off("sumo:closed");var b=jQuery("#"+t).data("ajax-url"),u=0;if(void 0===n)n=!1;var d,h=jQuery("#page_number_"+i).val(),m=jQuery("#bwg_search_input_"+i).val(),p={},c=jQuery("#bwg_album_breadcrumb_"+i).val();if(c&&!0!==n){var y=JSON.parse(c);if("back"==r){y.splice(-1,1);var f=y.slice(-1)[0];r=f.id,h=f.page,p["action_"+i]="back"}else"numeric"===n||s?(y.splice(-1,1),y.push({id:r,page:h,search:m})):(y.push({id:r,page:1}),h=1);p["bwg_album_breadcrumb_"+i]=JSON.stringify(y)}if(p.gallery_type=jQuery("#"+t).data("gallery-type"),p.gallery_id=jQuery("#"+t).data("gallery-id"),p.tag=jQuery("#"+t).data("tag"),p.album_id=jQuery("#"+t).data("album-id"),p.theme_id=jQuery("#"+t).data("theme-id"),p.shortcode_id=jQuery("#"+t).data("shortcode-id"),p.bwg=i,p.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(h=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(void 0===w)w=!0;if(1==w&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),p["page_number_"+i]=h,p["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),p["album_gallery_id_"+i]=r,p["type_"+i]=_,p["title_"+i]=o,p["description_"+i]=g,p["sortImagesByValue_"+i]=l,p["bwg_random_seed_"+i]=jQuery("#bwg_random_seed_"+i).val(),0<jQuery("#bwg_search_input_"+i).length&&(p["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==p["bwg_album_breadcrumb_"+i]){var j=JSON.parse(p["bwg_album_breadcrumb_"+i]);jQuery.each(j,function(e,t){p["bwg_search_"+i]="",r==t.id&&(p["bwg_search_"+i]=t.search)})}var Q=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val();return d="string"==typeof Q&&""!==Q?Q.split(","):[],"object"==typeof Q&&(d=Q),p["bwg_tag_id_"+a]=d,jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),jQuery.ajax({type:"POST",url:b,data:p,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,u=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):a=="bwg_thumbnails_masonry_"+i?jQuery(".bwg-container-temp"+i).append(jQuery(e).closest(".bwg-container-"+i).html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e)},complete:function(){jQuery("div[id^='bwg_container1_'] img").each(function(){null!=jQuery(this).attr("data-lazy-src")&&""!=jQuery(this).attr("data-lazy-src")?jQuery(this).attr("src",jQuery(this).attr("data-lazy-src")):null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),jQuery(".blog_style_image_buttons_conteiner_"+i).find(jQuery(".bwg_blog_style_img_"+i)).on("load",function(){jQuery(".bwg_blog_style_img_"+i).closest(jQuery(".blog_style_image_buttons_conteiner_"+i)).show()}),""==d&&(d=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val(d),d.forEach(function(t){jQuery(".bwg_tags_container_"+i+" .bwg_tags_filter_buttons").each(function(){var e=parseInt(2*jQuery(this).outerHeight(!0));jQuery(this).val()==t&&(jQuery(this).addClass("active"),e<jQuery(this).position().top&&jQuery(".bwg_tags_container_"+i+" .show_bottom_tag").val("1"),jQuery(".bwg_tags_container_"+i+" .bwg_all_tags").removeClass("active"))})}),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(jQuery("#bwg_container1_"+i));var e=jQuery("#bwg_container1_"+i).data("gallery-type");if(jQuery(".bwg-album-thumbnails").length){bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i)}else{switch(e){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(".bwg-container-"+i);break;case"slideshow":bwg_slideshow_ready(i);break;case"carousel":bwg_carousel_ready(i),bwg_carousel_onload(jQuery("#bwg_container1_"+i));break;case"image_browser":bwg_image_browser_ready(jQuery("#bwg_container1_"+i));break;case"blog_style":bwg_blog_style_ready(jQuery("#bwg_container1_"+i))}bwg_mosaic_ajax(i,u)}jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_16x9_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_instapost_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),jQuery("#bwg_embed_frame_16x9_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery("#bwg_embed_frame_16x9_"+i).height(.5625*jQuery("#bwg_embed_frame_16x9_"+i).width()),jQuery("#bwg_embed_frame_instapost_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery(".bwg_embed_frame_instapost_"+i).height((jQuery(".bwg_embed_frame_instapost_"+i).width()-16)*jQuery(".bwg_embed_frame_instapost_"+i).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+i).attr("data-width")+96),jQuery("#bwg_search_input_"+i).val(p["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();jQuery("#bwg_container2_"+i+" .cur_gal_id").val();""==d&&(d=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+i).val(d)}}),!1}if("back"===r)return-1==document.referrer.indexOf(window.location.host)?(str=jQuery(location).attr("href"),void window.location.replace(str.substring(0,str.indexOf("type_0")))):void window.history.back();var v=jQuery("#bwg_search_input_"+i).val(),x=jQuery(".bwg_tags_container_"+i+" .cur_gal_id").val(),k=window.location.href,C="",z=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+x).val();if(jQuery(".bwg_tags_container_"+i).parent().hasClass("bwg_tag_select_view")&&(z=z.toString()),"#"==k.substr(-1)&&(k=k.slice(0,-1)),""!==v&&void 0!==v?!1!==(C=bwg_add_url_parameter(C=bwg_remove_url_parameter("page_number_"+i,k),"bwg_search_"+i,v))&&(k=C):!1!==(C=bwg_remove_url_parameter("bwg_search_"+i,k))&&(k=C),void 0!==l&&""!==l&&!1!==(C=bwg_add_url_parameter(k,"sort_by_"+i,l))&&(k=C),null!=z&&0<z.length){var I="",E=z.split(",");jQuery.each(E,function(e){var t=",";e===E.length-1&&(t=""),I+=E[e]+t}),""!==I&&!1!==(C=bwg_add_url_parameter(k,"filter_tag_"+i,I))&&(k=C)}else!1!==(C=bwg_remove_url_parameter("filter_tag_"+i,C))&&(k=C);window.location.href=k}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery(".bwg_tags_container_"+e+" #bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,n,g){var w,b=!1,u="";if(void 0!==g&&""!==g){b=!0,bwg_params[g].bwg_trans_in_progress=!0,u="_"+g,w=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else w=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(g))return bwg_fallback(o,l,n,g);if(!bwg_testBrowser_cssTransforms3d(g))return bwg_fallback3d(o,l,n,g);function d(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+u).removeAttr("style"),jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),jQuery(".bwg_image_info").show(),jQuery(o).html(""),b){bwg_change_watermark_container(g),bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].data,t=bwg_params[g].event_stack}else{e="";gallery_box_data.bwg_trans_in_progress=!1;t=gallery_box_data.event_stack}if(void 0!==t&&0<t.length){var i=t[0].split("-");t.shift(),bwg_change_image(i[0],i[1],e,!0,g)}bwg_change_watermark_container()}b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g),jQuery(".bwg_slide_bg_"+g).css("perspective",1e3)):(gallery_box_data.bwg_trans_in_progress=!0,jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_slide_bg").css("perspective",1e3)),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(l).css({opacity:1,backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".bwg_slider"+u).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+u).css({transition:"all "+w+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+u).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(d)),0==w&&d()}function bwg_cubeH(e,t,i,a){var r=jQuery(e).width()/2;"right"==i?bwg_cube(r,r,0,0,90,0,-90,e,t,i,a):"left"==i&&bwg_cube(r,-r,0,0,-90,0,90,e,t,i,a)}function bwg_cubeV(e,t,i,a){var r=jQuery(e).height()/2;"right"==i?bwg_cube(r,0,-r,90,0,-90,0,e,t,i,a):"left"==i&&bwg_cube(r,0,r,-90,0,90,0,e,t,i,a)}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_grid(e,t,i,a,r,_,s,o,l,n,g){var w,b=!1,u="";if(event_stack=void 0!==g&&""!==g?(b=!0,bwg_params[g].bwg_trans_in_progress=!0,u="_"+g,w=bwg_params[g].bwg_transition_duration,bwg_params[g].event_stack):(w=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.event_stack),!bwg_testBrowser_cssTransitions())return bwg_fallback(o,l,n);b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+u).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+u).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"));var d=w/(e+t);var h=jQuery(o).find("img"),m=jQuery(o).find("figure"),p=(jQuery(o).find("iframe").css("opacity",0),jQuery('<span style="display: block;" />').addClass("bwg_grid"+u));jQuery(o).prepend(p);var c,y,f,j,Q,v,x,k,C,z,I,E=jQuery(".bwg_slide_bg"+u),M=h.width(),S=h.height(),O=E.width(),T=E.height(),H=Math.floor(O/e),B=Math.floor(T/t),D=O-e*H,L=Math.ceil(D/e),A=T-t*B,W=Math.ceil(A/t),R=0,F=Math.ceil((jQuery(".bwg_slide_bg"+u).width()-h.width())/2),N=void 0===h.attr("src")?"":h.attr("src");a="min-auto"===(a="auto"===a?O:a)?-O:a,r="min-auto"===(r="auto"===r?T:r)?-T:r;for(var P=0;P<e;P++){var q=0,U=Math.floor((jQuery(".bwg_slide_bg"+u).height()-h.height())/2),V=H;if(0<D){var J=L<=D?L:D;V+=J,D-=J}for(var G=0;G<t;G++){var Y=B,$=A;0<$&&(Y+=J=W<=$?W:A,$-=J),p.append((c=V,y=Y,f=q,j=U,Q=R,v=F,x=N,k=M,C=S,z=g,void 0,I=(P+G)*d,jQuery('<span class="bwg_gridlet'+u+'" />').css({display:"block",width:c,height:y,top:f,left:Q,backgroundImage:'url("'+x+'")',backgroundColor:b?jQuery(".bwg_slideshow_image_wrap_"+z).css("background-color"):jQuery(".spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:v+"px "+j+"px",backgroundSize:k+"px "+C+"px",transition:"all "+w+"ms ease-in-out "+I+"ms",transform:"none"}))),q+=Y,U-=Y}F-=V,R+=V}var X=p.children().last();function K(){if(jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),h.css("opacity",1),m.css("opacity",1),p.remove(),b){bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].event_stack,t=bwg_params[g].data}else{gallery_box_data.bwg_trans_in_progress=!1;e=gallery_box_data.event_stack,t=""}if(jQuery(".bwg_image_info").show(),jQuery(o).html(""),void 0!==e&&0<e.length){var i=e[0].split("-");e.shift(),bwg_change_image(i[0],i[1],t,!0,g)}b?bwg_change_watermark_container(g):bwg_change_watermark_container()}p.show(),h.css("opacity",0),m.css("opacity",0),p.children().first().addClass("rs-top-left"),p.children().last().addClass("rs-bottom-right"),p.children().eq(t-1).addClass("rs-bottom-left"),p.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){p.children().css({opacity:s,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+_+")"})},1),jQuery(l).css("opacity",1),jQuery(X).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(K)),0==w&&K()}function bwg_sliceH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,8,0,r,0,1,0,e,t,i,a)}function bwg_sliceV(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(10,1,0,0,r,1,0,e,t,i,a)}function bwg_slideV(e,t,i,a){if("right"==i)var r="auto";else if("left"==i)r="min-auto";bwg_grid(1,1,0,0,r,1,1,e,t,i,a)}function bwg_slideH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,1,0,r,0,1,1,e,t,i,a)}function bwg_scaleOut(e,t,i,a){bwg_grid(1,1,0,0,0,1.5,0,e,t,i,a)}function bwg_scaleIn(e,t,i,a){bwg_grid(1,1,0,0,0,.5,0,e,t,i,a)}function bwg_blockScale(e,t,i,a){bwg_grid(8,6,0,0,0,.6,0,e,t,i,a)}function bwg_kaleidoscope(e,t,i,a){bwg_grid(10,8,0,0,0,1,0,e,t,i,a)}function bwg_fan(e,t,i,a){if("right"==i)var r=45,_=100;else if("left"==i)r=-45,_=-100;bwg_grid(1,10,r,_,0,1,0,e,t,i,a)}function bwg_blindV(e,t,i,a){bwg_grid(1,8,0,0,0,.7,0,e,t,"",a)}function bwg_blindH(e,t,i,a){bwg_grid(10,1,0,0,0,.7,0,e,t,"",a)}function bwg_random(e,t,i,a){var r=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["bwg_"+r[Math.floor(Math.random()*r.length)]](e,t,i,a)}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+o&&(o=0),0<n+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+o},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+s},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}})}function bwg_filmstrip_arrows(e){var t=void 0!==e&&""!==e?"_"+e:"",i=void 0!==e&&""!==e?"_slideshow":"";if("width"==(void 0!==e&&""!==e?bwg_params[e].width_or_heigh:gallery_box_data.width_or_height))var a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).width(),r=jQuery(".bwg"+i+"_filmstrip"+t).width();else a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).height(),r=jQuery(".bwg"+i+"_filmstrip"+t).height();a<r?(jQuery(".bwg"+i+"_filmstrip_left"+t).hide(),jQuery(".bwg"+i+"_filmstrip_right"+t).hide()):(jQuery(".bwg"+i+"_filmstrip_left"+t).show(),jQuery(".bwg"+i+"_filmstrip_right"+t).show())}function bwg_move_filmstrip(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==n?(t=jQuery(".bwg"+l+"_filmstrip"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip"+o).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerHeight(!0)),s="left"==g?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+o).position().top,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top)+t),i<t||(a<Math.abs(_)?"left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}})))}function bwg_move_dots(e){var t=jQuery(".bwg_slideshow_dots_active_"+e).position().left,i=jQuery(".bwg_slideshow_dots_active_"+e).position().left+jQuery(".bwg_slideshow_dots_active_"+e).outerWidth(!0),a=jQuery(".bwg_slideshow_dots_container_"+e).outerWidth(!0),r=jQuery(".bwg_slideshow_dots_thumbnails_"+e).outerWidth(!1),_=jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left,s=Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left)+a;r<a||(t<Math.abs(_)?jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-t},{duration:500,complete:function(){}}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500,complete:function(){}}))}function bwg_testBrowser_cssTransitions(e){return bwg_testDom("Transition",e)}function bwg_testBrowser_cssTransforms3d(e){return bwg_testDom("Perspective",e)}function bwg_testDom(e,t){for(var i=["","Webkit","Moz","ms","O","Khtml"],a=i.length;a--;)if(void 0!==document.body.style[i[a]+e])return!0;return!1}function bwg_fallback(e,t,i,a){bwg_fade(e,t,i,a)}function bwg_fallback3d(e,t,i,a){bwg_sliceV(e,t,i,a)}function bwg_none(e,t,i,a){var r=void 0!==a&&""!==a?"_"+a:"";if(jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),void 0!==a&&""!==a){var _=bwg_params[a].bwg_current_key;bwg_change_watermark_container(a),jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).removeClass("bwg_slideshow_thumb_active"+r).addClass("bwg_slideshow_thumb_deactive"+r),jQuery("#bwg_filmstrip_thumbnail_"+_+r).removeClass("bwg_slideshow_thumb_deactive"+r).addClass("bwg_slideshow_thumb_active"+r),jQuery(".bwg_slideshow_dots"+r).removeClass("bwg_slideshow_dots_active"+r).addClass("bwg_slideshow_dots_deactive"+r),jQuery("#bwg_dots_"+_+r).removeClass("bwg_slideshow_dots_deactive"+r).addClass("bwg_slideshow_dots_active"+r)}else jQuery(".bwg_image_info").show(),gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),bwg_change_watermark_container()}function bwg_iterator(e){var t=1;return void 0!==e&&""!==e&&void 0!==bwg_params[e]&&1==bwg_params[e].enable_slideshow_shuffle&&(t=Math.floor((bwg_params[e].data.length-1)*Math.random()+1)),t}function bwg_change_image_slideshow(e,t,i,a,r){i=bwg_params[r].data;if(jQuery("#bwg_slideshow_image_container_"+r).find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#image_id_"+r+"_"+i[e].id).find(".bwg_fb_video").each(function(){jQuery(this).attr("src",jQuery(this).attr("src"))}),i[t]){if(jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-pause")&&bwg_play(bwg_params[r].data,r),a||(jQuery("#bwg_current_image_key_"+r).val(t),"-1"==e?e=jQuery(".bwg_slideshow_thumb_active_"+r).children("img").attr("image_key"):"-2"==e&&(e=jQuery(".bwg_slideshow_dots_active_"+r).attr("image_key"))),bwg_params[r].bwg_trans_in_progress)return void bwg_params[r].event_stack.push(e+"-"+t);var _="right";if(t<e)_="left";else if(e==t)return;jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),"width"==bwg_params[r].width_or_height?bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).width()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width):bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).height()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width),e=t,bwg_params[r].bwg_current_key=e,jQuery("#bwg_slideshow_image_"+r).attr("image_id",i[t].id),jQuery(".bwg_slideshow_title_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1<i[t].filetype.indexOf("EMBED_"),n=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),g=-1<i[t].filetype.indexOf("INSTAGRAM_VIDEO"),w=jQuery(s).height(),b=jQuery(s).width(),u='<span class="bwg_slideshow_image_spun1_'+r+'" style="display: '+(l?"block":"table")+' ;width: inherit; height: inherit;"><span class="bwg_slideshow_image_spun2_'+r+'" style="display: '+(l?"block":"table-cell")+'; vertical-align: middle; text-align: center; ">';if(l){if(u+='<span style="height: '+w+"px; width: "+b+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(u+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var d=0,h=0;w<b+88?d=(h=w)-88:h=(d=b)+88,u+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame","data-width":i[t].image_width,"data-height":i[t].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+d+"px; height:"+h+"px; vertical-align:middle; display:inline-block; position:relative;"})}else u+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});u+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var m="";"open_lightbox"==bwg_params[r].thumb_click_action?m+=' class="bwg_lightbox" data-image-id="'+i[t].id+'" data-elementor-open-lightbox="no"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(m+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),u+="<a "+m+">"}u+='<img style="max-height: '+w+"px !important; max-width: "+b+'px !important; display:inline-block;" ',u+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',u+=' id="bwg_slideshow_image_'+r+'" ',u+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}u+="</span></span>",jQuery(o).html(u),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),0<bwg_params[r].enable_slideshow_filmstrip?bwg_move_filmstrip(r):bwg_move_dots(r),i[t].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+r).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+r).css({display:""})}bwg_add_lightbox()}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=jQuery("#bwg_container1_"+e).parent();t.hasClass("elementor-tab-content")&&t.width(t.closest(".elementor-widget-wrap").width());var i=t.width(),a=bwg_params[e].data;if(i>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var r="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,_="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:r}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:_}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" :hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size})}else jQuery(".bwg_slideshow_image_wrap_"+e).css({width:i}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(i*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:"width: "+(i-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(i*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e),"horizontal"==bwg_params[e].filmstrip_direction?(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({width:i}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:i-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:i*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:i}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:i*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:i*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:i*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:i*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*i*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*i*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});a[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){var t=jQuery(".bwg_slideshow_embed_"+e).width(),i=jQuery(".bwg_slideshow_embed_").height();jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+96)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=jQuery(".bwg_image_container").width(),i=jQuery(".bwg_image_container").height();jQuery(".inner_instagram_iframe_bwg_embed_frame").each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+176)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-176)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96)),e.css({top:.5*(i-e.height())})}),bwg_change_watermark_container()}}function bwg_play(t,i){if(void 0!==i&&""!==i)t=bwg_params[i].data;void 0!==i&&""!==i?(window.clearInterval(window["bwg_playInterval"+i]),window["bwg_playInterval"+i]=setInterval(function(){var e=1;1==bwg_params[i].enable_slideshow_shuffle&&(e=Math.floor((t.length-1)*Math.random()+1)),bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),(parseInt(jQuery("#bwg_current_image_key_"+i).val())+e)%t.length,t,"",i)},1e3*bwg_params[i].slideshow_interval)):(window.clearInterval(gallery_box_data.bwg_playInterval),gallery_box_data.bwg_playInterval=setInterval(function(){jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")||(void 0===t||void 0!==t[parseInt(jQuery("#bwg_current_image_key").val())+1]?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):1==gallery_box_data.enable_loop&&bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0))},1e3*gallery_box_data.slideshow_interval))}function bwg_image_browser(e){if(jQuery("#bwg_embed_frame_16x9_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery("#bwg_embed_frame_16x9_"+e).height(.5625*jQuery("#bwg_embed_frame_16x9_"+e).width()),jQuery("#bwg_embed_frame_instapost_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").length){var t=jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").contents();jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").replaceWith(t)}jQuery(".bwg_embed_frame_instapost_"+e).height((jQuery(".bwg_embed_frame_instapost_"+e).width()-16)*jQuery(".bwg_embed_frame_instapost_"+e).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+e).attr("data-width")+96);var i=jQuery(".image_browser_images_"+e).width();i<=108?jQuery(".paging-input_"+e).css("display","none"):(i<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):i<=580?(jQuery(".paging-input_"+e).css("display","inline"),jQuery(".tablenav-pages_"+e+" a").css("font-size","13px"),jQuery(".paging-input_"+e).css("margin","0% 7% 0% 7%")):(jQuery(".tablenav-pages_"+e+" a").css("font-size","15px"),jQuery(".paging-input_"+e).css("margin","0% 14% 0% 14%"),jQuery(".paging-input_"+e).css("display","inline")),jQuery(".tablenav-pages_"+e+" .next-page").css("margin","0% 0% 0% 0%"),jQuery(".tablenav-pages_"+e+" .prev-page").css("margin","0% 0% 0% 0%"))}function bwg_disable_right_click(e){e.bind("contextmenu",function(){return!1}),e.css("webkitTouchCallout","none")}jQuery(function(){function i(e){bwg_slideshow_blur(e),bwg_carousel_blur(e),0<jQuery(".bwg_play_pause").length&&window.clearInterval(gallery_box_data.bwg_playInterval)}function a(e){e&&bwg_main_ready(e),bwg_slideshow_focus(),bwg_carousel_focus(),jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")&&bwg_play(gallery_box_data.data)}var r=!1;jQuery(".bwg_container").each(function(){if(0<jQuery(this).find(".wd_error").length&&(r=!0),!r){var e=jQuery(this);if(e[0].offsetHeight)var t=0;else t=1;setInterval(function(){e[0].offsetHeight?1==t&&(t=0,a(e)):0==t&&i(!(t=1))},200)}}),r||jQuery(window).focus(function(){a()}).blur(function(){i(!0)})}),jQuery(window).on("resize",function(){setTimeout(function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),bwg_tags_button_section_visibility(),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()},0)}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
photo-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/?utm_source=photo_gallery&utm_medium=free_plugin
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
- * Version: 1.5.76
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/plugins/?utm_source=photo_gallery&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -105,8 +105,8 @@ final class BWG {
105
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
106
  $this->front_url = $this->plugin_url;
107
  $this->main_file = plugin_basename(__FILE__);
108
- $this->plugin_version = '1.5.76';
109
- $this->db_version = '1.5.76';
110
  $this->prefix = 'bwg';
111
  $this->nicename = __('Photo Gallery', $this->prefix);
112
  require_once($this->plugin_dir . '/framework/WDWLibrary.php');
@@ -714,7 +714,7 @@ final class BWG {
714
  $params['current_url'] = WDWLibrary::get('current_url', NULL);
715
  $params['ajax'] = TRUE;
716
 
717
- echo $this->shortcode($params);
718
 
719
  die();
720
  }
@@ -741,11 +741,12 @@ final class BWG {
741
  }
742
  }
743
 
744
- public function shortcode( $params = array() ) {
745
  if ( is_admin() && defined('DOING_AJAX') && !DOING_AJAX) {
746
  return;
747
  }
748
  if ( isset($params['id']) && $params['id'] ) {
 
749
  global $wpdb;
750
  $shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $params['id']));
751
  if ($shortcode) {
@@ -753,13 +754,20 @@ final class BWG {
753
  foreach ($shortcode_params as $shortcode_param) {
754
  $shortcode_param = str_replace('"', '', $shortcode_param);
755
  $shortcode_elem = explode('=', $shortcode_param);
756
- $params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
757
- }
 
 
 
758
  }
759
  else {
760
  return;
761
  }
762
  }
 
 
 
 
763
 
764
  // 'gallery_type' is the only parameter not being checked.
765
  // Checking for incomplete shortcodes.
@@ -1178,7 +1186,6 @@ final class BWG {
1178
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
1179
  }
1180
  }
1181
-
1182
  $this->create_post_types();
1183
  // Using this insted of flush_rewrite_rule() for better performance with multisite.
1184
  global $wp_rewrite;
@@ -1485,8 +1492,8 @@ final class BWG {
1485
  * Overview.
1486
  */
1487
  public function overview() {
1488
- if ( is_admin() && !isset($_REQUEST['ajax']) ) {
1489
- if ( !class_exists("TenWebLibNew") ) {
1490
  $plugin_dir = apply_filters('tenweb_new_free_users_lib_path', array('version' => '1.1.3', 'path' => $this->plugin_dir));
1491
  require_once($plugin_dir['path'] . '/wd/start.php');
1492
  }
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/?utm_source=photo_gallery&utm_medium=free_plugin
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
+ * Version: 1.5.77
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/plugins/?utm_source=photo_gallery&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
105
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
106
  $this->front_url = $this->plugin_url;
107
  $this->main_file = plugin_basename(__FILE__);
108
+ $this->plugin_version = '1.5.77';
109
+ $this->db_version = '1.5.77';
110
  $this->prefix = 'bwg';
111
  $this->nicename = __('Photo Gallery', $this->prefix);
112
  require_once($this->plugin_dir . '/framework/WDWLibrary.php');
714
  $params['current_url'] = WDWLibrary::get('current_url', NULL);
715
  $params['ajax'] = TRUE;
716
 
717
+ echo $this->shortcode($params, TRUE);
718
 
719
  die();
720
  }
741
  }
742
  }
743
 
744
+ public function shortcode( $params = array(), $from_ajax = FALSE ) {
745
  if ( is_admin() && defined('DOING_AJAX') && !DOING_AJAX) {
746
  return;
747
  }
748
  if ( isset($params['id']) && $params['id'] ) {
749
+ $params['id'] = (int) $params['id'];
750
  global $wpdb;
751
  $shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $params['id']));
752
  if ($shortcode) {
754
  foreach ($shortcode_params as $shortcode_param) {
755
  $shortcode_param = str_replace('"', '', $shortcode_param);
756
  $shortcode_elem = explode('=', $shortcode_param);
757
+ /* Not change 'gallery_type' after ajax, for Preview_Section */
758
+ if ( !$from_ajax || str_replace(' ', '', $shortcode_elem[0]) != 'gallery_type' ) {
759
+ $params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
760
+ }
761
+ }
762
  }
763
  else {
764
  return;
765
  }
766
  }
767
+ /* For Preview section - get selected 'gallery_type' from URL */
768
+ if ( isset($_GET['type']) ) {
769
+ $params['gallery_type'] = basename(stripslashes(WDWLibrary::get('type','','sanitize_text_field','GET')));
770
+ }
771
 
772
  // 'gallery_type' is the only parameter not being checked.
773
  // Checking for incomplete shortcodes.
1186
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
1187
  }
1188
  }
 
1189
  $this->create_post_types();
1190
  // Using this insted of flush_rewrite_rule() for better performance with multisite.
1191
  global $wp_rewrite;
1492
  * Overview.
1493
  */
1494
  public function overview() {
1495
+ if (is_admin() && !isset($_REQUEST['ajax'])) {
1496
+ if (!class_exists("TenWebLibNew")) {
1497
  $plugin_dir = apply_filters('tenweb_new_free_users_lib_path', array('version' => '1.1.3', 'path' => $this->plugin_dir));
1498
  require_once($plugin_dir['path'] . '/wd/start.php');
1499
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,wdsupport,photogallerysupport,10web
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 4.6
5
  Tested up to: 5.7
6
- Stable tag: 1.5.76
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -282,6 +282,17 @@ Choose whether to display random or the first/last specific number of images.
282
 
283
  == Changelog ==
284
 
 
 
 
 
 
 
 
 
 
 
 
285
  = 1.5.76 =
286
  * Improved: Lightbox load time.
287
  * Improved: Use "a" tag in image description.
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 4.6
5
  Tested up to: 5.7
6
+ Stable tag: 1.5.77
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
282
 
283
  == Changelog ==
284
 
285
+ = 1.5.77 =
286
+ * Added: Select gallery/gallery group type on preview.
287
+ * Fixed: XSS vulnerability.
288
+ * Fixed: Lightbox close button on mobile.
289
+ * Fixed: Gallery group preview image stretched.
290
+ * Fixed: Adding image with dot in tag name.
291
+ * Fixed: Warnings in filemanager.
292
+ * Fixed: Image table header style on editing gallery.
293
+ * Fixed: Bulk rotate.
294
+ * Fixed: Create thumbnail for svg images.
295
+
296
  = 1.5.76 =
297
  * Improved: Lightbox load time.
298
  * Improved: Use "a" tag in image description.
update.php CHANGED
@@ -429,7 +429,6 @@ class BWGUpdate {
429
  if ( version_compare($version, '1.5.68' ) == -1 ) {
430
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_file_paths ADD `author` bigint(20) NOT NULL DEFAULT 1");
431
  }
432
-
433
  return;
434
  }
435
  }
429
  if ( version_compare($version, '1.5.68' ) == -1 ) {
430
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_file_paths ADD `author` bigint(20) NOT NULL DEFAULT 1");
431
  }
 
432
  return;
433
  }
434
  }