Photo Gallery by WD – Responsive Photo Gallery - Version 1.5.39

Version Description

  • Fixed: Control buttons container height.
  • Fixed: Allow to write url as advertisement text.
  • Fixed: Conflict with Bootstrap classes.
  • Fixed: Scroll load with "Enable dynamic URLs for galleries and gallery groups" is on.
  • Fixed: Pagination with disabled "Enable href attribute" and "Enable dynamic URLs for galleries and gallery groups" options set to Yes.
  • Fixed: Hit counter.
  • Fixed: Bulk deleting galleries/gallery groups.
  • Fixed: Sharing with 'Enable dynamic URLs for galleries and gallery groups' is on.
  • Fixed: Lazy load with disabled 'Enable dynamic URLs for galleries and gallery groups'.
  • Fixed: Masonry view with 'Resizable thumbnails' set to No.
  • Fixed: Load with galleries in tab.
  • Fixed: Bug on masonry view with image title "Show on hover" option on.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.5.39
Comparing to
See all releases

Code changes from version 1.5.38 to 1.5.39

admin/controllers/elementorWidget.php CHANGED
@@ -140,7 +140,7 @@ class BWGElementor extends \Elementor\Widget_Base {
140
  'bwg_gallery_view_type',
141
  [
142
  'label_block' => true,
143
- 'description' => __('Select the gallery view type.', BWG()->prefix) . '<a target="_balnk" href="' . $bwg_view_type . '">' . __('Edit options', BWG()->prefix) . '</a>',
144
  'type' => \Elementor\Controls_Manager::SELECT,
145
  'default' => 'thumbnails',
146
  'options' => $bwg_gallery_view_type_options,
@@ -155,7 +155,7 @@ class BWGElementor extends \Elementor\Widget_Base {
155
  [
156
  'label' => __('Gallery', BWG()->prefix),
157
  'label_block' => true,
158
- 'description' => __('Select the gallery to display.', BWG()->prefix) . '<a target="_balnk" href="' . $bwg_edit_link . '">' . __('Edit gallery', BWG()->prefix) . '</a>',
159
  'type' => \Elementor\Controls_Manager::SELECT,
160
  'default' => 0,
161
  'options' => WDWLibrary::get_galleries(),
@@ -169,7 +169,7 @@ class BWGElementor extends \Elementor\Widget_Base {
169
  [
170
  'label' => __('Tag', BWG()->prefix),
171
  'label_block' => true,
172
- 'description' => __('Filter gallery images by this tag.', BWG()->prefix) . '<a target="_balnk" href="' .$bwd_tag_link . '">' . __('Edit tag', BWG()->prefix) . '</a>',
173
  'type' => \Elementor\Controls_Manager::SELECT,
174
  'default' => 0,
175
  'options' => WDWLibrary::get_tags(),
@@ -183,7 +183,7 @@ class BWGElementor extends \Elementor\Widget_Base {
183
  'bwg_gallery_group_view_type',
184
  [
185
  'label_block' => true,
186
- 'description' => __('Select the gallery group type.', BWG()->prefix) . '<a target="_balnk" href="' . $bwg_group_view_type . '">' . __('Edit options', BWG()->prefix) . '</a>',
187
  'type' => \Elementor\Controls_Manager::SELECT,
188
  'default' => 'album_compact_preview',
189
  'options' => $bwg_gallery_group_view_type_options,
@@ -197,7 +197,7 @@ class BWGElementor extends \Elementor\Widget_Base {
197
  [
198
  'label' => __('Gallery group', BWG()->prefix),
199
  'label_block' => true,
200
- 'description' => __('Select the gallery group to display.', BWG()->prefix) . '<a target="_balnk" href="' . $bwd_group_link . '">' . __('Edit gallery group', BWG()->prefix) . '</a>',
201
  'type' => \Elementor\Controls_Manager::SELECT,
202
  'default' => 0,
203
  'options' => WDWLibrary::get_gallery_groups(),
@@ -212,7 +212,7 @@ class BWGElementor extends \Elementor\Widget_Base {
212
  [
213
  'label' => __('Theme', BWG()->prefix),
214
  'label_block' => true,
215
- 'description' => (BWG()->is_pro ? __('Choose the theme for your gallery.', BWG()->prefix) . '<a target="_balnk" href="' . $bwd_theme_link . '">' . __('Edit theme', BWG()->prefix). '</a>' : __('You can\'t edit theme in free version.', BWG()->prefix)),
216
  'type' => \Elementor\Controls_Manager::SELECT,
217
  'default' => WDWLibrary::get_default_theme(),
218
  'options' => WDWLibrary::get_theme_rows_data(),
@@ -240,7 +240,7 @@ class BWGElementor extends \Elementor\Widget_Base {
240
  }
241
  $params['theme_id'] = $settings['bwg_theme'];
242
 
243
- if ( doing_filter('wd_seo_sitemap_images') ) {
244
  WDWSitemap::instance()->shortcode($params);
245
  }
246
  else {
140
  'bwg_gallery_view_type',
141
  [
142
  'label_block' => true,
143
+ 'description' => __('Select the gallery view type.', BWG()->prefix) . '<a target="_blank" href="' . $bwg_view_type . '">' . __('Edit options', BWG()->prefix) . '</a>',
144
  'type' => \Elementor\Controls_Manager::SELECT,
145
  'default' => 'thumbnails',
146
  'options' => $bwg_gallery_view_type_options,
155
  [
156
  'label' => __('Gallery', BWG()->prefix),
157
  'label_block' => true,
158
+ 'description' => __('Select the gallery to display.', BWG()->prefix) . '<a target="_blank" href="' . $bwg_edit_link . '">' . __('Edit gallery', BWG()->prefix) . '</a>',
159
  'type' => \Elementor\Controls_Manager::SELECT,
160
  'default' => 0,
161
  'options' => WDWLibrary::get_galleries(),
169
  [
170
  'label' => __('Tag', BWG()->prefix),
171
  'label_block' => true,
172
+ 'description' => __('Filter gallery images by this tag.', BWG()->prefix) . '<a target="_blank" href="' .$bwd_tag_link . '">' . __('Edit tag', BWG()->prefix) . '</a>',
173
  'type' => \Elementor\Controls_Manager::SELECT,
174
  'default' => 0,
175
  'options' => WDWLibrary::get_tags(),
183
  'bwg_gallery_group_view_type',
184
  [
185
  'label_block' => true,
186
+ 'description' => __('Select the gallery group type.', BWG()->prefix) . '<a target="_blank" href="' . $bwg_group_view_type . '">' . __('Edit options', BWG()->prefix) . '</a>',
187
  'type' => \Elementor\Controls_Manager::SELECT,
188
  'default' => 'album_compact_preview',
189
  'options' => $bwg_gallery_group_view_type_options,
197
  [
198
  'label' => __('Gallery group', BWG()->prefix),
199
  'label_block' => true,
200
+ 'description' => __('Select the gallery group to display.', BWG()->prefix) . '<a target="_blank" href="' . $bwd_group_link . '">' . __('Edit gallery group', BWG()->prefix) . '</a>',
201
  'type' => \Elementor\Controls_Manager::SELECT,
202
  'default' => 0,
203
  'options' => WDWLibrary::get_gallery_groups(),
212
  [
213
  'label' => __('Theme', BWG()->prefix),
214
  'label_block' => true,
215
+ 'description' => (BWG()->is_pro ? __('Choose the theme for your gallery.', BWG()->prefix) . '<a target="_blank" href="' . $bwd_theme_link . '">' . __('Edit theme', BWG()->prefix). '</a>' : __('You can\'t edit theme in free version.', BWG()->prefix)),
216
  'type' => \Elementor\Controls_Manager::SELECT,
217
  'default' => WDWLibrary::get_default_theme(),
218
  'options' => WDWLibrary::get_theme_rows_data(),
240
  }
241
  $params['theme_id'] = $settings['bwg_theme'];
242
 
243
+ if ( doing_filter('wd_seo_sitemap_images') || doing_filter('wpseo_sitemap_urlimages') ) {
244
  WDWSitemap::instance()->shortcode($params);
245
  }
246
  else {
admin/views/AdminView.php CHANGED
@@ -44,7 +44,7 @@ class AdminView_bwg {
44
  <?php echo $id ? ' id="' . $id . '"' : ''; ?>
45
  <?php echo $class ? ' class="' . $class . '"' : ''; ?>
46
  <?php echo $style ? ' style="' . $style . '"' : ''; ?>
47
- ><h1 class="hidden"></h1><?php
48
  echo $content;
49
  // Add nonce to form.
50
  wp_nonce_field(BWG()->nonce, BWG()->nonce);
44
  <?php echo $id ? ' id="' . $id . '"' : ''; ?>
45
  <?php echo $class ? ' class="' . $class . '"' : ''; ?>
46
  <?php echo $style ? ' style="' . $style . '"' : ''; ?>
47
+ ><h1 class="bwg-hidden"></h1><?php
48
  echo $content;
49
  // Add nonce to form.
50
  wp_nonce_field(BWG()->nonce, BWG()->nonce);
admin/views/Albums.php CHANGED
@@ -278,7 +278,7 @@ class AlbumsView_bwg extends AdminView_bwg {
278
  <div id="bwg_tabs" class="bwg_tabs">
279
  <?php
280
  foreach ($params['albums_galleries'] as $item) {
281
- $item->published = !$item->published ? 'dashicons-hidden' : 'hidden';
282
  $item->preview_image = 'style="background-image:url(&quot;'. $item->preview_image .'&quot;)"';
283
  echo $this->albumgallery_template($item);
284
  }
278
  <div id="bwg_tabs" class="bwg_tabs">
279
  <?php
280
  foreach ($params['albums_galleries'] as $item) {
281
+ $item->published = !$item->published ? 'dashicons-hidden' : 'bwg-hidden';
282
  $item->preview_image = 'style="background-image:url(&quot;'. $item->preview_image .'&quot;)"';
283
  echo $this->albumgallery_template($item);
284
  }
admin/views/Albumsgalleries.php CHANGED
@@ -97,11 +97,11 @@ class AlbumsgalleriesView_bwg extends AdminView_bwg {
97
  ?>
98
  <tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
99
  <th class="table_small_col check-column">
100
- <input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" data-id="<?php echo $row->id; ?>" data-is-album="<?php echo htmlspecialchars(addslashes($row->is_album)); ?>" data-preview-image="<?php echo htmlspecialchars(addslashes($preview_image)); ?>" data-name="<?php echo htmlspecialchars(addslashes($row->name)); ?>" data-status="<?php echo !$row->published ? 'dashicons-hidden' : 'hidden'; ?>" />
101
  </th>
102
  <td class="column-primary column-title" data-colname="<?php _e('Title', BWG()->prefix); ?>">
103
  <strong class="has-media-icon">
104
- <a class="wd-pointer" onclick="window.parent.bwg_add_album_gallery('<?php echo $row->id; ?>', '<?php echo htmlspecialchars(addslashes($row->is_album)); ?>', '<?php echo htmlspecialchars(addslashes($preview_image)); ?>', '<?php echo htmlspecialchars(addslashes($row->name)); ?>','<?php echo !$row->published ? 'dashicons-hidden' : 'hidden' ?>')" id="a_<?php echo $iterator; ?>">
105
  <span class="media-icon image-icon">
106
  <img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
107
  </span>
97
  ?>
98
  <tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
99
  <th class="table_small_col check-column">
100
+ <input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" data-id="<?php echo $row->id; ?>" data-is-album="<?php echo htmlspecialchars(addslashes($row->is_album)); ?>" data-preview-image="<?php echo htmlspecialchars(addslashes($preview_image)); ?>" data-name="<?php echo htmlspecialchars(addslashes($row->name)); ?>" data-status="<?php echo !$row->published ? 'dashicons-hidden' : 'bwg-hidden'; ?>" />
101
  </th>
102
  <td class="column-primary column-title" data-colname="<?php _e('Title', BWG()->prefix); ?>">
103
  <strong class="has-media-icon">
104
+ <a class="wd-pointer" onclick="window.parent.bwg_add_album_gallery('<?php echo $row->id; ?>', '<?php echo htmlspecialchars(addslashes($row->is_album)); ?>', '<?php echo htmlspecialchars(addslashes($preview_image)); ?>', '<?php echo htmlspecialchars(addslashes($row->name)); ?>','<?php echo !$row->published ? 'dashicons-hidden' : 'bwg-hidden' ?>')" id="a_<?php echo $iterator; ?>">
105
  <span class="media-icon image-icon">
106
  <img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
107
  </span>
admin/views/Editimage.php CHANGED
@@ -317,7 +317,7 @@ class EditimageView_bwg {
317
  <input id="h" type="hidden" name="h" value="" />
318
  </form>
319
 
320
- <div id="croped_preview" class="hidden wp-core-ui">
321
  <span id="success_msg" class="notice notice-success"><p><?php _e('The thumbnail was successfully cropped.', BWG()->prefix); ?></p></span>
322
  <div id="croped_image_cont" style="height: 445px; display: grid;">
323
  <img id='croped_image_thumb'>
@@ -781,6 +781,9 @@ class EditimageView_bwg {
781
  }
782
  @ini_restore('memory_limit');
783
  if ( !empty($edit_type) ) {
 
 
 
784
  $where = ' `id` = ' . $image_id;
785
  $updated_image = WDWLibrary::update_image_modified_date( $where );
786
  $image_data->image_url = WDWLibrary::image_url_version($image_data->image_url, $updated_image['modified_date']);
317
  <input id="h" type="hidden" name="h" value="" />
318
  </form>
319
 
320
+ <div id="croped_preview" class="bwg-hidden wp-core-ui">
321
  <span id="success_msg" class="notice notice-success"><p><?php _e('The thumbnail was successfully cropped.', BWG()->prefix); ?></p></span>
322
  <div id="croped_image_cont" style="height: 445px; display: grid;">
323
  <img id='croped_image_thumb'>
781
  }
782
  @ini_restore('memory_limit');
783
  if ( !empty($edit_type) ) {
784
+ $resolution_thumb = WDWLibrary::get_thumb_size( $image_data->thumb_url );
785
+ WDWLibrary::update_thumb_dimansions($resolution_thumb,"id = $image_id");
786
+
787
  $where = ' `id` = ' . $image_id;
788
  $updated_image = WDWLibrary::update_image_modified_date( $where );
789
  $image_data->image_url = WDWLibrary::image_url_version($image_data->image_url, $updated_image['modified_date']);
admin/views/Galleries.php CHANGED
@@ -386,6 +386,9 @@ class GalleriesView_bwg extends AdminView_bwg {
386
  }
387
 
388
  public function image_display( $params = array() ) {
 
 
 
389
  $ids_string = '';
390
  ?>
391
  <div class="buttons_div_left">
@@ -604,12 +607,15 @@ class GalleriesView_bwg extends AdminView_bwg {
604
  <?php echo $this->search(array('sorting' => true)); ?>
605
  <div class="tablenav top">
606
  <?php
607
- echo $this->bulk_actions($params['actions'], TRUE, 'image_bulk_action');
 
 
608
  echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']);
609
  ?>
610
  </div>
611
  <table id="images_table" class="images_table adminlist table table-striped wp-list-table widefat fixed pages media">
612
  <thead>
 
613
  <td class="col_drag" data-page-number="<?php echo $params['page_num']; ?>">
614
  <?php if ($params['orderby'] == 'order') { ?>
615
  <select title="<?php _e('Show order column', BWG()->prefix); ?>" onchange="wd_showhide_weights(true);return false;">
@@ -629,6 +635,7 @@ class GalleriesView_bwg extends AdminView_bwg {
629
  <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Filename', BWG()->prefix); ?></label>
630
  <input id="check_all" type="checkbox" />
631
  </td>
 
632
  <td class="col_num">#</td>
633
  <th class="column-primary column-title"><?php _e('Image', BWG()->prefix); ?></th>
634
  <th></th>
@@ -682,6 +689,7 @@ class GalleriesView_bwg extends AdminView_bwg {
682
 
683
  ?>
684
  <tr id="tr_<?php echo $row->id; ?>" class="<?php echo $alternate; ?><?php echo $temp ? ' wd-template wd-hide' : ''; ?>">
 
685
  <th class="<?php if ($params['orderby'] == 'order') echo 'connectedSortable'; ?> col_drag handles ui-sortable-handle">
686
  <div title="<?php _e('Drag to re-order', BWG()->prefix); ?>" class="wd-drag handle dashicons dashicons-move <?php if ($params['orderby'] != 'order') echo 'wd-hide'; ?>"></div>
687
  <input class="wd-hide wd-order" id="order_input_<?php echo $row->id; ?>" name="order_input_<?php echo $row->id; ?>" type="text" size="1" value="<?php echo $row->order; ?>" />
@@ -689,6 +697,7 @@ class GalleriesView_bwg extends AdminView_bwg {
689
  <th class="check-column">
690
  <input type="checkbox" id="check_<?php echo $row->id; ?>" name="check[<?php echo $row->id; ?>]" onclick="spider_check_all(this)" />
691
  </th>
 
692
  <th class="col_num"><?php echo $temp ? 'tempnum' : ++$i; ?></th>
693
  <td class="column-primary column-title" data-colname="<?php _e('Filename', BWG()->prefix); ?>">
694
  <strong class="has-media-icon">
@@ -710,6 +719,7 @@ class GalleriesView_bwg extends AdminView_bwg {
710
  <?php }
711
  ?>
712
  </strong>
 
713
  <div class="row-actions">
714
  <span class="wd-image-actions <?php echo ( !$is_embed && ( $params['gallery_type'] == '' ) ? '' : ' wd-hide' ); ?>"><a class="<?php echo (BWG()->is_demo || !BWG()->wp_editor_exists ? '' : 'thickbox thickbox-preview'); ?>" href="<?php echo (BWG()->is_demo ? 'javascript:alert(\'' . addslashes(__('This option is disabled in demo.', BWG()->prefix)) . '\');' : (BWG()->wp_editor_exists ? $edit_link : 'javascript:alert(\'' . addslashes(__('Image edit functionality is not supported by your web host.', BWG()->prefix)) . '\');')); ?>"><?php _e('Edit', BWG()->prefix); ?></a> |</span>
715
  <span class="wd-image-actions <?php echo ( !$is_embed && ( $params['gallery_type'] == '' ) ? '' : ' wd-hide' ); ?>"><a class="<?php echo (BWG()->is_demo || !BWG()->wp_editor_exists ? '' : 'thickbox thickbox-preview'); ?>" href="<?php echo (BWG()->is_demo ? 'javascript:alert(\'' . addslashes(__('This option is disabled in demo.', BWG()->prefix)) . '\');' : (BWG()->wp_editor_exists ? $crop_link : 'javascript:alert(\'' . addslashes(__('Image edit functionality is not supported by your web host.', BWG()->prefix)) . '\');')); ?>"><?php _e('Crop Thumbnail', BWG()->prefix); ?></a> |</span>
@@ -725,6 +735,7 @@ class GalleriesView_bwg extends AdminView_bwg {
725
  return false;
726
  }"><?php _e('Delete', BWG()->prefix); ?></a></span>
727
  </div>
 
728
  <button class="toggle-row" type="button">
729
  <span class="screen-reader-text"><?php _e('Show more details', BWG()->prefix); ?></span>
730
  </button>
@@ -733,14 +744,13 @@ class GalleriesView_bwg extends AdminView_bwg {
733
  <div class="bwg-td-container">
734
  <div class="bwg-td-item">
735
  <label class="wd-table-label" for="image_alt_text_<?php echo $row->id; ?>"><?php _e('Alt/Title', BWG()->prefix); ?></label>
736
- <textarea rows="4" id="image_alt_text_<?php echo $row->id; ?>" name="image_alt_text_<?php echo $row->id; ?>"><?php echo $row->alt; ?></textarea>
737
  </div>
738
  <div class="bwg-td-item">
739
  <label class="wd-table-label" for="image_description_<?php echo $row->id; ?>"><?php _e('Description', BWG()->prefix); ?></label>
740
- <textarea rows="4" id="image_description_<?php echo $row->id; ?>" name="image_description_<?php echo $row->id; ?>"><?php echo $row->description; ?></textarea>
741
  </div>
742
-
743
- <?php
744
  if ( function_exists('BWGEC') ) {
745
  $priselist_name = $row->priselist_name ? "Pricelist: " . $row->priselist_name : "Not for sale";
746
  $unset = $priselist_name == "Not for sale" ? "" : " <span onclick='bwg_remove_pricelist(this);' data-image-id= '" . $row->id . "' data-pricelist-id='" . $row->pricelist_id . "' class ='spider_delete_img_small' style='margin-top: -2px;margin-left: 3px;'></span>";
@@ -750,8 +760,11 @@ class GalleriesView_bwg extends AdminView_bwg {
750
  echo "<input type='hidden' id='pricelist_id_" . $row->id . "' value='" . $row->pricelist_id . "'></div>";
751
  }
752
  ?>
753
-
754
- <div class="bwg-td-item">
 
 
 
755
  <label class="wd-table-label" for="redirect_url_<?php echo $row->id; ?>"><?php _e('Redirect URL', BWG()->prefix); ?></label>
756
  <i class="wd-info dashicons dashicons-info" data-id="wd-info-redirect"></i>
757
  <div id="wd-info-redirect" class="wd-hide">
@@ -763,11 +776,10 @@ class GalleriesView_bwg extends AdminView_bwg {
763
  </div>
764
  <textarea rows="4" onkeypress="prevent_new_line(event)" class="bwg_redirect_url" id="redirect_url_<?php echo $row->id; ?>" name="redirect_url_<?php echo $row->id; ?>"><?php echo $row->redirect_url; ?></textarea>
765
  </div>
766
- <div class="bwg-td-item">
767
  <label class="wd-table-label"><?php _e('Tags', BWG()->prefix); ?></label>
768
  <div class="tags_div<?php echo count($row->tags) > 1 ? '' : ' tags_div_empty'; ?>">
769
  <?php
770
- $tags_id_string = '';
771
  if ( $row->tags ) {
772
  ?>
773
  <div id="tags_div_<?php echo $row->id; ?>">
@@ -789,6 +801,7 @@ class GalleriesView_bwg extends AdminView_bwg {
789
  <a onclick="jQuery('#loading_div').show();" href="<?php echo $add_tag_url; ?>" class="thickbox thickbox-preview"><span class="dashicons dashicons-plus"></span><?php _e('Add tag', BWG()->prefix); ?></a>
790
  </div>
791
  </div>
 
792
  <input type="hidden" value="<?php echo $tags_id_string; ?>" id="tags_<?php echo $row->id; ?>" name="tags_<?php echo $row->id; ?>" />
793
  <input type="hidden" id="image_url_<?php echo $row->id; ?>" name="image_url_<?php echo $row->id; ?>" value="<?php echo $row->pure_image_url; ?>" />
794
  <input type="hidden" id="thumb_url_<?php echo $row->id; ?>" name="thumb_url_<?php echo $row->id; ?>" value="<?php echo $row->pure_thumb_url; ?>" />
386
  }
387
 
388
  public function image_display( $params = array() ) {
389
+ if( $params['row'] ) {
390
+ $is_google_photos = ($params['row']->gallery_type == 'google_photos') ? TRUE : FALSE;
391
+ }
392
  $ids_string = '';
393
  ?>
394
  <div class="buttons_div_left">
607
  <?php echo $this->search(array('sorting' => true)); ?>
608
  <div class="tablenav top">
609
  <?php
610
+ if( !$is_google_photos ) {
611
+ echo $this->bulk_actions($params['actions'], TRUE, 'image_bulk_action');
612
+ }
613
  echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']);
614
  ?>
615
  </div>
616
  <table id="images_table" class="images_table adminlist table table-striped wp-list-table widefat fixed pages media">
617
  <thead>
618
+ <?php if( !$is_google_photos ) { ?>
619
  <td class="col_drag" data-page-number="<?php echo $params['page_num']; ?>">
620
  <?php if ($params['orderby'] == 'order') { ?>
621
  <select title="<?php _e('Show order column', BWG()->prefix); ?>" onchange="wd_showhide_weights(true);return false;">
635
  <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Filename', BWG()->prefix); ?></label>
636
  <input id="check_all" type="checkbox" />
637
  </td>
638
+ <?php } ?>
639
  <td class="col_num">#</td>
640
  <th class="column-primary column-title"><?php _e('Image', BWG()->prefix); ?></th>
641
  <th></th>
689
 
690
  ?>
691
  <tr id="tr_<?php echo $row->id; ?>" class="<?php echo $alternate; ?><?php echo $temp ? ' wd-template wd-hide' : ''; ?>">
692
+ <?php if( !$is_google_photos ) { ?>
693
  <th class="<?php if ($params['orderby'] == 'order') echo 'connectedSortable'; ?> col_drag handles ui-sortable-handle">
694
  <div title="<?php _e('Drag to re-order', BWG()->prefix); ?>" class="wd-drag handle dashicons dashicons-move <?php if ($params['orderby'] != 'order') echo 'wd-hide'; ?>"></div>
695
  <input class="wd-hide wd-order" id="order_input_<?php echo $row->id; ?>" name="order_input_<?php echo $row->id; ?>" type="text" size="1" value="<?php echo $row->order; ?>" />
697
  <th class="check-column">
698
  <input type="checkbox" id="check_<?php echo $row->id; ?>" name="check[<?php echo $row->id; ?>]" onclick="spider_check_all(this)" />
699
  </th>
700
+ <?php } ?>
701
  <th class="col_num"><?php echo $temp ? 'tempnum' : ++$i; ?></th>
702
  <td class="column-primary column-title" data-colname="<?php _e('Filename', BWG()->prefix); ?>">
703
  <strong class="has-media-icon">
719
  <?php }
720
  ?>
721
  </strong>
722
+ <?php if( !$is_google_photos) { ?>
723
  <div class="row-actions">
724
  <span class="wd-image-actions <?php echo ( !$is_embed && ( $params['gallery_type'] == '' ) ? '' : ' wd-hide' ); ?>"><a class="<?php echo (BWG()->is_demo || !BWG()->wp_editor_exists ? '' : 'thickbox thickbox-preview'); ?>" href="<?php echo (BWG()->is_demo ? 'javascript:alert(\'' . addslashes(__('This option is disabled in demo.', BWG()->prefix)) . '\');' : (BWG()->wp_editor_exists ? $edit_link : 'javascript:alert(\'' . addslashes(__('Image edit functionality is not supported by your web host.', BWG()->prefix)) . '\');')); ?>"><?php _e('Edit', BWG()->prefix); ?></a> |</span>
725
  <span class="wd-image-actions <?php echo ( !$is_embed && ( $params['gallery_type'] == '' ) ? '' : ' wd-hide' ); ?>"><a class="<?php echo (BWG()->is_demo || !BWG()->wp_editor_exists ? '' : 'thickbox thickbox-preview'); ?>" href="<?php echo (BWG()->is_demo ? 'javascript:alert(\'' . addslashes(__('This option is disabled in demo.', BWG()->prefix)) . '\');' : (BWG()->wp_editor_exists ? $crop_link : 'javascript:alert(\'' . addslashes(__('Image edit functionality is not supported by your web host.', BWG()->prefix)) . '\');')); ?>"><?php _e('Crop Thumbnail', BWG()->prefix); ?></a> |</span>
735
  return false;
736
  }"><?php _e('Delete', BWG()->prefix); ?></a></span>
737
  </div>
738
+ <?php } ?>
739
  <button class="toggle-row" type="button">
740
  <span class="screen-reader-text"><?php _e('Show more details', BWG()->prefix); ?></span>
741
  </button>
744
  <div class="bwg-td-container">
745
  <div class="bwg-td-item">
746
  <label class="wd-table-label" for="image_alt_text_<?php echo $row->id; ?>"><?php _e('Alt/Title', BWG()->prefix); ?></label>
747
+ <textarea rows="4" id="image_alt_text_<?php echo $row->id; ?>" <?php disabled($is_google_photos) ?> name="image_alt_text_<?php echo $row->id; ?>"><?php echo $row->alt; ?></textarea>
748
  </div>
749
  <div class="bwg-td-item">
750
  <label class="wd-table-label" for="image_description_<?php echo $row->id; ?>"><?php _e('Description', BWG()->prefix); ?></label>
751
+ <textarea rows="4" id="image_description_<?php echo $row->id; ?>" <?php disabled($is_google_photos) ?> name="image_description_<?php echo $row->id; ?>"><?php echo $row->description; ?></textarea>
752
  </div>
753
+ <?php
 
754
  if ( function_exists('BWGEC') ) {
755
  $priselist_name = $row->priselist_name ? "Pricelist: " . $row->priselist_name : "Not for sale";
756
  $unset = $priselist_name == "Not for sale" ? "" : " <span onclick='bwg_remove_pricelist(this);' data-image-id= '" . $row->id . "' data-pricelist-id='" . $row->pricelist_id . "' class ='spider_delete_img_small' style='margin-top: -2px;margin-left: 3px;'></span>";
760
  echo "<input type='hidden' id='pricelist_id_" . $row->id . "' value='" . $row->pricelist_id . "'></div>";
761
  }
762
  ?>
763
+ <?php
764
+ $tags_id_string = '';
765
+ if( !$is_google_photos ) {
766
+ ?>
767
+ <div class="bwg-td-item bwg-td-item-redirect-url">
768
  <label class="wd-table-label" for="redirect_url_<?php echo $row->id; ?>"><?php _e('Redirect URL', BWG()->prefix); ?></label>
769
  <i class="wd-info dashicons dashicons-info" data-id="wd-info-redirect"></i>
770
  <div id="wd-info-redirect" class="wd-hide">
776
  </div>
777
  <textarea rows="4" onkeypress="prevent_new_line(event)" class="bwg_redirect_url" id="redirect_url_<?php echo $row->id; ?>" name="redirect_url_<?php echo $row->id; ?>"><?php echo $row->redirect_url; ?></textarea>
778
  </div>
779
+ <div class="bwg-td-item bwg-td-item-tags">
780
  <label class="wd-table-label"><?php _e('Tags', BWG()->prefix); ?></label>
781
  <div class="tags_div<?php echo count($row->tags) > 1 ? '' : ' tags_div_empty'; ?>">
782
  <?php
 
783
  if ( $row->tags ) {
784
  ?>
785
  <div id="tags_div_<?php echo $row->id; ?>">
801
  <a onclick="jQuery('#loading_div').show();" href="<?php echo $add_tag_url; ?>" class="thickbox thickbox-preview"><span class="dashicons dashicons-plus"></span><?php _e('Add tag', BWG()->prefix); ?></a>
802
  </div>
803
  </div>
804
+ <?php } ?>
805
  <input type="hidden" value="<?php echo $tags_id_string; ?>" id="tags_<?php echo $row->id; ?>" name="tags_<?php echo $row->id; ?>" />
806
  <input type="hidden" id="image_url_<?php echo $row->id; ?>" name="image_url_<?php echo $row->id; ?>" value="<?php echo $row->pure_image_url; ?>" />
807
  <input type="hidden" id="thumb_url_<?php echo $row->id; ?>" name="thumb_url_<?php echo $row->id; ?>" value="<?php echo $row->pure_thumb_url; ?>" />
admin/views/Options.php CHANGED
@@ -19,7 +19,7 @@ class OptionsView_bwg extends AdminView_bwg {
19
  $form_attr = array(
20
  'id' => BWG()->prefix . '_options_form',
21
  'name' => BWG()->prefix . '_options_form',
22
- 'class' => BWG()->prefix . '_options_form wd-form wp-core-ui js hidden',
23
  'action' => add_query_arg( array('page' => $params['page'] ), admin_url('admin.php')),
24
  );
25
  echo $this->form(ob_get_clean(), $form_attr);
19
  $form_attr = array(
20
  'id' => BWG()->prefix . '_options_form',
21
  'name' => BWG()->prefix . '_options_form',
22
+ 'class' => BWG()->prefix . '_options_form wd-form wp-core-ui js bwg-hidden',
23
  'action' => add_query_arg( array('page' => $params['page'] ), admin_url('admin.php')),
24
  );
25
  echo $this->form(ob_get_clean(), $form_attr);
admin/views/Shortcode.php CHANGED
@@ -25,7 +25,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
25
  $form_attr = array(
26
  'id' => BWG()->prefix . '_shortcode_form',
27
  'name' => BWG()->prefix . '_shortcode_form',
28
- 'class' => BWG()->prefix . '_shortcode_form wd-form wp-core-ui js hidden',
29
  'action' => '#',
30
  );
31
  echo $this->form(ob_get_clean(), $form_attr);
25
  $form_attr = array(
26
  'id' => BWG()->prefix . '_shortcode_form',
27
  'name' => BWG()->prefix . '_shortcode_form',
28
+ 'class' => BWG()->prefix . '_shortcode_form wd-form wp-core-ui js bwg-hidden',
29
  'action' => '#',
30
  );
31
  echo $this->form(ob_get_clean(), $form_attr);
css/bwg_frontend.css CHANGED
@@ -1467,6 +1467,7 @@ body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .SumoS
1467
  }
1468
 
1469
  .bwg_popup_image {
 
1470
  vertical-align: middle;
1471
  display: inline-block;
1472
  }
1467
  }
1468
 
1469
  .bwg_popup_image {
1470
+ width: auto;
1471
  vertical-align: middle;
1472
  display: inline-block;
1473
  }
css/bwg_tables.css CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  .ajax-msg,
2
  .unsaved-msg,
3
  .sorting-msg {
@@ -1515,7 +1518,6 @@ textarea.bwg_popup_input {
1515
  #bwg_template {
1516
  display: none !important;
1517
  }
1518
-
1519
  .ui-tooltip {
1520
  padding: 0 10px !important;
1521
  position: absolute;
1
+ .bwg-hidden {
2
+ display: none;
3
+ }
4
  .ajax-msg,
5
  .unsaved-msg,
6
  .sorting-msg {
1518
  #bwg_template {
1519
  display: none !important;
1520
  }
 
1521
  .ui-tooltip {
1522
  padding: 0 10px !important;
1523
  position: absolute;
css/styles.min.css CHANGED
@@ -1 +1 @@
1
- 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;cursor:pointer;text-decoration:none}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 0}.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-color:#fff;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{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;margin-bottom:10px;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%;margin:0 5px 20px 5px}.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:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.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:inline-table;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:table-cell;text-align:center;vertical-align:middle}.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{vertical-align:middle;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_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}}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_thumbnails_masonry_0{overflow:hidden}
1
+ 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;cursor:pointer;text-decoration:none}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 0}.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-color:#fff;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{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;margin-bottom:10px;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%;margin:0 5px 20px 5px}.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:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.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:inline-table;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:table-cell;text-align:center;vertical-align:middle}.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_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_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}}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_thumbnails_masonry_0{overflow:hidden}
framework/WDWLibrary.php CHANGED
@@ -1527,7 +1527,8 @@ class WDWLibrary {
1527
  self::recover_image_size( $width_orig, $height_orig, $width, $original_image, $filename );
1528
  self::recover_image_size( $width_orig, $height_orig, $thumb_width, $original_image, $thumb_filename);
1529
 
1530
- $resolution_thumb = self::get_thumb_size( $thumb_filename );
 
1531
  $where = "id = " . $image->id;
1532
  self::update_thumb_dimansions( $resolution_thumb, $where );
1533
  }
1527
  self::recover_image_size( $width_orig, $height_orig, $width, $original_image, $filename );
1528
  self::recover_image_size( $width_orig, $height_orig, $thumb_width, $original_image, $thumb_filename);
1529
 
1530
+ $resolution_thumb = self::get_thumb_size( $image->thumb_url );
1531
+
1532
  $where = "id = " . $image->id;
1533
  self::update_thumb_dimansions( $resolution_thumb, $where );
1534
  }
framework/WDWSitemap.php CHANGED
@@ -30,11 +30,11 @@ final class WDWSitemap {
30
  $post = get_post($post_id);
31
 
32
  remove_all_shortcodes();
33
- add_shortcode('Best_Wordpress_Gallery', array($this, 'shortcode'));
34
- do_shortcode($post->post_content);
35
  if ( defined('ELEMENTOR_VERSION') ) {
36
  \Elementor\Plugin::instance()->frontend->get_builder_content($post->ID);
37
  }
 
 
38
 
39
  return $this->images;
40
  }
30
  $post = get_post($post_id);
31
 
32
  remove_all_shortcodes();
 
 
33
  if ( defined('ELEMENTOR_VERSION') ) {
34
  \Elementor\Plugin::instance()->frontend->get_builder_content($post->ID);
35
  }
36
+ add_shortcode('Best_Wordpress_Gallery', array($this, 'shortcode'));
37
+ do_shortcode($post->post_content);
38
 
39
  return $this->images;
40
  }
framework/howto/howto.php CHANGED
@@ -5,12 +5,12 @@ wp_print_scripts('jquery-ui-tabs');
5
  <link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700" rel="stylesheet">
6
  <script>
7
  function wd_how_to_use() {
8
- jQuery('#wd_howto_container').toggleClass('hidden');
9
  jQuery('body').toggleClass('wd-howto-disable-scroll');
10
  }
11
  function wd_toggle_mobile_menu() {
12
  jQuery('.wd-howto-menu').toggleClass('wd-howto-menu-opened');
13
- jQuery('.wd-howto-menu-overlay').toggleClass('hidden');
14
  }
15
  jQuery(document).ready(function () {
16
  jQuery('#wd_howto_wrap').tabs({
@@ -21,7 +21,7 @@ wp_print_scripts('jquery-ui-tabs');
21
  }
22
  });
23
  jQuery(document).keyup(function(e) {
24
- if ( e.keyCode == 27 && !jQuery('#wd_howto_container').hasClass('hidden') ) {
25
  wd_how_to_use();
26
  }
27
  });
@@ -331,10 +331,10 @@ wp_print_scripts('jquery-ui-tabs');
331
  float: right;
332
  }
333
  </style>
334
- <div id="wd_howto_container" class="hidden">
335
  <div class="wd-howto-overlay" onclick="wd_how_to_use(); return false;"></div>
336
  <div id="wd_howto_wrap" class="wd-howto-wrap">
337
- <div class="wd-howto-menu-overlay hidden" onclick="wd_toggle_mobile_menu()"></div>
338
  <div class="wd-howto-menu">
339
  <div class="wd-howto-title"><?php _e('How to ...', BWG()->prefix); ?></div>
340
  <ul>
5
  <link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700" rel="stylesheet">
6
  <script>
7
  function wd_how_to_use() {
8
+ jQuery('#wd_howto_container').toggleClass('bwg-hidden');
9
  jQuery('body').toggleClass('wd-howto-disable-scroll');
10
  }
11
  function wd_toggle_mobile_menu() {
12
  jQuery('.wd-howto-menu').toggleClass('wd-howto-menu-opened');
13
+ jQuery('.wd-howto-menu-overlay').toggleClass('bwg-hidden');
14
  }
15
  jQuery(document).ready(function () {
16
  jQuery('#wd_howto_wrap').tabs({
21
  }
22
  });
23
  jQuery(document).keyup(function(e) {
24
+ if ( e.keyCode == 27 && !jQuery('#wd_howto_container').hasClass('bwg-hidden') ) {
25
  wd_how_to_use();
26
  }
27
  });
331
  float: right;
332
  }
333
  </style>
334
+ <div id="wd_howto_container" class="bwg-hidden">
335
  <div class="wd-howto-overlay" onclick="wd_how_to_use(); return false;"></div>
336
  <div id="wd_howto_wrap" class="wd-howto-wrap">
337
+ <div class="wd-howto-menu-overlay bwg-hidden" onclick="wd_toggle_mobile_menu()"></div>
338
  <div class="wd-howto-menu">
339
  <div class="wd-howto-title"><?php _e('How to ...', BWG()->prefix); ?></div>
340
  <ul>
frontend/controllers/BWGControllerShare.php CHANGED
@@ -1,23 +1,10 @@
1
  <?php
2
 
3
  class BWGControllerShare {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
  public function __construct() {
17
  }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $this->display();
23
  }
@@ -31,14 +18,4 @@ class BWGControllerShare {
31
 
32
  $view->display();
33
  }
34
-
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- // Getters & Setters //
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- // Private Methods //
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- ////////////////////////////////////////////////////////////////////////////////////////
42
- // Listeners //
43
- ////////////////////////////////////////////////////////////////////////////////////////
44
  }
1
  <?php
2
 
3
  class BWGControllerShare {
4
+
 
 
 
 
 
 
 
 
 
 
 
5
  public function __construct() {
6
  }
7
+
 
 
8
  public function execute() {
9
  $this->display();
10
  }
18
 
19
  $view->display();
20
  }
 
 
 
 
 
 
 
 
 
 
21
  }
frontend/models/model.php CHANGED
@@ -263,10 +263,17 @@ class BWGModelSite {
263
 
264
  if ( !empty($row->preview_image) ) {
265
  $row->resolution_thumb = WDWLibrary::get_thumb_size($row->preview_image);
 
 
 
 
266
  $row->preview_image = WDWLibrary::image_url_version($row->preview_image, $row->modified_date);
267
  }
268
  if ( !empty($row->random_preview_image) ) {
269
  $row->resolution_thumb = WDWLibrary::get_thumb_size($row->random_preview_image);
 
 
 
270
  $row->random_preview_image = WDWLibrary::image_url_version($row->random_preview_image, $row->modified_date);
271
  }
272
  if ( !$row->preview_image ) {
@@ -300,4 +307,17 @@ class BWGModelSite {
300
 
301
  return array( 'rows' => $rows, 'page_nav' => $page_nav );
302
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  }
263
 
264
  if ( !empty($row->preview_image) ) {
265
  $row->resolution_thumb = WDWLibrary::get_thumb_size($row->preview_image);
266
+ if ( $row->resolution_thumb == "" ) {
267
+ $row->resolution_thumb = $this->get_album_preview_thumb_dimensions($row->preview_image);
268
+ }
269
+
270
  $row->preview_image = WDWLibrary::image_url_version($row->preview_image, $row->modified_date);
271
  }
272
  if ( !empty($row->random_preview_image) ) {
273
  $row->resolution_thumb = WDWLibrary::get_thumb_size($row->random_preview_image);
274
+ if ( $row->resolution_thumb == "" ) {
275
+ $row->resolution_thumb = $this->get_album_preview_thumb_dimensions($row->random_preview_image);
276
+ }
277
  $row->random_preview_image = WDWLibrary::image_url_version($row->random_preview_image, $row->modified_date);
278
  }
279
  if ( !$row->preview_image ) {
307
 
308
  return array( 'rows' => $rows, 'page_nav' => $page_nav );
309
  }
310
+
311
+ /**
312
+ * Get thumb resolution from bwg_image row.
313
+ *
314
+ * @param string $thumb_url
315
+ *
316
+ * @return string $resolution
317
+ */
318
+ public function get_album_preview_thumb_dimensions( $thumb_url ) {
319
+ global $wpdb;
320
+ $resolution = $wpdb->get_var('SELECT resolution_thumb FROM ' . $wpdb->prefix . 'bwg_image WHERE thumb_url = "' . $thumb_url . '"');
321
+ return $resolution;
322
+ }
323
  }
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -11,7 +11,7 @@ class BWGViewGalleryBox {
11
  require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php');
12
 
13
  $bwg = (isset($_GET['current_view']) ? esc_html($_GET['current_view']) : 0);
14
- $current_url = isset($_GET['current_url']) ? esc_html($_GET['current_url']) : '';
15
  $theme_id = isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 0;
16
  $current_image_id = WDWLibrary::esc_script('get', 'image_id', 0, 'int');
17
  $gallery_id = WDWLibrary::esc_script('get', 'gallery_id', 0, 'int');
@@ -54,14 +54,14 @@ class BWGViewGalleryBox {
54
  $image_right_click = isset(BWG()->options->image_right_click) ? BWG()->options->image_right_click : 0;
55
 
56
  require_once BWG()->plugin_dir . "/frontend/models/model.php";
57
- $model_site = new BWGModelSite();
58
  $theme_row = $model_site->get_theme_row_data($theme_id);
59
 
60
  $filmstrip_direction = 'horizontal';
61
  if ($theme_row->lightbox_filmstrip_pos == 'right' || $theme_row->lightbox_filmstrip_pos == 'left') {
62
  $filmstrip_direction = 'vertical';
63
  }
64
- $image_filmstrip_height = 0;
65
  $image_filmstrip_width = 0;
66
  if ( $params['popup_enable_filmstrip'] ) {
67
  if ( $filmstrip_direction == 'horizontal' ) {
@@ -91,36 +91,6 @@ class BWGViewGalleryBox {
91
  'gallery_id' => $gallery_id,
92
  'tag' => $tag,
93
  'theme_id' => $theme_id,
94
- 'thumb_width' => $params['thumb_width'],
95
- 'thumb_height' => $params['thumb_height'],
96
- 'open_with_fullscreen' => $params['popup_fullscreen'],
97
- 'open_with_autoplay' => $params['popup_autoplay'],
98
- 'image_width' => $params['popup_width'],
99
- 'image_height' => $params['popup_height'],
100
- 'image_effect' => $params['popup_effect'],
101
- 'wd_sor' => $params['sort_by'],
102
- 'wd_ord' => $params['order_by'],
103
- 'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
104
- 'image_filmstrip_height' => $image_filmstrip_height,
105
- 'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
106
- 'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
107
- 'popup_enable_info' => $params['popup_enable_info'],
108
- 'popup_info_always_show' => $params['popup_info_always_show'],
109
- 'popup_info_full_width' => $params['popup_info_full_width'],
110
- 'popup_hit_counter' => $params['popup_hit_counter'],
111
- 'popup_enable_rate' => $params['popup_enable_rate'],
112
- 'slideshow_interval' => $params['popup_interval'],
113
- 'enable_comment_social' => $params['popup_enable_comment'],
114
- 'enable_image_facebook' => $params['popup_enable_facebook'],
115
- 'enable_image_twitter' => $params['popup_enable_twitter'],
116
- 'enable_image_ecommerce' => $params['popup_enable_ecommerce'],
117
- 'enable_image_pinterest' => $params['popup_enable_pinterest'],
118
- 'enable_image_tumblr' => $params['popup_enable_tumblr'],
119
- 'watermark_type' => $params['watermark_type'],
120
- 'slideshow_effect_duration' => $params['popup_effect_duration'],
121
- 'popup_enable_email' => $params['popup_enable_email'],
122
- 'popup_enable_captcha' => $params['popup_enable_captcha'],
123
- 'comment_moderation' => $params['comment_moderation'],
124
  );
125
  if ($params['watermark_type'] != 'none') {
126
  $params_array['watermark_link'] = $params['watermark_link'];
@@ -250,7 +220,7 @@ class BWGViewGalleryBox {
250
  border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
251
  <?php
252
  }?>
253
- height: <?php echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top; ?>px;
254
  text-align: <?php echo $theme_row->lightbox_ctrl_btn_align; ?>;
255
  }
256
  .bwg_toggle_container {
@@ -745,7 +715,7 @@ class BWGViewGalleryBox {
745
  <div class="bwg_filmstrip_thumbnail_img_wrap">
746
  <img <?php if( $is_embed || $resolution_thumb ) { ?>
747
  style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" <?php } ?>
748
- class="bwg_filmstrip_thumbnail_img hidden"
749
  data-url="<?php echo ($is_embed ? "" : BWG()->upload_url) . $image_row->thumb_url; ?>"
750
  src=""
751
  onclick='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")' ontouchend='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")'
@@ -779,7 +749,7 @@ class BWGViewGalleryBox {
779
  }
780
  elseif ($params['watermark_type'] == 'text') {
781
  ?>
782
- <a class="bwg_none_selectable bwg_watermark_text bwg_watermark" target="_blank" href="<?php echo esc_js($params['watermark_link']); ?>"><?php echo stripslashes($params['watermark_text']); ?></a>
783
  <?php
784
  }
785
  ?>
@@ -794,7 +764,7 @@ class BWGViewGalleryBox {
794
  <?php
795
  echo $this->loading();
796
  if ($params['popup_enable_ctrl_btn']) {
797
- $share_url = add_query_arg(array('curr_url' => $current_url, 'image_id' => $current_image_id), WDWLibrary::get_share_page()) . '#bwg' . $gallery_id . '/' . $current_image_id;
798
  ?>
799
  <div class="bwg_btn_container">
800
  <div class="bwg_ctrl_btn_container">
@@ -871,7 +841,7 @@ class BWGViewGalleryBox {
871
  $style = 'inline-block';
872
  }
873
  ?>
874
- <a id="bwg_download" <?php if ($is_embed) { ?> class="hidden" <?php } ?> href="<?php echo $download_href; ?>" target="_blank" download="<?php echo end($current_image_arr); ?>">
875
  <i title="<?php echo __('Download original image', BWG()->prefix); ?>" class="bwg-icon-download bwg_ctrl_btn"></i>
876
  </a>
877
  <?php
@@ -1388,7 +1358,7 @@ class BWGViewGalleryBox {
1388
 
1389
  private function loading() {
1390
  ?>
1391
- <div class="bwg-loading hidden"></div>
1392
  <?php
1393
  }
1394
 
11
  require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php');
12
 
13
  $bwg = (isset($_GET['current_view']) ? esc_html($_GET['current_view']) : 0);
14
+ $current_url = isset($_GET['current_url']) ? $_GET['current_url'] : '';
15
  $theme_id = isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 0;
16
  $current_image_id = WDWLibrary::esc_script('get', 'image_id', 0, 'int');
17
  $gallery_id = WDWLibrary::esc_script('get', 'gallery_id', 0, 'int');
54
  $image_right_click = isset(BWG()->options->image_right_click) ? BWG()->options->image_right_click : 0;
55
 
56
  require_once BWG()->plugin_dir . "/frontend/models/model.php";
57
+ $model_site = new BWGModelSite();
58
  $theme_row = $model_site->get_theme_row_data($theme_id);
59
 
60
  $filmstrip_direction = 'horizontal';
61
  if ($theme_row->lightbox_filmstrip_pos == 'right' || $theme_row->lightbox_filmstrip_pos == 'left') {
62
  $filmstrip_direction = 'vertical';
63
  }
64
+ $image_filmstrip_height = 0;
65
  $image_filmstrip_width = 0;
66
  if ( $params['popup_enable_filmstrip'] ) {
67
  if ( $filmstrip_direction == 'horizontal' ) {
91
  'gallery_id' => $gallery_id,
92
  'tag' => $tag,
93
  'theme_id' => $theme_id,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  );
95
  if ($params['watermark_type'] != 'none') {
96
  $params_array['watermark_link'] = $params['watermark_link'];
220
  border-top-right-radius: <?php echo $theme_row->lightbox_ctrl_cont_border_radius; ?>px;
221
  <?php
222
  }?>
223
+ /*height: <?php /*echo $theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top;*/ ?>px;*/
224
  text-align: <?php echo $theme_row->lightbox_ctrl_btn_align; ?>;
225
  }
226
  .bwg_toggle_container {
715
  <div class="bwg_filmstrip_thumbnail_img_wrap">
716
  <img <?php if( $is_embed || $resolution_thumb ) { ?>
717
  style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" <?php } ?>
718
+ class="bwg_filmstrip_thumbnail_img bwg-hidden"
719
  data-url="<?php echo ($is_embed ? "" : BWG()->upload_url) . $image_row->thumb_url; ?>"
720
  src=""
721
  onclick='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")' ontouchend='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")'
749
  }
750
  elseif ($params['watermark_type'] == 'text') {
751
  ?>
752
+ <a class="bwg_none_selectable bwg_watermark_text bwg_watermark" target="_blank" href="<?php echo esc_js($params['watermark_link']); ?>"><?php echo urldecode($params['watermark_text']); ?></a>
753
  <?php
754
  }
755
  ?>
764
  <?php
765
  echo $this->loading();
766
  if ($params['popup_enable_ctrl_btn']) {
767
+ $share_url = add_query_arg(array('curr_url' => urlencode($current_url), 'image_id' => $current_image_id), WDWLibrary::get_share_page()) . '#bwg' . $gallery_id . '/' . $current_image_id;
768
  ?>
769
  <div class="bwg_btn_container">
770
  <div class="bwg_ctrl_btn_container">
841
  $style = 'inline-block';
842
  }
843
  ?>
844
+ <a id="bwg_download" <?php if ($is_embed) { ?> class="bwg-hidden" <?php } ?> href="<?php echo $download_href; ?>" target="_blank" download="<?php echo end($current_image_arr); ?>">
845
  <i title="<?php echo __('Download original image', BWG()->prefix); ?>" class="bwg-icon-download bwg_ctrl_btn"></i>
846
  </a>
847
  <?php
1358
 
1359
  private function loading() {
1360
  ?>
1361
+ <div class="bwg-loading bwg-hidden"></div>
1362
  <?php
1363
  }
1364
 
frontend/views/BWGViewSlideshow.php CHANGED
@@ -481,7 +481,7 @@ public function display($params = array(), $bwg = 0) {
481
  <div>
482
  <span class="bwg_slideshow_title_spun_<?php echo $bwg; ?>">
483
  <div class="bwg_slideshow_title_text_<?php echo $bwg; ?> <?php if ( !$current_image_alt ) {
484
- echo 'hidden';
485
  } ?>">
486
  <?php echo html_entity_decode($current_image_alt); ?>
487
  </div>
@@ -498,7 +498,7 @@ public function display($params = array(), $bwg = 0) {
498
  <div>
499
  <span class="bwg_slideshow_description_spun_<?php echo $bwg; ?>">
500
  <div class="bwg_slideshow_description_text_<?php echo $bwg; ?> <?php if ( !$current_image_description ) {
501
- echo 'hidden';
502
  } ?>">
503
  <?php echo html_entity_decode(str_replace("\r\n", esc_html('<br />'), $current_image_description)); ?>
504
  </div>
481
  <div>
482
  <span class="bwg_slideshow_title_spun_<?php echo $bwg; ?>">
483
  <div class="bwg_slideshow_title_text_<?php echo $bwg; ?> <?php if ( !$current_image_alt ) {
484
+ echo 'bwg-hidden';
485
  } ?>">
486
  <?php echo html_entity_decode($current_image_alt); ?>
487
  </div>
498
  <div>
499
  <span class="bwg_slideshow_description_spun_<?php echo $bwg; ?>">
500
  <div class="bwg_slideshow_description_text_<?php echo $bwg; ?> <?php if ( !$current_image_description ) {
501
+ echo 'bwg-hidden';
502
  } ?>">
503
  <?php echo html_entity_decode(str_replace("\r\n", esc_html('<br />'), $current_image_description)); ?>
504
  </div>
frontend/views/view.php CHANGED
@@ -179,7 +179,11 @@ class BWGViewSite {
179
  if (isset($params["compuct_album_enable_page"])) {
180
  $compuct_album_enable_page = $params["compuct_album_enable_page"];
181
  }
182
- if (BWG()->options->front_ajax == "1" && $compuct_album_enable_page !== "2" && $compuct_album_enable_page !== "3") {
 
 
 
 
183
  if ( $params['album_view_type'] == 'album' || isset($params['image_rows']) && count($params['image_rows']['images']) ) {
184
  echo $content;
185
  }
@@ -358,7 +362,7 @@ class BWGViewSite {
358
  ?>
359
  <?php
360
  $bwg_search_focus = "";
361
- $bwg_search_reset = "hidden";
362
  $bwg_ajax_reset = "bwg_ajax('".$form_id."', '".$current_view."', '".$cur_gal_id."', ". $album_gallery_id.", '', '".$type."', 1)";
363
  if (BWG()->options->front_ajax == "1" && !empty($bwg_search)) {
364
  $bwg_search_focus = 'style="display:none;"';
@@ -369,7 +373,7 @@ class BWGViewSite {
369
  <div class="bwg_search_container_1" id="bwg_search_container_1_<?php echo $current_view; ?>">
370
  <div class="bwg_search_container_2" id="bwg_search_container_2_<?php echo $current_view; ?>">
371
  <span class="bwg_search_input_container">
372
- <span class="bwg_search_loupe_container1 hidden">
373
  <i title="<?php echo __('SEARCH...', BWG()->prefix); ?>" class="bwg-icon-search bwg_search" onclick="bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
374
  </span>
375
  <input id="bwg_search_input_<?php echo $current_view; ?>" class="bwg_search_input" type="text" onkeypress="bwg_key_press(this); return bwg_check_search_input_enter(this, event);" name="bwg_search_<?php echo $current_view; ?>" value="<?php echo $bwg_search; ?>" placeholder="<?php echo $placeholder; ?>" />
@@ -489,7 +493,8 @@ class BWGViewSite {
489
  $id = $params['container_id'];
490
  $cur_alb_gal_id = $params['cur_alb_gal_id'];
491
  $type = $params['album_view_type'];
492
- $enable_seo = BWG()->options->enable_seo;
 
493
  $pagination = $params['image_enable_page'];
494
  if ( isset($params['image_enable_page'])
495
  && isset($params['images_per_page'])
@@ -655,18 +660,18 @@ class BWGViewSite {
655
  $last_page = "last-page disabled";
656
  }
657
  ?>
658
- <span class="pagination-links_<?php echo $current_view; ?>">
659
- <a class="bwg-a <?php echo $first_page; ?>" title="<?php echo __('Go to the first page', BWG()->prefix); ?>" <?php echo BWG()->options->front_ajax == "1" && $page_number > 1 && $enable_seo ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $first_button; ?></a>
660
- <a class="bwg-a <?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', BWG()->prefix); ?>" <?php echo $page_number > 1 && $enable_seo ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number - 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $previous_button; ?></a>
661
- <span class="paging-input_<?php echo $current_view; ?>">
662
  <span class="total-pages_<?php echo $current_view; ?>"><?php echo $page_number; ?></span> <?php echo __('of', BWG()->prefix); ?>
663
- <span class="total-pages_<?php echo $current_view; ?>">
664
  <?php echo $items_county; ?>
665
  </span>
666
  </span>
667
- <a class="bwg-a <?php echo $next_page ?>" title="<?php echo __('Go to the next page', BWG()->prefix); ?>" <?php echo $page_number + 1 <= $items_county && $enable_seo ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number + 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $next_button; ?></a>
668
- <a class="bwg-a <?php echo $last_page ?>" title="<?php echo __('Go to the last page', BWG()->prefix); ?>" <?php echo BWG()->options->front_ajax == "1" && $page_number < $items_county && $enable_seo ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $items_county ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $last_button; ?></a>
669
- </span>
670
  <?php
671
  }
672
  ?>
@@ -688,13 +693,14 @@ class BWGViewSite {
688
  ?>
689
  <script type="text/javascript">
690
  function bwg_scroll_load_action() {
 
691
  if (jQuery(document).scrollTop() + jQuery(window).height() > (jQuery('#<?php echo $form_id; ?>').offset().top + jQuery('#<?php echo $form_id; ?>').height())) {
692
  spider_page_<?php echo $current_view; ?>('', <?php echo $page_number; ?>, 1, true);
693
  return false;
694
  }
695
  }
696
  jQuery(document).ready(function () {
697
- jQuery(window).off("scroll").on("scroll", bwg_scroll_load_action );
698
  });
699
  </script>
700
  <?php
@@ -742,18 +748,20 @@ class BWGViewSite {
742
 
743
  <?php if ( BWG()->options->front_ajax != "1" ) { ?>
744
  jQuery('.<?php echo $first_page; ?>').on('click', function () {
745
- spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2, 'numeric');
 
746
  });
747
  jQuery('.<?php echo $prev_page; ?>').on('click', function () {
748
- spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1, 'numeric');
749
- return false;
750
  });
751
  jQuery('.<?php echo $next_page; ?>').on('click', function () {
752
- spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1, 'numeric');
753
- return false;
754
  });
755
  jQuery('.<?php echo $last_page; ?>').on('click', function () {
756
- spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2, 'numeric');
 
757
  });
758
 
759
  <?php } ?>
179
  if (isset($params["compuct_album_enable_page"])) {
180
  $compuct_album_enable_page = $params["compuct_album_enable_page"];
181
  }
182
+ $enable_page = "";
183
+ if (isset($params["image_enable_page"])) {
184
+ $enable_page = $params["image_enable_page"];
185
+ }
186
+ if ( BWG()->options->front_ajax == "1" && (($compuct_album_enable_page !== "2" && $compuct_album_enable_page !== "3") && ($enable_page !== "2" && $enable_page !== "3")) ) {
187
  if ( $params['album_view_type'] == 'album' || isset($params['image_rows']) && count($params['image_rows']['images']) ) {
188
  echo $content;
189
  }
362
  ?>
363
  <?php
364
  $bwg_search_focus = "";
365
+ $bwg_search_reset = "bwg-hidden";
366
  $bwg_ajax_reset = "bwg_ajax('".$form_id."', '".$current_view."', '".$cur_gal_id."', ". $album_gallery_id.", '', '".$type."', 1)";
367
  if (BWG()->options->front_ajax == "1" && !empty($bwg_search)) {
368
  $bwg_search_focus = 'style="display:none;"';
373
  <div class="bwg_search_container_1" id="bwg_search_container_1_<?php echo $current_view; ?>">
374
  <div class="bwg_search_container_2" id="bwg_search_container_2_<?php echo $current_view; ?>">
375
  <span class="bwg_search_input_container">
376
+ <span class="bwg_search_loupe_container1 bwg-hidden">
377
  <i title="<?php echo __('SEARCH...', BWG()->prefix); ?>" class="bwg-icon-search bwg_search" onclick="bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
378
  </span>
379
  <input id="bwg_search_input_<?php echo $current_view; ?>" class="bwg_search_input" type="text" onkeypress="bwg_key_press(this); return bwg_check_search_input_enter(this, event);" name="bwg_search_<?php echo $current_view; ?>" value="<?php echo $bwg_search; ?>" placeholder="<?php echo $placeholder; ?>" />
493
  $id = $params['container_id'];
494
  $cur_alb_gal_id = $params['cur_alb_gal_id'];
495
  $type = $params['album_view_type'];
496
+ $enable_seo = (int) BWG()->options->enable_seo;
497
+ $enable_dynamic_url = (int) BWG()->options->front_ajax;
498
  $pagination = $params['image_enable_page'];
499
  if ( isset($params['image_enable_page'])
500
  && isset($params['images_per_page'])
660
  $last_page = "last-page disabled";
661
  }
662
  ?>
663
+ <span class="pagination-links_<?php echo $current_view; ?>">
664
+ <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>
665
+ <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>
666
+ <span class="paging-input_<?php echo $current_view; ?>">
667
  <span class="total-pages_<?php echo $current_view; ?>"><?php echo $page_number; ?></span> <?php echo __('of', BWG()->prefix); ?>
668
+ <span class="total-pages_<?php echo $current_view; ?>">
669
  <?php echo $items_county; ?>
670
  </span>
671
  </span>
672
+ <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>
673
+ <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>
674
+ </span>
675
  <?php
676
  }
677
  ?>
693
  ?>
694
  <script type="text/javascript">
695
  function bwg_scroll_load_action() {
696
+
697
  if (jQuery(document).scrollTop() + jQuery(window).height() > (jQuery('#<?php echo $form_id; ?>').offset().top + jQuery('#<?php echo $form_id; ?>').height())) {
698
  spider_page_<?php echo $current_view; ?>('', <?php echo $page_number; ?>, 1, true);
699
  return false;
700
  }
701
  }
702
  jQuery(document).ready(function () {
703
+ jQuery(window).off("scroll").on("scroll", bwg_scroll_load_action );
704
  });
705
  </script>
706
  <?php
748
 
749
  <?php if ( BWG()->options->front_ajax != "1" ) { ?>
750
  jQuery('.<?php echo $first_page; ?>').on('click', function () {
751
+ spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2, 'numeric');
752
+ return false;
753
  });
754
  jQuery('.<?php echo $prev_page; ?>').on('click', function () {
755
+ spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1, 'numeric');
756
+ return false;
757
  });
758
  jQuery('.<?php echo $next_page; ?>').on('click', function () {
759
+ spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1, 'numeric');
760
+ return false;
761
  });
762
  jQuery('.<?php echo $last_page; ?>').on('click', function () {
763
+ spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2, 'numeric');
764
+ return false;
765
  });
766
 
767
  <?php } ?>
js/bwg.js CHANGED
@@ -1762,6 +1762,7 @@ var bwg_j = 'pr_' + j_int;
1762
  * @param files
1763
  */
1764
  function bwg_add_image(files) {
 
1765
  jQuery('#check_all_items, #check_all').attr('checked', false);
1766
  for ( var i in files ) {
1767
  if ( files[i]['error'] == true ) {
@@ -1774,6 +1775,19 @@ function bwg_add_image(files) {
1774
  var instagram_post_width = files[i]['resolution'].split('x')[0].trim();
1775
  var instagram_post_height = files[i]['resolution'].split('x')[1].trim();
1776
  var html = jQuery(".wd-template").clone().html();
 
 
 
 
 
 
 
 
 
 
 
 
 
1777
  var name = files[i]['name'].substr(0, files[i]['name'].lastIndexOf('.')) || files[i]['name'];
1778
  var filename = files[i]['filename'];
1779
  if ( name != "" ) {
1762
  * @param files
1763
  */
1764
  function bwg_add_image(files) {
1765
+ var gallery_type = jQuery('#gallery_type option:selected').val();
1766
  jQuery('#check_all_items, #check_all').attr('checked', false);
1767
  for ( var i in files ) {
1768
  if ( files[i]['error'] == true ) {
1775
  var instagram_post_width = files[i]['resolution'].split('x')[0].trim();
1776
  var instagram_post_height = files[i]['resolution'].split('x')[1].trim();
1777
  var html = jQuery(".wd-template").clone().html();
1778
+ // Google Photos add-on is active.
1779
+ if ( gallery_type == 'google_photos' ) {
1780
+ jQuery('.bulkactions').remove();
1781
+ jQuery('#images_table').find('.col_drag').remove();
1782
+ jQuery('#images_table').find('.check-column').remove();
1783
+ jQuery('.wd-template').find('.col_drag').remove();
1784
+ jQuery('.wd-template').find('.check-column').remove();
1785
+ jQuery('.wd-template').find('.bwg-td-item-redirect-url').remove();
1786
+ jQuery('.wd-template').find('.bwg-td-item-tags').remove();
1787
+ jQuery('.wd-template').find('#image_alt_text_tempid').prop("disabled", true);
1788
+ jQuery('.wd-template').find('#image_description_tempid').prop("disabled", true);
1789
+ html = jQuery(".wd-template").clone().html();
1790
+ }
1791
  var name = files[i]['name'].substr(0, files[i]['name'].lastIndexOf('.')) || files[i]['name'];
1792
  var filename = files[i]['filename'];
1793
  if ( name != "" ) {
js/bwg_frontend.js CHANGED
@@ -10,65 +10,42 @@ var bwg_params_ib = [];
10
  var bwg_params_carousel = [];
11
 
12
  jQuery(document).ready(function () {
13
-
14
- document.addEventListener("visibilitychange", function() {
15
- var bwg_error = false;
16
- /* If there is error (empty gallery).*/
17
- jQuery(".bwg_container").each(function () {
18
- if ( jQuery(this).find(".wd_error").length > 0 ) {
19
- bwg_error = true;
20
- }
21
- });
22
- if ( !bwg_error ) {
23
- if (document.visibilityState == 'visible') {
24
- bwg_slideshow_focus();
25
- }
26
- if (document.visibilityState == 'hidden') {
27
- bwg_slideshow_blur();
28
- }
29
- }
30
- });
31
  bwg_main_ready();
32
 
 
 
 
33
 
34
- jQuery.fn.extend({
35
- hideShow: function (callback) {
36
- this.checkForVisiblilityChange(callback);
37
- return this;
38
- },
39
- checkForVisiblilityChange: function (callback) {
40
- if (!(this.length >>> 0)) {
41
- return undefined;
42
- }
43
- var elem, i = 0;
44
- while ((elem = this[i++])) {
45
- var curValue = jQuery(elem).is(":visible");
46
- (elem.lastVisibility === undefined) && (elem.lastVisibility = curValue);
47
- (curValue !== elem.lastVisibility) && (
48
- elem.lastVisibility = curValue,
49
- (typeof callback === "function") && (
50
- callback.apply(this, [new jQuery.Event('visibilityChanged'), curValue ? "shown" : "hidden"])
51
- ),
52
- (function (elem, curValue) {
53
- setTimeout(function () {
54
- jQuery(elem).trigger('visibilityChanged', [curValue ? "shown" : "hidden"])
55
- }, 10)
56
- })(elem, curValue)
57
- )
58
- }
59
- (function (that, a) {
60
- setTimeout(function () {
61
- that.checkForVisiblilityChange.apply(that, a);
62
- }, 10)
63
- })(this, arguments)
64
  }
65
- });
66
- jQuery(this).hideShow(function(event, visibility) {
67
- if ( visibility == 'shown' ) {
68
- bwg_main_ready();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
  });
71
-
72
  });
73
 
74
  function bwg_main_ready() {
@@ -746,8 +723,8 @@ function bwg_search_focus(that) {
746
 
747
  /* show search and reset icons */
748
  function bwg_key_press(that) {
749
- jQuery(that).parent().find('.bwg_search_reset_container').removeClass("hidden");
750
- jQuery(that).parent().find('.bwg_search_loupe_container1').removeClass("hidden");
751
  }
752
 
753
  function bwg_all_thumnails_loaded(that) {
@@ -985,7 +962,8 @@ function bwg_thumbnail_masonry(that) {
985
  scale = jQuery( this ).find("img").data("width")/jQuery( this ).find("img").data("height");
986
  scaleHeight = jQuery( this ).width()/scale;
987
  /* calculating height of image title and description */
988
- var k = + ( jQuery(this).find( '.bwg-title1' ).height() + jQuery(this).find( '.bwg-masonry-thumb-description' ).height() );
 
989
  jQuery(this).height( scaleHeight + k );
990
  }
991
  /* Use getBoundingClientRect instead of jQuery.height() to avoid rounding. */
@@ -1508,8 +1486,8 @@ function bwg_document_ready() {
1508
  jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function (e) {
1509
  if (jQuery(this).find('.bwg_search_input').val() == '') {
1510
  jQuery(this).find('.search_placeholder_title').show();
1511
- jQuery(this).find('.bwg_search_loupe_container1').addClass("hidden");
1512
- jQuery(this).find('.bwg_search_reset_container').addClass("hidden");
1513
  }
1514
  });
1515
  });
@@ -1561,8 +1539,8 @@ function bwg_clear_search_input (current_view) {
1561
  return;
1562
  }
1563
  jQuery("#bwg_search_input_" + current_view).val('');
1564
- jQuery("#bwg_search_container_1_" + current_view + " .bwg_search_loupe_container1").addClass("hidden");
1565
- jQuery("#bwg_search_container_1_" + current_view + " .bwg_search_reset_container").addClass("hidden");
1566
  }
1567
 
1568
  function bwg_check_search_input_enter(that, e) {
@@ -1584,11 +1562,11 @@ function bwg_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, typ
1584
  var search_input_val = jQuery("#bwg_search_input_" + current_view).val();
1585
  var current_url = window.location.href;
1586
  var redirect_url = "";
1587
- var filter_tag = jQuery("#bwg_tag_id_" + id).val();
1588
  if ( window.location.hash !== "" ) {
1589
  current_url = current_url.replace("#", "");
1590
  }
1591
- if ( search_input_val !== "" ) {
1592
  redirect_url = bwg_remove_url_parameter("page_number_" + current_view, current_url);
1593
  redirect_url = bwg_add_url_parameter(redirect_url, "bwg_search_" + current_view, search_input_val);
1594
  if ( redirect_url !== false ) {
@@ -1610,12 +1588,13 @@ function bwg_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, typ
1610
  }
1611
  if ( typeof filter_tag !== "undefined" && filter_tag !== null && filter_tag.length > 0 ) {
1612
  var tag_ides = "";
1613
- jQuery.each(filter_tag, function (key) {
 
1614
  var flag = ",";
1615
- if (key === filter_tag.length - 1) {
1616
  flag = "";
1617
  }
1618
- tag_ides += filter_tag[key] + flag;
1619
  });
1620
  if ( tag_ides !== "" ) {
1621
  redirect_url = bwg_add_url_parameter(current_url, "filter_tag_" + current_view, tag_ides);
@@ -1762,8 +1741,8 @@ function bwg_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, typ
1762
  if (jQuery(this).attr("data-lazy-src") != undefined && jQuery(this).attr("data-lazy-src") != '') {
1763
  jQuery(this).attr("src", jQuery(this).attr("data-lazy-src"));
1764
  }
1765
- else if (jQuery(this).attr("data-src") != undefined && jQuery(this).attr("data-src") != '') {
1766
- jQuery(this).attr("src", jQuery(this).attr("data-src"));
1767
  }
1768
  });
1769
  jQuery(".blog_style_image_buttons_conteiner_" + current_view).find(jQuery(".bwg_blog_style_img_" + current_view)).on("load", function() {
@@ -1860,7 +1839,6 @@ function bwg_select_tag(current_view, form_id, cur_gal_id, album_gallery_id, typ
1860
  if ( reset ) {
1861
  jQuery("#bwg_tag_id_" + cur_gal_id).val('');
1862
  }
1863
-
1864
  bwg_ajax(form_id, current_view, cur_gal_id, album_gallery_id, '', type, 1, '');
1865
  }
1866
 
10
  var bwg_params_carousel = [];
11
 
12
  jQuery(document).ready(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  bwg_main_ready();
14
 
15
+ function bwg_hiddenFunction() {
16
+ bwg_slideshow_blur();
17
+ }
18
 
19
+ function bwg_visibleFunction() {
20
+ bwg_main_ready();
21
+ bwg_slideshow_focus();
22
+ }
23
+ jQuery(".bwg_container").each(function () {
24
+ var bwg_error = false;
25
+ if ( jQuery(this).find(".wd_error").length > 0 ) {
26
+ bwg_error = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
28
+ if ( !bwg_error ) {
29
+ var bwg_visibilityCounter = 0;
30
+ jQuery(this).on('visibility', function () {
31
+ var $element = jQuery(this);
32
+ setInterval(function () {
33
+ if ($element.is(':hidden')) {
34
+ if (bwg_visibilityCounter == 1) {
35
+ bwg_visibilityCounter = 0;
36
+ bwg_hiddenFunction();
37
+ }
38
+ }
39
+ else {
40
+ if (bwg_visibilityCounter == 0) {
41
+ bwg_visibilityCounter = 1;
42
+ bwg_visibleFunction();
43
+ }
44
+ }
45
+ }, 300);
46
+ }).trigger('visibility');
47
  }
48
  });
 
49
  });
50
 
51
  function bwg_main_ready() {
723
 
724
  /* show search and reset icons */
725
  function bwg_key_press(that) {
726
+ jQuery(that).parent().find('.bwg_search_reset_container').removeClass("bwg-hidden");
727
+ jQuery(that).parent().find('.bwg_search_loupe_container1').removeClass("bwg-hidden");
728
  }
729
 
730
  function bwg_all_thumnails_loaded(that) {
962
  scale = jQuery( this ).find("img").data("width")/jQuery( this ).find("img").data("height");
963
  scaleHeight = jQuery( this ).width()/scale;
964
  /* calculating height of image title and description */
965
+ /* finding title/description with 'a>' selector to avoid calculating heights for 'Show on hover' option. */
966
+ var k = + ( jQuery(this).find( 'a>.bwg-title1' ).height() + jQuery(this).find( 'a>.bwg-masonry-thumb-description' ).height() );
967
  jQuery(this).height( scaleHeight + k );
968
  }
969
  /* Use getBoundingClientRect instead of jQuery.height() to avoid rounding. */
1486
  jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function (e) {
1487
  if (jQuery(this).find('.bwg_search_input').val() == '') {
1488
  jQuery(this).find('.search_placeholder_title').show();
1489
+ jQuery(this).find('.bwg_search_loupe_container1').addClass("bwg-hidden");
1490
+ jQuery(this).find('.bwg_search_reset_container').addClass("bwg-hidden");
1491
  }
1492
  });
1493
  });
1539
  return;
1540
  }
1541
  jQuery("#bwg_search_input_" + current_view).val('');
1542
+ jQuery("#bwg_search_container_1_" + current_view + " .bwg_search_loupe_container1").addClass("bwg-hidden");
1543
+ jQuery("#bwg_search_container_1_" + current_view + " .bwg_search_reset_container").addClass("bwg-hidden");
1544
  }
1545
 
1546
  function bwg_check_search_input_enter(that, e) {
1562
  var search_input_val = jQuery("#bwg_search_input_" + current_view).val();
1563
  var current_url = window.location.href;
1564
  var redirect_url = "";
1565
+ var filter_tag = jQuery("#bwg_tag_id_" + current_view).val();
1566
  if ( window.location.hash !== "" ) {
1567
  current_url = current_url.replace("#", "");
1568
  }
1569
+ if ( search_input_val !== "" && typeof search_input_val !== "undefined" ) {
1570
  redirect_url = bwg_remove_url_parameter("page_number_" + current_view, current_url);
1571
  redirect_url = bwg_add_url_parameter(redirect_url, "bwg_search_" + current_view, search_input_val);
1572
  if ( redirect_url !== false ) {
1588
  }
1589
  if ( typeof filter_tag !== "undefined" && filter_tag !== null && filter_tag.length > 0 ) {
1590
  var tag_ides = "";
1591
+ var filter_tags = filter_tag.split(',');
1592
+ jQuery.each(filter_tags, function (key) {
1593
  var flag = ",";
1594
+ if (key === filter_tags.length - 1) {
1595
  flag = "";
1596
  }
1597
+ tag_ides += filter_tags[key] + flag;
1598
  });
1599
  if ( tag_ides !== "" ) {
1600
  redirect_url = bwg_add_url_parameter(current_url, "filter_tag_" + current_view, tag_ides);
1741
  if (jQuery(this).attr("data-lazy-src") != undefined && jQuery(this).attr("data-lazy-src") != '') {
1742
  jQuery(this).attr("src", jQuery(this).attr("data-lazy-src"));
1743
  }
1744
+ else if (jQuery(this).attr("data-original") != undefined && jQuery(this).attr("data-original") != '') {
1745
+ jQuery(this).attr("src", jQuery(this).attr("data-original"));
1746
  }
1747
  });
1748
  jQuery(".blog_style_image_buttons_conteiner_" + current_view).find(jQuery(".bwg_blog_style_img_" + current_view)).on("load", function() {
1839
  if ( reset ) {
1840
  jQuery("#bwg_tag_id_" + cur_gal_id).val('');
1841
  }
 
1842
  bwg_ajax(form_id, current_view, cur_gal_id, album_gallery_id, '', type, 1, '');
1843
  }
1844
 
js/bwg_gallery_box.js CHANGED
@@ -689,23 +689,31 @@ function spider_showpopup(description, lifetime, popup, duration, lightbox_ctrl_
689
  if ( !is_embed ) {
690
  if ( jQuery( '#spider_popup_wrap .bwg_popup_image_spun img' ).prop( 'complete' ) ) {
691
  /* Already loaded. */
692
- bwg_first_image_load( popup );
693
  }
694
  else {
695
  jQuery( '#spider_popup_wrap .bwg_popup_image_spun img' ).on( 'load error', function () {
696
- bwg_first_image_load( popup );
697
  } );
698
  }
699
  }
700
  else {
701
- bwg_first_image_load( popup );
702
  }
703
- spider_receivedpopup( description, lifetime, lightbox_ctrl_btn_pos );
704
  }
705
  }
706
 
707
- function bwg_first_image_load(popup) {
708
  popup.show();
 
 
 
 
 
 
 
 
709
  jQuery( ".bwg_spider_popup_loading" ).hide();
710
  if ( gallery_box_data['preload_images'] == 1 ) {
711
  bwg_preload_images( parseInt( jQuery( '#bwg_current_image_key' ).val() ) );
@@ -721,17 +729,10 @@ function spider_hasalreadyreceivedpopup(description) {
721
  return false;
722
  }
723
 
724
- function spider_receivedpopup(description, lifetime, lightbox_ctrl_btn_pos) {
725
  var date = new Date();
726
  date.setDate(date.getDate() + lifetime);
727
  document.cookie = description + "=true;expires=" + date.toUTCString() + ";path=/";
728
- var bwg_ctrl_btn_container_height = gallery_box_data['bwg_ctrl_btn_container_height'];
729
- if (lightbox_ctrl_btn_pos == 'bottom') {
730
- jQuery(".bwg_toggle_container").css("bottom", bwg_ctrl_btn_container_height + "px");
731
- }
732
- else if (lightbox_ctrl_btn_pos == 'top') {
733
- jQuery(".bwg_toggle_container").css("top", bwg_ctrl_btn_container_height + "px");
734
- }
735
  }
736
 
737
  function spider_isunsupporteduseragent() {
@@ -1131,7 +1132,6 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
1131
  }
1132
  }
1133
  }, 200);
1134
-
1135
  jQuery("#spider_popup_left").show();
1136
  jQuery("#spider_popup_right").show();
1137
  jQuery(".bwg_image_info").hide();
@@ -1230,6 +1230,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
1230
  location.replace("#bwg" + gallery_box_data['gallery_id'] + "/" + data[key]["id"]);
1231
  history.replaceState(undefined, undefined, "#bwg" + gallery_box_data['gallery_id'] + "/" + data[key]["id"]);
1232
  }
 
1233
  /* Change image id for rating.*/
1234
  if (gallery_box_data['popup_enable_rate']) {
1235
  jQuery("#bwg_star").attr("data-score", data[key]["avg_rating"]);
@@ -1281,13 +1282,13 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
1281
  var cur_width = jQuery(current_image_class).width();
1282
  var innhtml = '<span class="bwg_popup_image_spun1" style="display: ' + ( !is_embed ? 'table' : 'block' ) + '; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:' + (!is_embed ? 'table-cell' : 'block') + '; vertical-align: middle;text-align: center;height: 100%;">';
1283
  if ( !is_embed ) {
1284
- jQuery(".bwg-loading").removeClass("hidden");
1285
- jQuery("#bwg_download").removeClass("hidden");
1286
  innhtml += '<img style="max-height: ' + cur_height + 'px; max-width: ' + cur_width + 'px;" class="bwg_popup_image bwg_popup_watermark" src="' + gallery_box_data['site_url'] + jQuery('<span />').html(data[key]["image_url"]).text() + '" alt="' + data[key]["alt"] + '" />';
1287
  }
1288
  else { /*is_embed*/
1289
  /* hide download button if image source is embed */
1290
- jQuery("#bwg_download").addClass("hidden");
1291
  innhtml += '<span class="bwg_popup_embed bwg_popup_watermark" style="display: ' + ( is_ifrem ? 'block' : 'table' ) + '; table-layout: fixed; height: 100%;">' + (is_embed_instagram_video ? '<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>' : ' ');
1292
  if (is_embed_instagram_post) {
1293
  var post_width = 0;
@@ -1310,7 +1311,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
1310
  innhtml += '</span></span>';
1311
  jQuery(next_image_class).html(innhtml);
1312
  jQuery(next_image_class).find("img").on("load error", function () {
1313
- jQuery(".bwg-loading").addClass("hidden");
1314
  });
1315
  jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({
1316
  maxWidth: cur_width,
@@ -1958,7 +1959,7 @@ function bwg_popup_resize_lightbox() {
1958
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1959
  }
1960
  }
1961
- var bwg_ctrl_btn_container_height = gallery_box_data['bwg_ctrl_btn_container_height'];
1962
  if ( gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' ) {
1963
  if (jQuery(".bwg_toggle_container i").hasClass('bwg-icon-caret-down')) {
1964
  jQuery(".bwg_toggle_container").css("bottom", bwg_ctrl_btn_container_height + "px");
@@ -2212,7 +2213,7 @@ function bwg_load_visible_images( key, preloadCount, total_thumbnail_count ) {
2212
  }
2213
  for( var i = startPoint; i <= endPoint; i++) {
2214
  var filmstrip_image = jQuery("#bwg_filmstrip_thumbnail_" + i + " img");
2215
- filmstrip_image.removeClass('hidden');
2216
  filmstrip_image.attr('src', filmstrip_image.data('url'));
2217
  }
2218
  }
@@ -2225,13 +2226,13 @@ function bwg_load_filmstrip() {
2225
 
2226
  if ( rightIndex < total_thumbnail_count ) { /* check if right index is greater than max index */
2227
  var filmstrip_image = jQuery("#bwg_filmstrip_thumbnail_" + rightIndex + " img");
2228
- filmstrip_image.removeClass('hidden');
2229
  filmstrip_image.attr('src', filmstrip_image.data('url'));
2230
  }
2231
  /* Left from key indexes */
2232
  if ( leftIndex >= 0 ) {
2233
  var filmstrip_image = jQuery("#bwg_filmstrip_thumbnail_" + leftIndex + " img");
2234
- filmstrip_image.removeClass('hidden');
2235
  filmstrip_image.attr('src', filmstrip_image.data('url'));
2236
  }
2237
  }
689
  if ( !is_embed ) {
690
  if ( jQuery( '#spider_popup_wrap .bwg_popup_image_spun img' ).prop( 'complete' ) ) {
691
  /* Already loaded. */
692
+ bwg_first_image_load( popup, lightbox_ctrl_btn_pos );
693
  }
694
  else {
695
  jQuery( '#spider_popup_wrap .bwg_popup_image_spun img' ).on( 'load error', function () {
696
+ bwg_first_image_load( popup, lightbox_ctrl_btn_pos );
697
  } );
698
  }
699
  }
700
  else {
701
+ bwg_first_image_load( popup, lightbox_ctrl_btn_pos );
702
  }
703
+ spider_receivedpopup( description, lifetime );
704
  }
705
  }
706
 
707
+ function bwg_first_image_load(popup, lightbox_ctrl_btn_pos) {
708
  popup.show();
709
+
710
+ var bwg_ctrl_btn_container_height = jQuery(".bwg_ctrl_btn_container").height();
711
+ if (lightbox_ctrl_btn_pos == 'bottom') {
712
+ jQuery(".bwg_toggle_container").css("bottom", bwg_ctrl_btn_container_height + "px");
713
+ }
714
+ else if (lightbox_ctrl_btn_pos == 'top') {
715
+ jQuery(".bwg_toggle_container").css("top", bwg_ctrl_btn_container_height + "px");
716
+ }
717
  jQuery( ".bwg_spider_popup_loading" ).hide();
718
  if ( gallery_box_data['preload_images'] == 1 ) {
719
  bwg_preload_images( parseInt( jQuery( '#bwg_current_image_key' ).val() ) );
729
  return false;
730
  }
731
 
732
+ function spider_receivedpopup(description, lifetime) {
733
  var date = new Date();
734
  date.setDate(date.getDate() + lifetime);
735
  document.cookie = description + "=true;expires=" + date.toUTCString() + ";path=/";
 
 
 
 
 
 
 
736
  }
737
 
738
  function spider_isunsupporteduseragent() {
1132
  }
1133
  }
1134
  }, 200);
 
1135
  jQuery("#spider_popup_left").show();
1136
  jQuery("#spider_popup_right").show();
1137
  jQuery(".bwg_image_info").hide();
1230
  location.replace("#bwg" + gallery_box_data['gallery_id'] + "/" + data[key]["id"]);
1231
  history.replaceState(undefined, undefined, "#bwg" + gallery_box_data['gallery_id'] + "/" + data[key]["id"]);
1232
  }
1233
+ jQuery("#bwg_rate_form input[name='image_id']").val(data[key]["id"]);
1234
  /* Change image id for rating.*/
1235
  if (gallery_box_data['popup_enable_rate']) {
1236
  jQuery("#bwg_star").attr("data-score", data[key]["avg_rating"]);
1282
  var cur_width = jQuery(current_image_class).width();
1283
  var innhtml = '<span class="bwg_popup_image_spun1" style="display: ' + ( !is_embed ? 'table' : 'block' ) + '; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:' + (!is_embed ? 'table-cell' : 'block') + '; vertical-align: middle;text-align: center;height: 100%;">';
1284
  if ( !is_embed ) {
1285
+ jQuery(".bwg-loading").removeClass("bwg-hidden");
1286
+ jQuery("#bwg_download").removeClass("bwg-hidden");
1287
  innhtml += '<img style="max-height: ' + cur_height + 'px; max-width: ' + cur_width + 'px;" class="bwg_popup_image bwg_popup_watermark" src="' + gallery_box_data['site_url'] + jQuery('<span />').html(data[key]["image_url"]).text() + '" alt="' + data[key]["alt"] + '" />';
1288
  }
1289
  else { /*is_embed*/
1290
  /* hide download button if image source is embed */
1291
+ jQuery("#bwg_download").addClass("bwg-hidden");
1292
  innhtml += '<span class="bwg_popup_embed bwg_popup_watermark" style="display: ' + ( is_ifrem ? 'block' : 'table' ) + '; table-layout: fixed; height: 100%;">' + (is_embed_instagram_video ? '<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>' : ' ');
1293
  if (is_embed_instagram_post) {
1294
  var post_width = 0;
1311
  innhtml += '</span></span>';
1312
  jQuery(next_image_class).html(innhtml);
1313
  jQuery(next_image_class).find("img").on("load error", function () {
1314
+ jQuery(".bwg-loading").addClass("bwg-hidden");
1315
  });
1316
  jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({
1317
  maxWidth: cur_width,
1959
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1960
  }
1961
  }
1962
+ var bwg_ctrl_btn_container_height = jQuery(".bwg_ctrl_btn_container").height();
1963
  if ( gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' ) {
1964
  if (jQuery(".bwg_toggle_container i").hasClass('bwg-icon-caret-down')) {
1965
  jQuery(".bwg_toggle_container").css("bottom", bwg_ctrl_btn_container_height + "px");
2213
  }
2214
  for( var i = startPoint; i <= endPoint; i++) {
2215
  var filmstrip_image = jQuery("#bwg_filmstrip_thumbnail_" + i + " img");
2216
+ filmstrip_image.removeClass('bwg-hidden');
2217
  filmstrip_image.attr('src', filmstrip_image.data('url'));
2218
  }
2219
  }
2226
 
2227
  if ( rightIndex < total_thumbnail_count ) { /* check if right index is greater than max index */
2228
  var filmstrip_image = jQuery("#bwg_filmstrip_thumbnail_" + rightIndex + " img");
2229
+ filmstrip_image.removeClass('bwg-hidden');
2230
  filmstrip_image.attr('src', filmstrip_image.data('url'));
2231
  }
2232
  /* Left from key indexes */
2233
  if ( leftIndex >= 0 ) {
2234
  var filmstrip_image = jQuery("#bwg_filmstrip_thumbnail_" + leftIndex + " img");
2235
+ filmstrip_image.removeClass('bwg-hidden');
2236
  filmstrip_image.attr('src', filmstrip_image.data('url'));
2237
  }
2238
  }
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(document).ready(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");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")||(39===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):37===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):27===e.keyCode?spider_destroypopup(1e3):32===e.keyCode&&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,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_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, .bwg_popup_image").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,i,a,r,_,s,o){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_hasalreadyreceivedpopup(_)||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:'+i+"px; height:"+a+"px; margin-top:-"+a/2+"px; margin-left: -"+i/2+'px; ">'+e+"</div>").hide().appendTo("body");gallery_box_ready(),spider_showpopup(_,s,t,r,o)},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):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i)}),spider_receivedpopup(e,t,r))}function bwg_first_image_load(e){e.show(),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_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function spider_receivedpopup(e,t,i){var a=new Date;a.setDate(a.getDate()+t),document.cookie=e+"=true;expires="+a.toUTCString()+";path=/";var r=gallery_box_data.bwg_ctrl_btn_container_height;"bottom"==i?jQuery(".bwg_toggle_container").css("bottom",r+"px"):"top"==i&&jQuery(".bwg_toggle_container").css("top",r+"px")}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){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&&location.replace("#"),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,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.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=jQuery("#bwg_tag_id_"+_).val();s=s||0;var o=1==i?"&open_ecommerce=1":"",l=jQuery("#bwg_search_input_"+_).val(),n=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";l=l||"",void 0!==a&&(r+="&gallery_id="+a);var g="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(g="&open_comment=1"),spider_createpopup(r+"&bwg_random_seed="+jQuery("#bwg_random_seed_"+_).val()+"&image_id="+e+"&filter_tag="+s+o+g+"&filter_search_name="+l+n,_,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,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,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)),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("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("hidden"),jQuery("#bwg_download").removeClass("hidden"),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(r[a].image_url).text()+'" alt="'+r[a].alt+'" />';function p(){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",r[a].image_url):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+r[a].image_url),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+r[a].thumb_url.replace("/thumb/","/.original/")));var e=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].image_url));i=i.replace(/%252F/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"),0==r[a].comment_count?jQuery("#bwg_added_comments").hide():(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(d+="</span></span>",jQuery(o).html(d),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:u,maxHeight:b,height:"auto"}),l)p();else jQuery(o).find("img").one("load",function(){p()}).each(function(){this.complete&&jQuery(this).load()})}}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(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[e]&&0!=gallery_box_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,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=gallery_box_data.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("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("hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("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+=" >",""!=i&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" 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+=" >",""!=i&&(l+='<img src="//instagram.com/p/'+i+'/media/?size=l" 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+=" >",""!=i&&(l+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+i+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),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=jQuery.parseJSON(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+jQuery.parseJSON(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(){1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(jQuery(this).data("bwg"))}),bwg_document_ready(),jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}),bwg_slideshow_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_image_browser_ready()}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_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(){jQuery(".bwg_blog_style").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e);var t=!1;jQuery(this).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"),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(e,jQuery(this).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(jQuery(this).attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1});var i=window.location.hash.substring(1);i&&"-1"!=i.indexOf("bwg")&&(bwg_hash_array=i.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_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_slideshow_blur(){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=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_ready(){jQuery(".bwg-carousel").each(function(){var t=jQuery(this).data("bwg");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(){bwg_params_carousel[t].carousel.prev()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(){bwg_params_carousel[t].carousel.next()}),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].bwg_currentlyMoving=!1,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].bwg_currentlyMoving=!0,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),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(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_params_carousel[e]=jQuery(this).data("params"),bwg_carousel_watermark(e),bwg_carousel_params(e),bwg_container_loaded(e)})}function bwg_carousel_params(t){var e=jQuery("#bwg_container1_"+t).parent().width(),i=1;e<bwg_params_carousel[t].carousel_r_width?i=e/bwg_params_carousel[t].carousel_r_width:e=bwg_params_carousel[t].carousel_r_width,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*i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*i),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*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:e*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*i}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel-container"+t).css({width:e,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:e*i,containerHeight:bwg_params_carousel[t].image_height*i,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*i,largeFeatureHeight:bwg_params_carousel[t].image_height*i,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_play_pause-ico_"+e).css({fontSize:i*bwg_params_carousel[e].carousel_play_pause_btn_size/a}),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(){jQuery(".bwg_slideshow").each(function(){var i=jQuery(this).data("bwg");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(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e),jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery(".image_browser_images_conteiner_"+e).attr("data-params")),setTimeout(function(){bwg_image_browser(e)},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("hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("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_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden")}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=jQuery(e);if(t.find(".bwg-empty-item").remove(),"horizontal"==t.data("masonry-type")){var a=t.data("thumbnail-height"),r=t.data("max-count"),_=[];for(i=0;i<r;i++)_.push(0);t.find(".bwg-item").each(function(){var e=_.indexOf(Math.min.apply(Math,_));jQuery(this).css({height:a,order:e+1}),_[e]+=jQuery(this)[0].getBoundingClientRect().width});var s=Math.max.apply(Math,_);for(t.width(s),i=0;i<r;i++)_[i]<s&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:a,order:i+1,width:s-_[i]}))}else{t.removeAttr("style");s=t.width();var o=t.data("thumbnail-width"),l=(r=t.data("max-count"),parseInt(s/o)+("0"==t.data("resizable-thumbnails")?0:1));r<l&&(l=r);var n=t.find(".bwg-item").length;n<l&&(l=n);var g,w,b=100/l,u=[];for(i=0;i<l;i++)u.push(0);t.find(".bwg-item").each(function(){var e=u.indexOf(Math.min.apply(Math,u));if(jQuery(this).css({width:b+"%",order:e+1}),0<jQuery(this).find("img").attr("data-width").length&&0<jQuery(this).find("img").attr("data-height").length){w=jQuery(this).find("img").data("width")/jQuery(this).find("img").data("height"),g=jQuery(this).width()/w;var t=+(jQuery(this).find(".bwg-title1").height()+jQuery(this).find(".bwg-masonry-thumb-description").height());jQuery(this).height(g+t)}u[e]+=jQuery(this)[0].getBoundingClientRect().height});var d=Math.max.apply(Math,u);for(i=0;i<l;i++)u[i]<d&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:b+"%",order:i+1,height:d-u[i]}));t.outerWidth(l*o),t.height(d)}bwg_container_loaded(t.data("bwg"))}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]=z=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(S=[])[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,S[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){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=[],z=0;z<Q;z++)k[z]=0,x[z]=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]++,B=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:B,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var C=0,I=[],E=0,O=0;for(z=0;z<Q;z++)C+=j,I[z]=0,c.each(function(e){v[e]==z&&(I[z]+=c.eq(e).height())}),0!=I[z]&&(E+=j/I[z],O+=j*x[z]*2*r/I[z]);var M=0;0!=E&&(M=(C+O)/E);for(z=0;z<Q;z++)0!=I[z]&&(u[z]=(M-2*x[z]*r)/I[z]);var S,T=[];T[0]=0;for(z=1;z<=Q;z++)T[z]=T[z-1]+j*u[z-1]+2*r;var B=[];for(z=0;z<Q;z++)B[z]=0;(S=[])[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:B[v[e]],left:T[v[e]]}),B[v[e]]+=i*u[v[e]]+2*r,S[v[e]]=e}),jQuery("#"+i).width(T[Q]).height(B[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(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(r,e,_){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+r).width(),t=jQuery(this).children(".bwg_mosaic_thumb_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(e);var i=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(),a=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:_+.5*t-.5*a<0?_:_+.5*t-.5*a,left:_+.5*e-.5*i,opacity:1,"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:0,left:-1e4,opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*_+"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(".bwg-album").off("click").on("click",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(".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1").on("click",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=jQuery(e).parent().parent(),a=i.find(".current_view").val(),r=i.find(".form_id").val(),_=i.find(".cur_gal_id").val(),s=i.find(".album_gallery_id").val(),o=i.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){t=t+jQuery(e).text()+","}),""==(t=t.slice(0,-1))&&(t=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",t),jQuery(e).parent().find(".CaptionCont .placeholder").html(t),jQuery("#bwg_tag_id_"+a).val(jQuery("#bwg_tag_id_"+_).val()),bwg_select_tag(a,r,_,s,o,!1)}function bwg_document_ready(){bwg_add_lightbox(),jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this);e.data("right-click-protection")&&bwg_disable_right_click(e),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var t=e.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&t.length)for(var i=0;i<t[0].length;i++)void 0===t[0][i].attributes.selected&&(t[0][i].selected=!1);t.length&&(t.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]}),t.off("change").on("change",function(){bwg_filter_by_tag(this)}));var a=e.find(".bwg_order");a.length&&a.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("hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("hidden"))})}),jQuery(".search_tags").on("sumo:opened",function(){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 e=window.location.hash.substring(1);if(e&&"-1"!=e.indexOf("bwg")){bwg_hash_array=e.replace("bwg","").split("/");var t=jQuery(".bwg_container");t&&bwg_gallery_box(bwg_hash_array[1],t,!1,bwg_hash_array[0])}bwg_blog_style_ready(),bwg_image_browser_ready(),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("hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("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 13!=(t.which||t.keyCode)||(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){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 w=jQuery("#"+t).data("ajax-url"),b=0;if(void 0===n)n=!1;var u=jQuery("#page_number_"+i).val(),d=jQuery("#bwg_search_input_"+i).val(),h={},m=jQuery("#bwg_album_breadcrumb_"+i).val();if(m&&!0!==n){var p=JSON.parse(m);if("back"==r){p.splice(-1,1);var c=p.slice(-1)[0];r=c.id,u=c.page,h["action_"+i]="back"}else"numeric"===n||s?(p.splice(-1,1),p.push({id:r,page:u,search:d})):(p.push({id:r,page:1}),u=1);h["bwg_album_breadcrumb_"+i]=JSON.stringify(p)}if(h.gallery_type=jQuery("#"+t).data("gallery-type"),h.gallery_id=jQuery("#"+t).data("gallery-id"),h.tag=jQuery("#"+t).data("tag"),h.album_id=jQuery("#"+t).data("album-id"),h.theme_id=jQuery("#"+t).data("theme-id"),h.shortcode_id=jQuery("#"+t).data("shortcode-id"),h.bwg=i,h.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(u=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(h["page_number_"+i]=u,h["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),h["album_gallery_id_"+i]=r,h["type_"+i]=_,h["title_"+i]=o,h["description_"+i]=g,h["sortImagesByValue_"+i]=l,0<jQuery("#bwg_search_input_"+i).length&&(h["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==h["bwg_album_breadcrumb_"+i]){var y=jQuery.parseJSON(h["bwg_album_breadcrumb_"+i]);jQuery.each(y,function(e,t){h["bwg_search_"+i]="",r==t.id&&(h["bwg_search_"+i]=t.search)})}return h["bwg_tag_id_"+a]=jQuery("#bwg_tag_id_"+a).val(),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:w,data:h,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,b=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()):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-src")&&""!=jQuery(this).attr("data-src")&&jQuery(this).attr("src",jQuery(this).attr("data-src"))}),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()}),jQuery("#bwg_tags_id_"+a).val(jQuery("#bwg_tag_id_"+a).val()),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(),bwg_mosaic_ajax(i,b),bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i),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(h["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();var e=jQuery("#bwg_container2_"+i+" .cur_gal_id").val();jQuery("#bwg_tag_id_"+i).val(jQuery("#bwg_tag_id_"+e).val())}}),!1}if("back"!==r){var f=jQuery("#bwg_search_input_"+i).val(),j=window.location.href,Q="",v=jQuery("#bwg_tag_id_"+a).val();if(""!==window.location.hash&&(j=j.replace("#","")),""!==f?!1!==(Q=bwg_add_url_parameter(Q=bwg_remove_url_parameter("page_number_"+i,j),"bwg_search_"+i,f))&&(j=Q):!1!==(Q=bwg_remove_url_parameter("bwg_search_"+i,j))&&(j=Q),void 0!==l&&""!==l&&!1!==(Q=bwg_add_url_parameter(j,"sort_by_"+i,l))&&(j=Q),null!=v&&0<v.length){var x="";jQuery.each(v,function(e){var t=",";e===v.length-1&&(t=""),x+=v[e]+t}),""!==x&&!1!==(Q=bwg_add_url_parameter(j,"filter_tag_"+i,x))&&(j=Q)}else!1!==(Q=bwg_remove_url_parameter("filter_tag_"+i,Q))&&(j=Q);window.location.href=j}else window.history.back()}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_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_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({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_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,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,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+'"':"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(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(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(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_slideshow_image_wrap_"+e).parent().width(),i=bwg_params[e].data;if(t>=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 a="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,r="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:a}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:r}),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:t}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:t*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: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(t*(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: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(t*(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:t}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:t-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:t}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:t*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:t*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:t*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:t*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});i[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(document).ready(function(){document.addEventListener("visibilitychange",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||("visible"==document.visibilityState&&bwg_slideshow_focus(),"hidden"==document.visibilityState&&bwg_slideshow_blur())}),bwg_main_ready(),jQuery.fn.extend({hideShow:function(e){return this.checkForVisiblilityChange(e),this},checkForVisiblilityChange:function(e){if(this.length>>>0){for(var t,i,a,r=0;t=this[r++];){var _=jQuery(t).is(":visible");void 0===t.lastVisibility&&(t.lastVisibility=_),_!==t.lastVisibility&&(t.lastVisibility=_,"function"==typeof e&&e.apply(this,[new jQuery.Event("visibilityChanged"),_?"shown":"hidden"]),function(e,t){setTimeout(function(){jQuery(e).trigger("visibilityChanged",[t?"shown":"hidden"])},10)}(t,_))}i=this,a=arguments,setTimeout(function(){i.checkForVisiblilityChange.apply(i,a)},10)}}}),jQuery(this).hideShow(function(e,t){"shown"==t&&bwg_main_ready()})}),jQuery(window).on("resize",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),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()}),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(document).ready(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");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")||(39===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):37===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):27===e.keyCode?spider_destroypopup(1e3):32===e.keyCode&&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,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_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, .bwg_popup_image").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,i,a,r,_,s,o){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_hasalreadyreceivedpopup(_)||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:'+i+"px; height:"+a+"px; margin-top:-"+a/2+"px; margin-left: -"+i/2+'px; ">'+e+"</div>").hide().appendTo("body");gallery_box_ready(),spider_showpopup(_,s,t,r,o)},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)}),spider_receivedpopup(e,t))}function bwg_first_image_load(e,t){e.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_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function spider_receivedpopup(e,t){var i=new Date;i.setDate(i.getDate()+t),document.cookie=e+"=true;expires="+i.toUTCString()+";path=/"}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){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&&location.replace("#"),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,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.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=jQuery("#bwg_tag_id_"+_).val();s=s||0;var o=1==i?"&open_ecommerce=1":"",l=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";l=l||"",void 0!==a&&(r+="&gallery_id="+a);var n="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(n="&open_comment=1"),spider_createpopup(r+"&bwg_random_seed="+jQuery("#bwg_random_seed_"+_).val()+"&image_id="+e+"&filter_tag="+s+o+n+"&filter_search_name="+l+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,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,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_"),g=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),n=-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%;">'+(n?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),g){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"),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(r[a].image_url).text()+'" alt="'+r[a].alt+'" />';function p(){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",r[a].image_url):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+r[a].image_url),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+r[a].thumb_url.replace("/thumb/","/.original/")));var e=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].image_url));i=i.replace(/%252F/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"),0==r[a].comment_count?jQuery("#bwg_added_comments").hide():(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(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)p();else jQuery(o).find("img").one("load",function(){p()}).each(function(){this.complete&&jQuery(this).load()})}}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(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[e]&&0!=gallery_box_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,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 g=o-parseFloat(s+_);else g=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(g)}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+=" >",""!=i&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" 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+=" >",""!=i&&(l+='<img src="//instagram.com/p/'+i+'/media/?size=l" 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+=" >",""!=i&&(l+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+i+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var g="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(g+=" "+attr+'="'+a[attr]+'"');g+=" >",""!=i&&(g+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=g+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var n="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(n+=" "+attr+'="'+a[attr]+'"');n+=" >",""!=i&&(n+='<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+=n+="</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=jQuery.parseJSON(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+jQuery.parseJSON(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(){1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(jQuery(this).data("bwg"))}),bwg_document_ready(),jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}),bwg_slideshow_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_image_browser_ready()}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_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(){jQuery(".bwg_blog_style").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e);var t=!1;jQuery(this).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"),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(e,jQuery(this).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(jQuery(this).attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1});var i=window.location.hash.substring(1);i&&"-1"!=i.indexOf("bwg")&&(bwg_hash_array=i.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_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_slideshow_blur(){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=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_ready(){jQuery(".bwg-carousel").each(function(){var t=jQuery(this).data("bwg");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(){bwg_params_carousel[t].carousel.prev()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(){bwg_params_carousel[t].carousel.next()}),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].bwg_currentlyMoving=!1,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].bwg_currentlyMoving=!0,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),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(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_params_carousel[e]=jQuery(this).data("params"),bwg_carousel_watermark(e),bwg_carousel_params(e),bwg_container_loaded(e)})}function bwg_carousel_params(t){var e=jQuery("#bwg_container1_"+t).parent().width(),i=1;e<bwg_params_carousel[t].carousel_r_width?i=e/bwg_params_carousel[t].carousel_r_width:e=bwg_params_carousel[t].carousel_r_width,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*i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*i),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*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:e*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*i}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel-container"+t).css({width:e,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:e*i,containerHeight:bwg_params_carousel[t].image_height*i,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*i,largeFeatureHeight:bwg_params_carousel[t].image_height*i,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_play_pause-ico_"+e).css({fontSize:i*bwg_params_carousel[e].carousel_play_pause_btn_size/a}),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(){jQuery(".bwg_slideshow").each(function(){var i=jQuery(this).data("bwg");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(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e),jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery(".image_browser_images_conteiner_"+e).attr("data-params")),setTimeout(function(){bwg_image_browser(e)},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_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden")}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")),g=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+g)+"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=jQuery(e);if(t.find(".bwg-empty-item").remove(),"horizontal"==t.data("masonry-type")){var a=t.data("thumbnail-height"),r=t.data("max-count"),_=[];for(i=0;i<r;i++)_.push(0);t.find(".bwg-item").each(function(){var e=_.indexOf(Math.min.apply(Math,_));jQuery(this).css({height:a,order:e+1}),_[e]+=jQuery(this)[0].getBoundingClientRect().width});var s=Math.max.apply(Math,_);for(t.width(s),i=0;i<r;i++)_[i]<s&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:a,order:i+1,width:s-_[i]}))}else{t.removeAttr("style");s=t.width();var o=t.data("thumbnail-width"),l=(r=t.data("max-count"),parseInt(s/o)+("0"==t.data("resizable-thumbnails")?0:1));r<l&&(l=r);var g=t.find(".bwg-item").length;g<l&&(l=g);var n,w,b=100/l,u=[];for(i=0;i<l;i++)u.push(0);t.find(".bwg-item").each(function(){var e=u.indexOf(Math.min.apply(Math,u));if(jQuery(this).css({width:b+"%",order:e+1}),0<jQuery(this).find("img").attr("data-width").length&&0<jQuery(this).find("img").attr("data-height").length){w=jQuery(this).find("img").data("width")/jQuery(this).find("img").data("height"),n=jQuery(this).width()/w;var t=+(jQuery(this).find("a>.bwg-title1").height()+jQuery(this).find("a>.bwg-masonry-thumb-description").height());jQuery(this).height(n+t)}u[e]+=jQuery(this)[0].getBoundingClientRect().height});var d=Math.max.apply(Math,u);for(i=0;i<l;i++)u[i]<d&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:b+"%",order:i+1,height:d-u[i]}));t.outerWidth(l*o),t.height(d)}bwg_container_loaded(t.data("bwg"))}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,g=0,n=[];n[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,n[e]=g,w[g]++):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[g]?e!==c.length-2?(b=row_cum_width2,n[e]=g,w[g]++,w[++g]=0,b=0):(b=row_cum_width2,n[e]=g,w[g]++):(w[++g]=1,n[e]=g,b=row_cum_width2-b):(b=row_cum_width2,n[e]=g,w[g]++)});for(var u=[],d=[],h=0;h<=g;h++)u[h]=1,d[h]=l;for(h=0;h<=g;h++)b=0,c.each(function(e){n[e]==h&&(b+=c.eq(e).width())}),u[h]=z=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(S=[])[0]=0;var m=[],p=[];m[0]=0,p[0]=0;for(h=1;h<=g;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[n[e]]),c.eq(e).height(i*u[n[e]]),c.eq(e).parent().css({top:p[n[e]],left:m[n[e]]}),m[n[e]]+=t*u[n[e]]+2*r,S[n[e]]=e}),jQuery("#"+i).height(p[g]+d[g]-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){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=[],z=0;z<Q;z++)k[z]=0,x[z]=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]++,B=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:B,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var C=0,I=[],E=0,O=0;for(z=0;z<Q;z++)C+=j,I[z]=0,c.each(function(e){v[e]==z&&(I[z]+=c.eq(e).height())}),0!=I[z]&&(E+=j/I[z],O+=j*x[z]*2*r/I[z]);var M=0;0!=E&&(M=(C+O)/E);for(z=0;z<Q;z++)0!=I[z]&&(u[z]=(M-2*x[z]*r)/I[z]);var S,T=[];T[0]=0;for(z=1;z<=Q;z++)T[z]=T[z-1]+j*u[z-1]+2*r;var B=[];for(z=0;z<Q;z++)B[z]=0;(S=[])[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:B[v[e]],left:T[v[e]]}),B[v[e]]+=i*u[v[e]]+2*r,S[v[e]]=e}),jQuery("#"+i).width(T[Q]).height(B[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(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(r,e,_){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+r).width(),t=jQuery(this).children(".bwg_mosaic_thumb_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(e);var i=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(),a=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:_+.5*t-.5*a<0?_:_+.5*t-.5*a,left:_+.5*e-.5*i,opacity:1,"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:0,left:-1e4,opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*_+"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(".bwg-album").off("click").on("click",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(".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1").on("click",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=jQuery(e).parent().parent(),a=i.find(".current_view").val(),r=i.find(".form_id").val(),_=i.find(".cur_gal_id").val(),s=i.find(".album_gallery_id").val(),o=i.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){t=t+jQuery(e).text()+","}),""==(t=t.slice(0,-1))&&(t=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",t),jQuery(e).parent().find(".CaptionCont .placeholder").html(t),jQuery("#bwg_tag_id_"+a).val(jQuery("#bwg_tag_id_"+_).val()),bwg_select_tag(a,r,_,s,o,!1)}function bwg_document_ready(){bwg_add_lightbox(),jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this);e.data("right-click-protection")&&bwg_disable_right_click(e),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var t=e.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&t.length)for(var i=0;i<t[0].length;i++)void 0===t[0][i].attributes.selected&&(t[0][i].selected=!1);t.length&&(t.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]}),t.off("change").on("change",function(){bwg_filter_by_tag(this)}));var a=e.find(".bwg_order");a.length&&a.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(){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 e=window.location.hash.substring(1);if(e&&"-1"!=e.indexOf("bwg")){bwg_hash_array=e.replace("bwg","").split("/");var t=jQuery(".bwg_container");t&&bwg_gallery_box(bwg_hash_array[1],t,!1,bwg_hash_array[0])}bwg_blog_style_ready(),bwg_image_browser_ready(),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 13!=(t.which||t.keyCode)||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,g,n){if("1"!=bwg_objectsL10n.front_ajax||!0===g){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 w=jQuery("#"+t).data("ajax-url"),b=0;if(void 0===g)g=!1;var u=jQuery("#page_number_"+i).val(),d=jQuery("#bwg_search_input_"+i).val(),h={},m=jQuery("#bwg_album_breadcrumb_"+i).val();if(m&&!0!==g){var p=JSON.parse(m);if("back"==r){p.splice(-1,1);var c=p.slice(-1)[0];r=c.id,u=c.page,h["action_"+i]="back"}else"numeric"===g||s?(p.splice(-1,1),p.push({id:r,page:u,search:d})):(p.push({id:r,page:1}),u=1);h["bwg_album_breadcrumb_"+i]=JSON.stringify(p)}if(h.gallery_type=jQuery("#"+t).data("gallery-type"),h.gallery_id=jQuery("#"+t).data("gallery-id"),h.tag=jQuery("#"+t).data("tag"),h.album_id=jQuery("#"+t).data("album-id"),h.theme_id=jQuery("#"+t).data("theme-id"),h.shortcode_id=jQuery("#"+t).data("shortcode-id"),h.bwg=i,h.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(u=1),void 0===o||""==o)o="";if(void 0===n||""==n)n="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(h["page_number_"+i]=u,h["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),h["album_gallery_id_"+i]=r,h["type_"+i]=_,h["title_"+i]=o,h["description_"+i]=n,h["sortImagesByValue_"+i]=l,0<jQuery("#bwg_search_input_"+i).length&&(h["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==h["bwg_album_breadcrumb_"+i]){var y=jQuery.parseJSON(h["bwg_album_breadcrumb_"+i]);jQuery.each(y,function(e,t){h["bwg_search_"+i]="",r==t.id&&(h["bwg_search_"+i]=t.search)})}return h["bwg_tag_id_"+a]=jQuery("#bwg_tag_id_"+a).val(),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:w,data:h,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,b=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===g?(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()):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()}),jQuery("#bwg_tags_id_"+a).val(jQuery("#bwg_tag_id_"+a).val()),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(),bwg_mosaic_ajax(i,b),bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i),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(h["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();var e=jQuery("#bwg_container2_"+i+" .cur_gal_id").val();jQuery("#bwg_tag_id_"+i).val(jQuery("#bwg_tag_id_"+e).val())}}),!1}if("back"!==r){var f=jQuery("#bwg_search_input_"+i).val(),j=window.location.href,Q="",v=jQuery("#bwg_tag_id_"+i).val();if(""!==window.location.hash&&(j=j.replace("#","")),""!==f&&void 0!==f?!1!==(Q=bwg_add_url_parameter(Q=bwg_remove_url_parameter("page_number_"+i,j),"bwg_search_"+i,f))&&(j=Q):!1!==(Q=bwg_remove_url_parameter("bwg_search_"+i,j))&&(j=Q),void 0!==l&&""!==l&&!1!==(Q=bwg_add_url_parameter(j,"sort_by_"+i,l))&&(j=Q),null!=v&&0<v.length){var x="",k=v.split(",");jQuery.each(k,function(e){var t=",";e===k.length-1&&(t=""),x+=k[e]+t}),""!==x&&!1!==(Q=bwg_add_url_parameter(j,"filter_tag_"+i,x))&&(j=Q)}else!1!==(Q=bwg_remove_url_parameter("filter_tag_"+i,Q))&&(j=Q);window.location.href=j}else window.history.back()}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_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,g,n){var w,b=!1,u="";if(void 0!==n&&""!==n){b=!0,bwg_params[n].bwg_trans_in_progress=!0,u="_"+n,w=bwg_params[n].bwg_transition_duration;bwg_params[n].event_stack}else w=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(n))return bwg_fallback(o,l,g,n);if(!bwg_testBrowser_cssTransforms3d(n))return bwg_fallback3d(o,l,g,n);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(n),bwg_params[n].bwg_trans_in_progress=!1;var e=bwg_params[n].data,t=bwg_params[n].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,n)}bwg_change_watermark_container()}b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+n).removeClass("bwg_slideshow_thumb_active_"+n).addClass("bwg_slideshow_thumb_deactive_"+n),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[n].bwg_current_key+"_"+n).removeClass("bwg_slideshow_thumb_deactive_"+n).addClass("bwg_slideshow_thumb_active_"+n),jQuery(".bwg_slideshow_dots_"+n).removeClass("bwg_slideshow_dots_active_"+n).addClass("bwg_slideshow_dots_deactive_"+n),jQuery("#bwg_dots_"+bwg_params[n].bwg_current_key+"_"+n).removeClass("bwg_slideshow_dots_deactive_"+n).addClass("bwg_slideshow_dots_active_"+n),jQuery(".bwg_slide_bg_"+n).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_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({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_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 g=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)g=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,g=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,g=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<g+o&&(o=0),0<g+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:g+o},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:g+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":"",g=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,n=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==g?(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"==n?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==g?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"==g?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"==n?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"==n?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_"),g=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),n=-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">',n&&(u+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),g){var d=0,h=0;w<b+88?d=(h=w)-88:h=(d=b)+88,u+=spider_display_embed(i[t].filetype,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,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+'"':"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(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(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(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_slideshow_image_wrap_"+e).parent().width(),i=bwg_params[e].data;if(t>=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 a="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,r="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:a}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:r}),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:t}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:t*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: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(t*(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: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(t*(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:t}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:t-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:t}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:t*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:t*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:t*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:t*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});i[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(document).ready(function(){bwg_main_ready(),jQuery(".bwg_container").each(function(){var e=!1;if(0<jQuery(this).find(".wd_error").length&&(e=!0),!e){var t=0;jQuery(this).on("visibility",function(){var e=jQuery(this);setInterval(function(){e.is(":hidden")?1==t&&(t=0,bwg_slideshow_blur()):0==t&&(t=1,bwg_main_ready(),bwg_slideshow_focus())},300)}).trigger("visibility")}})}),jQuery(window).on("resize",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),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()}),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.38
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
@@ -52,6 +52,7 @@ final class BWG {
52
  public $upload_dir = '';
53
  public $upload_url = '';
54
  public $free_msg = '';
 
55
 
56
  /**
57
  * Main BWG Instance.
@@ -83,14 +84,13 @@ final class BWG {
83
  private function define_constants() {
84
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
85
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
 
86
  $this->main_file = plugin_basename(__FILE__);
87
- $this->plugin_version = '1.5.38';
88
- $this->db_version = '1.5.38';
89
  $this->prefix = 'bwg';
90
  $this->nicename = __('Photo Gallery', $this->prefix);
91
 
92
- $this->use_home_url();
93
-
94
  require_once($this->plugin_dir . '/framework/BWGOptions.php');
95
  $this->options = new WD_BWG_Options();
96
  require_once($this->plugin_dir . '/framework/WD_BWG_Theme.php');
@@ -447,28 +447,6 @@ final class BWG {
447
  die();
448
  }
449
 
450
- private function use_home_url() {
451
- $home_url = str_replace(array("http://", "https://"), "", home_url());
452
- $pos = strpos($home_url, "/");
453
- if ( $pos ) {
454
- $home_url = substr($home_url, 0, $pos);
455
- }
456
-
457
- $site_url = str_replace("http://", "", $this->plugin_url);
458
- $site_url = str_replace("https://", "", $site_url);
459
- $pos = strpos($site_url, "/");
460
- if ( $pos ) {
461
- $site_url = substr($site_url, 0, $pos);
462
- }
463
-
464
- if ( $site_url != $home_url ) {
465
- $this->front_url = home_url("wp-content/plugins/" . plugin_basename(dirname(__FILE__)));
466
- }
467
- else {
468
- $this->front_url = $this->plugin_url;
469
- }
470
- }
471
-
472
  /**
473
  * Plugin menu.
474
  */
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.39
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
52
  public $upload_dir = '';
53
  public $upload_url = '';
54
  public $free_msg = '';
55
+ public $front_url = '';
56
 
57
  /**
58
  * Main BWG Instance.
84
  private function define_constants() {
85
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
86
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
87
+ $this->front_url = $this->plugin_url;
88
  $this->main_file = plugin_basename(__FILE__);
89
+ $this->plugin_version = '1.5.39';
90
+ $this->db_version = '1.5.39';
91
  $this->prefix = 'bwg';
92
  $this->nicename = __('Photo Gallery', $this->prefix);
93
 
 
 
94
  require_once($this->plugin_dir . '/framework/BWGOptions.php');
95
  $this->options = new WD_BWG_Options();
96
  require_once($this->plugin_dir . '/framework/WD_BWG_Theme.php');
447
  die();
448
  }
449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  /**
451
  * Plugin menu.
452
  */
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: 3.4
5
  Tested up to: 5.3
6
- Stable tag: 1.5.38
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -282,6 +282,20 @@ Choose whether to display random or the first/last specific number of images.
282
 
283
  == Changelog ==
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  = 1.5.38 =
286
  * Fixed: Bug breaking Sitemaps with Gallery Group shortcodes.
287
 
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: 3.4
5
  Tested up to: 5.3
6
+ Stable tag: 1.5.39
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.39 =
286
+ * Fixed: Control buttons container height.
287
+ * Fixed: Allow to write url as advertisement text.
288
+ * Fixed: Conflict with Bootstrap classes.
289
+ * Fixed: Scroll load with "Enable dynamic URLs for galleries and gallery groups" is on.
290
+ * Fixed: Pagination with disabled "Enable href attribute" and "Enable dynamic URLs for galleries and gallery groups" options set to Yes.
291
+ * Fixed: Hit counter.
292
+ * Fixed: Bulk deleting galleries/gallery groups.
293
+ * Fixed: Sharing with 'Enable dynamic URLs for galleries and gallery groups' is on.
294
+ * Fixed: Lazy load with disabled 'Enable dynamic URLs for galleries and gallery groups'.
295
+ * Fixed: Masonry view with 'Resizable thumbnails' set to No.
296
+ * Fixed: Load with galleries in tab.
297
+ * Fixed: Bug on masonry view with image title "Show on hover" option on.
298
+
299
  = 1.5.38 =
300
  * Fixed: Bug breaking Sitemaps with Gallery Group shortcodes.
301