Photo Gallery by WD – Responsive Photo Gallery - Version 2.8.2

Version Description

Download this release

Release Info

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

Code changes from version 1.8.1 to 2.8.2

Files changed (67) hide show
  1. admin/controllers/Galleries.php +1 -2
  2. admin/controllers/Speed.php +0 -756
  3. admin/models/Speed.php +0 -8
  4. admin/views/Galleries.php +1 -2
  5. admin/views/Speed.php +0 -439
  6. booster/AdminBar.php +345 -0
  7. booster/Elementor.php +73 -0
  8. booster/Gutenberg.php +28 -0
  9. booster/List.php +84 -0
  10. booster/README.md +2 -0
  11. booster/TWBLibrary.php +232 -0
  12. booster/assets/css/global.css +658 -0
  13. css/bwg_speed.css → booster/assets/css/speed.css +367 -323
  14. booster/assets/css/top_banner.css +80 -0
  15. booster/assets/images/button_plus.svg +1 -0
  16. {images/speed → booster/assets/images}/check_green.jpg +0 -0
  17. booster/assets/images/check_green_bg.svg +13 -0
  18. {images/speed → booster/assets/images}/check_grey.jpg +0 -0
  19. booster/assets/images/check_score.svg +15 -0
  20. booster/assets/images/close.svg +10 -0
  21. {images/speed → booster/assets/images}/close_dark.svg +0 -0
  22. {images/speed → booster/assets/images}/close_error.svg +0 -0
  23. {images/speed → booster/assets/images}/close_red.svg +0 -0
  24. {images/speed → booster/assets/images}/desktop.svg +0 -0
  25. {images/speed → booster/assets/images}/disc.svg +0 -0
  26. booster/assets/images/down_arrow_nav.svg +10 -0
  27. {images/speed → booster/assets/images}/google_spinner.svg +0 -0
  28. booster/assets/images/green-info.svg +16 -0
  29. booster/assets/images/help.svg +1 -0
  30. {images/speed → booster/assets/images}/information.svg +0 -0
  31. booster/assets/images/loader.svg +4 -0
  32. booster/assets/images/loader_green.svg +6 -0
  33. booster/assets/images/loader_medium.svg +4 -0
  34. {images/speed → booster/assets/images}/loader_small.svg +0 -0
  35. {images/speed → booster/assets/images}/loader_small_grey.svg +0 -0
  36. booster/assets/images/logo_dark.svg +6 -0
  37. booster/assets/images/logo_green.svg +13 -0
  38. booster/assets/images/logo_white.svg +8 -0
  39. {images/speed → booster/assets/images}/mobile.svg +0 -0
  40. booster/assets/images/not_optimized.svg +6 -0
  41. booster/assets/images/optimize.svg +12 -0
  42. booster/assets/images/red-info.svg +20 -0
  43. booster/assets/images/reload.svg +10 -0
  44. booster/assets/images/separator.svg +3 -0
  45. {images/speed → booster/assets/images}/star_grey.jpg +0 -0
  46. {images/speed → booster/assets/images}/success.svg +0 -0
  47. booster/assets/images/up_arrow_nav.svg +10 -0
  48. {js → booster/assets/js}/circle-progress.js +0 -0
  49. booster/assets/js/elementor.js +22 -0
  50. booster/assets/js/global.js +229 -0
  51. booster/assets/js/gutenberg.js +72 -0
  52. booster/assets/js/gutenberg/gutenberg-compiled.asset.php +1 -0
  53. booster/assets/js/gutenberg/gutenberg-compiled.js +197 -0
  54. booster/assets/js/gutenberg/gutenberg-compiled.js.map +1 -0
  55. booster/assets/js/speed.js +425 -0
  56. booster/controller.php +611 -0
  57. booster/init.php +45 -0
  58. booster/main.php +491 -0
  59. booster/model.php +3 -0
  60. booster/view.php +458 -0
  61. css/bwg_frontend.css +0 -30
  62. css/styles.min.css +1 -1
  63. js/bwg_frontend.js +0 -5
  64. js/bwg_speed.js +0 -447
  65. js/scripts.min.js +1 -1
  66. photo-gallery.php +15 -127
  67. readme.txt +4 -1
admin/controllers/Galleries.php CHANGED
@@ -371,8 +371,7 @@ class GalleriesController_bwg {
371
  $params['facebook_post_gallery'] = (!$params['instagram_post_gallery']) ? ($params['row']->gallery_type == 'facebook_post' ? TRUE : FALSE) : FALSE;
372
  $params['gallery_type'] = ($params['row']->gallery_type == 'instagram' || $params['row']->gallery_type == 'instagram_post') ? 'instagram' : (($params['row']->gallery_type == 'facebook_post' || $params['row']->gallery_type == 'facebook') ? 'facebook' : $params['row']->gallery_type);
373
 
374
- $params['booster_is_active'] = ( is_plugin_active('tenweb-speed-optimizer/tenweb_speed_optimizer.php') ) ? TRUE : FALSE;
375
- $params['booster_page_url'] = add_query_arg(array( 'page' => 'speed_' . BWG()->prefix ), admin_url('admin.php'));
376
 
377
  // Image display params.
378
  $params['actions'] = WDWLibrary::image_actions( $params['gallery_type'] );
371
  $params['facebook_post_gallery'] = (!$params['instagram_post_gallery']) ? ($params['row']->gallery_type == 'facebook_post' ? TRUE : FALSE) : FALSE;
372
  $params['gallery_type'] = ($params['row']->gallery_type == 'instagram' || $params['row']->gallery_type == 'instagram_post') ? 'instagram' : (($params['row']->gallery_type == 'facebook_post' || $params['row']->gallery_type == 'facebook') ? 'facebook' : $params['row']->gallery_type);
373
 
374
+ $params['booster_page_url'] = add_query_arg(array( 'page' => 'twb_photo-gallery' ), admin_url('admin.php'));
 
375
 
376
  // Image display params.
377
  $params['actions'] = WDWLibrary::image_actions( $params['gallery_type'] );
admin/controllers/Speed.php DELETED
@@ -1,756 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class SpeedController_bwg
5
- */
6
- class SpeedController_bwg {
7
- /**
8
- * @var $model
9
- */
10
- private $model;
11
- /**
12
- * @var $view
13
- */
14
- private $view;
15
- /**
16
- * @var string $page
17
- */
18
- private $page;
19
-
20
- /**
21
- * @var string $booster_plugin_slug
22
- */
23
- private $booster_plugin_slug = 'tenweb-speed-optimizer/tenweb_speed_optimizer.php';
24
-
25
- /**
26
- * @var string $booster_plugin_zip_url
27
- */
28
- private $booster_plugin_zip_url = 'https://downloads.wordpress.org/plugin/tenweb-speed-optimizer.latest-stable.zip';
29
-
30
- /**
31
- * @var integer $booster_plugin_status 0-not installed, 1-not active, 2-active
32
- */
33
- private $booster_plugin_status = 0;
34
-
35
- /**
36
- * @var bool $booster_is_connected
37
- */
38
- private $booster_is_connected = FALSE;
39
-
40
- /**
41
- * @var bool $tenweb_is_paid
42
- */
43
- private $tenweb_is_paid = FALSE;
44
-
45
- /**
46
- * @var mixed $subscription_id
47
- */
48
- private $subscription_id = FALSE;
49
-
50
- /**
51
- * @var array $google_api_keys
52
- */
53
- private $google_api_keys = array();
54
-
55
- public function __construct() {
56
- $this->check_booster_status();
57
- $this->set_booster_data();
58
-
59
- $this->google_api_keys = array(
60
- 'AIzaSyCQmF4ZSbZB8prjxci3GWVK4UWc-Yv7vbw',
61
- 'AIzaSyAgXPc9Yp0auiap8L6BsHWoSVzkSYgHdrs',
62
- 'AIzaSyCftPiteYkBsC2hamGbGax5D9JQ4CzexPU',
63
- 'AIzaSyC-6oKLqdvufJnysAxd0O56VgZrCgyNMHg',
64
- 'AIzaSyB1QHYGZZ6JIuUUce4VyBt5gF_-LwI5Xsk'
65
- );
66
- if ( class_exists('SpeedModel_bwg') && class_exists('SpeedView_bwg')) {
67
- $this->model = new SpeedModel_bwg();
68
- $this->view = new SpeedView_bwg();
69
- }
70
-
71
- $this->page = WDWLibrary::get('page');
72
- }
73
-
74
- /**
75
- * Set the data for Booster.
76
- *
77
- * @return void
78
- */
79
- public function set_booster_data() {
80
- $data = WDWLibrary::get_booster_data();
81
- $this->subscription_id = $data['subscription_id'];
82
- $this->booster_plugin_status = $data['booster_plugin_status'];
83
- $this->booster_is_connected = $data['booster_is_connected'];
84
- $this->tenweb_is_paid = $data['tenweb_is_paid'];
85
- }
86
-
87
- /**
88
- * Function is checking every time plugin status in wp with options and update option if somethin changed
89
- */
90
- public function check_booster_status() {
91
- $booster_plugin_status = get_option('bwg_speed');
92
-
93
- if( !empty($booster_plugin_status) && isset($booster_plugin_status['booster_plugin_status']) ) {
94
- $booster_plugin_status = $booster_plugin_status['booster_plugin_status'];
95
- } else {
96
- $booster_plugin_status = 0;
97
- }
98
-
99
- switch ( $booster_plugin_status ) {
100
- case 0:
101
- if ( $this->is_plugin_installed( $this->booster_plugin_slug ) ) {
102
- if ( is_plugin_active($this->booster_plugin_slug) ) {
103
- update_option('bwg_speed', array( 'booster_plugin_status' => 2 ), 1);
104
- } else {
105
- update_option('bwg_speed', array( 'booster_plugin_status' => 1 ), 1);
106
- }
107
- }
108
- break;
109
- case 1:
110
- if ( $this->is_plugin_installed( $this->booster_plugin_slug ) ) {
111
- if ( is_plugin_active($this->booster_plugin_slug) ) {
112
- update_option('bwg_speed', array( 'booster_plugin_status' => 2 ), 1);
113
- } else {
114
- update_option('bwg_speed', array( 'booster_plugin_status' => 1 ), 1);
115
- }
116
- } else {
117
- update_option('bwg_speed', array( 'booster_plugin_status' => 0 ), 1);
118
- }
119
-
120
- break;
121
- case 2:
122
- if ( $this->is_plugin_installed( $this->booster_plugin_slug ) ) {
123
- if ( !is_plugin_active($this->booster_plugin_slug) ) {
124
- update_option('bwg_speed', array( 'booster_plugin_status' => 1 ), 1);
125
- }
126
- } else {
127
- update_option('bwg_speed', array( 'booster_plugin_status' => 0 ), 1);
128
- }
129
- break;
130
- }
131
- }
132
-
133
- /**
134
- * Execute.
135
- */
136
- public function execute() {
137
- $task = WDWLibrary::get('task');
138
- if ( $task != 'display' && method_exists($this, $task) ) {
139
- //check_admin_referer(BWG()->nonce, BWG()->nonce);
140
- $this->$task();
141
- }
142
- else {
143
- $this->display();
144
- }
145
- }
146
-
147
- /**
148
- * Get pages compressed from endpoint
149
- */
150
- public function get_pages_compressed() {
151
- $workspace_id = 0;
152
- $domain_id = 0;
153
- if ( defined('TENWEBIO_MANAGER_PREFIX') ) {
154
- $workspace_id = (int) get_site_option(TENWEBIO_MANAGER_PREFIX . '_workspace_id', 0);
155
- $domain_id = (int) get_option(TENWEBIO_MANAGER_PREFIX . '_domain_id', 0);
156
- }
157
-
158
- $return_empty_data = array('pages' => array(),
159
- 'total_compressed_images' => 0,
160
- 'total_not_compressed_images_size' => '0 B',
161
- 'total_not_compressed_images_count' => 0
162
- );
163
-
164
- if ( $workspace_id == 0 || $domain_id == 0 ) {
165
- return $return_empty_data;
166
- }
167
- $url = '';
168
- if ( defined('TENWEBIO_API_URL') ) {
169
- $url = TENWEBIO_API_URL . "/compress/workspaces/" . $workspace_id . "/domains/" . $domain_id."/stat";
170
- }
171
-
172
- $access_token = get_site_option('tenweb_access_token');
173
-
174
- $args = array(
175
- 'timeout' => 120,
176
- 'headers' => array(
177
- "accept" => "application/x.10weboptimizer.v3+json",
178
- "authorization" => "Bearer " . $access_token,
179
- ),
180
- );
181
- $response = wp_remote_get($url, $args);
182
- $return_data = $return_empty_data;
183
- if ( is_array($response) && !is_wp_error($response) ) {
184
- $body = json_decode( $response['body'], 1 );
185
- if ( isset($body['status']) && $body['status'] == 200 ) {
186
- $data = $body['data'];
187
- $total_size = isset($data['not_compressed']['total_size']) ? $data['not_compressed']['total_size'] : 0;
188
- $total_not_compressed_images_size = WDWLibrary::formatBytes($total_size);
189
- $total_not_compressed_images_count = intval($data['not_compressed']['full']+$data['not_compressed']['thumbs']+$data['not_compressed']['other']);
190
- $pages_compressed = $data['pages_compressed'];
191
- $total_compressed_images = 0;
192
-
193
-
194
- $two_optimized_pages = \TenWebOptimizer\OptimizerUtils::getCriticalPages();
195
-
196
- /* Add new key permalink to $pages_compressed array */
197
- foreach ( $pages_compressed as $key => $compressed ) {
198
- $total_compressed_images += $compressed['images_count'];
199
- $page_id = $compressed['page_id'];
200
- if( $page_id == 'front_page' ) {
201
- $permalink = get_home_url();;
202
- } else {
203
- $permalink = get_permalink( $page_id );
204
- }
205
- if(substr($permalink, -1) == '/') {
206
- $permalink = substr($permalink, 0, -1);
207
- }
208
- $pages_compressed[$key]['permalink'] = $permalink;
209
- unset($two_optimized_pages[$page_id]);
210
- }
211
-
212
- $i = 0;
213
- /* Adding new pages which are optimized but haven't images and endpoint doesn't have that pages in response */
214
- foreach ( $two_optimized_pages as $page_id => $val ) {
215
- $pages_compressed_temp[$i]['page_id'] = $page_id;
216
- $pages_compressed_temp[$i]['images_count'] = 0;
217
- $pages_compressed_temp[$i]['permalink'] = $val['url'];
218
- $i++;
219
- }
220
- if ( !empty($pages_compressed_temp) ) {
221
- $pages_compressed = array_merge($pages_compressed, $pages_compressed_temp);
222
- }
223
-
224
-
225
- $home_url = get_home_url();
226
- $home_compressed = false;
227
- foreach ( $pages_compressed as $key => $page ) {
228
- $permalink = $page['permalink'];
229
-
230
- if(substr($permalink, -1) != '/') {
231
- $permalink = $permalink.'/';
232
- }
233
- if(substr($home_url, -1) != '/') {
234
- $home_url = $home_url.'/';
235
- }
236
- if ( $permalink == $home_url ) {
237
- $home_compressed = true;
238
- $temp_data[0] = $pages_compressed[$key];
239
- $temp_data[0]['permalink'] = 'Homepage';
240
- unset($pages_compressed[$key]);
241
- continue;
242
- }
243
- }
244
-
245
- if ( $home_compressed ) {
246
- $pages_compressed = array_merge( $temp_data, $pages_compressed );
247
- }
248
-
249
- $return_data['pages'] = $pages_compressed;
250
- $return_data['total_compressed_images'] = $total_compressed_images;
251
- $return_data['total_not_compressed_images_size'] = $total_not_compressed_images_size;
252
- $return_data['total_not_compressed_images_count'] = $total_not_compressed_images_count;
253
- }
254
- if ( $total_compressed_images != 0 || $total_not_compressed_images_size != 0 ) {
255
- update_option("bwg_optimized_pages", $return_data);
256
- } else {
257
- /* in case of returned data is 0 just get from db last data or run PG functionality to get count/size */
258
- $data = get_option("bwg_optimized_pages");
259
- if( !empty( $return_data ) ) {
260
- $return_data = $data;
261
- } else {
262
- $images_total_size = get_option('bwg_images_total_size');
263
- if ( !empty($images_total_size) ) {
264
- $return_data['total_not_compressed_images_size'] = $images_total_size;
265
- $return_data['total_not_compressed_images_count'] = $this->get_optimize_media_count();
266
- }
267
- }
268
- }
269
- } else {
270
- /* if getting error from endpoint try to get data from DB */
271
- $data = get_option("bwg_optimized_pages");
272
- if( !empty( $return_data ) ) {
273
- $return_data = $data;
274
- } else {
275
- $images_total_size = get_option('bwg_images_total_size');
276
- if ( !empty($images_total_size) ) {
277
- $return_data['total_not_compressed_images_size'] = $images_total_size;
278
- $return_data['total_not_compressed_images_count'] = $this->get_optimize_media_count();
279
- }
280
- }
281
- }
282
- return $return_data;
283
- }
284
-
285
- /**
286
- * Display.
287
- */
288
- public function display() {
289
- $params = array();
290
- $params['booster_plugin_status'] = $this->booster_plugin_status;
291
-
292
- $media_count = $this->get_optimize_media_count();
293
- $params['media_count'] = $media_count;
294
-
295
- $params['page_is_public'] = WDWLibrary::get('status', '');
296
-
297
- $bwg_speed_score = get_option('bwg_speed_score');
298
- $data = array(
299
- 'url' => get_home_url(),
300
- 'desktop_score' => 0,
301
- 'desktop_loading_time' => 0,
302
- 'mobile_score' => 0,
303
- 'mobile_loading_time' => 0,
304
- 'last_analyzed_time' => '',
305
- );
306
- if ( !empty($bwg_speed_score) && !empty($bwg_speed_score['last']) && !empty($bwg_speed_score['last']['url']) ) {
307
- $last_url = $bwg_speed_score['last']['url'];
308
- if ( !empty($bwg_speed_score[$last_url]['desktop_score'])
309
- && !empty($bwg_speed_score[$last_url]['desktop_loading_time'])
310
- && !empty($bwg_speed_score[$last_url]['mobile_score'])
311
- && !empty($bwg_speed_score[$last_url]['mobile_loading_time'])
312
- && !empty($bwg_speed_score[$last_url]['last_analyzed_time']) ) {
313
- $data = array(
314
- 'url' => $last_url,
315
- 'desktop_score' => $bwg_speed_score[$last_url]['desktop_score'],
316
- 'desktop_loading_time' => $bwg_speed_score[$last_url]['desktop_loading_time'],
317
- 'mobile_score' => $bwg_speed_score[$last_url]['mobile_score'],
318
- 'mobile_loading_time' => $bwg_speed_score[$last_url]['mobile_loading_time'],
319
- 'last_analyzed_time' => $bwg_speed_score[$last_url]['last_analyzed_time'],
320
- );
321
- }
322
- }
323
-
324
- $params['bwg_speed_score'] = $data;
325
- $two_domain_id = get_site_option('tenweb_domain_id');
326
- $params['dashboard_booster_url'] = '';
327
- if ( defined("TENWEB_DASHBOARD") && !empty($two_domain_id) ) {
328
- $params['dashboard_booster_url'] = trim(TENWEB_DASHBOARD, '/') . '/websites/' . $two_domain_id . '/booster/frontend';
329
- }
330
-
331
- $params['booster_is_connected'] = $this->booster_is_connected;
332
- $params['tenweb_is_paid'] = $this->tenweb_is_paid;
333
- $params['subscription_id'] = $this->subscription_id;
334
- $images_total_size = get_option('bwg_images_total_size');
335
- if( empty($images_total_size) ) {
336
- $images_total_size = 0;
337
- }
338
- $params['images_total_size'] = $images_total_size;
339
- $params['two_domain_id'] = get_site_option('tenweb_domain_id');
340
- if ( $params['booster_is_connected'] && !$params['tenweb_is_paid'] ) {
341
- $params['pages_compressed'] = $this->get_pages_compressed();
342
- }
343
-
344
- $this->view->display($params);
345
- }
346
-
347
- /*
348
- * Get Total size of all images ajax action
349
- * */
350
- public function get_total_size_of_images() {
351
- $bwg_images_total_size = get_option('bwg_images_total_size');
352
- if ( !empty($bwg_images_total_size) ) {
353
- return $bwg_images_total_size;
354
- }
355
- $allowed_types = array('image/jpeg','image/jpg','image/png','image/gif','image/webp','image/svg','image/png');
356
-
357
- $args = array(
358
- 'post_type' => 'attachment',
359
- 'numberposts' => -1,
360
- 'post_status' => null,
361
- 'post_parent' => null, // any parent
362
- );
363
- $attachments = get_posts($args);
364
- if ($attachments) {
365
- $total = 0;
366
- foreach ($attachments as $post) {
367
- if ( !in_array($post->post_mime_type, $allowed_types) ) {
368
- continue;
369
- }
370
-
371
- $meta = wp_get_attachment_metadata( $post->ID );
372
- if ( isset($meta['filesize']) ) {
373
- $filesize = $meta['filesize'];
374
- } else {
375
- $path = get_attached_file($post->ID);
376
- if ( !file_exists($path) ) {
377
- continue;
378
- }
379
- $filesize = filesize($path);
380
- }
381
- $total += $filesize;
382
- }
383
- }
384
-
385
- global $wpdb;
386
- $sizes = $wpdb->get_col('Select `size` FROM `' . $wpdb->prefix . 'bwg_image` WHERE `size`<>""');
387
- if ( !empty($sizes) ) {
388
- $sizes = array_map('WDWLibrary::convertToBytes', $sizes);
389
- $sizes = WDWLibrary::formatBytes( array_sum($sizes) + $total );
390
- } else {
391
- $sizes = WDWLibrary::formatBytes( $total );
392
- }
393
- update_option('bwg_images_total_size', $sizes, 1);
394
- echo json_encode(array("size" => $sizes));
395
- die;
396
- }
397
-
398
- /**
399
- * Top banner.
400
- */
401
- public function top_banner() {
402
- if ( !WDWLibrary::get_gallery_images_count() ) {
403
- return;
404
- }
405
-
406
- $booster_is_active = ( $this->booster_is_connected && $this->booster_plugin_status == 2 ) ? TRUE : FALSE;
407
-
408
- if ( $this->tenweb_is_paid === FALSE ) {
409
- // get optimize media count.
410
- $media_count = $this->get_optimize_media_count();
411
- $two_domain_id = get_site_option('tenweb_domain_id');
412
- $booster_upgrade_plan_url = "https://my.10web.io/websites/". $two_domain_id ."/booster/frontend?pricing=1";
413
- $params = array(
414
- 'booster_is_active' => $booster_is_active,
415
- 'booster_is_connectd' => $this->booster_is_connected,
416
- 'media_count' => $media_count,
417
- 'button' => array(
418
- 'name' => ($booster_is_active) ? __('Upgrade', 'photo-gallery') : __('Optimize now', 'photo-gallery'),
419
- 'url' => ($booster_is_active) ? $booster_upgrade_plan_url : add_query_arg(array( 'page' => 'speed_' . BWG()->prefix ), admin_url('admin.php')),
420
- 'target' => ($booster_is_active) ? 'target="_blank"' : ''
421
- )
422
- );
423
- $this->view->top_banner($params);
424
- }
425
- }
426
-
427
- /**
428
- * Install booster plugin
429
- */
430
- public function install_booster() {
431
- $speed_ajax_nonce = WDWLibrary::get('speed_ajax_nonce');
432
- if ( !wp_verify_nonce($speed_ajax_nonce, 'speed_ajax_nonce') ){
433
- die('Permission Denied.');
434
- }
435
-
436
- $plugin_slug = $this->booster_plugin_slug;
437
- $plugin_zip = $this->booster_plugin_zip_url;
438
-
439
-
440
- /* Check if new plugin is already installed */
441
- if ( $this->is_plugin_installed( $plugin_slug ) ) {
442
- $installed = true;
443
- } else {
444
- $installed = $this->install_plugin( $plugin_zip );
445
- }
446
- /* 0-not installed, 1-installed but not active, 2-active */
447
- $booster_plugin_status = 0;
448
- if ( !is_wp_error( $installed ) && $installed ) {
449
- $activate = activate_plugin( $plugin_slug );
450
-
451
- // To change 10Web Booster plugins status on Dashboard.
452
- if (class_exists('\Tenweb_Authorization\Helper')
453
- && method_exists('\Tenweb_Authorization\Helper', "check_site_state") ) {
454
- \Tenweb_Authorization\Helper::check_site_state(true);
455
- }
456
- /* Function activate_plugin return null when activate is success and false when not */
457
- if ( is_null($activate) ) {
458
- update_option('bwg_speed', array( 'booster_plugin_status' => 2 ), 1);
459
- $this->set_booster_data();
460
- $booster_plugin_status = 2;
461
- } else {
462
- update_option('bwg_speed', array( 'booster__plugin_status' => 1 ), 1);
463
- $booster_plugin_status = 1;
464
- }
465
- }
466
- echo json_encode( array(
467
- 'booster_plugin_status' => esc_html($booster_plugin_status),
468
- 'booster_is_connected' => esc_html($this->booster_is_connected),
469
- 'subscription_id' => esc_html($this->subscription_id),
470
- ) );
471
- die;
472
- }
473
-
474
- /**
475
- * Check if plugin already installed
476
- *
477
- * @param string $slug plugin's slug
478
- *
479
- * @return bool
480
- */
481
- public function is_plugin_installed( $slug ) {
482
- if ( ! function_exists( 'get_plugins' ) ) {
483
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
484
- }
485
- $all_plugins = get_plugins();
486
-
487
- if ( !empty( $all_plugins[$slug] ) ) {
488
- return true;
489
- } else {
490
- return false;
491
- }
492
- }
493
-
494
- /**
495
- * Install booster pluging using zip url
496
- *
497
- * @param $plugin_zip string which is url of the plugin zip
498
- *
499
- * @return bool
500
- */
501
- public function install_plugin( $plugin_zip = '' ) {
502
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
503
- wp_cache_flush();
504
-
505
- $upgrader = new Plugin_Upgrader();
506
- $installed = $upgrader->install( $plugin_zip );
507
- return $installed;
508
- }
509
-
510
- /**
511
- * Get optimize media count.
512
- *
513
- * @param string $dir
514
- * @param array $file_types
515
- *
516
- * @return array
517
- */
518
- public function get_optimize_media_count() {
519
- global $wpdb;
520
- $allowed_types = array('image/jpeg','image/jpg','image/png','image/gif','image/webp','image/svg');
521
- // get all wp-media attachments.
522
- $attachments = wp_count_attachments();
523
- $count_attachment = 0;
524
- if ( !empty($attachments) ) {
525
- foreach ( $attachments as $key => $attachment ) {
526
- if ( in_array($key, $allowed_types) ) {
527
- $count_attachment += $attachment;
528
- }
529
- }
530
- }
531
-
532
- // Get all Photo gallery media.
533
- $row = $wpdb->get_row( 'SELECT count(id) AS qty FROM `' . $wpdb->prefix . 'bwg_file_paths` WHERE is_dir = 0' );
534
- $count = intval($count_attachment) + intval($row->qty);
535
-
536
- return $count;
537
- }
538
-
539
- /**
540
- * Ajax action Sign up to dashboard action
541
- *
542
- * @return bool
543
- */
544
- public function sign_up_dashboard() {
545
- $speed_ajax_nonce = WDWLibrary::get('speed_ajax_nonce');
546
- if ( !wp_verify_nonce($speed_ajax_nonce, 'speed_ajax_nonce') ){
547
- die('Permission Denied.');
548
- }
549
-
550
- $bwg_email = WDWLibrary::get('bwg_email');
551
- $args = array(
552
- 'method' => 'POST',
553
- 'headers' => array(
554
- 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',
555
- 'Accept' => 'application/x.10webcore.v1+json'
556
- ),
557
- 'body' => array(
558
- 'email' => $bwg_email,
559
- 'first_name' => '10Webber',
560
- 'last_name' => rand( 1000, 9999 ),
561
- 'product_id' => '101',
562
- 'service_key' => 'gTcjslfqqBFFwJKBnFgQYhkQEJpplLaDKfj',
563
- ),
564
- );
565
-
566
- $url = 'https://core.10web.io/api/checkout/signup-via-magic-link';
567
- $result = wp_remote_post( $url, $args );
568
- ob_clean();
569
- if ( !empty($result) && isset( $result['body']) ) {
570
- $result = $result['body'];
571
- } else {
572
- echo json_encode( array('status' => 'error' ) );
573
- die;
574
- }
575
-
576
- $result = json_decode($result, 1);
577
-
578
- if ( isset($result['status']) && isset($result['data']['magic_data']) && $result['status'] == "ok" ) {
579
- $args = array();
580
- if ( isset($result['data']['magic_data']) ) {
581
- $magic_data = $result['data']['magic_data'];
582
- $args = array('magic_data' => $magic_data);
583
- }
584
- if ( class_exists('\TenWebOptimizer\OptimizerUtils') ) {
585
- $two_connect_link = \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link('login', $args);
586
- echo json_encode(array( 'status' => 'success', 'booster_connect_url' => $two_connect_link ));
587
- } else {
588
- echo json_encode( array('status' => 'error') );
589
- }
590
- die;
591
- } elseif( isset($result['error']) && $result['error']['status_code'] == "422" ) {
592
- if( class_exists('\TenWebOptimizer\OptimizerUtils') ) {
593
- $two_connect_link = \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link('login', array('login_request_plugin' => 'photo_gallery'));
594
- echo json_encode( array('status' => 'success', 'booster_connect_url' => $two_connect_link) );
595
- } else {
596
- echo json_encode( array('status' => 'error') );
597
- }
598
- die;
599
- }
600
- echo json_encode( array('status' => 'error') );
601
- die;
602
- }
603
-
604
- /**
605
- * Connect to dashboard.
606
- *
607
- * @return void
608
- */
609
- public function connect_to_dashboard() {
610
- $speed_ajax_nonce = WDWLibrary::get('speed_ajax_nonce');
611
- if ( !wp_verify_nonce($speed_ajax_nonce, 'speed_ajax_nonce') ){
612
- die('Permission Denied.');
613
- }
614
-
615
- if ( class_exists('\TenWebOptimizer\OptimizerUtils') ) {
616
- $two_connect_link = \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link('login');
617
- echo json_encode(array( 'status' => 'success', 'booster_connect_url' => $two_connect_link ));
618
- }
619
- else {
620
- echo json_encode(array( 'status' => 'error' ) );
621
- }
622
- die;
623
- }
624
-
625
- /**
626
- * Ajax action Get google page speed scor for desktop and mobile
627
- *
628
- */
629
- public function get_google_page_speed() {
630
- $speed_ajax_nonce = WDWLibrary::get('speed_ajax_nonce');
631
- $last_api_key_index = WDWLibrary::get('last_api_key_index', '');
632
-
633
- if ( !wp_verify_nonce($speed_ajax_nonce, 'speed_ajax_nonce') ){
634
- die('Permission Denied.');
635
- }
636
-
637
- $url = WDWLibrary::get('bwg_url');
638
-
639
- /* Check if url hasn't http or https add */
640
- if ( strpos($url, 'http') !== 0 ){
641
- if ( isset($_SERVER['HTTPS']) ) {
642
- $url = 'https://'.$url;
643
- } else {
644
- $url = 'http://'.$url;
645
- }
646
- }
647
-
648
- /* Check if the url is valid */
649
- if ( !filter_var($url, FILTER_VALIDATE_URL) ) {
650
- echo json_encode(array('error' => 1)); die;
651
- }
652
-
653
- $post_id = url_to_postid($url);
654
- $home_url = get_home_url();
655
- if ( $post_id !== 0 && get_post_status( $post_id ) != 'publish' && rtrim($url, "/") != rtrim($home_url, "/") ) {
656
- echo json_encode( array('error' => 1, 'msg' => esc_html__('This page is not public. Please publish the page to check the score.', 'photo-gallery')) );
657
- die;
658
- }
659
-
660
- if ( $last_api_key_index != '' ) {
661
- /* remove array value as this key already used and no need to try again during the retry */
662
- unset($this->google_api_keys[$last_api_key_index]);
663
- }
664
- $random_index = array_rand( $this->google_api_keys );
665
- $random_api_key = $this->google_api_keys[$random_index];
666
- $result = $this->bwg_google_speed_cron( $url, 'desktop', $random_api_key );
667
- if ( !empty($result['error']) || empty($result)) {
668
- /* Case when retry already done and $last_api_key_index is not empty */
669
- if ( $last_api_key_index != '' ) {
670
- echo json_encode(array( 'error' => 1 ));
671
- }
672
- else {
673
- echo json_encode(array( 'error' => 1, 'last_api_key_index' => $random_index ));
674
- }
675
- die;
676
- }
677
- $score['desktop'] = $result['score']*100;
678
- $score['desktop_loading_time'] = $result['loading_time'];
679
-
680
- $result = $this->bwg_google_speed_cron( $url, 'mobile', $random_api_key );
681
- if( !empty($result['error']) || empty($result) ) {
682
- /* Case when retry already done and $last_api_key_index is not empty */
683
- if ( $last_api_key_index != '' ) {
684
- echo json_encode(array( 'error' => 1 ));
685
- }
686
- else {
687
- echo json_encode(array( 'error' => 1, 'last_api_key_index' => $random_index ));
688
- }
689
- die;
690
- }
691
- $score['mobile'] = $result['score']*100;
692
- $score['mobile_loading_time'] = $result['loading_time'];
693
-
694
- $nowdate = current_time( 'mysql' );
695
- $nowdate = date('d.m.Y h:i:s a', strtotime($nowdate));
696
-
697
- $data = get_option('bwg_speed_score');
698
- $data[$url] = array(
699
- 'desktop_score' => $score['desktop'],
700
- 'desktop_loading_time' => $score['desktop_loading_time'],
701
- 'mobile_score' => $score['mobile'],
702
- 'mobile_loading_time' => $score['mobile_loading_time'],
703
- 'last_analyzed_time' => $nowdate,
704
- 'error' => 0
705
- );
706
- $data['last'] = array(
707
- 'url' => $url
708
- );
709
- update_option('bwg_speed_score', $data, 1);
710
-
711
- $bwg_hompage_optimized = get_option('bwg_hompage_optimized');
712
- if ( rtrim($url, "/") == rtrim($home_url, "/") && !empty($bwg_hompage_optimized) && $bwg_hompage_optimized == 1 ) {
713
- update_option('bwg_hompage_optimized', 2);
714
- }
715
- ob_clean();
716
- echo json_encode(array(
717
- 'desktop_score' => esc_html($score['desktop']),
718
- 'desktop_loading_time' => esc_html($score['desktop_loading_time']),
719
- 'mobile_score' => esc_html($score['mobile']),
720
- 'mobile_loading_time' => esc_html($score['mobile_loading_time']),
721
- 'last_analyzed_time' => esc_html($nowdate),
722
- ));
723
- die;
724
- }
725
-
726
- /**
727
- * Remote get action to get google speed score
728
- *
729
- * @param $page_url string which is url of the page which speed should counted
730
- * @param $strategy string parameter which get desktop or mobile
731
- *
732
- * @return array
733
- */
734
- public function bwg_google_speed_cron( $page_url, $strategy, $key = 'AIzaSyCQmF4ZSbZB8prjxci3GWVK4UWc-Yv7vbw') {
735
- $url = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=" . $page_url . "&key=".$key;
736
- $url = ( $strategy == "mobile" ) ? $url . "&strategy=mobile" : $url;
737
-
738
- $response = wp_remote_get($url, array('timeout' => 300));
739
- $data = array();
740
-
741
- if (is_array($response) && !is_wp_error($response)) {
742
-
743
- $body = $response['body'];
744
- $body = json_decode($body);
745
- if (isset($body->error) ) {
746
- $data['error'] = 1;
747
- } else {
748
- $data['score'] = $body->lighthouseResult->categories->performance->score;
749
- $data['loading_time'] = $body->lighthouseResult->audits->interactive->displayValue;
750
- }
751
- } else {
752
- $data['error'] = 1;
753
- }
754
- return $data;
755
- }
756
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/Speed.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class SpeedModel_bwg
5
- */
6
- class SpeedModel_bwg {
7
-
8
- }
 
 
 
 
 
 
 
 
admin/views/Galleries.php CHANGED
@@ -7,7 +7,6 @@ class GalleriesView_bwg extends AdminView_bwg {
7
 
8
  public function __construct() {
9
  wp_enqueue_script(BWG()->prefix . '_jquery.ui.touch-punch.min');
10
- wp_enqueue_script(BWG()->prefix . '_speed');
11
  parent::__construct();
12
  }
13
 
@@ -452,7 +451,7 @@ class GalleriesView_bwg extends AdminView_bwg {
452
  </span>
453
  </div>
454
  <div>
455
- <a href="<?php echo esc_url(add_query_arg(array( 'page' => 'speed_' . BWG()->prefix ), admin_url('admin.php'))); ?>" class="bwg-total-size-banner-button">
456
  <?php esc_html_e('Optimize now', 'photo-gallery'); ?>
457
  </a>
458
  </div>
7
 
8
  public function __construct() {
9
  wp_enqueue_script(BWG()->prefix . '_jquery.ui.touch-punch.min');
 
10
  parent::__construct();
11
  }
12
 
451
  </span>
452
  </div>
453
  <div>
454
+ <a href="<?php echo esc_url(add_query_arg(array( 'page' => 'twb_photo-gallery' ), admin_url('admin.php'))); ?>" class="bwg-total-size-banner-button">
455
  <?php esc_html_e('Optimize now', 'photo-gallery'); ?>
456
  </a>
457
  </div>
admin/views/Speed.php DELETED
@@ -1,439 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class SpeedView_bwg
5
- */
6
- class SpeedView_bwg extends AdminView_bwg {
7
-
8
- public function __construct() {
9
- parent::__construct();
10
- wp_enqueue_style(BWG()->prefix . '_speed');
11
- wp_enqueue_script(BWG()->prefix . '_speed');
12
- wp_enqueue_script(BWG()->prefix . '_speed_circle');
13
- }
14
-
15
- /**
16
- * Display page.
17
- *
18
- * @param $params
19
- */
20
- public function display( $params = array() ) {
21
- ?>
22
- <div class="wrap">
23
- <?php
24
- $data = array(
25
- 'title' => __('Image optimization is not active', 'photo-gallery'),
26
- 'description' => __('Complete the sign up process to optimize your images for better website performance.', 'photo-gallery'),
27
- 'html' => '<input type="email" class="bwg-sign-up-input" placeholder="Email address" />',
28
- 'button1' => array(
29
- 'title' => __('Sign up', 'photo-gallery'),
30
- 'action' => 'onclick=\'sign_up_dashboard( this );\'',
31
- 'class' => 'bwg-primary',
32
- ),
33
- 'html2' => sprintf(__('By signing up, you agree to 10Web’s. %s and %s', 'photo-gallery'),
34
- '<a href="https://10web.io/terms-of-service/" target="_blank">' . __('Terms of Services', 'photo-gallery') . '</a>',
35
- '<a href="https://10web.io/privacy-policy/" target="_blank">' . __('Privacy Policy', 'photo-gallery') . '</a>'),
36
- 'dismiss' => array(
37
- 'action' => 'onclick=\'bwg_leaving_popup = true; jQuery(".bwg-popup-overlay").addClass("bwg-hidden");\'',
38
- ),
39
- );
40
- echo $this->popup($data);
41
- ?>
42
- <div class="bwg-speed-header">
43
- <?php
44
- if ( $params['booster_plugin_status'] !== 2 ) {
45
- $this->install_booster_view( $params['booster_plugin_status'] );
46
- $this->sign_up_booster_view( $params['booster_plugin_status'] );
47
- $this->connected_booster_view( $params );
48
- $this->connect_to_platform_view($params['booster_plugin_status']);
49
- }
50
- else {
51
- if ( !$params['booster_is_connected'] ) {
52
- if ( $params['subscription_id'] ) {
53
- $this->connect_to_platform_view($params['booster_plugin_status']);
54
- } else {
55
- $this->sign_up_booster_view( $params['booster_plugin_status'] );
56
- }
57
- }
58
- else {
59
- $this->connected_booster_view( $params );
60
- }
61
- }
62
- ?>
63
- </div>
64
- <div class="bwg-speed-body">
65
- <div class="bwg-speed-body-container">
66
- <?php
67
- if ( $params['booster_is_connected'] && !$params['tenweb_is_paid'] ) {
68
- $this->optimizer_on_free_connected($params);
69
- } elseif ( $params['booster_is_connected'] && $params['tenweb_is_paid'] ) {
70
- $this->optimizer_on_pro($params['dashboard_booster_url']);
71
- } else {
72
- $this->optimizer_on_free_not_connected($params);
73
- }
74
- ?>
75
- <p class="bwg-section-title"><?php esc_html_e('PageSpeed optimization', 'photo-gallery'); ?></p>
76
- <p class="bwg-description"><?php esc_html_e('Speed up your website and increase PageSpeed score by optimizing all images.', 'photo-gallery') ?></p>
77
- <div class="bwg-analyze-input-container">
78
- <input type="url" class="bwg-analyze-input <?php esc_attr_e( ( $params['page_is_public'] === 0 ) ? 'bwg-analyze-input-error' : ''); ?>" placeholder="<?php esc_html_e('Page URL', 'photo-gallery') ?>" value="">
79
- <?php if ( $params['page_is_public'] === 0 ) { ?>
80
- <p class="bwg-error-msg"><?php esc_html_e('This page is not public. Please publish the page to check the score.', 'photo-gallery'); ?></p>
81
- <?php } ?>
82
- <a class="bwg-analyze-input-button <?php esc_attr_e( ( !$params['page_is_public'] ) ? 'bwg-disable-analyze' : ''); ?>"><?php esc_html_e('Analyze', 'photo-gallery') ?></a>
83
- </div>
84
-
85
- <div class="bwg-analyze-info-container">
86
- <div class="bwg-analyze-info-left">
87
- <div class="bwg-analyze-info-left-cont">
88
- <div class="bwg-analyze-mobile-score">
89
-
90
- <div class="speed_circle" data-thickness="6" data-id="mobile">
91
- <p class="circle_animated"><?php echo esc_html($params['bwg_speed_score']['mobile_score']); ?></p>
92
- </div>
93
- <p class="bwg-score-name"><?php esc_html_e('Mobile Score', 'photo-gallery'); ?></p>
94
- <p class="bwg-load-time bwg-load-time-mobile"><?php esc_html_e('Load Time:', 'photo-gallery'); ?> <span><?php echo esc_html($params['bwg_speed_score']['mobile_loading_time']); ?></span></p>
95
- </div>
96
- <div class="bwg-analyze-desktop-score">
97
-
98
- <div class="speed_circle" data-thickness="6" data-id="desktop">
99
- <p class="circle_animated"><?php echo esc_html($params['bwg_speed_score']['desktop_score']); ?></p>
100
- </div>
101
- <p class="bwg-score-name"><?php esc_html_e('Desktop Score', 'photo-gallery'); ?></p>
102
- <p class="bwg-load-time bwg-load-time-desktop"><?php esc_html_e('Load Time:', 'photo-gallery'); ?> <span><?php echo esc_html($params['bwg_speed_score']['desktop_loading_time']); ?></span></p>
103
- </div>
104
- </div>
105
- <div class="bwg-analyze-score-info">
106
- <span><?php esc_html_e('Scale:', 'photo-gallery') ?></span>
107
- <span class="bwg-fast-icon bwg-score-icon"></span>90-100 <?php esc_html_e('(fast)', 'photo-gallery'); ?>
108
- <span class="bwg-averege-icon bwg-score-icon"></span>50-89 <?php esc_html_e('(average)', 'photo-gallery'); ?>
109
- <span class="bwg-slow-icon bwg-score-icon"></span>0-49 <?php esc_html_e('(slow)', 'photo-gallery'); ?>
110
- </div>
111
- </div>
112
-
113
- <div class="bwg-analyze-info-right">
114
- <p class="bwg-analyze-info-right-sub-title"><?php esc_html_e('Check your score with', 'photo-gallery') ?></p>
115
- <a href="https://pagespeed.web.dev/" target="_blank"><?php esc_html_e('Google PageSpeed Insights', 'photo-gallery') ?></a>
116
- <hr>
117
- <h3><?php esc_html_e('Analyzed page:', 'photo-gallery'); ?></h3>
118
- <p class="bwg-last-analyzed-page" title="<?php echo esc_html($params['bwg_speed_score']['url']); ?>"><?php echo esc_html($params['bwg_speed_score']['url']); ?></p>
119
- <div class="bwg-last-analyzed-date-container">
120
- <h3><?php esc_html_e('Last analyzed:', 'photo-gallery'); ?></h3>
121
- <p class="bwg-last-analyzed-date"><?php echo esc_html($params['bwg_speed_score']['last_analyzed_time']); ?></p>
122
- </div>
123
- </div>
124
- </div>
125
- </div>
126
- </div>
127
- <?php
128
- }
129
-
130
- /**
131
- * Optimizer section view when booster connected and pro version
132
- *
133
- * @param string $url dashboard booster url
134
- */
135
- public function optimizer_on_pro( $url ) {
136
- ?>
137
- <div class="bwg-analyze-img_optimizer-container bwg-optimize_on bwg-optimize_done">
138
- <div>
139
- <p class="bwg-section-title"><?php esc_html_e('You’re all set!', 'photo-gallery') ?></p>
140
- <p class="bwg-header-description"><?php esc_html_e('All images in media library are optimized.', 'photo-gallery') ?></p>
141
- <ul>
142
- <li><span></span><?php esc_html_e('Auto-optimize all uploaded images.', 'photo-gallery') ?></li>
143
- <li><span></span><?php esc_html_e('Configure WebP format conversion', 'photo-gallery') ?></li>
144
- </ul>
145
- </div>
146
- <div class="bwg-optimize_on-button-cont">
147
- <a href="<?php echo esc_url($url); ?>" target="_blank" class="bwg-optimize-add-pages"><?php esc_html_e('Manage', 'photo-gallery') ?></a>
148
- </div>
149
- </div>
150
- <?php
151
- }
152
-
153
- /**
154
- * Optimizer section view when booster connected and free version
155
- *
156
- * @param string $url dashboard booster url
157
- */
158
- public function optimizer_on_free_not_connected( $params ) {
159
- ?>
160
- <div class="bwg-img_optimizer-container bwg-img_optimizer-not-container">
161
- <div class="bwg-img_optimizer-left">
162
- <span class="bwg-not-optimized-info"><?php esc_html_e('Not Optimized', 'photo-gallery') ?></span>
163
- <h5><?php echo esc_html($params['media_count']); ?><span> <?php echo _n('image', 'images', $params['media_count'], 'photo-gallery'); ?></span></h5>
164
- <ul>
165
- <li><?php esc_html_e('Optimize all uploaded images', 'photo-gallery') ?></li>
166
- <li><?php esc_html_e('Serve Images in WebP format', 'photo-gallery') ?></li>
167
- <li><?php esc_html_e('Speed up website and reduce load time', 'photo-gallery') ?></li>
168
- </ul>
169
- </div>
170
- <div class="bwg-img_optimizer-right">
171
- <div class="bwg-img_optimizer-button-container">
172
- <div class="bwg-img_optimizer-info">
173
- <p class="bwg-section-description"><?php esc_html_e('Reduce image size by up to 40% without compromising the quality.', 'photo-gallery') ?></p>
174
-
175
- <p class="bwg-total_size"><?php esc_html_e('Total size:', 'photo-gallery') ?></p>
176
- <p class="bwg-total_size_value"><?php echo esc_html($params['images_total_size']) ?></p>
177
- </div>
178
- <a class="bwg-img_optimize-now-button"><?php echo __('Optimize Now', 'photo-gallery'); ?></a>
179
- </div>
180
- </div>
181
- </div>
182
- <?php
183
- }
184
-
185
- /**
186
- * Optimizer section view when booster connected and free version
187
- *
188
- * @param string $url dashboard booster url
189
- */
190
- public function optimizer_on_free_connected( $params ) {
191
- $compressed_count = intval(count($params['pages_compressed']['pages']));
192
- ?>
193
- <div class="bwg-img_optimizer-container">
194
- <div class="bwg-img_optimizer-left">
195
- <span class="bwg-optimized-info"><?php esc_html_e('Optimized for free', 'photo-gallery') ?></span>
196
- <h5><?php echo esc_html($params['pages_compressed']['total_compressed_images']); ?><span> <?php echo _n('image', 'images', $params['media_count'], 'photo-gallery'); ?></span></h5>
197
- <p class="bwg-section-description"><?php esc_html_e('Image optimization is performed only on 6 pages included in Free plan.', 'photo-gallery') ?></p>
198
-
199
- <div class="bwg-line_info_container">
200
- <span><?php esc_html_e('Optimized pages', 'photo-gallery') ?></span>
201
- <span><?php echo $compressed_count; esc_html_e(' of 6', 'photo-gallery')?></span>
202
- </div>
203
- <div class="bwg-line_container"><span class="bwg-size_<?php echo esc_attr($compressed_count); ?>"></span></div>
204
- <div class="bwg-section-bottom">
205
- <?php
206
- $pages = $params['pages_compressed']['pages'];
207
- $hompage = false;
208
- if ( !empty($pages) ) {
209
- foreach ( $pages as $page ) {
210
- if ( $page['permalink'] == 'Homepage' ) {
211
- $hompage = true;
212
- $path = $page['permalink'];
213
- } else {
214
- $path = parse_url($page['permalink']);
215
- $path["path"] = rtrim($path["path"] , "/");
216
- $explode = explode("/", $path["path"]);
217
-
218
- if ( count($explode) > 1 ) {
219
- $path = '.../' . end($explode);
220
- } else {
221
- $path = '...' . $path['path'];
222
- }
223
- }
224
- $image_count_text = '';
225
- if ( intval($page['images_count']) != 0 ) {
226
- $image_count_text = intval($page['images_count']).' '.esc_html__(' images', 'photo-gallery');
227
- }
228
- ?>
229
- <div class="bwg-most-image-cont">
230
- <div class="bwg-most-image-cont-path <?php echo $hompage ? 'bwg-hompage-path' : ''; ?>"><?php echo esc_html($path); ?></div>
231
- <div class="bwg-most-image-cont-img-count bwg-optimized"><?php echo esc_html($image_count_text) ?></div>
232
- </div>
233
- <?php
234
- }
235
- }
236
- ?>
237
- </div>
238
- </div>
239
- <div class="bwg-img_optimizer-right">
240
- <span class="bwg-not-optimized-info"><?php esc_html_e('Not Optimized', 'photo-gallery') ?></span>
241
-
242
- <h5><?php echo esc_html($params['pages_compressed']['total_not_compressed_images_count']); ?><span> <?php echo _n('image', 'images', $params['pages_compressed']['total_not_compressed_images_count'], 'photo-gallery'); ?></span></h5>
243
- <ul>
244
- <li><?php esc_html_e('Specify the most image-heavy pages', 'photo-gallery') ?></li>
245
- <li><?php esc_html_e('Optimize pages with photo galleries', 'photo-gallery') ?></li>
246
- </ul>
247
-
248
- <p><?php esc_html_e('Add pages with images you’d like to optimize.', 'photo-gallery') ?></p>
249
- <div class="bwg-img_optimizer-button-container">
250
- <div class="bwg-img_optimizer-info">
251
- <p><?php esc_html_e('Total size:', 'photo-gallery') ?></p>
252
- <p><?php echo esc_html($params['pages_compressed']['total_not_compressed_images_size']) ?></p>
253
- </div>
254
- <a class="bwg-img_add_pages_button" target="_blank" href="https://my.10web.io/websites/<?php echo $params['two_domain_id']; ?>/booster/frontend"><?php echo __('Add pages', 'photo-gallery'); ?></a>
255
- </div>
256
- </div>
257
- </div>
258
- <?php
259
- }
260
-
261
- /**
262
- * Top banner.
263
- *
264
- * @param array $params
265
- */
266
- public function top_banner( $params = array() ) {
267
- $booster_is_active = $params['booster_is_active'];
268
- $media_count = $params['media_count'];
269
- $button = $params['button'];
270
- ?>
271
- <div class="bwg-booster-top-banner <?php echo esc_attr( (($booster_is_active) ? 'bwg-booster-active' : '') ); ?>">
272
- <?php if ( ! $booster_is_active ) { ?>
273
- <p class="bwg-booster-top-banner-wrapper-note">
274
- <span class="bwg-booster-top-banner-wrapper-note--text"><?php esc_html_e('Heavy images negatively affect your website load time and PageSpeed optimization.', 'photo-gallery'); ?></span>
275
- </p>
276
- <?php } ?>
277
- <div class="bwg-booster-top-banner-wrapper">
278
- <div>
279
- <p class="bwg-booster-top-banner-wrappe--images-count">
280
- <?php
281
- if ( $booster_is_active ) {
282
- esc_html_e('Get 10Web Booster Pro', 'photo-gallery');
283
- }
284
- else {
285
- $single = __('%s image can be optimized', 'photo-gallery');
286
- $plural = __('%s images can be optimized', 'photo-gallery');
287
- echo wp_sprintf( _n($single, $plural, intval($media_count), 'photo-gallery'), $media_count );
288
- }
289
- ?>
290
- </p>
291
- <p>
292
- <?php
293
- if ( $booster_is_active ) {
294
- esc_html_e('Automatically optimize the entire website with all images.', 'photo-gallery');
295
- }
296
- else {
297
- esc_html_e('Improve PageSpeed optimization by optimizing your website.', 'photo-gallery');
298
- }
299
- ?>
300
- </p>
301
- </div>
302
- <div>
303
- <a href="<?php echo esc_url($button['url']); ?>" <?php echo esc_attr($button['target']); ?> class="bwg-booster-top-banner-wrappe--button"><?php echo esc_html($button['name']); ?></a>
304
- </div>
305
- </div>
306
- </div>
307
- <?php
308
- }
309
-
310
- /**
311
- * HTML content for case when booster plugin installed and the website has any subscription plan.
312
- *
313
- * @return void
314
- */
315
- public function connect_to_platform_view($booster_plugin_status) {
316
- ?>
317
- <div class="bwg-booster-container bwg-connect-to-dashboard-container <?php echo esc_html($booster_plugin_status != 2) ? 'bwg-hidden' : ''; ?>">
318
- <p class="bwg-section-title"><?php esc_html_e('10Web Booster plugin is installed!', 'photo-gallery') ?></p>
319
- <p class="bwg-description"><?php esc_html_e('Connect to 10Web dashboard to activate 10Web Booster on your website and start optimization process. Optimization will start automatically.', 'photo-gallery') ?></p>
320
- <div class="bwg-sign-up-dashboard-button-container">
321
- <a class="bwg-booster-button bwg-connect-to-dashboard-button"><?php esc_html_e('Connect', 'photo-gallery'); ?></a>
322
- </div>
323
- </div>
324
- <?php
325
- }
326
-
327
- /**
328
- * HTML content for case when booster plugin installed but user didn't sign up
329
- *
330
- * @param int $booster_plugin_status 2-active, 1-installed, 0-not installed
331
- */
332
- public function sign_up_booster_view( $booster_plugin_status ) {
333
- ?>
334
- <div class="bwg-booster-container bwg-sign_up-booster-container <?php echo esc_html($booster_plugin_status != 2) ? 'bwg-hidden' : ''; ?>">
335
- <p class="bwg-section-title"><?php esc_html_e('10Web Booster plugin is installed!', 'photo-gallery') ?></p>
336
- <p class="bwg-description"><?php esc_html_e('Use 10Web Website Booster to optimize all website images and boost PageSpeed score.', 'photo-gallery') ?></p>
337
- <ul class="bwg-install-booster-steps">
338
- <li class="bwg_so_check_active">
339
- <?php esc_html_e('Install 10Web Booster', 'photo-gallery') ?>
340
- <span><?php esc_html_e('Activate plugin on the website', 'photo-gallery') ?></span>
341
- </li>
342
- <li>
343
- <?php esc_html_e('Sign up and connect', 'photo-gallery') ?>
344
- <span><?php esc_html_e('Start the optimization process', 'photo-gallery') ?></span>
345
- </li>
346
- <li>
347
- <?php esc_html_e('Optimize all images', 'photo-gallery') ?>
348
- <span><?php esc_html_e('Speed up the entire website', 'photo-gallery') ?></span>
349
- </li>
350
- </ul>
351
- <input type="email" class="bwg-sign-up-input" placeholder="Email address">
352
- <div class="bwg-sign-up-dashboard-button-container">
353
- <a class="bwg-booster-button bwg-sign-up-dashboard-button"><?php esc_html_e('Sign up', 'photo-gallery'); ?></a>
354
- <div>
355
- <?php esc_html_e('By signing up, you agree to 10Web’s.', 'photo-gallery'); ?>
356
- <br>
357
- <a href="https://10web.io/terms-of-service/" target="_blank"><?php esc_html_e('Terms of Services', 'photo-gallery'); ?></a>
358
- <?php esc_html_e(' and ', 'photo-gallery'); ?>
359
- <a href="https://10web.io/privacy-policy/" target="_blank"><?php esc_html_e('Privacy Policy', 'photo-gallery'); ?></a>
360
- </div>
361
- </div>
362
- </div>
363
- <?php
364
- }
365
-
366
- /**
367
- * html content for case when booster plugin installed but user didn't sign up
368
- *
369
- * @param arrar $params status->2-active, 1-installed, 0-not installed, booster url
370
- */
371
- public function connected_booster_view( $params = array() ) {
372
- ?>
373
- <div class="bwg-connected-booster-container <?php echo esc_html($params['booster_plugin_status'] != 2) ? 'bwg-hidden' : '';
374
- echo !$params['tenweb_is_paid'] ? ' bwg-is-free': '';?>">
375
- <div class="bwg-connected-booster-content">
376
- <div class="bwg-connected-booster-done-cont">
377
- <?php esc_html_e('Site is connected', 'photo-gallery') ?>
378
- </div>
379
- <p class="bwg-section-title"><?php esc_html_e('10Web Booster is active', 'photo-gallery') ?></p>
380
- <p class="bwg-header-description"><?php esc_html_e('Our plugin is now optimizing your website.', 'photo-gallery') ?></p>
381
- <p class="bwg-header-description"><?php esc_html_e('Manage optimization settings from the 10Web dashboard.', 'photo-gallery') ?></p>
382
- <?php
383
- if ( !$params['tenweb_is_paid'] ) { ?>
384
- <ul class="bwg-install-booster-steps">
385
- <li class="bwg_so_check_active">
386
- <?php esc_html_e('Install 10Web Booster', 'photo-gallery') ?>
387
- <span><?php esc_html_e('Activate plugin on the website', 'photo-gallery') ?></span>
388
- </li>
389
- <li class="bwg_so_check_active">
390
- <?php esc_html_e('Sign up and connect', 'photo-gallery') ?>
391
- <span><?php esc_html_e('Start the optimization process', 'photo-gallery') ?></span>
392
- </li>
393
- <li>
394
- <?php esc_html_e('Optimize all images', 'photo-gallery') ?>
395
- <span><a href="https://my.10web.io/upgrade-plan" target="_blank"><?php esc_html_e('Upgrade to Booster Pro', 'photo-gallery') ?></a></span>
396
- </li>
397
- </ul>
398
- <?php } ?>
399
- </div>
400
- <div class="button-container">
401
- <a href="<?php echo esc_url($params['dashboard_booster_url']); ?>" target="_blank" class="bwg-manage-booster"><?php esc_html_e('Manage', 'photo-gallery'); ?></a>
402
- </div>
403
- </div>
404
- <?php
405
- }
406
-
407
- /**
408
- * html content for case when booster plugin didn't installed
409
- *
410
- * @param int $booster_plugin_status 2-active, 1-installed, 0-not installed
411
- */
412
- public function install_booster_view( $booster_plugin_status ) {
413
- ?>
414
- <div class="bwg-install-booster-container">
415
- <p class="bwg-section-title"><?php esc_html_e('10Web Booster', 'photo-gallery') ?></p>
416
- <p class="bwg-header-description"><?php esc_html_e('Use 10Web Website Booster to optimize all website images and boost PageSpeed score.', 'photo-gallery') ?></p>
417
- <ul class="bwg-install-booster-steps">
418
- <li class="<?php echo esc_html($booster_plugin_status > 1 ? 'bwg_so_check_active' : '');?>">
419
- <?php esc_html_e('Install 10Web Booster', 'photo-gallery') ?>
420
- <span><?php esc_html_e('Activate plugin on the website', 'photo-gallery') ?></span>
421
- </li>
422
- <li>
423
- <?php esc_html_e('Sign up and connect', 'photo-gallery') ?>
424
- <span><?php esc_html_e('Start the optimization process', 'photo-gallery') ?></span>
425
- </li>
426
- <li>
427
- <?php esc_html_e('Optimize all images', 'photo-gallery') ?>
428
- <span><?php esc_html_e('Speed up the entire website', 'photo-gallery') ?></span>
429
- </li>
430
- </ul>
431
- <div class="bwg-button-container-parent">
432
- <div class="button-container">
433
- <a class="bwg-install-booster"><?php echo esc_html($booster_plugin_status === 0) ? __('Install 10Web Booster plugin', 'photo-gallery') : __('Activate 10Web Booster plugin', 'photo-gallery'); ?></a>
434
- <p><?php esc_html_e('Installing from WordPress repository', 'photo-gallery') ?></p>
435
- </div>
436
- </div>
437
- </div>
438
- <?php }
439
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
booster/AdminBar.php ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class OptimizerAdminBar
4
+ */
5
+ class TWBAdminBar
6
+ {
7
+ private $booster;
8
+
9
+ private $page_speed_status;
10
+
11
+ /* Keeping ongoing data of progresses to show notification popup*/
12
+ private $notification_data = array( 'inprogress' => array(), 'completed' => array() );
13
+ /* Set 1 if need to show notification */
14
+ private $show_notification_popup = 0;
15
+
16
+ function __construct( $wp_admin_bar, $booster ) {
17
+ $this->twb_get_notification_data();
18
+ /* No need to add adminbar menu in admin if there is no notification data to show */
19
+ if ( is_admin() && !$this->show_notification_popup ) {
20
+ return;
21
+ }
22
+ $this->booster = $booster;
23
+ /* Ajax action which checking notification status and show if response has data */
24
+ if ( isset($_POST['action']) && sanitize_text_field($_POST['action']) == "twb_notif_check" ) {
25
+ $html = '';
26
+ $clearInterval = 1;
27
+ if ( !empty($this->notification_data['completed']) ) {
28
+ $html = $this->twb_popup_notification();
29
+ $changeLogo = 1;
30
+ }
31
+ if ( !empty($this->notification_data['inprogress']) ) {
32
+ $html = $this->twb_popup_notification();
33
+ $clearInterval = 0;
34
+ $changeLogo = 0;
35
+ }
36
+ echo wp_json_encode(array('html' => $html, 'clearInterval' => $clearInterval, 'changeLogo' => $changeLogo));
37
+ die;
38
+ } else {
39
+
40
+ $this->page_speed_status = $this->get_page_speed_status();
41
+ $this->include_style_scripts();
42
+ $wp_admin_bar->add_menu(array(
43
+ 'id' => 'twb_adminbar_info',
44
+ 'title' => $this->twb_admin_menu(),
45
+ 'meta' => array(
46
+ 'target' => '_blank',
47
+ 'class' => $this->booster->cta_button['class'],
48
+ 'html' => $this->twb_admin_bar_menu_content(),
49
+ ),
50
+ ));
51
+ }
52
+ }
53
+
54
+ public function include_style_scripts() {
55
+ wp_enqueue_style(TenWebBooster::PREFIX . '-global');
56
+ wp_enqueue_script(TenWebBooster::PREFIX . '-global');
57
+ }
58
+
59
+ /**
60
+ * Get status which return if score counted = 2, not counted = 0, inprogress = 1
61
+ *
62
+ * @return int
63
+ */
64
+ public function get_page_speed_status() {
65
+ global $post;
66
+ if ( empty($post) ) {
67
+ return false;
68
+ }
69
+
70
+ $post_id = $post->ID;
71
+ $page_score = get_post_meta( $post_id, 'two_page_speed' );
72
+ $page_score = end($page_score);
73
+
74
+ if ( isset($page_score['previous_score']) ) {
75
+ if ( isset( $page_score['previous_score']['error'] ) && $page_score['previous_score']['error'] == "1" ) {
76
+ return 'error';
77
+ } elseif ( isset( $page_score['previous_score']['status'] ) && $page_score['previous_score']['status'] == "inprogress" ) {
78
+ return 'inprogress';
79
+ } elseif( isset( $page_score['previous_score']['status'] ) && $page_score['previous_score']['status'] == "completed" ) {
80
+ return 'completed';
81
+ }
82
+ }
83
+ return 'notstarted';
84
+ }
85
+
86
+ /**
87
+ * Admin bar menu.
88
+ *
89
+ * @return string
90
+ */
91
+ public function twb_admin_menu() {
92
+ if ( !is_admin() ) {
93
+ $img = '';
94
+ $className = '';
95
+ $title = '';
96
+ if ( $this->page_speed_status == 'notstarted' ) {
97
+ $img = '<img class="twb_menu_logo" src="' . $this->booster->plugin_url . '/assets/images/logo_white.svg" />';
98
+ $img .= '<img class="twb-hidden twb_not_optimized_logo" src="' . $this->booster->plugin_url . '/assets/images/not_optimized.svg" />';
99
+ $title = '<div class="twb_menu_logo">'.__("Check PageSpeed Score", 'tenweb-booster').'</div>';
100
+ $title .= '<div class="twb-hidden twb_not_optimized_logo">'.__("Not optimized", 'tenweb-booster').'</div>';
101
+ } elseif ( $this->page_speed_status == 'inprogress' ) {
102
+ $img = '<img class="twb_menu_logo" src="' . $this->booster->plugin_url . '/assets/images/logo_white.svg" />';
103
+ $img .= '<img class="twb-hidden twb_not_optimized_menu_logo" src="' . $this->booster->plugin_url . '/assets/images/not_optimized.svg" />';
104
+ $className = ' twb_score_inprogress';
105
+ $title = '<div class="twb_menu_logo">'.__("Check PageSpeed Score", 'tenweb-booster').'</div>';
106
+ $title .= '<div class="twb-hidden twb_not_optimized_logo">'.__("Not optimized", 'tenweb-booster').'</div>';
107
+ } elseif ( $this->page_speed_status == 'completed' || $this->page_speed_status == 'error' ) {
108
+ $img = '<img src="' . $this->booster->plugin_url . '/assets/images/not_optimized.svg" />';
109
+ $title = __("Not optimized", 'tenweb-booster');
110
+ $className = ' twb_not_optimized';
111
+ }
112
+ $twb_admin_bar_menu = '<div class="twb_admin_bar_menu twb_frontend' . $className . '"><div class="twb_admin_bar_menu_header' . $className . '">' . $img . " " . $title . '</div><div class="twb_vr"></div><span></span></div>';
113
+ } else {
114
+ if ( $this->show_notification_popup ) {
115
+ $className = 'twb_backend_optimizing_logo';
116
+ if( empty($this->notification_data['inprogress']) ) {
117
+ $className = "twb_backend_not_optimized_logo";
118
+ }
119
+ $twb_admin_bar_menu = '<div class="twb_admin_bar_menu twb_backend"><div class="twb_admin_bar_menu_header"><span class="'.$className.'"></span></div></div>';
120
+ }
121
+ }
122
+ return $twb_admin_bar_menu;
123
+ }
124
+
125
+ /**
126
+ * Adminbar menu content.
127
+ *
128
+ * @return string
129
+ */
130
+ public function twb_admin_bar_menu_content()
131
+ {
132
+ ob_start();
133
+ if( is_admin() ) {
134
+ /* Notification for in progress optimizing */
135
+ echo $this->twb_popup_notification();
136
+ }
137
+ ?>
138
+ <div class="twb_admin_bar_menu_main twb-hidden">
139
+ <?php
140
+
141
+ if ( !is_admin() ) {
142
+ if ( $this->page_speed_status == 'notstarted' ) {
143
+ $this->twb_front_score_not_counted_content();
144
+ } elseif ( $this->page_speed_status == 'inprogress' ) {
145
+ $this->twb_front_score_in_progress_content();
146
+ } elseif ( $this->page_speed_status == 'error' ) {
147
+ $this->twb_front_score_error_content();
148
+ } else {
149
+ $this->twb_front_score_counted_content();
150
+ }
151
+ }
152
+ ?>
153
+ </div>
154
+ <?php
155
+ return ob_get_clean();
156
+ }
157
+
158
+ /* Content of admin menu if score not counted*/
159
+ public function twb_front_score_not_counted_content() {
160
+ global $post;
161
+ if ( empty($post) ) {
162
+ return false;
163
+ }
164
+
165
+ $post_id = $post->ID;
166
+ $checkout_url = '';
167
+ ?>
168
+ <div class="twb_admin_bar_menu_content twb-notoptimized twb_not_optimized_content">
169
+ <p class="twb_status_title"><?php echo __('Check the PageSpeed score', 'tenweb-booster'); ?></p>
170
+ <p class="twb_status_description"><?php _e('PageSpeed score is an essential attribute to your website’s performance. It affects both the user experience and SEO rankings.', 'tenweb-booster') ?></p>
171
+ <a data-post_id="<?php echo esc_attr($post_id); ?>"
172
+ data-initiator="admin-bar" target="_blank"
173
+ class="twb_check_score_button"><?php _e('Check PageSpeed Score', 'tenweb-booster') ?></a>
174
+ </div>
175
+ <?php
176
+ $this->twb_front_score_in_progress_content();
177
+ $this->twb_front_score_counted_content();
178
+ }
179
+
180
+ /* Content of admin menu if score counting in progress */
181
+ public function twb_front_score_in_progress_content() {
182
+ global $post;
183
+ if ( empty($post) ) {
184
+ return false;
185
+ }
186
+
187
+ $post_id = $post->ID;
188
+ $page_title = get_the_title( $post_id );
189
+ ?>
190
+ <div class="twb_admin_bar_menu_content twb-optimizing <?php echo $this->page_speed_status == 'notstarted' ? 'twb-hidden' : ''; ?>">
191
+ <p class="twb_status_title twb_status_title_inprogress twb_score_inprogress"><span></span><?php echo __('Checking...', 'tenweb-booster'); ?></p>
192
+ <p class="twb_status_description"><?php echo sprintf(__('We are checking the PageSpeed score of your %s page.', 'tenweb-booster'), $page_title); ?></p>
193
+ </div>
194
+ <?php
195
+ }
196
+
197
+ /* Content of admin menu if score counted */
198
+ public function twb_front_score_counted_content() {
199
+ global $post;
200
+ if ( empty($post) ) {
201
+ return false;
202
+ }
203
+
204
+ $post_id = $post->ID;
205
+ $page_score = get_post_meta( $post_id, 'two_page_speed' );
206
+
207
+ $score = array(
208
+ 'mobile_score' => 0,
209
+ 'mobile_tti' => 0,
210
+ 'desktop_score' => 0,
211
+ 'desktop_tti' => 0,
212
+ );
213
+
214
+ if ( !empty($page_score) ) {
215
+ $page_score = end($page_score);
216
+ if ( !empty($page_score['previous_score']) && !empty($page_score['previous_score']['mobile_score']) ) {
217
+ $page_score = $page_score['previous_score'];
218
+ $score = array(
219
+ 'mobile_score' => $page_score['mobile_score'],
220
+ 'mobile_tti' => $page_score['mobile_tti'],
221
+ 'desktop_score' => $page_score['desktop_score'],
222
+ 'desktop_tti' => $page_score['desktop_tti'],
223
+ );
224
+ }
225
+ }
226
+
227
+
228
+ $page_title = get_the_title( $post_id );
229
+ $url = $this->booster->submenu_url;
230
+ ?>
231
+ <div class="twb_admin_bar_menu_content twb-optimized twb_counted <?php echo $this->page_speed_status != 'completed' ? 'twb-hidden' : ''; ?>">
232
+ <?php
233
+ $title = sprintf(__('%s page', 'tenweb-booster'), $page_title);
234
+ TWBLibrary::score( $score, $url, $post_id, $title, 0 ) ?>
235
+ </div>
236
+ <?php
237
+ }
238
+
239
+ /* Content of admin menu if score counted */
240
+ public function twb_front_score_error_content() {
241
+ global $post;
242
+ if ( empty($post) ) {
243
+ return false;
244
+ }
245
+
246
+ $post_id = $post->ID;
247
+ $page_title = get_the_title( $post_id );
248
+ $url = $this->booster->submenu_url;
249
+
250
+ $score = array(
251
+ 'error' => 1,
252
+ );
253
+ ?>
254
+ <div class="twb_admin_bar_menu_content twb-optimized twb_counted <?php echo $this->page_speed_status != 'error' ? 'twb-hidden' : ''; ?>">
255
+ <?php
256
+ $title = sprintf(__('%s page', 'tenweb-booster'), $page_title);
257
+ TWBLibrary::score( $score, $url, $post_id, $title, 0 ); ?>
258
+ </div>
259
+ <?php
260
+ }
261
+
262
+ /* Getting data inprogress and counted scores */
263
+ public function twb_get_notification_data() {
264
+ global $wpdb;
265
+ $posts = $wpdb->get_results("SELECT * FROM `".$wpdb->postmeta."` WHERE meta_key='two_page_speed'", ARRAY_A);
266
+ if( empty($posts) ) {
267
+ return;
268
+ }
269
+ foreach ( $posts as $post ) {
270
+ $page_score = unserialize($post['meta_value']);
271
+ if( isset($page_score['previous_score']) ) {
272
+ $page_score = $page_score['previous_score'];
273
+ } else {
274
+ continue;
275
+ }
276
+
277
+ $page_title = get_the_title($post['post_id']);
278
+ $post_id = $post['post_id'];
279
+ if ( isset($page_score["status"]) && $page_score["status"] == "inprogress" ) {
280
+ $this->show_notification_popup = 1;
281
+ $this->notification_data['inprogress'][] = array(
282
+ 'post_id' => $post_id,
283
+ 'post_title' => $page_title,
284
+ );
285
+ }
286
+ $shown = isset($page_score["shown"]) ? $page_score["shown"] : 0;
287
+ if (isset($page_score["status"]) && $page_score["status"] == "completed" && !isset($page_score["error"]) && !$shown ) {
288
+ $this->show_notification_popup = 1;
289
+ $this->notification_data['completed'][] = array(
290
+ 'post_id' => $post_id,
291
+ 'post_title' => $page_title,
292
+ 'mobile_score' => $page_score['mobile_score'],
293
+ 'mobile_tti' => $page_score['mobile_tti'],
294
+ 'desktop_score' => $page_score['desktop_score'],
295
+ 'desktop_tti' => $page_score['desktop_tti'],
296
+ );
297
+ $page_score["shown"] = 1;
298
+ $data['previous_score'] = $page_score;
299
+ update_post_meta($post_id, 'two_page_speed', $data);
300
+ }
301
+
302
+ }
303
+ }
304
+
305
+ /* Show notification during the page load if there is optimizing page in progress */
306
+ public function twb_popup_notification() {
307
+ if ( !$this->show_notification_popup ) {
308
+ return '';
309
+ }
310
+ ob_start();
311
+ ?>
312
+ <div class="twb_admin_bar_menu_main twb_admin_bar_menu_main_notif">
313
+ <?php if ( !empty($this->notification_data['completed']) ) { ?>
314
+ <div class="twb_admin_bar_menu_content twb_counted">
315
+ <?php
316
+ $url = $this->booster->submenu_url;
317
+ $i = 1;
318
+ foreach ( $this->notification_data['completed'] as $score ) { ?>
319
+ <div class="twb_counted_cont">
320
+ <div class="twb_score_block_container">
321
+ <?php
322
+ $title = sprintf( __('%s page', 'tenweb-booster'), esc_html($score['post_title']) );
323
+ TWBLibrary::score( $score, $url, $score['post_id'], $title, 0 ) ?>
324
+ </div>
325
+ </div>
326
+ <?php
327
+ $i++;
328
+ }
329
+ ?>
330
+ </div>
331
+ <?php } ?>
332
+ <?php if ( !empty($this->notification_data['inprogress']) ) { ?>
333
+ <div class="twb_counting_container">
334
+ <?php foreach ( $this->notification_data['inprogress'] as $checking ) { ?>
335
+ <p class="twb_counting_title"><span></span><?php _e('Checking…', 'tenweb-booster'); ?></p>
336
+ <p class="twb_counting_descr"><?php echo sprintf(__('We are checking the PageSpeed score of your %s page.', 'tenweb-booster'), '<span>'.esc_html($checking['post_title']).'</span>'); ?></p>
337
+ <?php } ?>
338
+ </div>
339
+ <?php } ?>
340
+ </div>
341
+ <?php
342
+ return ob_get_clean();
343
+ }
344
+
345
+ }
booster/Elementor.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class TWBElementor
5
+ */
6
+ class TWBElementor {
7
+ private $booster;
8
+
9
+ function __construct( $booster ) {
10
+ $this->booster = $booster;
11
+ add_action('elementor/editor/after_enqueue_scripts', array( $this, 'scripts_styles' ));
12
+ add_action('elementor/documents/register_controls', array( $this,'register_document_controls' ));
13
+ }
14
+
15
+ /**
16
+ * Enqueue scripts.
17
+ *
18
+ * @return void
19
+ */
20
+ public function scripts_styles() {
21
+ wp_enqueue_style('twb-open-sans', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700,800&display=swap');
22
+ wp_enqueue_style(TenWebBooster::PREFIX . '-global', $this->booster->plugin_url . '/assets/css/global.css', array( 'twb-open-sans' ), TenWebBooster::VERSION);
23
+ if ( $this->booster->cta_button['button_color'] || $this->booster->cta_button['text_color'] ) {
24
+ wp_add_inline_style(TenWebBooster::PREFIX . '-global', '.twb-custom-button, .twb-custom-button:hover {background-color: ' . $this->booster->cta_button['button_color'] . ' !important; color: ' . $this->booster->cta_button['text_color'] . ' !important;}');
25
+ }
26
+
27
+ wp_enqueue_script(TenWebBooster::PREFIX . '-elementor', $this->booster->plugin_url . '/assets/js/elementor.js', array('jquery'), TenWebBooster::VERSION);
28
+ wp_localize_script(TenWebBooster::PREFIX . '-elementor', 'twb', array(
29
+ 'title' => $this->booster->cta_button['section_label'],
30
+ ));
31
+ }
32
+
33
+ /**
34
+ * Register additional document controls.
35
+ *
36
+ * @param \Elementor\Core\DocumentTypes\PageBase $document The PageBase document instance.
37
+ */
38
+ public function register_document_controls( $document ) {
39
+ if ( ! $document instanceof \Elementor\Core\DocumentTypes\PageBase || ! $document::get_property( 'has_elements' ) || !empty($document->get_section_controls('twb_optimize_section')) ) {
40
+ return;
41
+ }
42
+
43
+ $section_label = isset($this->booster->cta_button['section_label']) ? $this->booster->cta_button['section_label'] : '';
44
+
45
+ \Elementor\Controls_Manager::add_tab('twb_optimize', $section_label);
46
+
47
+ $document->start_controls_section(
48
+ 'twb_optimize_section',
49
+ [
50
+ 'tab' => 'twb_optimize',
51
+ ]
52
+ );
53
+
54
+ $content = TWBLibrary::twb_button_template( $this->booster );
55
+ $classname = 'twb_elementor_settings_content twb_optimized';
56
+ $label_html = '';
57
+ if ( $section_label != '' ) {
58
+ $label_html = '<p class="twb_elementor_control_title">' . esc_html($section_label) . '</p>';
59
+ }
60
+
61
+ $document->add_control(
62
+ 'twb_raw_html',
63
+ [
64
+ 'label' => $label_html,
65
+ 'type' => \Elementor\Controls_Manager::RAW_HTML,
66
+ 'raw' => $content,
67
+ 'content_classes' => $classname,
68
+ ]
69
+ );
70
+
71
+ $document->end_controls_section();
72
+ }
73
+ }
booster/Gutenberg.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class TWBGutenberg
5
+ */
6
+ class TWBGutenberg {
7
+ private $booster;
8
+ function __construct($booster) {
9
+ $this->booster = $booster;
10
+ add_action('enqueue_block_editor_assets', array($this, 'register_scripts'));
11
+ }
12
+
13
+ /**
14
+ * Register scripts.
15
+ *
16
+ * @return void
17
+ */
18
+ public function register_scripts() {
19
+ wp_enqueue_script(TenWebBooster::PREFIX . '-gutenberg', $this->booster->plugin_url . '/assets/js/gutenberg/gutenberg-compiled.js', array(
20
+ 'wp-plugins',
21
+ 'wp-edit-post'
22
+ ), TenWebBooster::VERSION);
23
+ wp_enqueue_style(TenWebBooster::PREFIX . '-global');
24
+ if ( $this->booster->cta_button['button_color'] || $this->booster->cta_button['text_color'] ) {
25
+ wp_add_inline_style(TenWebBooster::PREFIX . '-global', '.twb-custom-button, .twb-custom-button:hover {background-color: ' . $this->booster->cta_button['button_color'] . ' !important; color: ' . $this->booster->cta_button['text_color'] . ' !important;}');
26
+ }
27
+ }
28
+ }
booster/List.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class TWBGutenberg
5
+ */
6
+ class TWBList {
7
+ private $booster;
8
+ protected static $_instance = null;
9
+
10
+ function __construct( $booster ) {
11
+ $this->booster = $booster;
12
+ wp_enqueue_style(TenWebBooster::PREFIX . '-global');
13
+ wp_enqueue_script(TenWebBooster::PREFIX . '-global');
14
+ // Add column to the posts list table.
15
+ add_filter('manage_post_posts_columns', array( $this, 'add_column' ));
16
+ add_filter('manage_page_posts_columns', array( $this, 'add_column' ));
17
+ add_action('manage_post_posts_custom_column', array( $this, 'manage_column' ), 10, 2);
18
+ add_action('manage_page_posts_custom_column', array( $this, 'manage_column' ), 10, 2);
19
+ }
20
+
21
+ /**
22
+ * Main Instance.
23
+ *
24
+ * Ensures only one instance is loaded or can be loaded.
25
+ *
26
+ * @static
27
+ * @return Main instance.
28
+ */
29
+ public static function instance($booster) {
30
+ if ( is_null( self::$_instance ) ) {
31
+ self::$_instance = new self($booster);
32
+ }
33
+ return self::$_instance;
34
+ }
35
+
36
+ public function add_column( $columns ) {
37
+ $offset = array_search('author', array_keys($columns));
38
+
39
+ return array_merge(array_slice($columns, 0, $offset), [ 'twb-speed' => __('PageSpeed Score', 'tenweb-booster') ], array_slice($columns, $offset, NULL));
40
+ }
41
+
42
+ public function manage_column( $column_key, $post_id ) {
43
+ if ( $column_key == 'twb-speed' ) {
44
+ if ( get_post_status($post_id) != 'publish' ) {
45
+ return;
46
+ }
47
+ $this->display($post_id);
48
+ }
49
+ }
50
+
51
+ private function display( $post_id ) {
52
+ $page_score = get_post_meta($post_id, 'two_page_speed', TRUE);
53
+ $status = 'notstarted';
54
+ $score = array();
55
+ if ( isset($page_score['previous_score']['status']) ) {
56
+ $status = $page_score['previous_score']['status'];
57
+ $score = $page_score['previous_score'];
58
+ }
59
+ ?>
60
+ <span class="twb-page-speed twb-optimized <?php echo $status == 'completed' ? '' : 'twb-hidden'; ?>">
61
+ <a><?php _e('Not optimized', 'tenweb-booster'); ?></a><span class="twb-page-speed twb-see-score"><?php _e('See score', 'tenweb-booster'); ?></span>
62
+ </span>
63
+ <span data-status="<?php echo $status; ?>" class="twb-page-speed twb-notoptimized <?php echo $status == 'notstarted' ? '' : 'twb-hidden'; ?>">
64
+ <a data-post_id="<?php echo esc_attr($post_id); ?>"><?php _e('Check score', 'tenweb-booster'); ?></a>
65
+ </span>
66
+ <span class="twb-page-speed twb-optimizing <?php echo $status == 'inprogress' ? '' : 'twb-hidden'; ?>">
67
+ <?php _e('Checking...', 'tenweb-booster'); ?>
68
+ <p class="twb-description"></p>
69
+ </span>
70
+ <?php echo TWBLibrary::score($score, $this->booster->submenu_url, $post_id); ?>
71
+ <div class="twb-score-disabled-container twb-hidden">
72
+ <div class="twb-score-title"><?php _e('Checking PageSpeed score', 'tenweb-booster'); ?></div>
73
+ <div class="twb-score-desc"><?php _e('We are checking the PageSpeed score of a different page, please wait until the process is complete to run PageSpeed check on another page.', 'tenweb-booster'); ?></div>
74
+ <div class="twb-score-bottom"><a onclick="jQuery('.twb-score-disabled-container').addClass('twb-hidden')"><?php _e('Got it', 'tenweb-booster'); ?></a></div>
75
+ </div>
76
+ <?php
77
+ }
78
+ }
79
+
80
+ function TWBList($booster) {
81
+ return TWBList::instance($booster);
82
+ }
83
+
84
+
booster/README.md ADDED
@@ -0,0 +1,2 @@
 
 
1
+ # Booster Sdk
2
+
booster/TWBLibrary.php ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class TWBLibrary {
3
+
4
+ /**
5
+ * Return button template which styles user can change using arguments
6
+ *
7
+ * @param $object object of TenWebBooster class
8
+ *
9
+ * @return string html data
10
+ */
11
+ public static function twb_button_template( $object ) {
12
+ ob_start();
13
+
14
+ ?>
15
+ <a href="<?php echo esc_url($object->submenu_url); ?>" target="_blank"
16
+ class="twb-custom-button <?php echo isset($object->cta_button['class']) ? esc_attr($object->cta_button['class']) : '' ?>">
17
+ <?php echo isset($object->cta_button['label']) ? esc_html($object->cta_button['label']) : esc_html__('Optimize Now', 'tenweb-booster'); ?>
18
+ </a>
19
+ <?php
20
+ return ob_get_clean();
21
+ }
22
+
23
+ /**
24
+ * Convert bytes to B, KM, MB, GB, TB, PB.
25
+ *
26
+ * @param $bytes
27
+ * @param $precision
28
+ *
29
+ * @return string
30
+ */
31
+ public static function formatBytes( $bytes, $precision = 2 ) {
32
+ $units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB' );
33
+ $bytes = max($bytes, 0);
34
+ $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
35
+ $pow = min($pow, count($units) - 1);
36
+ $bytes /= pow(1024, $pow);
37
+
38
+ return round($bytes, $precision) . ' ' . $units[$pow];
39
+ }
40
+
41
+ /**
42
+ * Convert B, KM, MB, GB, TB, PB to bytes.
43
+ *
44
+ * @param string $from
45
+ *
46
+ * @return array|float|int|string|string[]|null
47
+ */
48
+ public static function convertToBytes( $from ) {
49
+ $units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB' );
50
+ $number = substr($from, 0, -2);
51
+ $suffix = strtoupper(substr($from, -2));
52
+ if ( is_numeric(substr($suffix, 0, 1)) ) {
53
+ return preg_replace('/[^\d]/', '', $from);
54
+ }
55
+ $flipped = array_flip($units);
56
+
57
+ if ( !isset($flipped[$suffix]) ) {
58
+ return NULL;
59
+ }
60
+
61
+ return floatval($number) * (1024 ** $flipped[$suffix]);
62
+ }
63
+
64
+ /**
65
+ * Save the page speed score in the post meta.
66
+ *
67
+ * @return void
68
+ */
69
+ public static function check_score($post_id) {
70
+ // Getting front_page placeholder instead of page ID for Home page.
71
+ $url = ($post_id == 'front_page') ? get_home_url() : get_permalink($post_id);
72
+ if ( !$url ) {
73
+ return;
74
+ }
75
+
76
+ // Get the page score from DB.
77
+ if ( $post_id == 'front_page' ) {
78
+ $page_score = get_option('two-front-page-speed');
79
+ }
80
+ else {
81
+ $page_score = get_post_meta($post_id, 'two_page_speed', TRUE);
82
+ }
83
+ if ( empty($page_score) ) {
84
+ $page_score = array();
85
+ }
86
+ if ( empty($page_score['previous_score']) ) {
87
+ $page_score['previous_score'] = array();
88
+ }
89
+ // Set the status to in progress.
90
+ $page_score['previous_score']['status'] = 'inprogress';
91
+ if ( $post_id == 'front_page' ) {
92
+ update_option('two-front-page-speed', $page_score);
93
+ }
94
+ else {
95
+ update_post_meta($post_id, 'two_page_speed', $page_score);
96
+ }
97
+
98
+ $desktop_score = TWBLibrary::google_check_score($url, 'desktop');
99
+ // $desktop_score = array('desktop_score' => 75, 'desktop_tti' => '1.1');
100
+ // $desktop_score = array('error' => 1);
101
+ $score = $desktop_score;
102
+ $mobile_score = TWBLibrary::google_check_score($url, 'mobile');
103
+ // $mobile_score = array('mobile_score' => 50, 'mobile_tti' => '1.0');
104
+ // $mobile_score = array('error' => 1);
105
+ $score = array_merge($score, $mobile_score);
106
+ $score['date'] = date('d.m.Y h:i:s a', strtotime(current_time('mysql')));
107
+ // Change the status.
108
+ $score['status'] = 'completed';
109
+ $score['shown'] = 0;
110
+ $page_score['previous_score'] = $score;
111
+
112
+ // Save the status and score in DB.
113
+ if ( $post_id == 'front_page' ) {
114
+ update_option('two-front-page-speed', $page_score);
115
+ }
116
+ else {
117
+ update_post_meta($post_id, 'two_page_speed', $page_score);
118
+ }
119
+
120
+ return json_encode($page_score['previous_score']);
121
+ }
122
+
123
+ /**
124
+ * Get the page speed from Google by URL.
125
+ *
126
+ * @param $page_url
127
+ * @param $strategy
128
+ *
129
+ * @return array
130
+ */
131
+ public static function google_check_score( $page_url, $strategy ) {
132
+ $google_api_keys = array(
133
+ 'AIzaSyCQmF4ZSbZB8prjxci3GWVK4UWc-Yv7vbw',
134
+ 'AIzaSyAgXPc9Yp0auiap8L6BsHWoSVzkSYgHdrs',
135
+ 'AIzaSyCftPiteYkBsC2hamGbGax5D9JQ4CzexPU',
136
+ 'AIzaSyC-6oKLqdvufJnysAxd0O56VgZrCgyNMHg',
137
+ 'AIzaSyB1QHYGZZ6JIuUUce4VyBt5gF_-LwI5Xsk',
138
+ );
139
+ $random_index = array_rand($google_api_keys);
140
+ $key = $google_api_keys[$random_index];
141
+ $url = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=" . $page_url . "&key=" . $key;
142
+ if ( $strategy == "mobile" ) {
143
+ $url .= "&strategy=mobile";
144
+ }
145
+ $response = wp_remote_get($url, array( 'timeout' => 300 ));
146
+ $data = array();
147
+ if ( is_array($response) && !is_wp_error($response) ) {
148
+ $body = $response['body'];
149
+ $body = json_decode($body);
150
+ if ( isset($body->error) ) {
151
+ $data['error'] = 1;
152
+ }
153
+ else {
154
+ $data[$strategy . '_score'] = 100 * $body->lighthouseResult->categories->performance->score;
155
+ $data[$strategy . '_tti'] = rtrim($body->lighthouseResult->audits->interactive->displayValue, 's');
156
+ }
157
+ }
158
+ else {
159
+ $data['error'] = 1;
160
+ }
161
+
162
+ return $data;
163
+ }
164
+
165
+ /**
166
+ * @param $score
167
+ * @param $url
168
+ * @param $post_id
169
+ * @param $title
170
+ * @param $hidden
171
+ *
172
+ * @return void
173
+ */
174
+ public static function score( $score, $url = '', $post_id = 0, $title = '', $hidden = 1 ) {
175
+ $error = empty($score['error']) ? 0 : 1;
176
+ if (empty($score) || $error) {
177
+ $score = array(
178
+ 'desktop_score' => 0,
179
+ 'desktop_tti' => '',
180
+ 'mobile_score' => 0,
181
+ 'mobile_tti' => '',
182
+ 'date' => '',
183
+ 'status' => 'notstarted',
184
+ );
185
+ }
186
+ $title = ($title != '') ? 'of ' . $title : '';
187
+ ?>
188
+ <div class="twb-score-container <?php echo $hidden ? 'twb-hidden' : '' ?>" data-id="<?php echo esc_attr($post_id); ?>">
189
+ <div class="twb-score-title"><?php echo sprintf(__('PageSpeed score %s', 'tenweb-booster'), esc_html($title)); ?></div>
190
+ <div class="twb-score">
191
+ <div class="twb-score-mobile">
192
+ <div class="twb-score-circle"
193
+ data-id="mobile"
194
+ data-thickness="2"
195
+ data-size="30"
196
+ data-score="<?php echo esc_attr($score['mobile_score']); ?>"
197
+ data-tti="<?php echo esc_attr($score['mobile_tti']); ?>">
198
+ <span class="twb-score-circle-animated"></span>
199
+ </div>
200
+ <div class="twb-score-text">
201
+ <span class="twb-score-text-name"><?php _e('Mobile score', 'tenweb-booster'); ?></span>
202
+ <span class="twb-load-text-time"><?php _e('Load time: ', 'tenweb-booster'); ?><span
203
+ class="twb-load-time"></span>s</span>
204
+ </div>
205
+ </div>
206
+ <div class="twb-score-mobile twb-score-mobile-overlay twb-score-overlay <?php echo esc_html($error ? '' : 'twb-hidden'); ?>">
207
+ <div class="twb-reload" data-post_id="<?php echo $post_id; ?>"></div>
208
+ </div>
209
+ <div class="twb-score-desktop">
210
+ <div class="twb-score-circle"
211
+ data-id="desktop"
212
+ data-thickness="2"
213
+ data-size="30"
214
+ data-score="<?php echo esc_attr($score['desktop_score']); ?>"
215
+ data-tti="<?php echo esc_attr($score['desktop_tti']); ?>">
216
+ <span class="twb-score-circle-animated"></span>
217
+ </div>
218
+ <div class="twb-score-text">
219
+ <span class="twb-score-text-name"><?php _e('Desktop score', 'tenweb-booster'); ?></span>
220
+ <span class="twb-load-text-time"><?php _e('Load time: ', 'tenweb-booster'); ?><span
221
+ class="twb-load-time"></span>s</span>
222
+ </div>
223
+ </div>
224
+ <div class="twb-score-desktop twb-score-desktop-overlay twb-score-overlay <?php echo esc_html($error ? '' : 'twb-hidden'); ?>">
225
+ <div class="twb-reload" data-post_id="<?php echo $post_id; ?>"></div>
226
+ </div>
227
+ </div>
228
+ <div class="twb-score-bottom"><a target="_balnk" href="<?php echo esc_url($url); ?>"><?php _e('Optimize now', 'tenweb-booster'); ?></a></div>
229
+ </div>
230
+ <?php
231
+ }
232
+ }
booster/assets/css/global.css ADDED
@@ -0,0 +1,658 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ a.twb-custom-button,
2
+ a.twb-custom-button:hover,
3
+ .elementor-control a.twb-custom-button,
4
+ .elementor-control a.twb-custom-button:hover,
5
+ #wp-admin-bar-booster-top-button .ab-item,
6
+ #wp-admin-bar-booster-top-button .ab-item:hover{
7
+ margin: 3px 0 0 10px !important;
8
+ height: 26px !important;
9
+ border-radius: 2px;
10
+ font-weight: 600;
11
+ font-size: 12px;
12
+ line-height: 24px;
13
+ letter-spacing: 0.1px;
14
+ text-align: center;
15
+ cursor: pointer;
16
+ text-decoration: none;
17
+ padding: 0 8px 0 7px;
18
+ }
19
+
20
+ .twb-green-button,
21
+ .twb-green-button:hover,
22
+ .twb-green-button:focus,
23
+ .elementor-control a.twb-green-button,
24
+ .elementor-control a.twb-green-button:hover,
25
+ #wp-admin-bar-booster-top-button .ab-item,
26
+ #wp-admin-bar-booster-top-button .ab-item:hover,
27
+ #wp-admin-bar-booster-top-button .ab-item:focus,
28
+ #wpadminbar:not(.mobile) .ab-top-menu>#wp-admin-bar-booster-top-button:hover>.ab-item,
29
+ #wpadminbar:not(.mobile) .ab-top-menu>li.twb-green-button>.ab-item:focus {
30
+ background: #22B339 0% 0% no-repeat padding-box;
31
+ color: #FFFFFF;
32
+ }
33
+
34
+ .twb-custom-button:before,
35
+ #wp-admin-bar-booster-top-button .ab-item:before {
36
+ content: '';
37
+ top: 4px;
38
+ left: 0px;
39
+ width: 18px;
40
+ height: 18px;
41
+ background: transparent url("../images/optimize.svg") 0% 0% no-repeat padding-box !important;
42
+ float: left;
43
+ position: relative;
44
+ margin-right: 6px;
45
+ }
46
+
47
+ .twb_elementor_control_title {
48
+ font-size: 12px;
49
+ font-weight: bold;
50
+ line-height: 18px;
51
+ vertical-align: middle;
52
+ display: flex;
53
+ align-items: center;
54
+ margin-bottom: 2px;
55
+ color:#1E1E1E
56
+ }
57
+
58
+ .elementor-control a.twb-green-button,
59
+ .elementor-control a.twb-custom-button,
60
+ .elementor-control a.twb-custom-button:hover {
61
+ display: inline-block;
62
+ margin: 10px 0 0 0!important;
63
+ }
64
+
65
+ .elementor-control-twb_optimize_section .elementor-panel-heading {
66
+ display: none;
67
+ }
68
+
69
+ .elementor-panel .elementor-tab-control-twb_optimize {
70
+ position: relative;
71
+ padding: 0 5px;
72
+ box-sizing: border-box;
73
+ min-width: 80px;
74
+ width:initial;
75
+ }
76
+
77
+ .elementor-panel .elementor-panel-navigation .elementor-panel-navigation-tab.elementor-tab-control-twb_optimize a {
78
+ top: 22px;
79
+ position: absolute;
80
+ left: 50%;
81
+ transform: translateX(-50%);
82
+ font-size: 8px;
83
+ font-weight: 600;
84
+ width: 100%;
85
+ }
86
+
87
+ .elementor-panel .elementor-tab-control-twb_optimize a:before {
88
+ width: 26px;
89
+ position: absolute;
90
+ top: -17px;
91
+ left: calc(50% - 13px);
92
+ content: " ";
93
+ height: 26px;
94
+ background: transparent url(../images/logo_dark.svg) 0 0 no-repeat;
95
+ background-size: 26px;
96
+ }
97
+
98
+ .elementor-panel-menu-item-icon .twb-element-menu-icon:before {
99
+ display: block;
100
+ margin: auto;
101
+ width: 26px;
102
+ height: 26px;
103
+ content: " ";
104
+ background: transparent url(../images/logo_dark.svg) 0 0 no-repeat;
105
+ background-size: 26px;
106
+ }
107
+
108
+ .twb-hidden,
109
+ .twb-score-container.twb-hidden,
110
+ .twb-score-overlay.twb-hidden,
111
+ .twb-score-disabled-container.twb-hidden {
112
+ display: none;
113
+ }
114
+
115
+ .twb-page-speed {
116
+ position: relative;
117
+ padding-left: 20px;
118
+ font-size: 12px;
119
+ font-weight: 700;
120
+ font-family: Open Sans;
121
+ line-height: 18px;
122
+ color: #51575D;
123
+ }
124
+ .twb-optimized a {
125
+ text-decoration: none;
126
+ }
127
+
128
+ .twb-notoptimized a,
129
+ .twb-see-score {
130
+ color: #3A70AD;
131
+ text-decoration: underline;
132
+ cursor: pointer;
133
+ }
134
+
135
+ .twb-page-speed:before {
136
+ content: '';
137
+ position: absolute;
138
+ top: 8px;
139
+ left: 0px;
140
+ transform: translateY(-50%);
141
+ width: 16px;
142
+ height: 16px;
143
+ }
144
+
145
+ .twb-see-score:before {
146
+ background: transparent url(../images/separator.svg) 0% 0% no-repeat padding-box;
147
+ width: 1px;
148
+ height: 12px;
149
+ margin: 0 10px;
150
+ }
151
+ .twb-optimized:before {
152
+ background: transparent url(../images/not_optimized.svg) 0% 0% no-repeat padding-box;
153
+ }
154
+ .twb-notoptimized:before {
155
+ background: transparent url(../images/check_score.svg) 0% 0% no-repeat padding-box;
156
+ }
157
+ .twb-optimizing:before {
158
+ background: transparent url(../images/loader.svg) 0% 0% no-repeat padding-box;
159
+ margin: 8px 2px;
160
+ animation: rotation 1s infinite linear;
161
+ width: 14px;
162
+ height: 14px;
163
+ top: -6px
164
+ }
165
+ .twb-page-speed p.twb-description {
166
+ font-size: 11px;
167
+ margin: 0;
168
+ line-height: 12px;
169
+ font-weight: 600;
170
+ padding: 0;
171
+ color: #51575D;
172
+ }
173
+
174
+ .twb-score-container,
175
+ .twb-score-disabled-container {
176
+ display: flex;
177
+ flex-direction: column;
178
+ padding: 20px 25px;
179
+ background: #23282D 0% 0% no-repeat padding-box;
180
+ border: 1px solid #FFFFFF1A;
181
+ border-radius: 6px;
182
+ color: #FFFFFF;
183
+ position: absolute;
184
+ z-index: 10;
185
+ margin-top: -2px;
186
+ width: 350px;
187
+ }
188
+ #wpadminbar .twb-score-overlay,
189
+ .twb-score-overlay {
190
+ height: 32px;
191
+ z-index: 10;
192
+ position: absolute;
193
+ background-color: #2E3338 !important;
194
+ align-items: center;
195
+ justify-content: center;
196
+ }
197
+ #wpadminbar .twb-score-desktop-overlay,
198
+ .twb-score-desktop-overlay {
199
+ right: 20px;
200
+ }
201
+ #wpadminbar .twb-loader,
202
+ .twb-loader {
203
+ background: transparent url(../images/loader.svg) 0% 0% no-repeat padding-box;
204
+ animation: rotation 1s infinite linear;
205
+ width: 14px;
206
+ height: 14px;
207
+ }
208
+ #wpadminbar .twb-reload,
209
+ .twb-reload {
210
+ background: transparent url(../images/reload.svg) 0% 0% no-repeat padding-box;
211
+ width: 28px;
212
+ height: 28px;
213
+ cursor: pointer;
214
+ }
215
+ #wpadminbar .twb-score-title,
216
+ .twb-score-title {
217
+ font-size: 12px;
218
+ line-height: 18px;
219
+ font-weight: 600;
220
+ }
221
+ #wpadminbar .twb-score-desc,
222
+ .twb-score-desc {
223
+ font-size: 12px;
224
+ line-height: 18px;
225
+ font-weight: 400;
226
+ color: #FFFFFFCC;
227
+ }
228
+ #wpadminbar .twb-score,
229
+ .twb-score {
230
+ flex-direction: row;
231
+ display: flex;
232
+ padding: 20px 0 10px 0;
233
+ }
234
+
235
+ #wpadminbar .twb-score-bottom,
236
+ .twb-score-bottom {
237
+ text-align: right;
238
+ }
239
+ #wpadminbar .twb-score-bottom a,
240
+ #wpadminbar .twb-score-bottom a:hover,
241
+ .twb-score-bottom a,
242
+ .twb-score-bottom a:hover {
243
+ text-decoration: underline;
244
+ font-size: 12px;
245
+ line-height: 18px;
246
+ color: #22B339;
247
+ font-weight: 400;
248
+ cursor: pointer;
249
+ }
250
+
251
+ #wpadminbar .twb-score-mobile,
252
+ .twb-score-mobile {
253
+ margin-right: 10px;
254
+ }
255
+
256
+ #wpadminbar .twb-score-mobile,
257
+ #wpadminbar .twb-score-desktop,
258
+ .twb-score-mobile,
259
+ .twb-score-desktop {
260
+ display: flex;
261
+ width: 150px;
262
+ padding: 10px;
263
+ background: #FFFFFF0D 0% 0% no-repeat padding-box;
264
+ border-radius: 6px;
265
+ }
266
+
267
+ #wpadminbar .twb-score-text,
268
+ .twb-score-text {
269
+ margin-right: 16px;
270
+ text-align: left;
271
+ font-family: Open Sans;
272
+ font-weight: 100;
273
+ }
274
+
275
+ #wpadminbar .twb-score-text-name,
276
+ .twb-score-text-name {
277
+ display: block;
278
+ font: normal normal bold 10px/16px Open Sans;
279
+ letter-spacing: 0px;
280
+ opacity: 1;
281
+ }
282
+ #wpadminbar .twb-load-text-time,
283
+ .twb-load-text-time {
284
+ display: block;
285
+ font: normal normal 600 10px/16px Open Sans;
286
+ letter-spacing: 0.08px;
287
+ opacity: 0.5;
288
+ }
289
+
290
+ #wpadminbar .twb-score-circle,
291
+ .twb-score-circle {
292
+ width: 30px;
293
+ height: 30px;
294
+ position: relative;
295
+ border-radius: 50%;
296
+ margin-right: 12px;
297
+ background: #FFFFFF0D 0% 0% no-repeat padding-box;
298
+ }
299
+
300
+ #wpadminbar .twb-score0,
301
+ .twb-score0 {
302
+ background: url(../images/red-info.svg) no-repeat #FD3C310D;
303
+ background-size: 30px;
304
+ width: 30px;
305
+ height: 30px;
306
+ position: absolute;
307
+ left: -15px;
308
+ top: -15px;
309
+ border-radius: 30px;
310
+ }
311
+
312
+ #wpadminbar .twb-score-circle .twb-score-circle-animated,
313
+ .twb-score-circle .twb-score-circle-animated {
314
+ position: absolute;
315
+ left: 50%;
316
+ top: 50%;
317
+ -webkit-transform: translate(-50%, -50%);
318
+ -moz-transform: translate(-50%, -50%);
319
+ transform: translate(-50%, -50%);
320
+ text-align: center;
321
+ font: normal normal bold 12px/18px Open Sans;
322
+ letter-spacing: 0px;
323
+ }
324
+
325
+ /* Admin Bar styles start */
326
+ #wp-admin-bar-twb_adminbar_info {
327
+ height: 25px;
328
+ }
329
+
330
+ #wpadminbar .quicklinks #wp-admin-bar-twb_adminbar_info .ab-empty-item {
331
+ display: flex;
332
+ height: 25px;
333
+ }
334
+
335
+ #wpadminbar:not(.mobile) .ab-top-menu>li#wp-admin-bar-twb_adminbar_info:hover>.ab-item {
336
+ background: transparent;
337
+ }
338
+ #wpadminbar .twb_admin_bar_menu_header {
339
+ display: flex;
340
+ align-items: center;
341
+ height: 25px;
342
+ padding: 2px 8px;
343
+ box-sizing: border-box;
344
+ border-radius: 2px;
345
+ color: #FFFFFF;
346
+ font-size: 12px;
347
+ line-height: 18px;
348
+ letter-spacing: 0.1px;
349
+ font-weight: 700;
350
+ font-family: Open Sans;
351
+ background-color: #22B339;
352
+ margin-top: 3px;
353
+ }
354
+
355
+ #wpadminbar .twb_not_optimized_logo {
356
+ color: #FFFFFF;
357
+ font-size: 12px;
358
+ line-height: 18px;
359
+ letter-spacing: 0.1px;
360
+ font-weight: 700;
361
+ font-family: Open Sans;
362
+ }
363
+
364
+ #wpadminbar .twb_admin_bar_menu.twb_backend .twb_admin_bar_menu_header {
365
+ margin-top: 0;
366
+ background-color: transparent;
367
+ }
368
+
369
+ #wpadminbar .twb_admin_bar_menu_header.twb_not_optimized {
370
+ background-color: transparent;
371
+ }
372
+
373
+ #wpadminbar .twb_admin_bar_menu_header img {
374
+ width: 18px;
375
+ cursor: pointer;
376
+ margin-right: 4px;
377
+ }
378
+
379
+ #wpadminbar .twb_admin_bar_menu_header.twb_not_optimized img {
380
+ width: 12px;
381
+ cursor: pointer;
382
+ margin-right: 7px;
383
+ }
384
+
385
+ #wpadminbar .twb_admin_bar_menu.twb_frontend.twb_score_inprogress span,
386
+ #wpadminbar .twb_admin_bar_menu.twb_backend .twb_admin_bar_menu_header span {
387
+ background: transparent url(../images/loader_green.svg) 0 0 no-repeat padding-box;
388
+ animation: rotation 1s infinite linear;
389
+ width: 18px;
390
+ height: 18px;
391
+ padding: 0;
392
+ margin-left: 0px;
393
+ margin-top: 6px;
394
+ }
395
+
396
+ #wpadminbar .twb_admin_bar_menu.twb_backend .twb_admin_bar_menu_header span.twb_backend_not_optimized_logo {
397
+ background: transparent url(../images/not_optimized.svg) 0 3px no-repeat padding-box;
398
+ animation: none;
399
+ background-size: 12px;
400
+ }
401
+
402
+ #wpadminbar .twb_admin_bar_menu.twb_frontend.twb_score_inprogress .twb_vr {
403
+ display: inline-block;
404
+ width: 1px;
405
+ height: 18px;
406
+ background-color: #FFFFFF1A;
407
+ margin: 7px 10px 0 10px;
408
+ }
409
+
410
+
411
+ #wpadminbar .twb_admin_bar_menu.twb_backend .twb_admin_bar_menu_header span.twb_counted {
412
+ background: transparent url(../images/not_optimized.svg) 0 0 no-repeat padding-box;
413
+ animation:none;
414
+ }
415
+
416
+ @keyframes rotation {
417
+ from {
418
+ transform: rotate(0deg);
419
+ }
420
+ to {
421
+ transform: rotate(359deg);
422
+ }
423
+ }
424
+
425
+ #wpadminbar .twb_admin_bar_menu {
426
+ height: 100%;
427
+ cursor: pointer;
428
+ }
429
+
430
+ #wpadminbar div.twb_admin_bar_menu_main {
431
+ position: absolute;
432
+ background: transparent;
433
+ display: block;
434
+ padding-top: 10px;
435
+ left: 10px;
436
+ font-family: Open Sans;
437
+ }
438
+
439
+ #wpadminbar .twb_admin_bar_menu_content {
440
+ display: inline-block;
441
+ width: 400px;
442
+ height: auto;
443
+ padding: 25px 25px 20px 25px;
444
+ background-color: #23282D;
445
+ border: 1px solid #FFFFFF1A;
446
+ border-radius: 6px;
447
+ box-sizing: border-box;
448
+ font-family: Open Sans;
449
+ }
450
+
451
+ #wpadminbar .twb_admin_bar_menu_main_notif .twb_counted {
452
+ margin-bottom: 10px;
453
+ }
454
+
455
+ #wpadminbar .twb_admin_bar_menu_main_notif .twb_counted .twb_counted_cont {
456
+ border-bottom: 1px solid #FFFFFF1A;
457
+ }
458
+
459
+ #wpadminbar .twb_admin_bar_menu_main_notif .twb_counted .twb_counted_cont:first-child {
460
+ margin-top: 0px
461
+ }
462
+
463
+ #wpadminbar .twb_admin_bar_menu_main_notif .twb_counted .twb_counted_cont {
464
+ margin-top: 25px
465
+ }
466
+
467
+ #wpadminbar .twb_admin_bar_menu_main_notif .twb_counted .twb_counted_cont:last-child {
468
+ border: none;
469
+ }
470
+
471
+ #wpadminbar .twb_counted .twb_counted_congrats_row {
472
+ display: flex;
473
+ }
474
+
475
+ #wpadminbar .twb_counted .twb_counted_congrats_row span {
476
+ width: 18px;
477
+ height: 18px;
478
+ }
479
+
480
+ #wpadminbar .twb_admin_bar_menu_content .twb_status_title {
481
+ display: flex;
482
+ flex-grow: 1;
483
+ align-items: center;
484
+ font-size: 14px;
485
+ line-height: 20px;
486
+ color: #FFFFFF;
487
+ font-weight: bold;
488
+ margin-bottom: 4px;
489
+ }
490
+
491
+ #wpadminbar .twb_counted .twb_status_title {
492
+ background: url(../images/green-info.svg) 0 no-repeat padding-box;
493
+ background-size: 16px;
494
+ padding-left: 25px;
495
+ }
496
+
497
+ #wpadminbar .twb_admin_bar_menu.twb_frontend.twb_score_inprogress {
498
+ display: flex;
499
+ }
500
+ #wpadminbar .twb_admin_bar_menu_content .twb_score_inprogress span {
501
+ display: inline-block;
502
+ width: 16px;
503
+ height: 16px;
504
+ background-size: 16px!important;
505
+ margin-left: 0;
506
+ margin-right: 5px;
507
+ background: transparent url(../images/loader_green.svg) 0 0 no-repeat padding-box;
508
+ animation: rotation 1s infinite linear;
509
+ background-position: top 2px;
510
+ }
511
+
512
+ #wpadminbar .twb_admin_bar_menu_content .twb_status_description {
513
+ font: normal normal normal 12px/18px Open Sans;
514
+ letter-spacing: 0.1px;
515
+ color: #FFFFFF;
516
+ opacity: 0.8;
517
+ }
518
+
519
+ #wpadminbar .twb_admin_bar_menu_content.twb_counted .twb_status_description {
520
+ margin-bottom: 20px;
521
+ opacity: 1;
522
+ }
523
+ #wpadminbar .twb_admin_bar_menu_content.twb_counted .twb_status_description span {
524
+ font: italic normal bold 12px/18px Open Sans;
525
+ }
526
+
527
+ #wpadminbar .twb_admin_bar_menu_content .twb_check_score_button {
528
+ width: 180px;
529
+ height: 30px;
530
+ line-height: 30px;
531
+ box-sizing: border-box;
532
+ text-decoration: none;
533
+ background-color: #22B339;
534
+ color: #FFFFFF;
535
+ border-radius: 4px;
536
+ text-align: center;
537
+ margin-top: 20px;
538
+ float: right;
539
+ cursor: pointer;
540
+ }
541
+
542
+
543
+ #wpadminbar .twb_counted .twb_counted_congrats_row span.twb_up_arrow {
544
+ background: url(../images/up_arrow_nav.svg) 0 no-repeat padding-box;
545
+ background-size: 18px;
546
+ }
547
+
548
+ #wpadminbar .twb_counted .twb_counted_congrats_row span.twb_down_arrow {
549
+ background: url(../images/down_arrow_nav.svg) 0 no-repeat padding-box;
550
+ background-size: 18px;
551
+ }
552
+
553
+ #wpadminbar .twb_score_success_container_title {
554
+ line-height: 18px;
555
+ margin-bottom: 15px;
556
+ color: #fff;
557
+ }
558
+
559
+ #wpadminbar .twb_counted .twb_counted_congrats_subtitle {
560
+ font-size: 12px;
561
+ line-height: 18px;
562
+ letter-spacing: 0.1px;
563
+ }
564
+
565
+ #wpadminbar .twb_counted .twb_counted_congrats_subtitle span {
566
+ color: #FFFFFF;
567
+ font-style: italic;
568
+ font-weight: 600;
569
+ }
570
+
571
+ #wpadminbar .twb_admin_bar_menu_main hr {
572
+ height: 1px;
573
+ background-color: #FFFFFF1A;
574
+ margin: 20px 0;
575
+ border: none;
576
+ }
577
+
578
+ #wpadminbar .twb_counting_container {
579
+ width: 400px;
580
+ height: auto;
581
+ padding: 25px 25px 20px 25px;
582
+ background-color: #23282D;
583
+ border: 1px solid #FFFFFF1A;
584
+ border-radius: 6px;
585
+ box-sizing: border-box;
586
+ font-family: Open Sans;
587
+ }
588
+
589
+ #wpadminbar .twb_counting_container p.twb_counting_title {
590
+ display: flex;
591
+ align-items: center;
592
+ font: normal normal bold 14px/20px Open Sans;
593
+ letter-spacing: 0px;
594
+ color: #FFFFFF;
595
+ opacity: 1;
596
+ margin-bottom: 4px;
597
+ }
598
+
599
+ #wpadminbar .twb_counting_container p.twb_counting_descr {
600
+ font: normal normal normal 12px/14px Open Sans;
601
+ letter-spacing: 0.1px;
602
+ color: #FFFFFFCC;
603
+ border-bottom:1px solid #FFFFFF1A;
604
+ padding-bottom: 20px;
605
+ margin-bottom: 20px;
606
+ }
607
+
608
+ #wpadminbar .twb_counting_container p.twb_counting_descr:last-child {
609
+ border-bottom: none;
610
+ padding-bottom: 0px;
611
+ margin-bottom: 0px;
612
+ }
613
+
614
+ #wpadminbar .twb_counting_container p.twb_counting_title span {
615
+ display: inline-block;
616
+ width: 14px;
617
+ height: 14px;
618
+ background: transparent url(../images/loader_green.svg) 0 0 no-repeat padding-box;
619
+ background-size: 14px;
620
+ animation: rotation 1s infinite linear;
621
+ margin-right: 5px;
622
+ }
623
+
624
+ #wpadminbar .twb-score-container{
625
+ border: none;
626
+ }
627
+
628
+ #wpadminbar .twb-score-circle .twb-score-circle-animated {
629
+ color: #ffffff!important;
630
+ }
631
+
632
+ #wpadminbar .twb-score-text-name {
633
+ font-size: 10px;
634
+ line-height: 16px;
635
+ font-weight: bold;
636
+ letter-spacing: 0;
637
+ }
638
+
639
+ #wpadminbar .twb-load-text-time {
640
+ font-size: 10px;
641
+ line-height: 16px;
642
+ font-weight: bold;
643
+ letter-spacing: 0;
644
+ opacity: 0.5;
645
+ }
646
+
647
+ #wpadminbar .twb-load-time {
648
+ line-height: 0;
649
+ }
650
+
651
+ #wpadminbar .twb-score-circle, .twb-score-circle {
652
+ margin-right: 8px;
653
+ }
654
+
655
+ #wpadminbar .twb-hidden {
656
+ display: none!important;
657
+ }
658
+ /* Admin bar styles End */
css/bwg_speed.css → booster/assets/css/speed.css RENAMED
@@ -1,4 +1,4 @@
1
- .bwg-speed-header {
2
  width: 714px;
3
  height: auto;
4
  background-color: #FFFFFF;
@@ -10,24 +10,26 @@
10
  border: 1px solid #DEDEDE;
11
  }
12
 
13
- .bwg-speed-header .bwg-sign-up-dashboard-button-container {
14
  display: flex;
15
  gap: 15px;
16
  }
17
 
18
- .bwg-hidden {
19
  display: none!important;
20
  }
21
 
22
- .bwg-speed-body {
23
  font-family: 'Open Sans';
24
  border: 1px solid #DEDEDE;
25
  }
26
 
27
- .bwg-install-booster-container p.bwg-section-title,
28
- .bwg-booster-container p.bwg-section-title,
29
- .bwg-speed-body-container p.bwg-section-title,
30
- .bwg-connected-booster-content p.bwg-section-title{
 
 
31
  padding: 0;
32
  margin: 0 0 2px 0;
33
  color: #323A45;
@@ -36,11 +38,11 @@
36
  font-weight: bold;
37
  }
38
 
39
- .bwg-speed-body-container p.bwg-section-title {
40
  margin: 0 0 5px 0;
41
  }
42
 
43
- .bwg-description {
44
  padding: 0;
45
  margin: 0;
46
  font-size: 14px;
@@ -48,14 +50,14 @@
48
  color: #323A45;
49
  }
50
 
51
- ul.bwg-install-booster-steps {
52
  display: flex;
53
  justify-content: space-between;
54
  list-style: none; /* Remove default bullets */
55
  margin: 45px 0 0 0;
56
  }
57
 
58
- ul.bwg-install-booster-steps li {
59
  margin: 0;
60
  padding: 13px 0 0 0;
61
  width: 211px;
@@ -66,17 +68,17 @@ ul.bwg-install-booster-steps li {
66
  border-top: 12px solid #323A4510;
67
  position: relative;
68
  }
69
- ul.bwg-install-booster-steps li.bwg_so_check_active {
70
  border-color: #22B339;
71
  }
72
- ul.bwg-install-booster-steps li.bwg_so_check_active span{
73
  color: #22B339;
74
  }
75
- ul.bwg-install-booster-steps li.bwg_so_check_active:after{
76
- background-image: url(../images/speed/check_green.jpg);
77
  }
78
 
79
- ul.bwg-install-booster-steps li:after {
80
  content: ".";
81
  height: 36px;
82
  width: 36px;
@@ -86,12 +88,12 @@ ul.bwg-install-booster-steps li:after {
86
  border-radius: 50%;
87
  box-sizing: border-box;
88
  color: #ffffff00;
89
- background-image: url(../images/speed/check_grey.jpg);
90
  background-size: contain;
91
  z-index: 1;
92
  }
93
 
94
- ul.bwg-install-booster-steps li span {
95
  display: block;
96
  font-size: 12px;
97
  line-height: 18px;
@@ -100,14 +102,14 @@ ul.bwg-install-booster-steps li span {
100
 
101
  }
102
 
103
- ul.bwg-install-booster-steps li:last-child:after {
104
  right: -2px;
105
  top: -27px;
106
  height: 42px;
107
  width: 42px;
108
- background-image: url(../images/speed/star_grey.jpg);
109
  }
110
- .bwg-button-container-parent {
111
  margin-top: 30px;
112
  display: flex;
113
  justify-content: end;
@@ -117,12 +119,6 @@ ul.bwg-install-booster-steps li:last-child:after {
117
  display: inline-block;
118
  }
119
 
120
- /*.bwg-install-booster-container .button-container {*/
121
- /* position: absolute;*/
122
- /* right: 25px;*/
123
- /* bottom: 0;*/
124
- /*}*/
125
-
126
  .button-container p {
127
  font-size: 10px;
128
  line-height: 16px;
@@ -133,9 +129,9 @@ ul.bwg-install-booster-steps li:last-child:after {
133
  text-align: center;
134
  }
135
 
136
- a.bwg-install-booster,
137
- a.bwg-manage-booster,
138
- a.bwg-booster-button {
139
  display: block;
140
  height: 40px;
141
  box-sizing: border-box;
@@ -151,45 +147,45 @@ a.bwg-booster-button {
151
  cursor: pointer;
152
  }
153
 
154
- a.bwg-manage-booster {
155
  width: 210px;
156
  }
157
 
158
- a.bwg-install-booster:hover,
159
- a.bwg-booster-button:hover,
160
- a.bwg-optimize-now-button:hover,
161
- a.bwg-optimize-add-pages,
162
- a.bwg-manage-booster {
163
  color: #ffffff
164
  }
165
 
166
 
167
- a.bwg-disable-link {
168
  cursor: default;
169
  opacity: 0.5;
170
  }
171
 
172
- a.bwg-disable-analyze {
173
  background-color: #ffffff;
174
  cursor: default;
175
  opacity: 0.5;
176
  }
177
 
178
- a.bwg-disable-link:hover {
179
  background-color: #2160B5;
180
  color: #ffffff;
181
  cursor: default;
182
  }
183
 
184
- .bwg-loading-image {
185
  width: 15px;
186
  }
187
 
188
- .bwg-booster-container > div {
189
  display: flex;
190
  }
191
 
192
- .bwg-booster-container > div > div {
193
  padding: 0 0 0 15px;
194
  box-sizing: border-box;
195
  max-width: 420px;
@@ -198,15 +194,15 @@ a.bwg-disable-link:hover {
198
  color: #323A45;
199
  }
200
 
201
- .bwg-booster-container > div > div a {
202
  color: #323A45;
203
  }
204
 
205
- .bwg-sign-up-dashboard-button-container {
206
  margin-top: 30px;
207
  }
208
 
209
- input.bwg-sign-up-input {
210
  display: block;
211
  margin-top: 30px;
212
  padding: 10px 16px;
@@ -229,7 +225,7 @@ input.bwg-sign-up-input {
229
  color: #323A4580;
230
  }
231
 
232
- .bwg-speed-body {
233
  width: 714px;
234
  height: auto;
235
  background-color: #FFFFFF;
@@ -239,13 +235,13 @@ input.bwg-sign-up-input {
239
  border-radius: 4px;
240
  }
241
 
242
- .bwg-analyze-input-container {
243
  display: flex;
244
  margin-top: 20px;
245
  position: relative;
246
  }
247
 
248
- .bwg-analyze-input {
249
  width: 414px;
250
  height: 40px;
251
  box-sizing: border-box;
@@ -254,11 +250,11 @@ input.bwg-sign-up-input {
254
  margin-right: 25px;
255
  }
256
 
257
- .bwg-analyze-input-error,
258
- .bwg-input-error {
259
  border-color: #FD3C31 !important;
260
  }
261
- .bwg-analyze-input--error-message {
262
  display: block;
263
  margin-top: 3px;
264
  text-align: left;
@@ -272,7 +268,7 @@ input.bwg-sign-up-input {
272
  }
273
 
274
 
275
- .bwg-analyze-input-button {
276
  display: block;
277
  width:210px;
278
  height: 40px;
@@ -286,43 +282,43 @@ input.bwg-sign-up-input {
286
  cursor: pointer;
287
  }
288
 
289
- .bwg-analyze-input-button:hover {
290
  color: #323A45;
291
  }
292
 
293
- .bwg-analyze-info-container {
294
  display: flex;
295
  width: 100%;
296
  height: 204px;
297
  margin-top: 30px;
298
  }
299
 
300
- .bwg-analyze-info-left-cont {
301
  display: flex;
302
  }
303
 
304
- .bwg-analyze-mobile-score,
305
- .bwg-analyze-desktop-score {
306
  width: 202px;
307
  height: 158px;
308
  background: #F9F9F9;
309
  }
310
 
311
- .bwg-analyze-mobile-score {
312
  margin-right: 5px;
313
- background: url(../images/speed/mobile.svg) no-repeat #F9F9F9;
314
  background-size: 18px;
315
  background-position: 10px 10px;
316
  }
317
 
318
- .bwg-analyze-desktop-score {
319
  margin-left: 5px;
320
- background: url(../images/speed/desktop.svg) no-repeat #F9F9F9;
321
  background-size: 18px;
322
  background-position: 10px 10px;
323
  }
324
 
325
- .bwg-analyze-score-info {
326
  width: 414px;
327
  height: 38px;
328
  background: #F9F9F9;
@@ -333,7 +329,7 @@ input.bwg-sign-up-input {
333
  font-weight: 600;
334
  }
335
 
336
- .bwg-score-icon {
337
  width: 8px;
338
  height: 4px;
339
  border-radius: 3px;
@@ -341,23 +337,23 @@ input.bwg-sign-up-input {
341
  vertical-align: middle;
342
  }
343
 
344
- .bwg-fast-icon {
345
  background-color: #22B339;
346
  margin: 0 4px 0 2px;
347
  }
348
 
349
- .bwg-averege-icon {
350
  background-color: #F8C332;
351
  margin: 0 4px 0 13px;
352
  }
353
 
354
- .bwg-slow-icon {
355
  background-color: #FD3C31;
356
  margin: 0 4px 0 16px;
357
  }
358
 
359
 
360
- .bwg-analyze-info-right {
361
  width: 250px;
362
  height: 204px;
363
  background: #F9F9F9;
@@ -367,7 +363,7 @@ input.bwg-sign-up-input {
367
  position: relative;
368
  }
369
 
370
- .bwg-last-analyzed-date-container {
371
  position: absolute;
372
  padding: 0;
373
  margin: 0;
@@ -375,13 +371,13 @@ input.bwg-sign-up-input {
375
  bottom: 12px;
376
  }
377
 
378
- .bwg-analyze-info-right .bwg-last-analyzed-date-container h3,
379
- .bwg-analyze-info-right .bwg-last-analyzed-date-container p {
380
  margin: 0;
381
  padding: 0;
382
  }
383
 
384
- .bwg-analyze-info-right p.bwg-analyze-info-right-sub-title {
385
  padding: 0;
386
  margin: 18px 0 0 0;
387
  font-size: 12px;
@@ -390,7 +386,7 @@ input.bwg-sign-up-input {
390
  font-weight: 600;
391
  }
392
 
393
- .bwg-analyze-info-right a {
394
  color: #2160B5;
395
  font-size: 12px;
396
  line-height: 18px;
@@ -399,13 +395,13 @@ input.bwg-sign-up-input {
399
  font-weight: 600;
400
  }
401
 
402
- .bwg-analyze-info-right hr {
403
  margin: 15px 0 0 0;
404
  color: #F1F1F1;
405
  border: 1px solid #F1F1F1;
406
  }
407
 
408
- .bwg-analyze-info-right h3 {
409
  font-size: 14px;
410
  line-height: 20px;
411
  margin: 15px 0 0 0;
@@ -414,14 +410,14 @@ input.bwg-sign-up-input {
414
  font-weight: bold;
415
  }
416
 
417
- .bwg-analyze-info-right p.bwg-last-analyzed-page {
418
  display: inline-block;
419
  word-break: break-all;
420
  max-height: 35px;
421
  overflow: hidden;
422
  }
423
 
424
- .bwg-analyze-info-right p {
425
  display: block;
426
  font-size: 12px;
427
  line-height: 18px;
@@ -430,7 +426,7 @@ input.bwg-sign-up-input {
430
  color: #323A45;
431
  }
432
 
433
- .bwg-error-msg {
434
  position: absolute;
435
  color: #FD3C31;
436
  font-size: 12px;
@@ -440,50 +436,47 @@ input.bwg-sign-up-input {
440
  font-style: italic;
441
  }
442
 
443
- .bwg-analyze-input-container .bwg-error-msg {
444
  bottom: -20px
445
  }
446
 
447
- .bwg-connected-booster-container {
448
- display: flex;
449
- }
450
 
451
- .bwg-connected-booster-content p.bwg-section-title {
452
  margin-top: 10px;
453
  }
454
 
455
- .bwg-connected-booster-content {
456
  width: 60%;
457
  }
458
 
459
- .bwg-connected-booster-container.bwg-is-free {
460
  flex-wrap: wrap;
461
  }
462
 
463
- .bwg-connected-booster-container.bwg-is-free .bwg-connected-booster-content,
464
- .bwg-connected-booster-container.bwg-is-free .button-container {
465
  width: 100%;
466
  }
467
 
468
- .bwg-connected-booster-container.bwg-is-free .button-container {
469
  margin-top: 30px;
470
  }
471
 
472
- .bwg-connected-booster-container .button-container {
473
  width: 40%;
474
  display: flex;
475
  align-items: flex-end;
476
  justify-content: right;
477
  }
478
 
479
- .bwg-header-description {
480
  margin: 0;
481
  padding: 0;
482
  line-height: 20px;
483
  font-size: 14px;
484
  }
485
 
486
- .bwg-connected-booster-done-cont {
487
  width: 138px;
488
  height: 30px;
489
  box-sizing: border-box;
@@ -502,11 +495,11 @@ input.bwg-sign-up-input {
502
  font-weight: 600;
503
  }
504
 
505
- .bwg-connected-booster-content p.bwg-section-title {
506
  margin-top: 10px;
507
  }
508
 
509
- .bwg-score-name {
510
  font-size: 10px;
511
  line-height: 16px;
512
  color: #323A45;
@@ -516,7 +509,7 @@ input.bwg-sign-up-input {
516
  padding: 0;
517
  }
518
 
519
- .bwg-load-time {
520
  font-size: 12px;
521
  line-height: 18px;
522
  color: #7E838A;
@@ -553,11 +546,11 @@ input.bwg-sign-up-input {
553
 
554
  .speed_circle_loader {
555
  animation: rotation 1s infinite linear;
556
- background: url("../images/speed/google_spinner.svg") no-repeat;
557
  background-size: 100%;
558
  }
559
 
560
- .bwg-analyze-img_optimizer-container {
561
  padding: 20px;
562
  box-sizing: border-box;
563
  display: flex;
@@ -567,110 +560,23 @@ input.bwg-sign-up-input {
567
  margin-bottom: 30px;
568
  }
569
 
570
- /* booster top banner. */
571
- #bwg_options_form .wd-list-view-header {
572
- margin-bottom: 16px;
573
- }
574
- .bwg-booster-top-banner {
575
- border-top: 1px solid #e5e5e5;
576
- background-color: #f6f7f7;
577
- }
578
- .bwg-booster-top-banner.bwg-booster-active {
579
- border-top: unset;
580
- }
581
- .bwg-booster-top-banner * {
582
- margin: 0px;
583
- padding: 0px;
584
- line-height: 18px;
585
- font-family: 'Open Sans';
586
- font-weight: 400;
587
- font-size: 12px;
588
- }
589
- .bwg-booster-top-banner-wrapper-note {
590
- padding: 9px 16px;
591
- background-color: #ffffff;
592
- }
593
- .bwg-booster-top-banner-wrapper-note--text {
594
- position: relative;
595
- display: inline-block;
596
- padding-left: 22px;
597
- text-align: left;
598
- letter-spacing: 0.1px;
599
- font-weight: 600;
600
- color: #323A45;
601
- }
602
- .bwg-booster-top-banner-wrapper-note--text:before {
603
- content: '';
604
- position: absolute;
605
- top: 50%;
606
- left: 0px;
607
- transform: translateY(-50%);
608
- width: 14px;
609
- height: 14px;
610
- background: transparent url('images/information.svg') 0% 0% no-repeat padding-box;
611
- }
612
- .bwg-booster-top-banner-wrapper {
613
- display: -webkit-box;
614
- display: -ms-flexbox;
615
- display: flex;
616
- -webkit-box-pack: justify;
617
- -ms-flex-pack: justify;
618
- justify-content: space-between;
619
- -webkit-box-align: center;
620
- -ms-flex-align: center;
621
- align-items: center;
622
- padding: 18px 20px;
623
- border-top: 1px solid #E5E5E5;
624
- }
625
- .bwg-booster-top-banner-wrapper .bwg-booster-top-banner-wrappe--images-count {
626
- font-weight: 800;
627
- }
628
- .bwg-booster-top-banner-wrapper .bwg-booster-top-banner-wrappe--button {
629
- display: block;
630
- width: 210px;
631
- background: #2160B5 0% 0% no-repeat padding-box;
632
- border-radius: 4px;
633
- padding: 8px 0px;
634
- font-size: 14px;
635
- line-height: 18px;
636
- font-family: 'Segoe UI';
637
- font-weight: 400;
638
- letter-spacing: 0;
639
- color: #FFFFFF;
640
- text-decoration: none;
641
- cursor: pointer;
642
- text-align: center;
643
- }
644
- @media screen and (max-width: 640px) {
645
- .bwg-booster-top-banner-wrapper {
646
- display: block;
647
- padding: 10px 20px;
648
- }
649
- .bwg-booster-top-banner-wrapper .bwg-booster-top-banner-wrappe--images-count {
650
- padding-bottom: 2px;
651
- }
652
- .bwg-booster-top-banner-wrapper .bwg-booster-top-banner-wrappe--button {
653
- margin: 10px auto 0;
654
- }
655
- }
656
-
657
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending {
658
  align-items: center;
659
  position: relative;
660
  }
661
 
662
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending > div:first-child {
663
  width: 424px;
664
  border-right: 1px solid #E4E4E4;
665
  }
666
 
667
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending .bwg-img-count-container {
668
  text-align: center;
669
  flex-grow: 1;
670
  padding-left: 20px;
671
  }
672
 
673
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending .bwg-img-count-container h5 {
674
  font-size: 50px;
675
  line-height: 75px;
676
  color: #323A45;
@@ -679,13 +585,13 @@ input.bwg-sign-up-input {
679
  padding: 0;
680
  }
681
 
682
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending .bwg-img-count-container h5 span {
683
  font-size: 20px;
684
  line-height: 53px;
685
  vertical-align: bottom;
686
  }
687
 
688
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending .bwg-img-count-container p {
689
  font-size: 14px;
690
  line-height: 20px;
691
  color: #323A45;
@@ -696,17 +602,17 @@ input.bwg-sign-up-input {
696
  font-weight: 600;
697
  }
698
 
699
- .bwg-analyze-img_optimizer-container p.bwg-section-title {
700
  margin-bottom: 2px;
701
  }
702
 
703
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending ul {
704
  margin: 18px 0 0 0;
705
  padding: 0;
706
  }
707
 
708
 
709
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending li {
710
  text-align: left;
711
  font: normal normal 600 12px/18px Open Sans;
712
  letter-spacing: 0px;
@@ -716,12 +622,12 @@ input.bwg-sign-up-input {
716
  font-weight: 600;
717
  margin-bottom: 10px;
718
  padding-left: 26px;
719
- background: url(../images/speed/close_error.svg) no-repeat #F9F9F9;
720
  background-size: 22px;
721
  background-position: 0 -2px;
722
  }
723
 
724
- .bwg-optimize-now-button {
725
  display: block;
726
  width: 210px;
727
  height: 40px;
@@ -738,7 +644,7 @@ input.bwg-sign-up-input {
738
  margin-top: 20px;
739
  }
740
 
741
- .bwg-optimize-now-tooltip {
742
  position: absolute;
743
  bottom: 70px;
744
  width: 258px;
@@ -753,7 +659,7 @@ input.bwg-sign-up-input {
753
  letter-spacing: 0;
754
  }
755
 
756
- .bwg-optimize_on ul li span {
757
  width: 6px;
758
  height: 6px;
759
  background-color: #D6D8DA;
@@ -763,32 +669,32 @@ input.bwg-sign-up-input {
763
  vertical-align: middle;
764
  }
765
 
766
- .bwg-optimize_on p.bwg-section-title {
767
- background: url(../images/speed/success.svg) no-repeat;
768
  background-size: 20px;
769
  background-position: 175px 3px;
770
  }
771
 
772
- .bwg-optimize_on p {
773
  font-size: 14px;
774
  line-height: 20px;
775
  }
776
 
777
- .bwg-optimize_on ul {
778
  margin: 18px 0 0 0;
779
  }
780
- .bwg-optimize_on li {
781
  font-size: 12px;
782
  margin-bottom: 10px;
783
  font-weight: 600;
784
  line-height: 18px;
785
  }
786
 
787
- .bwg-optimize_on li:last-child {
788
  margin-bottom: 0px;
789
  }
790
 
791
- .bwg-optimize_on-button-cont {
792
  flex-grow: 1;
793
  vertical-align: bottom;
794
  align-self: flex-end;
@@ -796,7 +702,7 @@ input.bwg-sign-up-input {
796
  justify-content: right;
797
  }
798
 
799
- .bwg-optimize-add-pages {
800
  display: block;
801
  width: 210px;
802
  height: 40px;
@@ -813,37 +719,39 @@ input.bwg-sign-up-input {
813
  margin-top: 20px;
814
  }
815
 
816
- .bwg-optimize_on.bwg-optimize_done p.bwg-section-title {
817
- background: url(../images/speed/success.svg) no-repeat;
818
  background-size: 20px;
819
  background-position: 113px 3px;
820
  }
821
 
822
  @media only screen and (max-width: 730px) {
823
 
824
- .bwg-speed-header {
825
  width: 100%;
826
  padding: 15px 15px 20px 15px;
827
  }
828
 
829
- .bwg-install-booster-container {
 
 
830
  padding: 0;
831
  }
832
 
833
- .bwg-connected-booster-container .bwg-header-description,
834
- .bwg-sign_up-booster-container .bwg-description{
835
  display: inline;
836
  }
837
 
838
- .bwg-header-description {
839
  font-size: 14px;
840
  line-height: 20px;
841
  }
842
- .bwg-speed-body{
843
  width: 100%;
844
  }
845
 
846
- .bwg-install-booster-container .button-container {
847
  position: relative;
848
  display: block;
849
  width: 235px;
@@ -852,13 +760,13 @@ input.bwg-sign-up-input {
852
  margin-top: 20px;
853
  }
854
 
855
- ul.bwg-install-booster-steps {
856
  margin: 15px 0 0 0;
857
  padding-left: 10px;
858
  flex-direction: column;
859
  }
860
 
861
- ul.bwg-install-booster-steps li {
862
  height: 50px;
863
  padding-left: 25px;
864
  border-top: 0;
@@ -866,7 +774,7 @@ input.bwg-sign-up-input {
866
  margin: 0 0 25px 0;
867
  }
868
 
869
- ul.bwg-install-booster-steps li:after {
870
  top: 64px;
871
  left: -15px;
872
  right: unset;
@@ -874,7 +782,7 @@ input.bwg-sign-up-input {
874
  height: 23px;
875
  border-width: 2px;
876
  }
877
- ul.bwg-install-booster-steps li:last-child:after {
878
  width: 28px;
879
  height: 28px;
880
  top: 62px;
@@ -882,34 +790,34 @@ input.bwg-sign-up-input {
882
  border-width: 3px;
883
  }
884
 
885
- .bwg-button-container-parent {
886
  margin-top: 10px;
887
  justify-content: start;
888
  }
889
- .bwg-speed-body {
890
  padding: 15px;
891
  }
892
- .bwg-analyze-input-container {
893
  display:block;
894
  }
895
 
896
- input.bwg-analyze-input {
897
  width: 100%;
898
  margin-bottom: 30px;
899
  }
900
 
901
- .bwg-analyze-info-container,
902
- .bwg-analyze-info-left-cont {
903
  display: block;
904
  height: auto;
905
  }
906
 
907
- .bwg-analyze-info-right,
908
- .bwg-analyze-score-info {
909
  width: 100%;
910
  }
911
 
912
- .bwg-analyze-mobile-score, .bwg-analyze-desktop-score {
913
  width: 100%;
914
  height: auto;
915
  padding: 18px 0 16px 0;
@@ -921,7 +829,7 @@ input.bwg-sign-up-input {
921
  margin: 0 auto 14px auto;
922
  }
923
 
924
- .bwg-analyze-score-info {
925
  width: auto;
926
  margin-top: 8px;
927
  line-height: 36px;
@@ -929,49 +837,49 @@ input.bwg-sign-up-input {
929
  height: 36px;
930
  }
931
 
932
- .bwg-analyze-score-info>span:first-child {
933
  display: none;
934
  }
935
 
936
- .bwg-averege-icon,
937
- .bwg-slow-icon {
938
  margin: 0 4px 0 11px;
939
  }
940
 
941
- .bwg-fast-icon {
942
  margin: 0 4px 0 0px;
943
  }
944
 
945
- .bwg-score-icon {
946
  width: 6px;
947
  height: 4px;
948
  margin-bottom: 2px;
949
  }
950
 
951
- .bwg-analyze-info-right p.bwg-last-analyzed-date {
952
  margin-bottom: 0;
953
  }
954
 
955
- .bwg-analyze-img_optimizer-container {
956
  padding: 15px;
957
  }
958
 
959
- .bwg-analyze-info-right {
960
  margin: 10px 0 0 0;
961
  padding: 18px 15px 12px 15px;
962
  box-sizing: border-box;
963
  height: auto;
964
  }
965
 
966
- .bwg-analyze-info-right p.bwg-analyze-info-right-sub-title {
967
  margin: 0;
968
  }
969
 
970
- .bwg-analyze-img_optimizer-container {
971
  display: block;
972
  }
973
 
974
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending > div:first-child {
975
  width: auto;
976
  height: auto;
977
  border-right: none;
@@ -979,76 +887,76 @@ input.bwg-sign-up-input {
979
  padding-bottom: 20px;
980
  }
981
 
982
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending .bwg-img-count-container {
983
  text-align: left;
984
  padding-left: 0;
985
  }
986
 
987
- .bwg-optimize_on-button-cont {
988
  display: block;
989
  }
990
 
991
- input.bwg-sign-up-input {
992
  width: 100%;
993
  margin-top: 20px;
994
  }
995
- .bwg-speed-header .bwg-sign-up-dashboard-button-container {
996
  gap: 0;
997
  flex-direction: column;
998
  }
999
 
1000
- .bwg-booster-container > div {
1001
  display: block;
1002
  }
1003
 
1004
- a.bwg-booster-button {
1005
  display: block;
1006
  width: 210px;
1007
  height: 40px;
1008
  margin-bottom: 10px;
1009
  }
1010
 
1011
- .bwg-booster-container > div > div {
1012
  padding: 0;
1013
  }
1014
 
1015
- .bwg-connected-booster-container {
1016
  display: block;
1017
  }
1018
 
1019
- .bwg-connected-booster-content,
1020
- .bwg-connected-booster-container .button-container {
1021
  width: 100%;
1022
  display: block;
1023
  }
1024
 
1025
- a.bwg-manage-booster {
1026
  display: block;
1027
  width: 210px;
1028
  margin-top: 20px;
1029
  }
1030
 
1031
- .bwg-analyze-img_optimizer-container.bwg-optimize_pending .bwg-img-count-container h5 {
1032
  margin-top: 20px;
1033
  }
1034
 
1035
- .bwg-optimize-now-tooltip {
1036
  bottom: 205px;
1037
  width: 230px;
1038
  height: 85px;
1039
  }
1040
 
1041
- .bwg-analyze-input-container .bwg-error-msg {
1042
  top: 42px;
1043
  line-height: 13px;
1044
  }
1045
 
1046
- .bwg-last-analyzed-date-container {
1047
  position: relative;
1048
  bottom: unset;
1049
  }
1050
 
1051
- .bwg-analyze-info-right p.bwg-last-analyzed-page {
1052
  max-height: inherit;
1053
  overflow: hidden;
1054
  }
@@ -1056,7 +964,7 @@ input.bwg-sign-up-input {
1056
 
1057
  .speed-loader-blue {
1058
  animation: rotation 1s infinite linear;
1059
- background: url(../images/speed/loader_small.svg) no-repeat;
1060
  width: 18px;
1061
  height: 18px;
1062
  margin: auto;
@@ -1064,7 +972,7 @@ input.bwg-sign-up-input {
1064
 
1065
  .speed-loader-grey {
1066
  animation: rotation 1s infinite linear;
1067
- background: url(../images/speed/loader_small_grey.svg) no-repeat;
1068
  width: 18px;
1069
  height: 18px;
1070
  margin: auto;
@@ -1085,12 +993,12 @@ input.bwg-sign-up-input {
1085
  border-radius: 40px;
1086
  }
1087
 
1088
- .bwg-img_optimizer-container {
1089
  display: flex;
1090
  margin-bottom: 30px;
1091
  }
1092
 
1093
- .bwg-img_optimizer-container .bwg-img_optimizer-left {
1094
  display:flex;
1095
  flex-direction: column;
1096
  width: 250px;
@@ -1101,7 +1009,7 @@ input.bwg-sign-up-input {
1101
  box-sizing: border-box;
1102
  padding: 20px 20px 20px 19px;
1103
  }
1104
- .bwg-img_optimizer-container .bwg-img_optimizer-right {
1105
  display: flex;
1106
  flex-direction: column;
1107
  width: 414px;
@@ -1111,15 +1019,15 @@ input.bwg-sign-up-input {
1111
  padding: 20px;
1112
  }
1113
 
1114
- .bwg-img_optimizer-container.bwg-img_optimizer-not-container .bwg-img_optimizer-right {
1115
  width: 250px;
1116
  }
1117
 
1118
- .bwg-img_optimizer-container.bwg-img_optimizer-not-container .bwg-img_optimizer-left {
1119
  width: 414px;
1120
  }
1121
 
1122
- .bwg-img_optimizer-container .bwg-section-description {
1123
  margin: 0;
1124
  padding: 0;
1125
  line-height: 18px;
@@ -1127,14 +1035,14 @@ input.bwg-sign-up-input {
1127
 
1128
  }
1129
 
1130
- .bwg-img_optimizer-container.bwg-img_optimizer-not-container .bwg-section-description {
1131
  border-bottom: 1px solid #E4E4E4;
1132
  margin: 0 0 18px 0;
1133
  padding: 0 0 18px 0;
1134
 
1135
  }
1136
 
1137
- .bwg-section-bottom {
1138
  height: auto;
1139
  display: flex;
1140
  flex-direction: column;
@@ -1142,7 +1050,7 @@ input.bwg-sign-up-input {
1142
  flex-grow: 1;
1143
  }
1144
 
1145
- .bwg-most-image-cont {
1146
  display: flex;
1147
  font-size: 12px;
1148
  line-height: 18px;
@@ -1151,7 +1059,7 @@ input.bwg-sign-up-input {
1151
  margin-top: 10px;
1152
  }
1153
 
1154
- .bwg-most-image-cont-path {
1155
  flex-grow: 1;
1156
  text-decoration: underline;
1157
  padding-right: 10px;
@@ -1159,20 +1067,20 @@ input.bwg-sign-up-input {
1159
  word-break: break-all;
1160
  }
1161
 
1162
- .bwg-hompage-path {
1163
  text-decoration: none;
1164
  }
1165
 
1166
- .bwg-most-image-cont-img-count.bwg-not-optimized {
1167
  padding-right: 20px;
1168
- background: url(../images/speed/close_red.svg) no-repeat #F9F9F9;
1169
  background-position: right center;
1170
  background-size: 20px;
1171
  }
1172
 
1173
- .bwg-most-image-cont-img-count.bwg-optimized {
1174
  padding-right: 20px;
1175
- background: url(../images/speed/success.svg) no-repeat #F9F9F9;
1176
  background-position: right top;
1177
  background-size: 20px;
1178
  white-space: nowrap;
@@ -1180,8 +1088,8 @@ input.bwg-sign-up-input {
1180
  text-align: right;
1181
  }
1182
 
1183
- .bwg-optimized-info,
1184
- .bwg-not-optimized-info {
1185
  display: block;
1186
  width: 125px;
1187
  height: 28px;
@@ -1195,20 +1103,20 @@ input.bwg-sign-up-input {
1195
 
1196
  }
1197
 
1198
- .bwg-optimized-info {
1199
  width: 145px;
1200
- background: url(../images/speed/success.svg) no-repeat #FD3C310D;
1201
  background-position: 6px center;
1202
  background-size: 20px;
1203
  }
1204
- .bwg-not-optimized-info {
1205
- background: url(../images/speed/close_red.svg) no-repeat #FD3C310D;
1206
  background-position: 6px center;
1207
  background-size: 20px;
1208
  }
1209
 
1210
- .bwg-img_optimizer-right h5,
1211
- .bwg-img_optimizer-left h5 {
1212
  font-size: 36px;
1213
  line-height: 50px;
1214
  font-weight: 800;
@@ -1216,27 +1124,27 @@ input.bwg-sign-up-input {
1216
  height: 50px;
1217
  }
1218
 
1219
- .bwg-img_optimizer-not-container .bwg-img_optimizer-left h5 {
1220
  font-size: 36px;
1221
  line-height: 50px;
1222
  height: 50px;
1223
  }
1224
 
1225
- .bwg-img_optimizer-right h5 span,
1226
- .bwg-img_optimizer-left h5 span{
1227
  font-size: 14px;
1228
  line-height: 65px;
1229
  font-weight: 700;
1230
  padding-left: 7px;
1231
  }
1232
 
1233
- .bwg-img_optimizer-container ul {
1234
  margin: 0;
1235
  list-style: none;
1236
  }
1237
 
1238
- .bwg-img_optimizer-container li {
1239
- background: url(../images/speed/disc.svg) no-repeat;
1240
  background-position: 0px center;
1241
  background-size: 15px;
1242
  padding-left: 22px;
@@ -1246,31 +1154,31 @@ input.bwg-sign-up-input {
1246
  font-weight: 600;
1247
  }
1248
 
1249
- .bwg-img_optimizer-button-container {
1250
  display: flex;
1251
  align-items: flex-end;
1252
  }
1253
- .bwg-img_optimizer-not-container .bwg-img_optimizer-button-container {
1254
  display: block;
1255
  }
1256
 
1257
- .bwg-img_optimizer-info {
1258
  flex-grow: 1;
1259
  }
1260
 
1261
- .bwg-img_optimizer-info p {
1262
  font-size: 12px;
1263
  line-height: 18px;
1264
  padding: 0;
1265
  margin: 0;
1266
  }
1267
 
1268
- .bwg-img_optimizer-info p:first-child {
1269
  font-weight: 700;
1270
  }
1271
 
1272
- .bwg-img_optimize-now-button,
1273
- .bwg-img_add_pages_button {
1274
  display: block;
1275
  width: 210px;
1276
  text-align: center;
@@ -1287,17 +1195,17 @@ input.bwg-sign-up-input {
1287
  margin-top: 20px;
1288
  }
1289
 
1290
- .bwg-img_add_pages_button {
1291
  opacity: 1;
1292
  }
1293
 
1294
- .bwg-img_optimize-now-button:hover,
1295
- .bwg-img_add_pages_button:hover,
1296
- .bwg-img_add_pages_button:active {
1297
  color:#ffffff;
1298
  }
1299
 
1300
- .bwg-line_container {
1301
  width: 100%;
1302
  height: 6px;
1303
  background-color: #E6E7E8;
@@ -1305,7 +1213,7 @@ input.bwg-sign-up-input {
1305
  margin-bottom: 10px;
1306
  }
1307
 
1308
- p.bwg-total_size {
1309
  font-size: 14px;
1310
  line-height: 20px;
1311
  color: #323A45;
@@ -1313,37 +1221,37 @@ p.bwg-total_size {
1313
  font-weight: 600;
1314
  }
1315
 
1316
- .bwg-line_container span {
1317
  display: block;
1318
  height: 6px;
1319
  border-radius: 30px;
1320
  background-color: #22B339;
1321
  }
1322
 
1323
- .bwg-line_container span.bwg-size_0 {
1324
  width: 0;
1325
  }
1326
- .bwg-line_container span.bwg-size_1 {
1327
  width: 16.7%;
1328
  }
1329
- .bwg-line_container span.bwg-size_2 {
1330
  width: 33.4%;
1331
  }
1332
- .bwg-line_container span.bwg-size_3 {
1333
  width: 50.1%;
1334
  }
1335
- .bwg-line_container span.bwg-size_4 {
1336
  width: 66.8%;
1337
  }
1338
- .bwg-line_container span.bwg-size_5 {
1339
  width: 83.5%;
1340
  }
1341
 
1342
- .bwg-line_container span.bwg-size_6 {
1343
  width: 100%;
1344
  }
1345
 
1346
- .bwg-line_info_container {
1347
  display: flex;
1348
  margin-top: 30px;
1349
  margin-bottom: 9px;
@@ -1352,11 +1260,11 @@ p.bwg-total_size {
1352
  font-weight: 600;
1353
  }
1354
 
1355
- .bwg-line_info_container span:nth-child(1) {
1356
  flex-grow: 1;
1357
  }
1358
 
1359
- .bwg-img_optimizer-right > p {
1360
  margin: 101px 0 0 0;
1361
  display: flex;
1362
  align-items: flex-end;
@@ -1364,28 +1272,28 @@ p.bwg-total_size {
1364
  }
1365
 
1366
  @media screen and (max-width: 690px) {
1367
- .bwg-img_optimizer-container {
1368
  display: block;
1369
  }
1370
 
1371
- .bwg-img_optimizer-container .bwg-img_optimizer-left,
1372
- .bwg-img_optimizer-container .bwg-img_optimizer-right,
1373
- .bwg-img_optimizer-container.bwg-img_optimizer-not-container .bwg-img_optimizer-left,
1374
- .bwg-img_optimizer-container.bwg-img_optimizer-not-container .bwg-img_optimizer-right {
1375
  width: 100%;
1376
  padding: 15px;
1377
  }
1378
 
1379
- .bwg-img_optimizer-container .bwg-img_optimizer-left {
1380
  margin-bottom: 15px;
1381
  }
1382
 
1383
- .bwg-img_optimizer-button-container {
1384
  display: block;
1385
  }
1386
 
1387
- .bwg-img_add_pages_button,
1388
- .bwg-img_optimize-now-button {
1389
  width: 210px;
1390
  height: 40px;
1391
  display: block;
@@ -1393,26 +1301,162 @@ p.bwg-total_size {
1393
  margin-top: 20px;
1394
  }
1395
 
1396
- .bwg-img_optimizer-right > p {
1397
  margin: 30px 0 15px 0;
1398
  }
1399
 
1400
- .bwg-img_optimizer-button-container {
1401
  height: auto;
1402
  margin-top: 20px;
1403
  }
1404
 
1405
- .bwg-img_optimizer-container.bwg-img_optimizer-not-container .bwg-img_optimizer-button-container {
1406
  margin-top: 0px;
1407
  }
1408
 
1409
 
1410
- .bwg-line_container {
1411
  margin-bottom: 10px;
1412
  }
1413
 
1414
- .bwg-section-bottom {
1415
  margin-top: 10px;
1416
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1418
  }
1
+ .twb-speed-header {
2
  width: 714px;
3
  height: auto;
4
  background-color: #FFFFFF;
10
  border: 1px solid #DEDEDE;
11
  }
12
 
13
+ .twb-speed-header .twb-sign-up-dashboard-button-container {
14
  display: flex;
15
  gap: 15px;
16
  }
17
 
18
+ .twb-hidden {
19
  display: none!important;
20
  }
21
 
22
+ .twb-speed-body {
23
  font-family: 'Open Sans';
24
  border: 1px solid #DEDEDE;
25
  }
26
 
27
+ .twb-section-title,
28
+
29
+ .twb-install-booster-container p.twb-section-title,
30
+ .twb-booster-container p.twb-section-title,
31
+ .twb-speed-body-container p.twb-section-title,
32
+ .twb-connected-booster-content p.twb-section-title{
33
  padding: 0;
34
  margin: 0 0 2px 0;
35
  color: #323A45;
38
  font-weight: bold;
39
  }
40
 
41
+ .twb-speed-body-container p.twb-section-title {
42
  margin: 0 0 5px 0;
43
  }
44
 
45
+ .twb-description {
46
  padding: 0;
47
  margin: 0;
48
  font-size: 14px;
50
  color: #323A45;
51
  }
52
 
53
+ ul.twb-install-booster-steps {
54
  display: flex;
55
  justify-content: space-between;
56
  list-style: none; /* Remove default bullets */
57
  margin: 45px 0 0 0;
58
  }
59
 
60
+ ul.twb-install-booster-steps li {
61
  margin: 0;
62
  padding: 13px 0 0 0;
63
  width: 211px;
68
  border-top: 12px solid #323A4510;
69
  position: relative;
70
  }
71
+ ul.twb-install-booster-steps li.twb_so_check_active {
72
  border-color: #22B339;
73
  }
74
+ ul.twb-install-booster-steps li.twb_so_check_active span{
75
  color: #22B339;
76
  }
77
+ ul.twb-install-booster-steps li.twb_so_check_active:after{
78
+ background-image: url(../images/check_green.jpg);
79
  }
80
 
81
+ ul.twb-install-booster-steps li:after {
82
  content: ".";
83
  height: 36px;
84
  width: 36px;
88
  border-radius: 50%;
89
  box-sizing: border-box;
90
  color: #ffffff00;
91
+ background-image: url(../images/check_grey.jpg);
92
  background-size: contain;
93
  z-index: 1;
94
  }
95
 
96
+ ul.twb-install-booster-steps li span {
97
  display: block;
98
  font-size: 12px;
99
  line-height: 18px;
102
 
103
  }
104
 
105
+ ul.twb-install-booster-steps li:last-child:after {
106
  right: -2px;
107
  top: -27px;
108
  height: 42px;
109
  width: 42px;
110
+ background-image: url(../images/star_grey.jpg);
111
  }
112
+ .twb-button-container-parent {
113
  margin-top: 30px;
114
  display: flex;
115
  justify-content: end;
119
  display: inline-block;
120
  }
121
 
 
 
 
 
 
 
122
  .button-container p {
123
  font-size: 10px;
124
  line-height: 16px;
129
  text-align: center;
130
  }
131
 
132
+ a.twb-install-booster,
133
+ a.twb-manage-booster,
134
+ a.twb-booster-button {
135
  display: block;
136
  height: 40px;
137
  box-sizing: border-box;
147
  cursor: pointer;
148
  }
149
 
150
+ a.twb-manage-booster {
151
  width: 210px;
152
  }
153
 
154
+ a.twb-install-booster:hover,
155
+ a.twb-booster-button:hover,
156
+ a.twb-optimize-now-button:hover,
157
+ a.twb-optimize-add-pages,
158
+ a.twb-manage-booster {
159
  color: #ffffff
160
  }
161
 
162
 
163
+ a.twb-disable-link {
164
  cursor: default;
165
  opacity: 0.5;
166
  }
167
 
168
+ a.twb-disable-analyze {
169
  background-color: #ffffff;
170
  cursor: default;
171
  opacity: 0.5;
172
  }
173
 
174
+ a.twb-disable-link:hover {
175
  background-color: #2160B5;
176
  color: #ffffff;
177
  cursor: default;
178
  }
179
 
180
+ .twb-loading-image {
181
  width: 15px;
182
  }
183
 
184
+ .twb-booster-container > div {
185
  display: flex;
186
  }
187
 
188
+ .twb-booster-container > div > div {
189
  padding: 0 0 0 15px;
190
  box-sizing: border-box;
191
  max-width: 420px;
194
  color: #323A45;
195
  }
196
 
197
+ .twb-booster-container > div > div a {
198
  color: #323A45;
199
  }
200
 
201
+ .twb-sign-up-dashboard-button-container {
202
  margin-top: 30px;
203
  }
204
 
205
+ input.twb-sign-up-input {
206
  display: block;
207
  margin-top: 30px;
208
  padding: 10px 16px;
225
  color: #323A4580;
226
  }
227
 
228
+ .twb-speed-body {
229
  width: 714px;
230
  height: auto;
231
  background-color: #FFFFFF;
235
  border-radius: 4px;
236
  }
237
 
238
+ .twb-analyze-input-container {
239
  display: flex;
240
  margin-top: 20px;
241
  position: relative;
242
  }
243
 
244
+ .twb-analyze-input {
245
  width: 414px;
246
  height: 40px;
247
  box-sizing: border-box;
250
  margin-right: 25px;
251
  }
252
 
253
+ .twb-analyze-input-error,
254
+ .twb-input-error {
255
  border-color: #FD3C31 !important;
256
  }
257
+ .twb-analyze-input--error-message {
258
  display: block;
259
  margin-top: 3px;
260
  text-align: left;
268
  }
269
 
270
 
271
+ .twb-analyze-input-button {
272
  display: block;
273
  width:210px;
274
  height: 40px;
282
  cursor: pointer;
283
  }
284
 
285
+ .twb-analyze-input-button:hover {
286
  color: #323A45;
287
  }
288
 
289
+ .twb-analyze-info-container {
290
  display: flex;
291
  width: 100%;
292
  height: 204px;
293
  margin-top: 30px;
294
  }
295
 
296
+ .twb-analyze-info-left-cont {
297
  display: flex;
298
  }
299
 
300
+ .twb-analyze-mobile-score,
301
+ .twb-analyze-desktop-score {
302
  width: 202px;
303
  height: 158px;
304
  background: #F9F9F9;
305
  }
306
 
307
+ .twb-analyze-mobile-score {
308
  margin-right: 5px;
309
+ background: url(../images/mobile.svg) no-repeat #F9F9F9;
310
  background-size: 18px;
311
  background-position: 10px 10px;
312
  }
313
 
314
+ .twb-analyze-desktop-score {
315
  margin-left: 5px;
316
+ background: url(../images/desktop.svg) no-repeat #F9F9F9;
317
  background-size: 18px;
318
  background-position: 10px 10px;
319
  }
320
 
321
+ .twb-analyze-score-info {
322
  width: 414px;
323
  height: 38px;
324
  background: #F9F9F9;
329
  font-weight: 600;
330
  }
331
 
332
+ .twb-score-icon {
333
  width: 8px;
334
  height: 4px;
335
  border-radius: 3px;
337
  vertical-align: middle;
338
  }
339
 
340
+ .twb-fast-icon {
341
  background-color: #22B339;
342
  margin: 0 4px 0 2px;
343
  }
344
 
345
+ .twb-averege-icon {
346
  background-color: #F8C332;
347
  margin: 0 4px 0 13px;
348
  }
349
 
350
+ .twb-slow-icon {
351
  background-color: #FD3C31;
352
  margin: 0 4px 0 16px;
353
  }
354
 
355
 
356
+ .twb-analyze-info-right {
357
  width: 250px;
358
  height: 204px;
359
  background: #F9F9F9;
363
  position: relative;
364
  }
365
 
366
+ .twb-last-analyzed-date-container {
367
  position: absolute;
368
  padding: 0;
369
  margin: 0;
371
  bottom: 12px;
372
  }
373
 
374
+ .twb-analyze-info-right .twb-last-analyzed-date-container h3,
375
+ .twb-analyze-info-right .twb-last-analyzed-date-container p {
376
  margin: 0;
377
  padding: 0;
378
  }
379
 
380
+ .twb-analyze-info-right p.twb-analyze-info-right-sub-title {
381
  padding: 0;
382
  margin: 18px 0 0 0;
383
  font-size: 12px;
386
  font-weight: 600;
387
  }
388
 
389
+ .twb-analyze-info-right a {
390
  color: #2160B5;
391
  font-size: 12px;
392
  line-height: 18px;
395
  font-weight: 600;
396
  }
397
 
398
+ .twb-analyze-info-right hr {
399
  margin: 15px 0 0 0;
400
  color: #F1F1F1;
401
  border: 1px solid #F1F1F1;
402
  }
403
 
404
+ .twb-analyze-info-right h3 {
405
  font-size: 14px;
406
  line-height: 20px;
407
  margin: 15px 0 0 0;
410
  font-weight: bold;
411
  }
412
 
413
+ .twb-analyze-info-right p.twb-last-analyzed-page {
414
  display: inline-block;
415
  word-break: break-all;
416
  max-height: 35px;
417
  overflow: hidden;
418
  }
419
 
420
+ .twb-analyze-info-right p {
421
  display: block;
422
  font-size: 12px;
423
  line-height: 18px;
426
  color: #323A45;
427
  }
428
 
429
+ .twb-error-msg {
430
  position: absolute;
431
  color: #FD3C31;
432
  font-size: 12px;
436
  font-style: italic;
437
  }
438
 
439
+ .twb-analyze-input-container .twb-error-msg {
440
  bottom: -20px
441
  }
442
 
 
 
 
443
 
444
+ .twb-connected-booster-content p.twb-section-title {
445
  margin-top: 10px;
446
  }
447
 
448
+ .twb-connected-booster-content {
449
  width: 60%;
450
  }
451
 
452
+ .twb-connected-booster-container.twb-is-free {
453
  flex-wrap: wrap;
454
  }
455
 
456
+ .twb-connected-booster-container.twb-is-free .twb-connected-booster-content,
457
+ .twb-connected-booster-container.twb-is-free .button-container {
458
  width: 100%;
459
  }
460
 
461
+ .twb-connected-booster-container.twb-is-free .button-container {
462
  margin-top: 30px;
463
  }
464
 
465
+ .twb-connected-booster-container .button-container {
466
  width: 40%;
467
  display: flex;
468
  align-items: flex-end;
469
  justify-content: right;
470
  }
471
 
472
+ .twb-header-description {
473
  margin: 0;
474
  padding: 0;
475
  line-height: 20px;
476
  font-size: 14px;
477
  }
478
 
479
+ .twb-connected-booster-done-cont {
480
  width: 138px;
481
  height: 30px;
482
  box-sizing: border-box;
495
  font-weight: 600;
496
  }
497
 
498
+ .twb-connected-booster-content p.twb-section-title {
499
  margin-top: 10px;
500
  }
501
 
502
+ .twb-score-name {
503
  font-size: 10px;
504
  line-height: 16px;
505
  color: #323A45;
509
  padding: 0;
510
  }
511
 
512
+ .twb-load-time {
513
  font-size: 12px;
514
  line-height: 18px;
515
  color: #7E838A;
546
 
547
  .speed_circle_loader {
548
  animation: rotation 1s infinite linear;
549
+ background: url("../images/google_spinner.svg") no-repeat;
550
  background-size: 100%;
551
  }
552
 
553
+ .twb-analyze-img_optimizer-container {
554
  padding: 20px;
555
  box-sizing: border-box;
556
  display: flex;
560
  margin-bottom: 30px;
561
  }
562
 
563
+ .twb-analyze-img_optimizer-container.twb-optimize_pending {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
564
  align-items: center;
565
  position: relative;
566
  }
567
 
568
+ .twb-analyze-img_optimizer-container.twb-optimize_pending > div:first-child {
569
  width: 424px;
570
  border-right: 1px solid #E4E4E4;
571
  }
572
 
573
+ .twb-analyze-img_optimizer-container.twb-optimize_pending .twb-img-count-container {
574
  text-align: center;
575
  flex-grow: 1;
576
  padding-left: 20px;
577
  }
578
 
579
+ .twb-analyze-img_optimizer-container.twb-optimize_pending .twb-img-count-container h5 {
580
  font-size: 50px;
581
  line-height: 75px;
582
  color: #323A45;
585
  padding: 0;
586
  }
587
 
588
+ .twb-analyze-img_optimizer-container.twb-optimize_pending .twb-img-count-container h5 span {
589
  font-size: 20px;
590
  line-height: 53px;
591
  vertical-align: bottom;
592
  }
593
 
594
+ .twb-analyze-img_optimizer-container.twb-optimize_pending .twb-img-count-container p {
595
  font-size: 14px;
596
  line-height: 20px;
597
  color: #323A45;
602
  font-weight: 600;
603
  }
604
 
605
+ .twb-analyze-img_optimizer-container p.twb-section-title {
606
  margin-bottom: 2px;
607
  }
608
 
609
+ .twb-analyze-img_optimizer-container.twb-optimize_pending ul {
610
  margin: 18px 0 0 0;
611
  padding: 0;
612
  }
613
 
614
 
615
+ .twb-analyze-img_optimizer-container.twb-optimize_pending li {
616
  text-align: left;
617
  font: normal normal 600 12px/18px Open Sans;
618
  letter-spacing: 0px;
622
  font-weight: 600;
623
  margin-bottom: 10px;
624
  padding-left: 26px;
625
+ background: url(../images/close_error.svg) no-repeat #F9F9F9;
626
  background-size: 22px;
627
  background-position: 0 -2px;
628
  }
629
 
630
+ .twb-optimize-now-button {
631
  display: block;
632
  width: 210px;
633
  height: 40px;
644
  margin-top: 20px;
645
  }
646
 
647
+ .twb-optimize-now-tooltip {
648
  position: absolute;
649
  bottom: 70px;
650
  width: 258px;
659
  letter-spacing: 0;
660
  }
661
 
662
+ .twb-optimize_on ul li span {
663
  width: 6px;
664
  height: 6px;
665
  background-color: #D6D8DA;
669
  vertical-align: middle;
670
  }
671
 
672
+ .twb-optimize_on p.twb-section-title {
673
+ background: url(../images/success.svg) no-repeat;
674
  background-size: 20px;
675
  background-position: 175px 3px;
676
  }
677
 
678
+ .twb-optimize_on p {
679
  font-size: 14px;
680
  line-height: 20px;
681
  }
682
 
683
+ .twb-optimize_on ul {
684
  margin: 18px 0 0 0;
685
  }
686
+ .twb-optimize_on li {
687
  font-size: 12px;
688
  margin-bottom: 10px;
689
  font-weight: 600;
690
  line-height: 18px;
691
  }
692
 
693
+ .twb-optimize_on li:last-child {
694
  margin-bottom: 0px;
695
  }
696
 
697
+ .twb-optimize_on-button-cont {
698
  flex-grow: 1;
699
  vertical-align: bottom;
700
  align-self: flex-end;
702
  justify-content: right;
703
  }
704
 
705
+ .twb-optimize-add-pages {
706
  display: block;
707
  width: 210px;
708
  height: 40px;
719
  margin-top: 20px;
720
  }
721
 
722
+ .twb-optimize_on.twb-optimize_done p.twb-section-title {
723
+ background: url(../images/success.svg) no-repeat;
724
  background-size: 20px;
725
  background-position: 113px 3px;
726
  }
727
 
728
  @media only screen and (max-width: 730px) {
729
 
730
+ .twb-speed-header {
731
  width: 100%;
732
  padding: 15px 15px 20px 15px;
733
  }
734
 
735
+ .twb-page-header,
736
+
737
+ .twb-install-booster-container {
738
  padding: 0;
739
  }
740
 
741
+ .twb-connected-booster-container .twb-header-description,
742
+ .twb-sign_up-booster-container .twb-description{
743
  display: inline;
744
  }
745
 
746
+ .twb-header-description {
747
  font-size: 14px;
748
  line-height: 20px;
749
  }
750
+ .twb-speed-body{
751
  width: 100%;
752
  }
753
 
754
+ .twb-install-booster-container .button-container {
755
  position: relative;
756
  display: block;
757
  width: 235px;
760
  margin-top: 20px;
761
  }
762
 
763
+ ul.twb-install-booster-steps {
764
  margin: 15px 0 0 0;
765
  padding-left: 10px;
766
  flex-direction: column;
767
  }
768
 
769
+ ul.twb-install-booster-steps li {
770
  height: 50px;
771
  padding-left: 25px;
772
  border-top: 0;
774
  margin: 0 0 25px 0;
775
  }
776
 
777
+ ul.twb-install-booster-steps li:after {
778
  top: 64px;
779
  left: -15px;
780
  right: unset;
782
  height: 23px;
783
  border-width: 2px;
784
  }
785
+ ul.twb-install-booster-steps li:last-child:after {
786
  width: 28px;
787
  height: 28px;
788
  top: 62px;
790
  border-width: 3px;
791
  }
792
 
793
+ .twb-button-container-parent {
794
  margin-top: 10px;
795
  justify-content: start;
796
  }
797
+ .twb-speed-body {
798
  padding: 15px;
799
  }
800
+ .twb-analyze-input-container {
801
  display:block;
802
  }
803
 
804
+ input.twb-analyze-input {
805
  width: 100%;
806
  margin-bottom: 30px;
807
  }
808
 
809
+ .twb-analyze-info-container,
810
+ .twb-analyze-info-left-cont {
811
  display: block;
812
  height: auto;
813
  }
814
 
815
+ .twb-analyze-info-right,
816
+ .twb-analyze-score-info {
817
  width: 100%;
818
  }
819
 
820
+ .twb-analyze-mobile-score, .twb-analyze-desktop-score {
821
  width: 100%;
822
  height: auto;
823
  padding: 18px 0 16px 0;
829
  margin: 0 auto 14px auto;
830
  }
831
 
832
+ .twb-analyze-score-info {
833
  width: auto;
834
  margin-top: 8px;
835
  line-height: 36px;
837
  height: 36px;
838
  }
839
 
840
+ .twb-analyze-score-info>span:first-child {
841
  display: none;
842
  }
843
 
844
+ .twb-averege-icon,
845
+ .twb-slow-icon {
846
  margin: 0 4px 0 11px;
847
  }
848
 
849
+ .twb-fast-icon {
850
  margin: 0 4px 0 0px;
851
  }
852
 
853
+ .twb-score-icon {
854
  width: 6px;
855
  height: 4px;
856
  margin-bottom: 2px;
857
  }
858
 
859
+ .twb-analyze-info-right p.twb-last-analyzed-date {
860
  margin-bottom: 0;
861
  }
862
 
863
+ .twb-analyze-img_optimizer-container {
864
  padding: 15px;
865
  }
866
 
867
+ .twb-analyze-info-right {
868
  margin: 10px 0 0 0;
869
  padding: 18px 15px 12px 15px;
870
  box-sizing: border-box;
871
  height: auto;
872
  }
873
 
874
+ .twb-analyze-info-right p.twb-analyze-info-right-sub-title {
875
  margin: 0;
876
  }
877
 
878
+ .twb-analyze-img_optimizer-container {
879
  display: block;
880
  }
881
 
882
+ .twb-analyze-img_optimizer-container.twb-optimize_pending > div:first-child {
883
  width: auto;
884
  height: auto;
885
  border-right: none;
887
  padding-bottom: 20px;
888
  }
889
 
890
+ .twb-analyze-img_optimizer-container.twb-optimize_pending .twb-img-count-container {
891
  text-align: left;
892
  padding-left: 0;
893
  }
894
 
895
+ .twb-optimize_on-button-cont {
896
  display: block;
897
  }
898
 
899
+ input.twb-sign-up-input {
900
  width: 100%;
901
  margin-top: 20px;
902
  }
903
+ .twb-speed-header .twb-sign-up-dashboard-button-container {
904
  gap: 0;
905
  flex-direction: column;
906
  }
907
 
908
+ .twb-booster-container > div {
909
  display: block;
910
  }
911
 
912
+ a.twb-booster-button {
913
  display: block;
914
  width: 210px;
915
  height: 40px;
916
  margin-bottom: 10px;
917
  }
918
 
919
+ .twb-booster-container > div > div {
920
  padding: 0;
921
  }
922
 
923
+ .twb-connected-booster-container {
924
  display: block;
925
  }
926
 
927
+ .twb-connected-booster-content,
928
+ .twb-connected-booster-container .button-container {
929
  width: 100%;
930
  display: block;
931
  }
932
 
933
+ a.twb-manage-booster {
934
  display: block;
935
  width: 210px;
936
  margin-top: 20px;
937
  }
938
 
939
+ .twb-analyze-img_optimizer-container.twb-optimize_pending .twb-img-count-container h5 {
940
  margin-top: 20px;
941
  }
942
 
943
+ .twb-optimize-now-tooltip {
944
  bottom: 205px;
945
  width: 230px;
946
  height: 85px;
947
  }
948
 
949
+ .twb-analyze-input-container .twb-error-msg {
950
  top: 42px;
951
  line-height: 13px;
952
  }
953
 
954
+ .twb-last-analyzed-date-container {
955
  position: relative;
956
  bottom: unset;
957
  }
958
 
959
+ .twb-analyze-info-right p.twb-last-analyzed-page {
960
  max-height: inherit;
961
  overflow: hidden;
962
  }
964
 
965
  .speed-loader-blue {
966
  animation: rotation 1s infinite linear;
967
+ background: url(../images/loader_small.svg) no-repeat;
968
  width: 18px;
969
  height: 18px;
970
  margin: auto;
972
 
973
  .speed-loader-grey {
974
  animation: rotation 1s infinite linear;
975
+ background: url(../images/loader_small_grey.svg) no-repeat;
976
  width: 18px;
977
  height: 18px;
978
  margin: auto;
993
  border-radius: 40px;
994
  }
995
 
996
+ .twb-img_optimizer-container {
997
  display: flex;
998
  margin-bottom: 30px;
999
  }
1000
 
1001
+ .twb-img_optimizer-container .twb-img_optimizer-left {
1002
  display:flex;
1003
  flex-direction: column;
1004
  width: 250px;
1009
  box-sizing: border-box;
1010
  padding: 20px 20px 20px 19px;
1011
  }
1012
+ .twb-img_optimizer-container .twb-img_optimizer-right {
1013
  display: flex;
1014
  flex-direction: column;
1015
  width: 414px;
1019
  padding: 20px;
1020
  }
1021
 
1022
+ .twb-img_optimizer-container.twb-img_optimizer-not-container .twb-img_optimizer-right {
1023
  width: 250px;
1024
  }
1025
 
1026
+ .twb-img_optimizer-container.twb-img_optimizer-not-container .twb-img_optimizer-left {
1027
  width: 414px;
1028
  }
1029
 
1030
+ .twb-img_optimizer-container .twb-section-description {
1031
  margin: 0;
1032
  padding: 0;
1033
  line-height: 18px;
1035
 
1036
  }
1037
 
1038
+ .twb-img_optimizer-container.twb-img_optimizer-not-container .twb-section-description {
1039
  border-bottom: 1px solid #E4E4E4;
1040
  margin: 0 0 18px 0;
1041
  padding: 0 0 18px 0;
1042
 
1043
  }
1044
 
1045
+ .twb-section-bottom {
1046
  height: auto;
1047
  display: flex;
1048
  flex-direction: column;
1050
  flex-grow: 1;
1051
  }
1052
 
1053
+ .twb-most-image-cont {
1054
  display: flex;
1055
  font-size: 12px;
1056
  line-height: 18px;
1059
  margin-top: 10px;
1060
  }
1061
 
1062
+ .twb-most-image-cont-path {
1063
  flex-grow: 1;
1064
  text-decoration: underline;
1065
  padding-right: 10px;
1067
  word-break: break-all;
1068
  }
1069
 
1070
+ .twb-hompage-path {
1071
  text-decoration: none;
1072
  }
1073
 
1074
+ .twb-most-image-cont-img-count.twb-not-optimized {
1075
  padding-right: 20px;
1076
+ background: url(../images/close_red.svg) no-repeat #F9F9F9;
1077
  background-position: right center;
1078
  background-size: 20px;
1079
  }
1080
 
1081
+ .twb-most-image-cont-img-count.twb-optimized {
1082
  padding-right: 20px;
1083
+ background: url(../images/success.svg) no-repeat #F9F9F9;
1084
  background-position: right top;
1085
  background-size: 20px;
1086
  white-space: nowrap;
1088
  text-align: right;
1089
  }
1090
 
1091
+ .twb-optimized-info,
1092
+ .twb-not-optimized-info {
1093
  display: block;
1094
  width: 125px;
1095
  height: 28px;
1103
 
1104
  }
1105
 
1106
+ .twb-optimized-info {
1107
  width: 145px;
1108
+ background: url(../images/success.svg) no-repeat #FD3C310D;
1109
  background-position: 6px center;
1110
  background-size: 20px;
1111
  }
1112
+ .twb-not-optimized-info {
1113
+ background: url(../images/close_red.svg) no-repeat #FD3C310D;
1114
  background-position: 6px center;
1115
  background-size: 20px;
1116
  }
1117
 
1118
+ .twb-img_optimizer-right h5,
1119
+ .twb-img_optimizer-left h5 {
1120
  font-size: 36px;
1121
  line-height: 50px;
1122
  font-weight: 800;
1124
  height: 50px;
1125
  }
1126
 
1127
+ .twb-img_optimizer-not-container .twb-img_optimizer-left h5 {
1128
  font-size: 36px;
1129
  line-height: 50px;
1130
  height: 50px;
1131
  }
1132
 
1133
+ .twb-img_optimizer-right h5 span,
1134
+ .twb-img_optimizer-left h5 span{
1135
  font-size: 14px;
1136
  line-height: 65px;
1137
  font-weight: 700;
1138
  padding-left: 7px;
1139
  }
1140
 
1141
+ .twb-img_optimizer-container ul {
1142
  margin: 0;
1143
  list-style: none;
1144
  }
1145
 
1146
+ .twb-img_optimizer-container li {
1147
+ background: url(../images/disc.svg) no-repeat;
1148
  background-position: 0px center;
1149
  background-size: 15px;
1150
  padding-left: 22px;
1154
  font-weight: 600;
1155
  }
1156
 
1157
+ .twb-img_optimizer-button-container {
1158
  display: flex;
1159
  align-items: flex-end;
1160
  }
1161
+ .twb-img_optimizer-not-container .twb-img_optimizer-button-container {
1162
  display: block;
1163
  }
1164
 
1165
+ .twb-img_optimizer-info {
1166
  flex-grow: 1;
1167
  }
1168
 
1169
+ .twb-img_optimizer-info p {
1170
  font-size: 12px;
1171
  line-height: 18px;
1172
  padding: 0;
1173
  margin: 0;
1174
  }
1175
 
1176
+ .twb-img_optimizer-info p:first-child {
1177
  font-weight: 700;
1178
  }
1179
 
1180
+ .twb-img_optimize-now-button,
1181
+ .twb-img_add_pages_button {
1182
  display: block;
1183
  width: 210px;
1184
  text-align: center;
1195
  margin-top: 20px;
1196
  }
1197
 
1198
+ .twb-img_add_pages_button {
1199
  opacity: 1;
1200
  }
1201
 
1202
+ .twb-img_optimize-now-button:hover,
1203
+ .twb-img_add_pages_button:hover,
1204
+ .twb-img_add_pages_button:active {
1205
  color:#ffffff;
1206
  }
1207
 
1208
+ .twb-line_container {
1209
  width: 100%;
1210
  height: 6px;
1211
  background-color: #E6E7E8;
1213
  margin-bottom: 10px;
1214
  }
1215
 
1216
+ p.twb-total_size {
1217
  font-size: 14px;
1218
  line-height: 20px;
1219
  color: #323A45;
1221
  font-weight: 600;
1222
  }
1223
 
1224
+ .twb-line_container span {
1225
  display: block;
1226
  height: 6px;
1227
  border-radius: 30px;
1228
  background-color: #22B339;
1229
  }
1230
 
1231
+ .twb-line_container span.twb-size_0 {
1232
  width: 0;
1233
  }
1234
+ .twb-line_container span.twb-size_1 {
1235
  width: 16.7%;
1236
  }
1237
+ .twb-line_container span.twb-size_2 {
1238
  width: 33.4%;
1239
  }
1240
+ .twb-line_container span.twb-size_3 {
1241
  width: 50.1%;
1242
  }
1243
+ .twb-line_container span.twb-size_4 {
1244
  width: 66.8%;
1245
  }
1246
+ .twb-line_container span.twb-size_5 {
1247
  width: 83.5%;
1248
  }
1249
 
1250
+ .twb-line_container span.twb-size_6 {
1251
  width: 100%;
1252
  }
1253
 
1254
+ .twb-line_info_container {
1255
  display: flex;
1256
  margin-top: 30px;
1257
  margin-bottom: 9px;
1260
  font-weight: 600;
1261
  }
1262
 
1263
+ .twb-line_info_container span:nth-child(1) {
1264
  flex-grow: 1;
1265
  }
1266
 
1267
+ .twb-img_optimizer-right > p {
1268
  margin: 101px 0 0 0;
1269
  display: flex;
1270
  align-items: flex-end;
1272
  }
1273
 
1274
  @media screen and (max-width: 690px) {
1275
+ .twb-img_optimizer-container {
1276
  display: block;
1277
  }
1278
 
1279
+ .twb-img_optimizer-container .twb-img_optimizer-left,
1280
+ .twb-img_optimizer-container .twb-img_optimizer-right,
1281
+ .twb-img_optimizer-container.twb-img_optimizer-not-container .twb-img_optimizer-left,
1282
+ .twb-img_optimizer-container.twb-img_optimizer-not-container .twb-img_optimizer-right {
1283
  width: 100%;
1284
  padding: 15px;
1285
  }
1286
 
1287
+ .twb-img_optimizer-container .twb-img_optimizer-left {
1288
  margin-bottom: 15px;
1289
  }
1290
 
1291
+ .twb-img_optimizer-button-container {
1292
  display: block;
1293
  }
1294
 
1295
+ .twb-img_add_pages_button,
1296
+ .twb-img_optimize-now-button {
1297
  width: 210px;
1298
  height: 40px;
1299
  display: block;
1301
  margin-top: 20px;
1302
  }
1303
 
1304
+ .twb-img_optimizer-right > p {
1305
  margin: 30px 0 15px 0;
1306
  }
1307
 
1308
+ .twb-img_optimizer-button-container {
1309
  height: auto;
1310
  margin-top: 20px;
1311
  }
1312
 
1313
+ .twb-img_optimizer-container.twb-img_optimizer-not-container .twb-img_optimizer-button-container {
1314
  margin-top: 0px;
1315
  }
1316
 
1317
 
1318
+ .twb-line_container {
1319
  margin-bottom: 10px;
1320
  }
1321
 
1322
+ .twb-section-bottom {
1323
  margin-top: 10px;
1324
  }
1325
+ }
1326
+
1327
+
1328
+
1329
+ .twb-popup input.twb-sign-up-input {
1330
+ width: 100%;
1331
+ }
1332
+
1333
+ .twb-popup {
1334
+ width: 500px;
1335
+ height: 298px;
1336
+ background-color: #FFFFFF;
1337
+ font-family: Open Sans;
1338
+ top: 50%;
1339
+ position: fixed;
1340
+ left: 50%;
1341
+ text-align: center;
1342
+ z-index: 100000;
1343
+ border-radius: 10px;
1344
+ margin-left: -250px;
1345
+ margin-top: -149px;
1346
+ padding: 35px 30px;
1347
+ box-sizing: border-box;
1348
+ color: #323A45;
1349
+ }
1350
+
1351
+ .twb-popup a {
1352
+ color: #323A45;
1353
+ }
1354
+
1355
+ .twb-popup-dismiss {
1356
+ width: 16px;
1357
+ height: 16px;
1358
+ position: absolute;
1359
+ top: 50%;
1360
+ right: 50%;
1361
+ background: transparent url('../images/close.svg') 0% 0% no-repeat padding-box;
1362
+ margin-top: -134px;
1363
+ margin-right: -235px;
1364
+ z-index: 1000000;
1365
+ cursor: pointer;
1366
+ }
1367
+
1368
+ .twb-popup-overlay {
1369
+ background-color: rgba(0, 0, 0, 0.75);
1370
+ position: fixed;
1371
+ top: 0;
1372
+ left: 0;
1373
+ width: 100%;
1374
+ height: 100%;
1375
+ z-index: 100000;
1376
+ }
1377
+
1378
+ .twb-popup-title {
1379
+ font-weight: 800;
1380
+ font-size: 24px;
1381
+ line-height: 34px;
1382
+ letter-spacing: 0.2px;
1383
+ }
1384
+
1385
+ .twb-popup-description {
1386
+ font-weight: 400;
1387
+ font-size: 16px;
1388
+ line-height: 22px;
1389
+ letter-spacing: 0;
1390
+ margin-top: 15px;
1391
+ }
1392
 
1393
+ .twb-popup-button {
1394
+ margin-top: 15px;
1395
+ }
1396
+
1397
+ .twb-popup-button > a,
1398
+ .twb-popup-button > span {
1399
+ display: inline-block;
1400
+ width: 210px;
1401
+ height: 40px;
1402
+ box-sizing: border-box;
1403
+ font-size: 14px;
1404
+ font-weight: 400;
1405
+ line-height: 14px;
1406
+ text-align: center;
1407
+ padding: 13px 16px;
1408
+ border-radius: 4px;
1409
+ text-decoration: none;
1410
+ cursor: pointer;
1411
+ margin-top: 15px;
1412
+ }
1413
+
1414
+ .twb-popup-button .twb-html {
1415
+ font-size: 12px;
1416
+ padding: 0;
1417
+ line-height: 18px;
1418
+ }
1419
+
1420
+ .twb-popup-button a.twb-primary {
1421
+ background-color: #2160B5;
1422
+ color: #ffffff;
1423
+ border: 1px solid #2160B5;
1424
+ }
1425
+
1426
+ .twb-popup-button a.twb-secondary {
1427
+ background-color: #FFFFFF;
1428
+ color: #323A45;
1429
+ border: 1px solid #DEDEDE;
1430
+ }
1431
+
1432
+ @media screen and (max-width: 500px) {
1433
+ .twb-popup {
1434
+ width: 100%;
1435
+ left: 0;
1436
+ margin-left: 0;
1437
+ margin-top: -175px;
1438
+ border-radius: 0;
1439
+ }
1440
+ .twb-popup-dismiss {
1441
+ top: 15px;
1442
+ right: 15px;
1443
+ margin-top: 0;
1444
+ margin-right: 0;
1445
+ }
1446
+ .twb-popup-overlay {
1447
+ background-color: rgba(255, 255, 255, 1);
1448
+ }
1449
+ .twb-popup-content,
1450
+ .twb-popup-button {
1451
+ width: 280px;
1452
+ margin: 0 auto;
1453
+ }
1454
+ .twb-popup-button {
1455
+ margin-top: 15px;
1456
+ }
1457
+ .twb-popup-button > a,
1458
+ .twb-popup-button > span {
1459
+ float: none;
1460
+ margin: 15px auto 0 auto;
1461
+ }
1462
  }
booster/assets/css/top_banner.css ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .twb-booster-top-banner {
2
+ border-top: 1px solid #e5e5e5;
3
+ background-color: #f6f7f7;
4
+ }
5
+ .twb-booster-top-banner * {
6
+ margin: 0px;
7
+ padding: 0px;
8
+ line-height: 18px;
9
+ font-family: 'Open Sans';
10
+ font-weight: 400;
11
+ font-size: 12px;
12
+ }
13
+ .twb-booster-top-banner-wrapper-note {
14
+ padding: 9px 16px;
15
+ background-color: #ffffff;
16
+ }
17
+ .twb-booster-top-banner-wrapper-note--text {
18
+ position: relative;
19
+ display: inline-block;
20
+ padding-left: 22px;
21
+ text-align: left;
22
+ letter-spacing: 0.1px;
23
+ font-weight: 600;
24
+ color: #323A45;
25
+ }
26
+ .twb-booster-top-banner-wrapper-note--text:before {
27
+ content: '';
28
+ position: absolute;
29
+ top: 50%;
30
+ left: 0px;
31
+ transform: translateY(-50%);
32
+ width: 14px;
33
+ height: 14px;
34
+ background: transparent url('../images/information.svg') 0% 0% no-repeat padding-box;
35
+ }
36
+ .twb-booster-top-banner-wrapper {
37
+ display: -webkit-box;
38
+ display: -ms-flexbox;
39
+ display: flex;
40
+ -webkit-box-pack: justify;
41
+ -ms-flex-pack: justify;
42
+ justify-content: space-between;
43
+ -webkit-box-align: center;
44
+ -ms-flex-align: center;
45
+ align-items: center;
46
+ padding: 18px 20px;
47
+ border-top: 1px solid #E5E5E5;
48
+ }
49
+ .twb-booster-top-banner-wrapper .twb-booster-top-banner-wrappe--images-count {
50
+ font-weight: 800;
51
+ }
52
+ .twb-booster-top-banner-wrapper .twb-booster-top-banner-wrappe--button {
53
+ display: block;
54
+ width: 210px;
55
+ background: #2160B5 0% 0% no-repeat padding-box;
56
+ border-radius: 4px;
57
+ padding: 8px 0px;
58
+ font-size: 14px;
59
+ line-height: 18px;
60
+ font-family: 'Segoe UI';
61
+ font-weight: 400;
62
+ letter-spacing: 0;
63
+ color: #FFFFFF;
64
+ text-decoration: none;
65
+ cursor: pointer;
66
+ text-align: center;
67
+ }
68
+
69
+ @media screen and (max-width: 640px) {
70
+ .twb-booster-top-banner-wrapper {
71
+ display: block;
72
+ padding: 10px 20px;
73
+ }
74
+ .twb-booster-top-banner-wrapper .twb-booster-top-banner-wrappe--images-count {
75
+ padding-bottom: 2px;
76
+ }
77
+ .twb-booster-top-banner-wrapper .twb-booster-top-banner-wrappe--button {
78
+ margin: 10px auto 0;
79
+ }
80
+ }
booster/assets/images/button_plus.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="7.758" height="7.758" viewBox="0 0 7.758 7.758"><defs><style>.a{fill:#fff;}</style></defs><path class="a" d="M8.651,3.929H5.784a.169.169,0,0,1-.169-.169V.893H3.929V3.76a.169.169,0,0,1-.169.169H.893V5.615H3.76a.169.169,0,0,1,.169.169V8.651H5.615V5.784a.169.169,0,0,1,.169-.169H8.651Zm0,0" transform="translate(-0.893 -0.893)"/></svg>
{images/speed → booster/assets/images}/check_green.jpg RENAMED
File without changes
booster/assets/images/check_green_bg.svg ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg id="Checkmark_Icon_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22" height="22" viewBox="0 0 22 22">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_48150" data-name="Rectangle 48150" width="22" height="22" fill="#fff"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Mask_Group_1304" data-name="Mask Group 1304" clip-path="url(#clip-path)">
8
+ <g id="Group_94669" data-name="Group 94669" transform="translate(3.667 3.667)">
9
+ <path id="Success_Done_Checkmark_Icon" d="M26.167,18.833A7.333,7.333,0,1,1,18.833,11.5,7.342,7.342,0,0,1,26.167,18.833Z" transform="translate(-11.5 -11.5)" fill="#23b536"/>
10
+ <path id="Success_Done_Checkmark_Icon-2" data-name="Success_Done_Checkmark_Icon" d="M22.176,15.662a.677.677,0,0,0-1.031,0L17.657,19.15a.59.59,0,0,1-.357.159.43.43,0,0,1-.357-.159l-1.586-1.586a.609.609,0,0,0-.515-.2.754.754,0,0,0-.515.2.742.742,0,0,0,0,1.031l2.458,2.458a.835.835,0,0,0,.515.2.754.754,0,0,0,.515-.2l4.36-4.36A.677.677,0,0,0,22.176,15.662Z" transform="translate(-10.918 -10.628)" fill="#fafafa"/>
11
+ </g>
12
+ </g>
13
+ </svg>
{images/speed → booster/assets/images}/check_grey.jpg RENAMED
File without changes
booster/assets/images/check_score.svg ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg id="Component_289_2" data-name="Component 289 – 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18" viewBox="0 0 18 18">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_47762" data-name="Rectangle 47762" width="18" height="18" transform="translate(757 1233)" fill="#3a6fab"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Mask_Group_95145" data-name="Mask Group 95145" transform="translate(-757 -1233)" clip-path="url(#clip-path)">
8
+ <g id="noun-speed-1914448" transform="translate(758.725 1235.801)">
9
+ <g id="Group_96026" data-name="Group 96026" transform="translate(0.499 0.499)">
10
+ <path id="Path_170607" data-name="Path 170607" d="M2355.586,13110.588a6.923,6.923,0,0,1-.768-3.149,6.776,6.776,0,0,1,13.553,0,6.681,6.681,0,0,1-.773,3.156.916.916,0,0,1-.807.482.953.953,0,0,1-.418-.1l-.012-.007a.924.924,0,0,1-.381-1.224l0-.007a5.038,5.038,0,0,0,.565-2.3,4.955,4.955,0,0,0-9.91,0,5.1,5.1,0,0,0,.567,2.3l0,0a.916.916,0,0,1-.373,1.221.823.823,0,0,1-.438.114A.906.906,0,0,1,2355.586,13110.588Z" transform="translate(-2354.818 -13100.663)" fill="#3a6fab"/>
11
+ <path id="Path_170606" data-name="Path 170606" d="M297.746,209.582l-3.132,1.943a1.319,1.319,0,0,0-.614,1.112,1.29,1.29,0,0,0,2.4.639l1.879-3.17a.384.384,0,0,0-.537-.524Z" transform="translate(-289.032 -205.462)" fill="#3a6fab"/>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </svg>
booster/assets/images/close.svg ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <svg id="Close_Icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <path id="Path_169840" data-name="Path 169840" d="M0,0H16V16H0Z" fill="none"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Mask_Group_1282" data-name="Mask Group 1282" clip-path="url(#clip-path)">
8
+ <path id="Path_169841" data-name="Path 169841" d="M771.045,5105.572l-2.6-2.6-2.6,2.6a1.078,1.078,0,0,1-1.841-.76,1.079,1.079,0,0,1,.312-.76l0,0,2.6-2.6-2.6-2.6a1.086,1.086,0,0,1,0-1.526l.007-.006a1.078,1.078,0,0,1,1.517,0l0,0,2.6,2.6,2.608-2.609a1.083,1.083,0,0,1,1.517,0l.007.006a1.088,1.088,0,0,1,0,1.525l-2.605,2.6,2.607,2.607a1.076,1.076,0,0,1,.312.76,1.079,1.079,0,0,1-1.844.759Z" transform="translate(-760.445 -5093.445)" fill="rgba(50,58,69,0.2)"/>
9
+ </g>
10
+ </svg>
{images/speed → booster/assets/images}/close_dark.svg RENAMED
File without changes
{images/speed → booster/assets/images}/close_error.svg RENAMED
File without changes
{images/speed → booster/assets/images}/close_red.svg RENAMED
File without changes
{images/speed → booster/assets/images}/desktop.svg RENAMED
File without changes
{images/speed → booster/assets/images}/disc.svg RENAMED
File without changes
booster/assets/images/down_arrow_nav.svg ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18" viewBox="0 0 18 18">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_47807" data-name="Rectangle 47807" width="18" height="18" fill="#323a45"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Navigation_Icon" clip-path="url(#clip-path)">
8
+ <path id="Path_169381" data-name="Path 169381" d="M3.778,5.637.4,2.215A1.309,1.309,0,0,1,.275.472a1.28,1.28,0,0,1,1.879-.1L4.415,2.667a.383.383,0,0,0,.51,0L7.155.407A1.267,1.267,0,0,1,8.875.278a1.321,1.321,0,0,1,.1,1.9L5.562,5.637A1.277,1.277,0,0,1,3.778,5.637Z" transform="translate(4.335 6.035)" fill="rgba(255,255,255,0.8)"/>
9
+ </g>
10
+ </svg>
{images/speed → booster/assets/images}/google_spinner.svg RENAMED
File without changes
booster/assets/images/green-info.svg ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_48150" data-name="Rectangle 48150" width="20" height="20" fill="#323a45"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Group_103117" data-name="Group 103117" transform="translate(-2809 -4142)">
8
+ <path id="design_system_icons-40" data-name="design system icons-40" d="M31.5,21.5a10,10,0,1,1-10-10A10.012,10.012,0,0,1,31.5,21.5Z" transform="translate(2797.5 4130.5)" fill="#22b339" opacity="0.3"/>
9
+ <g id="Checkmark_Icon_2" transform="translate(2809 4142)">
10
+ <g id="Mask_Group_1304" data-name="Mask Group 1304" clip-path="url(#clip-path)">
11
+ <path id="Success_Done_Checkmark_Icon" d="M24.833,18.167A6.667,6.667,0,1,1,18.167,11.5,6.675,6.675,0,0,1,24.833,18.167Z" transform="translate(-8.167 -8.167)" fill="#22b339"/>
12
+ <path id="Success_Done_Checkmark_Icon-2" data-name="Success_Done_Checkmark_Icon" d="M21.443,15.641a.616.616,0,0,0-.937,0l-3.171,3.171a.537.537,0,0,1-.324.144.391.391,0,0,1-.324-.144L15.245,17.37a.553.553,0,0,0-.468-.18.685.685,0,0,0-.468.18.675.675,0,0,0,0,.937l2.234,2.234a.759.759,0,0,0,.468.18.685.685,0,0,0,.468-.18l3.964-3.964A.615.615,0,0,0,21.443,15.641Z" transform="translate(-7.876 -7.731)" fill="#fafafa"/>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </svg>
booster/assets/images/help.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 19 19"><defs><style>.a{fill:#fff;}</style></defs><g transform="translate(-64 -64)"><path class="a" d="M73.5,64A9.5,9.5,0,1,0,83,73.5,9.5,9.5,0,0,0,73.5,64Zm0,17.388A7.888,7.888,0,1,1,81.388,73.5,7.89,7.89,0,0,1,73.5,81.388Z"/><path class="a" d="M357.759,276.863a3.676,3.676,0,0,0-4.733,0A2.891,2.891,0,0,0,352,279.054v.161a.17.17,0,0,0,.17.17h1.018a.17.17,0,0,0,.17-.17v-.161a2.07,2.07,0,0,1,4.071,0,1.716,1.716,0,0,1-1.19,1.542,2.37,2.37,0,0,0-1.1.867,2.427,2.427,0,0,0-.422,1.376v.456a.17.17,0,0,0,.17.17H355.9a.17.17,0,0,0,.17-.17v-.481a1.025,1.025,0,0,1,.655-.95,3.061,3.061,0,0,0,2.059-2.81,2.882,2.882,0,0,0-1.024-2.191Zm-3.215,8.807a.848.848,0,1,0,.848-.848A.848.848,0,0,0,354.545,285.67Z" transform="translate(-281.893 -207.504)"/></g></svg>
{images/speed → booster/assets/images}/information.svg RENAMED
File without changes
booster/assets/images/loader.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg id="loader" xmlns="http://www.w3.org/2000/svg" width="13.846" height="13.846" viewBox="0 0 13.846 13.846">
2
+ <path id="Subtraction_1" data-name="Subtraction 1" d="M6.923,13.846a6.923,6.923,0,1,1,6.923-6.923A6.931,6.931,0,0,1,6.923,13.846Zm0-12.307a5.384,5.384,0,1,0,5.385,5.384A5.39,5.39,0,0,0,6.923,1.539Z" transform="translate(0 0)" fill="#fff"/>
3
+ <path id="Intersection_2" data-name="Intersection 2" d="M6.03,6.923h0A5.391,5.391,0,0,0,.643,1.539V1.518A.729.729,0,0,1,0,.8.805.805,0,0,1,.643,0,6.931,6.931,0,0,1,7.566,6.923H7.555a.755.755,0,0,1-.746.724H6.778A.775.775,0,0,1,6.03,6.923Z" transform="translate(6.28 0)" fill="#323a45" opacity="0.5"/>
4
+ </svg>
booster/assets/images/loader_green.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
+ <g id="loader" transform="translate(-281.823 -1)">
3
+ <path id="Subtraction_1" data-name="Subtraction 1" d="M9,18a9,9,0,1,1,9-9A9.01,9.01,0,0,1,9,18ZM9,2a7,7,0,1,0,7,7A7.007,7.007,0,0,0,9,2Z" transform="translate(281.823 1)" fill="#fff"/>
4
+ <path id="Intersection_2" data-name="Intersection 2" d="M7.838,9h0a7.008,7.008,0,0,0-7-7V1.973A.948.948,0,0,1,0,1.04,1.047,1.047,0,0,1,.836,0a9.01,9.01,0,0,1,9,9H9.821a.982.982,0,0,1-.969.941h-.04A1.008,1.008,0,0,1,7.838,9Z" transform="translate(289.987 1)" fill="#22b339"/>
5
+ </g>
6
+ </svg>
booster/assets/images/loader_medium.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg id="loader" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
+ <path id="Subtraction_1" data-name="Subtraction 1" d="M6.923,13.846a6.923,6.923,0,1,1,6.923-6.923A6.931,6.931,0,0,1,6.923,13.846Zm0-12.307a5.384,5.384,0,1,0,5.385,5.384A5.39,5.39,0,0,0,6.923,1.539Z" transform="translate(0 0)" fill="#fff"/>
3
+ <path id="Intersection_2" data-name="Intersection 2" d="M6.03,6.923h0A5.391,5.391,0,0,0,.643,1.539V1.518A.729.729,0,0,1,0,.8.805.805,0,0,1,.643,0,6.931,6.931,0,0,1,7.566,6.923H7.555a.755.755,0,0,1-.746.724H6.778A.775.775,0,0,1,6.03,6.923Z" transform="translate(6.28 0)" fill="#323a45" opacity="0.5"/>
4
+ </svg>
{images/speed → booster/assets/images}/loader_small.svg RENAMED
File without changes
{images/speed → booster/assets/images}/loader_small_grey.svg RENAMED
File without changes
booster/assets/images/logo_dark.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="27.102" height="26" viewBox="0 0 27.102 26">
2
+ <g id="Group_102205" data-name="Group 102205" transform="translate(0.499 -0.391)">
3
+ <path id="Union_846" data-name="Union 846" d="M-12237.115-21653.73a.127.127,0,0,1,0-.174l5.173-7.189a.138.138,0,0,0,.027-.082.134.134,0,0,0-.137-.135h-4.145a.134.134,0,0,1-.1-.055.129.129,0,0,1,.026-.18l13.2-10.029a.123.123,0,0,1,.175,0,.126.126,0,0,1,0,.174l-5.172,7.2a.127.127,0,0,0-.027.076.135.135,0,0,0,.136.137h4.139a.141.141,0,0,1,.109.055.135.135,0,0,1-.033.184l-13.2,10.023a.119.119,0,0,1-.087.037A.119.119,0,0,1-12237.115-21653.73Zm9.687-4.176a.136.136,0,0,1,.033-.18l6.733-5.135-1.725-1.686a1.5,1.5,0,0,1-.038-2.094,1.441,1.441,0,0,1,2.066-.039l2.84,2.785c.038.033.07.061.1.092l.064.072a.053.053,0,0,0,.022.021,1.43,1.43,0,0,1-.147,1.963,1.23,1.23,0,0,1-.4.25l-3.4,1.453.016-.012-6,2.551a.088.088,0,0,1-.055.016A.132.132,0,0,1-12227.429-21657.906Zm-12.221-.359-2.834-2.779c-.038-.033-.076-.064-.108-.1l-.065-.07a1.277,1.277,0,0,1-.19-.289.006.006,0,0,1-.006-.006c-.011-.021-.016-.037-.026-.059a.061.061,0,0,1-.011-.033.04.04,0,0,1-.012-.027s0-.006,0-.006c-.006-.016-.011-.037-.017-.055s0-.016-.011-.021a.107.107,0,0,0-.011-.037c-.006-.012-.006-.027-.011-.039a.05.05,0,0,0-.006-.027c0-.016,0-.031-.011-.049v-.016a1.413,1.413,0,0,1,.44-1.322,1.285,1.285,0,0,1,.4-.25l3.405-1.451-.017.016,6.016-2.557a.127.127,0,0,1,.157.039.134.134,0,0,1-.032.18l-6.744,5.139,1.719,1.682a1.511,1.511,0,0,1,.043,2.1,1.455,1.455,0,0,1-1.055.447A1.438,1.438,0,0,1-12239.649-21658.266Z" transform="translate(12243.007 21675.83)" fill="#7e8891" stroke="rgba(0,0,0,0)" stroke-width="1"/>
4
+ <rect id="Rectangle_51265" data-name="Rectangle 51265" width="25.589" height="26" transform="translate(0 0.391)" fill="none"/>
5
+ </g>
6
+ </svg>
booster/assets/images/logo_green.svg ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
2
+ <g id="Group_102205" data-name="Group 102205" transform="translate(0 -0.391)">
3
+ <path id="Path_171039" data-name="Path 171039" d="M.441,38.127h0a1.445,1.445,0,0,0,2.065-.037l7.924-6.038a.131.131,0,0,0,.033-.18.126.126,0,0,0-.158-.045l-9.409,4a1.426,1.426,0,0,0-.52,2.23Z" transform="translate(-0.028 -23.443)" fill="#fff"/>
4
+ <path id="Path_171040" data-name="Path 171040" d="M5.434,48.088a1.443,1.443,0,0,1-2.063.039l0,0L.462,45.274l-.034-.029-.06-.063a1.427,1.427,0,0,1,.12-1.992,1.393,1.393,0,0,1,.4-.252L4.295,41.49,3.723,42a1.571,1.571,0,0,0-.163,2.191q.045.054.095.1l1.74,1.7a1.5,1.5,0,0,1,.039,2.1" transform="translate(-0.014 -30.56)" fill="#9ea3a8"/>
5
+ <path id="Path_171041" data-name="Path 171041" d="M69.869,43.142h0a1.445,1.445,0,0,0-2.065.037l-7.911,6.038a.131.131,0,0,0-.033.18.126.126,0,0,0,.158.045l9.4-4a1.426,1.426,0,0,0,.52-2.23Z" transform="translate(-44.277 -31.469)" fill="#fff"/>
6
+ <path id="Path_171042" data-name="Path 171042" d="M78,32.276a1.443,1.443,0,0,1,2.063-.039l0,0,2.907,2.851L83,35.12l.06.063a1.427,1.427,0,0,1-.12,1.992,1.393,1.393,0,0,1-.4.252l-3.407,1.448.572-.507a1.571,1.571,0,0,0,.163-2.191q-.045-.054-.095-.1l-1.742-1.7a1.5,1.5,0,0,1-.036-2.1" transform="translate(-57.411 -23.446)" fill="#9ea3a8"/>
7
+ <rect id="Rectangle_51265" data-name="Rectangle 51265" width="25.589" height="26" transform="translate(0 0.391)" fill="none"/>
8
+ <g id="Group_103045" data-name="Group 103045" transform="translate(5.745 4.32)">
9
+ <path id="Path_171177" data-name="Path 171177" d="M31.671,23.435l5.209-7.126a.123.123,0,1,0-.175-.173L23.411,26.072a.128.128,0,0,0,.076.233h4.172a.136.136,0,0,1,.11.215L22.56,33.645a.123.123,0,0,0,.175.173l13.293-9.935a.128.128,0,0,0-.076-.233H31.781a.136.136,0,0,1-.11-.215Z" transform="translate(-22.525 -16.1)" fill="#22b339"/>
10
+ <path id="Path_171178" data-name="Path 171178" d="M36.927,16.485,28.22,25.033a.128.128,0,0,0,.089.22h3.142a.136.136,0,0,1,.094.233l-8.757,8.537a.055.055,0,0,0,.071.081L36.17,24.153a.128.128,0,0,0-.076-.23H31.9a.136.136,0,0,1-.11-.217l5.237-7.144a.065.065,0,0,0-.1-.076Z" transform="translate(-22.711 -16.371)" fill="#fff" opacity="0.2"/>
11
+ </g>
12
+ </g>
13
+ </svg>
booster/assets/images/logo_white.svg ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
+ <g id="Group_102623" data-name="Group 102623" transform="translate(-80 -236)">
3
+ <rect id="Rectangle_49998" data-name="Rectangle 49998" width="18" height="18" transform="translate(80 236)" fill="none"/>
4
+ <g id="Group_104194" data-name="Group 104194" transform="translate(83.358 237.916)">
5
+ <path id="Path_171177" data-name="Path 171177" d="M29.7,21.851l4.084-5.587a.1.1,0,1,0-.138-.136L23.22,23.919a.1.1,0,0,0,.06.183h3.271a.107.107,0,0,1,.086.168l-4.084,5.587a.1.1,0,0,0,.138.136L33.113,22.2a.1.1,0,0,0-.06-.183H29.783a.107.107,0,0,1-.086-.168Z" transform="translate(-22.525 -16.1)" fill="#fff"/>
6
+ </g>
7
+ </g>
8
+ </svg>
{images/speed → booster/assets/images}/mobile.svg RENAMED
File without changes
booster/assets/images/not_optimized.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
2
+ <g id="Group_104105" data-name="Group 104105" transform="translate(-3.334 -3.332)">
3
+ <path id="Subtraction_23" data-name="Subtraction 23" d="M14,7A7,7,0,1,1,7,0,7.008,7.008,0,0,1,14,7Z" transform="translate(3.334 3.332)" fill="#fd3c31"/>
4
+ <path id="design_system_icons-40" data-name="design system icons-40" d="M8.157,3.841a.848.848,0,0,0-.852-.671H4.824V.783a.883.883,0,0,0-.259-.6A.881.881,0,0,0,4.046,0H3.935a.81.81,0,0,0-.667.82V3.132H.787a.871.871,0,0,0-.593.261.769.769,0,0,0-.185.634A.819.819,0,0,0,.861,4.7H3.269V7.384a.883.883,0,0,0,.259.6.881.881,0,0,0,.519.186h.111a.81.81,0,0,0,.667-.82V4.736H7.417a.785.785,0,0,0,.556-.261A.808.808,0,0,0,8.157,3.841Z" transform="translate(10.276 4.499) rotate(45)" fill="#fff"/>
5
+ </g>
6
+ </svg>
booster/assets/images/optimize.svg ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18" viewBox="0 0 18 18">
2
+ <defs>
3
+ <linearGradient id="linear-gradient" x1="0.5" y1="1" x2="0.5" gradientUnits="objectBoundingBox">
4
+ <stop offset="0" stop-color="#fff" stop-opacity="0.588"/>
5
+ <stop offset="1" stop-color="#fff"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <g id="Group_102623" data-name="Group 102623" transform="translate(-80 -236)">
9
+ <rect id="Rectangle_49998" data-name="Rectangle 49998" width="18" height="18" transform="translate(80 236)" fill="none"/>
10
+ <path id="Path_171097" data-name="Path 171097" d="M-9886.972-8352.187a.1.1,0,0,1,0-.135l4.061-5.555a.109.109,0,0,0,.009-.11.108.108,0,0,0-.094-.057h-3.255a.1.1,0,0,1-.095-.069.1.1,0,0,1,.037-.112l10.363-7.746a.1.1,0,0,1,.136,0,.1.1,0,0,1,0,.137l-4.061,5.555a.107.107,0,0,0-.007.108.1.1,0,0,0,.093.057h3.253a.1.1,0,0,1,.1.069.109.109,0,0,1-.036.115l-10.363,7.743a.1.1,0,0,1-.068.029A.1.1,0,0,1-9886.972-8352.187Z" transform="translate(9970.389 8604.079)" stroke="rgba(0,0,0,0)" stroke-width="1" fill="url(#linear-gradient)"/>
11
+ </g>
12
+ </svg>
booster/assets/images/red-info.svg ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_47798" data-name="Rectangle 47798" width="20" height="20" fill="#323a45"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Group_103076" data-name="Group 103076" transform="translate(-1064 -32)">
8
+ <path id="design_system_icons-40" data-name="design system icons-40" d="M31.5,21.5a10,10,0,1,1-10-10A10.012,10.012,0,0,1,31.5,21.5Z" transform="translate(1052.5 20.5)" fill="#fd3c31" opacity="0.3"/>
9
+ <g id="Information_Icon" transform="translate(1064 32)">
10
+ <g id="Information_Icon-2" data-name="Information_Icon" clip-path="url(#clip-path)">
11
+ <g id="Info" transform="translate(3.333 3.334)">
12
+ <path id="Path_169137" data-name="Path 169137" d="M18.167,24.833a6.682,6.682,0,0,1-6.667-6.7,6.569,6.569,0,0,1,1.946-4.685A6.487,6.487,0,0,1,18.094,11.5a6.808,6.808,0,0,1,6.739,6.666,6.613,6.613,0,0,1-6.594,6.667Z" transform="translate(-11.5 -11.5)" fill="#fd3c31"/>
13
+ </g>
14
+ <g id="Info-2" data-name="Info" transform="translate(9.135 6.361)">
15
+ <path id="Path_169137-2" data-name="Path 169137" d="M19.907,15.435a.865.865,0,1,0,.865.865h0A.9.9,0,0,0,19.907,15.435Zm0,2.667h0a.877.877,0,0,0-.865.865v2.847a.877.877,0,0,0,.865.865h0a.877.877,0,0,0,.865-.865V18.966A.877.877,0,0,0,19.907,18.1Z" transform="translate(-19.042 -15.435)" fill="#fff"/>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </svg>
booster/assets/images/reload.svg ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <svg id="Restore_Icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28" viewBox="0 0 28 28">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_47809" data-name="Rectangle 47809" width="28" height="28" fill="#323a45"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Restore_Icon-2" data-name="Restore_Icon" clip-path="url(#clip-path)">
8
+ <path id="Path_169383" data-name="Path 169383" d="M16.864,11.5h0A8.124,8.124,0,0,1,22.6,13.9a8.519,8.519,0,0,1,2.383,5.778h1.5a1.2,1.2,0,0,1,.53.267,1.02,1.02,0,0,1,.353.756.908.908,0,0,1-.265.667l-2.383,2.711a1.011,1.011,0,0,1-1.5,0L20.88,21.455a1.088,1.088,0,0,1-.132-1.333,1.116,1.116,0,0,1,.794-.444h1.368a6.049,6.049,0,0,0-5.957-6.044h0a6.182,6.182,0,0,0-6.134,6.089,6.262,6.262,0,0,0,1.721,4.311,5.923,5.923,0,0,0,4.236,1.778h.088a6.371,6.371,0,0,0,2.868-.711,1.025,1.025,0,0,1,1.412.444,1.039,1.039,0,0,1-.441,1.422,8.35,8.35,0,0,1-3.839.978h-.088A8.167,8.167,0,0,1,8.7,19.678,8.222,8.222,0,0,1,16.864,11.5Z" transform="translate(-4.033 -5.59)" fill="rgba(255,255,255,0.5)"/>
9
+ </g>
10
+ </svg>
booster/assets/images/separator.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1" height="12" viewBox="0 0 1 12">
2
+ <line id="Line_4812" data-name="Line 4812" y2="12" transform="translate(0.5)" fill="none" stroke="#e4e4e4" stroke-width="1"/>
3
+ </svg>
{images/speed → booster/assets/images}/star_grey.jpg RENAMED
File without changes
{images/speed → booster/assets/images}/success.svg RENAMED
File without changes
booster/assets/images/up_arrow_nav.svg ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <svg id="Navigation_Icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18" viewBox="0 0 18 18">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_47807" data-name="Rectangle 47807" width="18" height="18" fill="#323a45"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Navigation_Icon-2" data-name="Navigation_Icon" clip-path="url(#clip-path)">
8
+ <path id="Path_169381" data-name="Path 169381" d="M3.778.363.4,3.785A1.309,1.309,0,0,0,.275,5.528a1.28,1.28,0,0,0,1.879.1L4.415,3.333a.383.383,0,0,1,.51,0l2.23,2.26a1.267,1.267,0,0,0,1.72.129,1.321,1.321,0,0,0,.1-1.9L5.562.363A1.277,1.277,0,0,0,3.778.363Z" transform="translate(4.335 5.965)" fill="rgba(255,255,255,0.8)"/>
9
+ </g>
10
+ </svg>
{js → booster/assets/js}/circle-progress.js RENAMED
File without changes
booster/assets/js/elementor.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Adding button in Elementor edit panel navigation view */
2
+ function twb_add_elementor_button() {
3
+ window.elementor.modules.layouts.panel.pages.menu.Menu.addItem({
4
+ name: twb.title,
5
+ icon: "twb-element-menu-icon",
6
+ title: twb.title,
7
+ type: "page",
8
+ callback: () => {
9
+ try {
10
+ window.$e.route("panel/page-settings/twb_optimize")
11
+ } catch (e) {
12
+ window.$e.route("panel/page-settings/settings"), window.$e.route("panel/page-settings/twb_optimize")
13
+ }
14
+ }
15
+ }, "more")
16
+ }
17
+
18
+ jQuery(window).on("elementor:init", () => {
19
+ window.elementor.on("panel:init", () => {
20
+ setTimeout(twb_add_elementor_button)
21
+ })
22
+ });
booster/assets/js/global.js ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function () {
2
+ /* Change the CTA for pages with PG in it.*/
3
+ if (jQuery(".bwg-container").length) {
4
+ var html = '<div class="twb_admin_bar_menu_header">';
5
+ html += '<img class="twb_menu_logo" src="' + twb.plugin_url + '/assets/images/logo_white.svg" />';
6
+ html += '<div class="twb_menu_logo">Optimize Images</div>';
7
+ html += '</div>';
8
+ jQuery(".twb_admin_bar_menu").html(html).on("click", function () {
9
+ window.open(twb.href, '_blank');
10
+ });
11
+ jQuery(".twb_admin_bar_menu_main").remove();
12
+ }
13
+
14
+ /* Is score check in progress.*/
15
+ twb_inprogress = false;
16
+
17
+ /* Check if any score check is in progress.*/
18
+ jQuery(".twb-notoptimized").each(function () {
19
+ if (jQuery(this).data("status") == 'inprogress') {
20
+ /* Disable score check button.*/
21
+ twb_disable_check();
22
+ }
23
+ });
24
+
25
+ /* Add check score action to the button in page/posts list,
26
+ if there is no inprogress action.*/
27
+ jQuery(".twb-notoptimized a").on("click", function () {
28
+ if (!twb_inprogress) {
29
+ twb_check_score(this);
30
+ }
31
+ });
32
+ /* Add check score action to the reload buttons.*/
33
+ jQuery(".twb-reload").on("click", function () {
34
+ twb_check_score(this);
35
+ });
36
+
37
+ /* Add a hover action to show page score.*/
38
+ jQuery(".twb-see-score").hover(function () {
39
+ jQuery(this).parent().parent().find(".twb-score-container").removeClass("twb-hidden");
40
+ },
41
+ function () {
42
+ jQuery(this).parent().parent().find(".twb-score-container").addClass("twb-hidden");
43
+ });
44
+ jQuery(".twb-score-container:not(.twb_admin_bar_menu_content .twb-score-container), .twb-score-disabled-container").hover(function () {
45
+ jQuery(this).removeClass("twb-hidden");
46
+ },
47
+ function () {
48
+ jQuery(this).addClass("twb-hidden");
49
+ });
50
+
51
+ /* Draw circle on given scores.*/
52
+ jQuery(".twb-score-circle").each(function () {
53
+ twb_draw_score_circle(this);
54
+ });
55
+
56
+ /* Show/hide Image optimizer menu content container */
57
+ jQuery("#wp-admin-bar-twb_adminbar_info").mouseenter(function(){
58
+ jQuery(".twb_admin_bar_menu_main .twb-score-container").removeClass("twb-hidden");
59
+ jQuery(".twb_admin_bar_menu_main").removeClass("twb-hidden");
60
+ }).mouseleave(function() {
61
+ jQuery(".twb_admin_bar_menu_main").addClass("twb-hidden");
62
+ });
63
+
64
+
65
+ /* Draw circle on given scores.*/
66
+ jQuery('.twb-score-circle').each(function () {
67
+ twb_draw_score_circle(this);
68
+ });
69
+
70
+ if( jQuery(".twb_admin_bar_menu.twb_backend span").hasClass("twb_backend_optimizing_logo") ) {
71
+ /* Run ajax every 30 seconds to check if score counted */
72
+ twb_run_notif_check = setInterval( twb_run_notif_check, 30000 );
73
+ }
74
+ });
75
+
76
+ /* Run ajax to check score counting status and show notification */
77
+ function twb_run_notif_check() {
78
+ jQuery.ajax({
79
+ type: "POST",
80
+ url: twb.ajax_url,
81
+ data: {
82
+ action: "twb_notif_check",
83
+ twb_nonce: twb.nonce,
84
+ }
85
+ }).success(function (results) {
86
+ var result = jQuery.parseJSON(results);
87
+ if (result.html != "") {
88
+ /* Show notification popup and change menu icon and text from loading to Not optimised */
89
+ if ( result.changeLogo == 1 ) {
90
+ jQuery(".twb_admin_bar_menu_header span").addClass("twb_counted");
91
+ }
92
+ jQuery("#wp-admin-bar-twb_adminbar_info").append(result.html);
93
+ jQuery(".twb_admin_bar_menu_content .twb-score-container").removeClass("twb-hidden");
94
+ jQuery(".twb_admin_bar_menu_content .twb-score-container .twb-score-circle").each(function () {
95
+ twb_draw_score_circle(this);
96
+ });
97
+ clearInterval(twb_run_notif_check);
98
+ }
99
+ }).error(function () {
100
+ clearInterval(twb_run_notif_check);
101
+ });
102
+
103
+ }
104
+
105
+ function twb_disable_check() {
106
+ twb_inprogress = true;
107
+ /* Add a hover action to show disabled notification.*/
108
+ jQuery(".twb-notoptimized").hover(function () {
109
+ jQuery(this).parent().find(".twb-score-disabled-container").removeClass("twb-hidden");
110
+ },
111
+ function () {
112
+ jQuery(this).parent().find(".twb-score-disabled-container").addClass("twb-hidden");
113
+ });
114
+ }
115
+ /**
116
+ * Optimize the page.
117
+ * @param that
118
+ */
119
+ function twb_check_score(that) {
120
+ var post_id = jQuery(that).data("post_id");
121
+ var parent = jQuery(that).parent().parent();
122
+ //var parent = jQuery(that).closest(".twb-score-container").parent();
123
+ /* Class add loading near admin bar menu */
124
+ jQuery(".twb_admin_bar_menu.twb_frontend").addClass("twb_score_inprogress");
125
+
126
+ /* If the action is not called with reload button.*/
127
+ if (parent.find(".twb-optimized").hasClass("twb-hidden")) {
128
+ /* Do not show loading in list.*/
129
+ parent.find(".twb-optimizing").removeClass("twb-hidden");
130
+ }
131
+ else {
132
+ /* Show loading on reload buttons.*/
133
+ parent.find(".twb-score-overlay").removeClass("twb-hidden");
134
+ parent.find(".twb-score-overlay div").removeClass("twb-reload").addClass("twb-loader");
135
+ }
136
+
137
+ parent.find(".twb-notoptimized").addClass("twb-hidden");
138
+
139
+ /* Disable score check button.*/
140
+ twb_disable_check();
141
+
142
+ jQuery.ajax({
143
+ url: twb.ajax_url,
144
+ type: "POST",
145
+ dataType: 'json',
146
+ data: {
147
+ action: "twb_check_score",
148
+ post_id: post_id,
149
+ twb_nonce: twb.nonce
150
+ },
151
+ success: function (data) {
152
+ if (data.error) {
153
+ /* Show reload buttons on failure.*/
154
+ parent.find(".twb-score-overlay").removeClass("twb-hidden");
155
+ parent.find(".twb-score-overlay div").removeClass("twb-loader").addClass("twb-reload");
156
+ }
157
+ else {
158
+ parent.find(".twb-score-overlay").addClass("twb-hidden");
159
+ var desktop = parent.find(".twb-score-desktop").find(".twb-score-circle");
160
+ desktop.data(
161
+ {
162
+ "score": data.desktop_score,
163
+ "tti": data.desktop_tti,
164
+ });
165
+ twb_draw_score_circle(desktop);
166
+ var mobile = parent.find(".twb-score-mobile").find(".twb-score-circle");
167
+ mobile.data(
168
+ {
169
+ "score": data.mobile_score,
170
+ "tti": data.mobile_tti,
171
+ });
172
+ twb_draw_score_circle(mobile);
173
+ }
174
+ },
175
+ error: function (xhr, textStatus, errorThrown) {
176
+ /* Show reload buttons on failure.*/
177
+ parent.find(".twb-score-overlay").removeClass("twb-hidden");
178
+ parent.find(".twb-score-overlay div").removeClass("twb-loader").addClass("twb-reload");
179
+ },
180
+ complete: function (xhr, textStatus) {
181
+ /* Hide optimizing container, show See score container.*/
182
+ parent.find(".twb-optimizing").addClass("twb-hidden");
183
+ parent.find(".twb-optimized").removeClass("twb-hidden");
184
+
185
+ jQuery("#wpadminbar .twb-optimized .twb-score-container").removeClass("twb-hidden");
186
+ jQuery("#wpadminbar .twb_admin_bar_menu").removeClass("twb_score_inprogress");
187
+ jQuery("#wpadminbar .twb_menu_logo").remove();
188
+ jQuery("#wpadminbar .twb_not_optimized_logo").removeClass("twb-hidden");
189
+ jQuery("#wpadminbar .twb_admin_bar_menu_header").addClass("twb_not_optimized");
190
+
191
+ /* Remove disabled action.*/
192
+ twb_inprogress = false;
193
+ jQuery(".twb-notoptimized").hover(function () {
194
+ jQuery(this).parent().find(".twb-score-disabled-container").addClass("twb-hidden");
195
+ });
196
+ }
197
+ });
198
+ }
199
+
200
+ /**
201
+ * Draw circle on given score.
202
+ * @param that
203
+ */
204
+ function twb_draw_score_circle(that) {
205
+ var score = parseInt(jQuery(that).data('score'));
206
+ var size = parseInt(jQuery(that).data('size'));
207
+ var thickness = parseInt(jQuery(that).data('thickness'));
208
+ var color = score <= 49 ? "rgb(253, 60, 49)" : (score >= 90 ? "rgb(12, 206, 107)" : "rgb(255, 164, 0)");
209
+ jQuery(that).parent().find('.twb-load-time').html(jQuery(that).data('tti'));
210
+ var _this = that;
211
+ jQuery(_this).circleProgress({
212
+ value: score / 100,
213
+ size: size,
214
+ startAngle: -Math.PI / 4 * 2,
215
+ lineCap: 'round',
216
+ emptyFill: "rgba(255, 255, 255, 0)",
217
+ thickness: thickness,
218
+ fill: {
219
+ color: color
220
+ }
221
+ }).on('circle-animation-progress', function (event, progress) {
222
+ var content = '<span class="twb-score0"></span>';
223
+ if (score != 0) {
224
+ content = Math.round(score * progress);
225
+ }
226
+ jQuery(that).find('.twb-score-circle-animated').html(content).css({"color": color});
227
+ jQuery(that).find('canvas').html(Math.round(score * progress));
228
+ });
229
+ }
booster/assets/js/gutenberg.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const { registerPlugin } = wp.plugins;
2
+ const { __ } = wp.i18n;
3
+ const { PluginDocumentSettingPanel, PluginSidebarMoreMenuItem, PluginSidebar } = wp.editPost;
4
+ const { PanelBody, PanelRow, Icon } = wp.components;
5
+ const { compose } = wp.compose;
6
+ const { withSelect, withDispatch } = wp.data;
7
+ const { useState, Fragment, useEffect } = wp.element;
8
+
9
+ const BoosterSidebarPanel = () => {
10
+ return(
11
+ <Fragment>
12
+ <PluginSidebarMoreMenuItem>{twb.cta_button.section_label}</PluginSidebarMoreMenuItem>
13
+ <PluginSidebar
14
+ title={twb.cta_button.section_label}>
15
+ <BoosterPanelRow/>
16
+ </PluginSidebar>
17
+ </Fragment>
18
+ );
19
+ }
20
+
21
+ const BoosterSettingPanel = () => {
22
+ return(
23
+ <Fragment>
24
+ <PluginDocumentSettingPanel
25
+ title={twb.cta_button.section_label}>
26
+ <BoosterPanelRow />
27
+ </PluginDocumentSettingPanel>
28
+ </Fragment>
29
+ );
30
+ }
31
+
32
+ const BoosterPanelRow = () => {
33
+ return (
34
+ <PanelRow>
35
+ <OptimizeButton />
36
+ </PanelRow>);
37
+ }
38
+
39
+ const OptimizeButton = () => {
40
+ return (
41
+ <a href={twb.href}
42
+ target="_blank"
43
+ className={twb.cta_button.class + " twb-custom-button"}>{twb.cta_button.label}</a>
44
+ );
45
+ }
46
+
47
+ registerPlugin('booster-sidebar-panel', {
48
+ render: BoosterSidebarPanel,
49
+ icon: <svg class="twb-speed-icon" xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26">
50
+ <g id="Group_103139" data-name="Group 103139" transform="translate(0 -0.391)">
51
+ <path id="Path_171039" data-name="Path 171039"
52
+ d="M.441,38.127h0a1.445,1.445,0,0,0,2.065-.037l7.924-6.038a.131.131,0,0,0,.033-.18.126.126,0,0,0-.158-.045l-9.409,4a1.426,1.426,0,0,0-.52,2.23Z"
53
+ transform="translate(-0.028 -23.443)" fill="#fff"/>
54
+ <path id="Path_171040" data-name="Path 171040"
55
+ d="M5.434,48.088a1.443,1.443,0,0,1-2.063.039l0,0L.462,45.274l-.034-.029-.06-.063a1.427,1.427,0,0,1,.12-1.992,1.393,1.393,0,0,1,.4-.252L4.295,41.49,3.723,42a1.571,1.571,0,0,0-.163,2.191q.045.054.095.1l1.74,1.7a1.5,1.5,0,0,1,.039,2.1"
56
+ transform="translate(-0.014 -30.56)" fill="#9ea3a8"/>
57
+ <path id="Path_171041" data-name="Path 171041"
58
+ d="M69.869,43.142h0a1.445,1.445,0,0,0-2.065.037l-7.911,6.038a.131.131,0,0,0-.033.18.126.126,0,0,0,.158.045l9.4-4a1.426,1.426,0,0,0,.52-2.23Z"
59
+ transform="translate(-44.277 -31.469)" fill="#fff"/>
60
+ <path id="Path_171042" data-name="Path 171042"
61
+ d="M78,32.276a1.443,1.443,0,0,1,2.063-.039l0,0,2.907,2.851L83,35.12l.06.063a1.427,1.427,0,0,1-.12,1.992,1.393,1.393,0,0,1-.4.252l-3.407,1.448.572-.507a1.571,1.571,0,0,0,.163-2.191q-.045-.054-.095-.1l-1.742-1.7a1.5,1.5,0,0,1-.036-2.1"
62
+ transform="translate(-57.411 -23.446)" fill="#9ea3a8"/>
63
+ <path id="Path_171043" data-name="Path 171043"
64
+ d="M31.607,23.5l5.172-7.19a.126.126,0,0,0,0-.176.121.121,0,0,0-.173,0l-13.2,10.025a.131.131,0,0,0-.03.18.127.127,0,0,0,.106.055h4.143a.136.136,0,0,1,.134.139.138.138,0,0,1-.025.078L22.56,33.8a.126.126,0,0,0,0,.176.121.121,0,0,0,.173,0l13.2-10.025a.131.131,0,0,0,.03-.18.127.127,0,0,0-.106-.055H31.717a.136.136,0,0,1-.134-.139.138.138,0,0,1,.025-.078"
65
+ transform="translate(-16.668 -11.879)" fill="#9ea3a8"/>
66
+ </g>
67
+ </svg>
68
+ });
69
+ registerPlugin('booster-settings-panel', {
70
+ render: BoosterSettingPanel,
71
+ icon: ''
72
+ });
booster/assets/js/gutenberg/gutenberg-compiled.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-element'), 'version' => '806496a6e790e936bdce');
booster/assets/js/gutenberg/gutenberg-compiled.js ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
4
+
5
+ /***/ "@wordpress/element":
6
+ /*!*********************************!*\
7
+ !*** external ["wp","element"] ***!
8
+ \*********************************/
9
+ /***/ (function(module) {
10
+
11
+ module.exports = window["wp"]["element"];
12
+
13
+ /***/ })
14
+
15
+ /******/ });
16
+ /************************************************************************/
17
+ /******/ // The module cache
18
+ /******/ var __webpack_module_cache__ = {};
19
+ /******/
20
+ /******/ // The require function
21
+ /******/ function __webpack_require__(moduleId) {
22
+ /******/ // Check if module is in cache
23
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
24
+ /******/ if (cachedModule !== undefined) {
25
+ /******/ return cachedModule.exports;
26
+ /******/ }
27
+ /******/ // Create a new module (and put it into the cache)
28
+ /******/ var module = __webpack_module_cache__[moduleId] = {
29
+ /******/ // no module.id needed
30
+ /******/ // no module.loaded needed
31
+ /******/ exports: {}
32
+ /******/ };
33
+ /******/
34
+ /******/ // Execute the module function
35
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
36
+ /******/
37
+ /******/ // Return the exports of the module
38
+ /******/ return module.exports;
39
+ /******/ }
40
+ /******/
41
+ /************************************************************************/
42
+ /******/ /* webpack/runtime/compat get default export */
43
+ /******/ !function() {
44
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
45
+ /******/ __webpack_require__.n = function(module) {
46
+ /******/ var getter = module && module.__esModule ?
47
+ /******/ function() { return module['default']; } :
48
+ /******/ function() { return module; };
49
+ /******/ __webpack_require__.d(getter, { a: getter });
50
+ /******/ return getter;
51
+ /******/ };
52
+ /******/ }();
53
+ /******/
54
+ /******/ /* webpack/runtime/define property getters */
55
+ /******/ !function() {
56
+ /******/ // define getter functions for harmony exports
57
+ /******/ __webpack_require__.d = function(exports, definition) {
58
+ /******/ for(var key in definition) {
59
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
60
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
61
+ /******/ }
62
+ /******/ }
63
+ /******/ };
64
+ /******/ }();
65
+ /******/
66
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
67
+ /******/ !function() {
68
+ /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
69
+ /******/ }();
70
+ /******/
71
+ /******/ /* webpack/runtime/make namespace object */
72
+ /******/ !function() {
73
+ /******/ // define __esModule on exports
74
+ /******/ __webpack_require__.r = function(exports) {
75
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
76
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
77
+ /******/ }
78
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
79
+ /******/ };
80
+ /******/ }();
81
+ /******/
82
+ /************************************************************************/
83
+ var __webpack_exports__ = {};
84
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
85
+ !function() {
86
+ /*!*********************************!*\
87
+ !*** ../assets/js/gutenberg.js ***!
88
+ \*********************************/
89
+ __webpack_require__.r(__webpack_exports__);
90
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
91
+ /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
92
+
93
+ const {
94
+ registerPlugin
95
+ } = wp.plugins;
96
+ const {
97
+ __
98
+ } = wp.i18n;
99
+ const {
100
+ PluginDocumentSettingPanel,
101
+ PluginSidebarMoreMenuItem,
102
+ PluginSidebar
103
+ } = wp.editPost;
104
+ const {
105
+ PanelBody,
106
+ PanelRow,
107
+ Icon
108
+ } = wp.components;
109
+ const {
110
+ compose
111
+ } = wp.compose;
112
+ const {
113
+ withSelect,
114
+ withDispatch
115
+ } = wp.data;
116
+ const {
117
+ useState,
118
+ Fragment,
119
+ useEffect
120
+ } = wp.element;
121
+
122
+ const BoosterSidebarPanel = () => {
123
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PluginSidebarMoreMenuItem, null, twb.cta_button.section_label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PluginSidebar, {
124
+ title: twb.cta_button.section_label
125
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(BoosterPanelRow, null)));
126
+ };
127
+
128
+ const BoosterSettingPanel = () => {
129
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PluginDocumentSettingPanel, {
130
+ title: twb.cta_button.section_label
131
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(BoosterPanelRow, null)));
132
+ };
133
+
134
+ const BoosterPanelRow = () => {
135
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(OptimizeButton, null));
136
+ };
137
+
138
+ const OptimizeButton = () => {
139
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
140
+ href: twb.href,
141
+ target: "_blank",
142
+ className: twb.cta_button.class + " twb-custom-button"
143
+ }, twb.cta_button.label);
144
+ };
145
+
146
+ registerPlugin('booster-sidebar-panel', {
147
+ render: BoosterSidebarPanel,
148
+ icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
149
+ class: "twb-speed-icon",
150
+ xmlns: "http://www.w3.org/2000/svg",
151
+ width: "26",
152
+ height: "26",
153
+ viewBox: "0 0 26 26"
154
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
155
+ id: "Group_103139",
156
+ "data-name": "Group 103139",
157
+ transform: "translate(0 -0.391)"
158
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
159
+ id: "Path_171039",
160
+ "data-name": "Path 171039",
161
+ d: "M.441,38.127h0a1.445,1.445,0,0,0,2.065-.037l7.924-6.038a.131.131,0,0,0,.033-.18.126.126,0,0,0-.158-.045l-9.409,4a1.426,1.426,0,0,0-.52,2.23Z",
162
+ transform: "translate(-0.028 -23.443)",
163
+ fill: "#fff"
164
+ }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
165
+ id: "Path_171040",
166
+ "data-name": "Path 171040",
167
+ d: "M5.434,48.088a1.443,1.443,0,0,1-2.063.039l0,0L.462,45.274l-.034-.029-.06-.063a1.427,1.427,0,0,1,.12-1.992,1.393,1.393,0,0,1,.4-.252L4.295,41.49,3.723,42a1.571,1.571,0,0,0-.163,2.191q.045.054.095.1l1.74,1.7a1.5,1.5,0,0,1,.039,2.1",
168
+ transform: "translate(-0.014 -30.56)",
169
+ fill: "#9ea3a8"
170
+ }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
171
+ id: "Path_171041",
172
+ "data-name": "Path 171041",
173
+ d: "M69.869,43.142h0a1.445,1.445,0,0,0-2.065.037l-7.911,6.038a.131.131,0,0,0-.033.18.126.126,0,0,0,.158.045l9.4-4a1.426,1.426,0,0,0,.52-2.23Z",
174
+ transform: "translate(-44.277 -31.469)",
175
+ fill: "#fff"
176
+ }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
177
+ id: "Path_171042",
178
+ "data-name": "Path 171042",
179
+ d: "M78,32.276a1.443,1.443,0,0,1,2.063-.039l0,0,2.907,2.851L83,35.12l.06.063a1.427,1.427,0,0,1-.12,1.992,1.393,1.393,0,0,1-.4.252l-3.407,1.448.572-.507a1.571,1.571,0,0,0,.163-2.191q-.045-.054-.095-.1l-1.742-1.7a1.5,1.5,0,0,1-.036-2.1",
180
+ transform: "translate(-57.411 -23.446)",
181
+ fill: "#9ea3a8"
182
+ }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
183
+ id: "Path_171043",
184
+ "data-name": "Path 171043",
185
+ d: "M31.607,23.5l5.172-7.19a.126.126,0,0,0,0-.176.121.121,0,0,0-.173,0l-13.2,10.025a.131.131,0,0,0-.03.18.127.127,0,0,0,.106.055h4.143a.136.136,0,0,1,.134.139.138.138,0,0,1-.025.078L22.56,33.8a.126.126,0,0,0,0,.176.121.121,0,0,0,.173,0l13.2-10.025a.131.131,0,0,0,.03-.18.127.127,0,0,0-.106-.055H31.717a.136.136,0,0,1-.134-.139.138.138,0,0,1,.025-.078",
186
+ transform: "translate(-16.668 -11.879)",
187
+ fill: "#9ea3a8"
188
+ })))
189
+ });
190
+ registerPlugin('booster-settings-panel', {
191
+ render: BoosterSettingPanel,
192
+ icon: ''
193
+ });
194
+ }();
195
+ /******/ })()
196
+ ;
197
+ //# sourceMappingURL=gutenberg-compiled.js.map
booster/assets/js/gutenberg/gutenberg-compiled.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"gutenberg-compiled.js","mappings":";;;;;;;;;;AAAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;ACNA,MAAM;EAAEA;AAAF,IAAqBC,EAAE,CAACC,OAA9B;AACA,MAAM;EAAEC;AAAF,IAASF,EAAE,CAACG,IAAlB;AACA,MAAM;EAAEC,0BAAF;EAA8BC,yBAA9B;EAAyDC;AAAzD,IAA2EN,EAAE,CAACO,QAApF;AACA,MAAM;EAAEC,SAAF;EAAaC,QAAb;EAAuBC;AAAvB,IAAgCV,EAAE,CAACW,UAAzC;AACA,MAAM;EAAEC;AAAF,IAAcZ,EAAE,CAACY,OAAvB;AACA,MAAM;EAAEC,UAAF;EAAcC;AAAd,IAA+Bd,EAAE,CAACe,IAAxC;AACA,MAAM;EAAEC,QAAF;EAAYC,QAAZ;EAAsBC;AAAtB,IAAoClB,EAAE,CAACmB,OAA7C;;AAEA,MAAMC,mBAAmB,GAAG,MAAM;EAChC,OACE,kEAAC,QAAD,QACE,kEAAC,yBAAD,QAA4BC,GAAG,CAACC,UAAJ,CAAeC,aAA3C,CADF,EAEE,kEAAC,aAAD;IACE,KAAK,EAAEF,GAAG,CAACC,UAAJ,CAAeC;EADxB,GAEE,kEAAC,eAAD,OAFF,CAFF,CADF;AASD,CAVD;;AAYA,MAAMC,mBAAmB,GAAG,MAAM;EAChC,OACE,kEAAC,QAAD,QACE,kEAAC,0BAAD;IACE,KAAK,EAAEH,GAAG,CAACC,UAAJ,CAAeC;EADxB,GAEE,kEAAC,eAAD,OAFF,CADF,CADF;AAQD,CATD;;AAWA,MAAME,eAAe,GAAG,MAAM;EAC5B,OACE,kEAAC,QAAD,QACE,kEAAC,cAAD,OADF,CADF;AAID,CALD;;AAOA,MAAMC,cAAc,GAAG,MAAM;EAC3B,OACE;IAAG,IAAI,EAAEL,GAAG,CAACM,IAAb;IACG,MAAM,EAAC,QADV;IAEG,SAAS,EAAEN,GAAG,CAACC,UAAJ,CAAeM,KAAf,GAAuB;EAFrC,GAE4DP,GAAG,CAACC,UAAJ,CAAeO,KAF3E,CADF;AAKD,CAND;;AAQA9B,cAAc,CAAC,uBAAD,EAA0B;EACtC+B,MAAM,EAAEV,mBAD8B;EAEtCW,IAAI,EAAE;IAAK,KAAK,EAAC,gBAAX;IAA4B,KAAK,EAAC,4BAAlC;IAA+D,KAAK,EAAC,IAArE;IAA0E,MAAM,EAAC,IAAjF;IAAsF,OAAO,EAAC;EAA9F,GACJ;IAAG,EAAE,EAAC,cAAN;IAAqB,aAAU,cAA/B;IAA8C,SAAS,EAAC;EAAxD,GACE;IAAM,EAAE,EAAC,aAAT;IAAuB,aAAU,aAAjC;IACM,CAAC,EAAC,8IADR;IAEM,SAAS,EAAC,2BAFhB;IAE4C,IAAI,EAAC;EAFjD,EADF,EAIE;IAAM,EAAE,EAAC,aAAT;IAAuB,aAAU,aAAjC;IACM,CAAC,EAAC,sOADR;IAEM,SAAS,EAAC,0BAFhB;IAE2C,IAAI,EAAC;EAFhD,EAJF,EAOE;IAAM,EAAE,EAAC,aAAT;IAAuB,aAAU,aAAjC;IACM,CAAC,EAAC,2IADR;IAEM,SAAS,EAAC,4BAFhB;IAE6C,IAAI,EAAC;EAFlD,EAPF,EAUE;IAAM,EAAE,EAAC,aAAT;IAAuB,aAAU,aAAjC;IACM,CAAC,EAAC,uOADR;IAEM,SAAS,EAAC,4BAFhB;IAE6C,IAAI,EAAC;EAFlD,EAVF,EAaE;IAAM,EAAE,EAAC,aAAT;IAAuB,aAAU,aAAjC;IACM,CAAC,EAAC,4VADR;IAEM,SAAS,EAAC,4BAFhB;IAE6C,IAAI,EAAC;EAFlD,EAbF,CADI;AAFgC,CAA1B,CAAd;AAsBAhC,cAAc,CAAC,wBAAD,EAA2B;EACvC+B,MAAM,EAAEN,mBAD+B;EAEvCO,IAAI,EAAE;AAFiC,CAA3B,CAAd,C","sources":["webpack:///external window [\"wp\",\"element\"]","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///../assets/js/gutenberg.js"],"sourcesContent":["module.exports = window[\"wp\"][\"element\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const { registerPlugin } = wp.plugins;\r\nconst { __ } = wp.i18n;\r\nconst { PluginDocumentSettingPanel, PluginSidebarMoreMenuItem, PluginSidebar } = wp.editPost;\r\nconst { PanelBody, PanelRow, Icon } = wp.components;\r\nconst { compose } = wp.compose;\r\nconst { withSelect, withDispatch } = wp.data;\r\nconst { useState, Fragment, useEffect } = wp.element;\r\n\r\nconst BoosterSidebarPanel = () => {\r\n return(\r\n <Fragment>\r\n <PluginSidebarMoreMenuItem>{twb.cta_button.section_label}</PluginSidebarMoreMenuItem>\r\n <PluginSidebar\r\n title={twb.cta_button.section_label}>\r\n <BoosterPanelRow/>\r\n </PluginSidebar>\r\n </Fragment>\r\n );\r\n}\r\n\r\nconst BoosterSettingPanel = () => {\r\n return(\r\n <Fragment>\r\n <PluginDocumentSettingPanel\r\n title={twb.cta_button.section_label}>\r\n <BoosterPanelRow />\r\n </PluginDocumentSettingPanel>\r\n </Fragment>\r\n );\r\n}\r\n\r\nconst BoosterPanelRow = () => {\r\n return (\r\n <PanelRow>\r\n <OptimizeButton />\r\n </PanelRow>);\r\n}\r\n\r\nconst OptimizeButton = () => {\r\n return (\r\n <a href={twb.href}\r\n target=\"_blank\"\r\n className={twb.cta_button.class + \" twb-custom-button\"}>{twb.cta_button.label}</a>\r\n );\r\n}\r\n\r\nregisterPlugin('booster-sidebar-panel', {\r\n render: BoosterSidebarPanel,\r\n icon: <svg class=\"twb-speed-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"26\" height=\"26\" viewBox=\"0 0 26 26\">\r\n <g id=\"Group_103139\" data-name=\"Group 103139\" transform=\"translate(0 -0.391)\">\r\n <path id=\"Path_171039\" data-name=\"Path 171039\"\r\n d=\"M.441,38.127h0a1.445,1.445,0,0,0,2.065-.037l7.924-6.038a.131.131,0,0,0,.033-.18.126.126,0,0,0-.158-.045l-9.409,4a1.426,1.426,0,0,0-.52,2.23Z\"\r\n transform=\"translate(-0.028 -23.443)\" fill=\"#fff\"/>\r\n <path id=\"Path_171040\" data-name=\"Path 171040\"\r\n d=\"M5.434,48.088a1.443,1.443,0,0,1-2.063.039l0,0L.462,45.274l-.034-.029-.06-.063a1.427,1.427,0,0,1,.12-1.992,1.393,1.393,0,0,1,.4-.252L4.295,41.49,3.723,42a1.571,1.571,0,0,0-.163,2.191q.045.054.095.1l1.74,1.7a1.5,1.5,0,0,1,.039,2.1\"\r\n transform=\"translate(-0.014 -30.56)\" fill=\"#9ea3a8\"/>\r\n <path id=\"Path_171041\" data-name=\"Path 171041\"\r\n d=\"M69.869,43.142h0a1.445,1.445,0,0,0-2.065.037l-7.911,6.038a.131.131,0,0,0-.033.18.126.126,0,0,0,.158.045l9.4-4a1.426,1.426,0,0,0,.52-2.23Z\"\r\n transform=\"translate(-44.277 -31.469)\" fill=\"#fff\"/>\r\n <path id=\"Path_171042\" data-name=\"Path 171042\"\r\n d=\"M78,32.276a1.443,1.443,0,0,1,2.063-.039l0,0,2.907,2.851L83,35.12l.06.063a1.427,1.427,0,0,1-.12,1.992,1.393,1.393,0,0,1-.4.252l-3.407,1.448.572-.507a1.571,1.571,0,0,0,.163-2.191q-.045-.054-.095-.1l-1.742-1.7a1.5,1.5,0,0,1-.036-2.1\"\r\n transform=\"translate(-57.411 -23.446)\" fill=\"#9ea3a8\"/>\r\n <path id=\"Path_171043\" data-name=\"Path 171043\"\r\n d=\"M31.607,23.5l5.172-7.19a.126.126,0,0,0,0-.176.121.121,0,0,0-.173,0l-13.2,10.025a.131.131,0,0,0-.03.18.127.127,0,0,0,.106.055h4.143a.136.136,0,0,1,.134.139.138.138,0,0,1-.025.078L22.56,33.8a.126.126,0,0,0,0,.176.121.121,0,0,0,.173,0l13.2-10.025a.131.131,0,0,0,.03-.18.127.127,0,0,0-.106-.055H31.717a.136.136,0,0,1-.134-.139.138.138,0,0,1,.025-.078\"\r\n transform=\"translate(-16.668 -11.879)\" fill=\"#9ea3a8\"/>\r\n </g>\r\n </svg>\r\n});\r\nregisterPlugin('booster-settings-panel', {\r\n render: BoosterSettingPanel,\r\n icon: ''\r\n});"],"names":["registerPlugin","wp","plugins","__","i18n","PluginDocumentSettingPanel","PluginSidebarMoreMenuItem","PluginSidebar","editPost","PanelBody","PanelRow","Icon","components","compose","withSelect","withDispatch","data","useState","Fragment","useEffect","element","BoosterSidebarPanel","twb","cta_button","section_label","BoosterSettingPanel","BoosterPanelRow","OptimizeButton","href","class","label","render","icon"],"sourceRoot":""}
booster/assets/js/speed.js ADDED
@@ -0,0 +1,425 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function () {
2
+ jQuery(".twb-analyze-input-button").on("click", function () {
3
+ if ( !jQuery(this).hasClass("twb-disable-analyze") ) {
4
+ twb_get_google_score(this, '', '');
5
+ }
6
+ });
7
+
8
+ jQuery(document).on('change', '.twb-analyze-input', function () {
9
+ analize_input_change();
10
+ });
11
+
12
+ /* If there is no score of home page run google score and get homepage score */
13
+ if ( twb.home_speed_status === '0' ) {
14
+ twb_get_google_score('', twb.home_url, '');
15
+ }
16
+ else {
17
+ /* Draw score circle if it is Speed Optimization page */
18
+ if( jQuery(".twb-analyze-desktop-score .speed_circle").length > 0 ) {
19
+ if (typeof twb.home_speed_status.desktop_score != "undefined") {
20
+ draw_score_circle(twb.home_speed_status.desktop_score, twb.home_speed_status.mobile_score);
21
+ }
22
+ }
23
+ }
24
+
25
+ get_total_size_of_images();
26
+ if ( twb.compressed_pages_status === "0" ) {
27
+ set_compressed_pages();
28
+ }
29
+ });
30
+
31
+ /* Count total size of images. */
32
+ function set_compressed_pages() {
33
+ jQuery.ajax( {
34
+ url: ajaxurl,
35
+ type: "POST",
36
+ data: {
37
+ action: "twb",
38
+ task: "set_compressed_pages",
39
+ speed_ajax_nonce: twb.speed_ajax_nonce
40
+ },
41
+ success: function ( result ) {
42
+ },
43
+ });
44
+ }
45
+
46
+ /* Count total size of images. */
47
+ function get_total_size_of_images() {
48
+ jQuery.ajax( {
49
+ url: ajaxurl,
50
+ type: "POST",
51
+ data: {
52
+ action: "twb",
53
+ task: "get_total_size_of_images",
54
+ speed_ajax_nonce: twb.speed_ajax_nonce
55
+ },
56
+ success: function ( result ) {
57
+ if( isValidJSONString(result) ) {
58
+ var data = JSON.parse(result);
59
+ jQuery(".twb-total_size_value").text(data.size);
60
+ }
61
+ },
62
+ });
63
+ }
64
+
65
+ function analize_input_change() {
66
+ var twb_analyze_input = jQuery(".twb-analyze-input");
67
+ twb_analyze_input.removeClass("twb-analyze-input-error");
68
+ jQuery(".twb-analyze-input-button").removeClass("twb-disable-analyze");
69
+ jQuery(".twb-analyze-input-container .twb-error-msg").remove();
70
+ var domain = twb.home_url.replace(/^https?:\/\/|www./g, '');
71
+ var url = twb_analyze_input.val();
72
+ var page_public = twb_analyze_input.data('page-public');
73
+
74
+ var error = false;
75
+ var error_msg = '';
76
+ if( url == '' ) {
77
+ error = true;
78
+ error_msg = twb.enter_page_url;
79
+ }
80
+ else if ( !isUrlValid(url) ) {
81
+ error = true;
82
+ error_msg = twb.wrong_url;
83
+ }
84
+ else if ( !url.includes(domain) ) {
85
+ error = true;
86
+ error_msg = twb.wrong_domain_url;
87
+ }
88
+ else if ( page_public === 0 ) {
89
+ error = true;
90
+ error_msg = twb.page_is_not_public;
91
+ }
92
+
93
+
94
+ if ( error === true ) {
95
+ jQuery(".twb-analyze-input-button").addClass("twb-disable-analyze");
96
+ jQuery(".twb-analyze-input").addClass("twb-analyze-input-error");
97
+ jQuery(".twb-analyze-input").after('<p class="twb-error-msg">' + error_msg + '</p>');
98
+ }
99
+
100
+ }
101
+
102
+ /**
103
+ * Install/activate the plugin.
104
+ *
105
+ * @param that object
106
+ */
107
+ function twb_install_plugin( that ) {
108
+ if ( jQuery(that).hasClass("twb-disable-link") ) {
109
+ return false;
110
+ }
111
+ jQuery(that).addClass('twb-disable-link');
112
+ jQuery(that).html('<div class="speed-loader-blue"></div>');
113
+ jQuery.ajax( {
114
+ url: ajaxurl,
115
+ type: "POST",
116
+ dataType: "text",
117
+ data: {
118
+ action: "twb",
119
+ task: "install_booster",
120
+ speed_ajax_nonce: twb.speed_ajax_nonce
121
+ },
122
+ success: function ( data ) {
123
+ jQuery(".twb-speed-header").html(data).find(".wrap").remove();;
124
+ }
125
+ });
126
+ }
127
+
128
+ /**
129
+ * Run ajax action and Sign Up to dashboard
130
+ *
131
+ * @param that object
132
+ */
133
+ function twb_sign_up_dashboard( that ) {
134
+ if ( jQuery(that).hasClass("twb-disable-link") ) {
135
+ return false;
136
+ }
137
+
138
+ var email_input = jQuery(that).parent().parent().find(".twb-sign-up-input");
139
+ var parent_slug = jQuery(that).data("parent_slug");
140
+ var slug = jQuery(that).data("slug");
141
+ var is_plugin = jQuery(that).data("is_plugin");
142
+
143
+ jQuery(".twb-error-msg").remove();
144
+ email_input.removeClass("twb-input-error");
145
+ jQuery(that).addClass('twb-disable-link');
146
+ jQuery(that).html('<div class="speed-loader-blue"></div>');
147
+
148
+ var email = email_input.val();
149
+ if (email === '') {
150
+ email_input.after('<p class="twb-error-msg">' + twb.empty_email + '</p>');
151
+ email_input.addClass("twb-input-error");
152
+ jQuery(that).text(twb.sign_up);
153
+ jQuery(that).removeClass('twb-disable-link');
154
+ return;
155
+ }
156
+ if (!isEmail(email)) {
157
+ email_input.after('<p class="twb-error-msg">' + twb.wrong_email + '</p>');
158
+ email_input.addClass("twb-input-error");
159
+ jQuery(that).text(twb.sign_up);
160
+ jQuery(that).removeClass('twb-disable-link');
161
+ return;
162
+ }
163
+ jQuery.ajax( {
164
+ url: ajaxurl,
165
+ type: "POST",
166
+ dataType: "text",
167
+ data: {
168
+ action: "twb",
169
+ task: "sign_up_dashboard",
170
+ twb_email: email,
171
+ parent_slug: parent_slug,
172
+ slug: slug,
173
+ is_plugin: is_plugin,
174
+ speed_ajax_nonce: twb.speed_ajax_nonce
175
+ },
176
+ success: function (result) {
177
+ if ( !isValidJSONString(result) ) {
178
+ jQuery(that).text(twb.sign_up);
179
+ jQuery(that).removeClass('twb-disable-link');
180
+ email_input.after('<p class="twb-error-msg">' + twb.something_wrong + '</p>');
181
+ return;
182
+ }
183
+ var data = JSON.parse(result);
184
+ if ( data['status'] === 'success' ) {
185
+ window.location.href = data['booster_connect_url'];
186
+ }
187
+ else {
188
+ jQuery(that).text(twb.sign_up);
189
+ jQuery(that).removeClass('twb-disable-link');
190
+ email_input.after('<p class="twb-error-msg">' + twb.something_wrong + '</p>');
191
+ return;
192
+ }
193
+ },
194
+ error: function (xhr) {
195
+ jQuery(that).text(twb.sign_up);
196
+ jQuery(that).removeClass('twb-disable-link');
197
+ email_input.after('<p class="twb-error-msg">' + twb.something_wrong + '</p>');
198
+ }
199
+ });
200
+ }
201
+
202
+ function twb_connect_to_dashboard( that ) {
203
+ if ( jQuery(that).hasClass("twb-disable-link") ) {
204
+ return false;
205
+ }
206
+
207
+ jQuery.ajax( {
208
+ url: ajaxurl,
209
+ type: "POST",
210
+ data: {
211
+ action: "twb",
212
+ task: "connect_to_dashboard",
213
+ speed_ajax_nonce: twb.speed_ajax_nonce
214
+ },
215
+ success: function ( result ) {
216
+ if ( !isValidJSONString(result) ) {
217
+ jQuery(that).text(twb.connect);
218
+ jQuery(that).removeClass('twb-disable-link');
219
+ return;
220
+ }
221
+ var data = JSON.parse(result);
222
+ if ( data['status'] === 'success' ) {
223
+ window.location.href = data['booster_connect_url'];
224
+ } else {
225
+ jQuery(that).text(twb.connect);
226
+ jQuery(that).removeClass('twb-disable-link');
227
+ return;
228
+ }
229
+ },
230
+ error: function ( xhr ) {
231
+ jQuery(that).text(twb.connect);
232
+ jQuery(that).removeClass('twb-disable-link');
233
+ }
234
+ });
235
+ }
236
+
237
+ /**
238
+ * Drawing score circle in different colors
239
+ *
240
+ * @param desktop_score int score value of desktop
241
+ * @param mobile_score int score value of desktop
242
+ */
243
+ function draw_score_circle( desktop_score, mobile_score ) {
244
+ var d = desktop_score;
245
+ var m = mobile_score;
246
+ var color_desktop = d <= 49 ? "rgb(253, 60, 49)" : (d >= 90 ? "rgb(12, 206, 107)" : "rgb(255, 164, 0)");
247
+ var color_mobile = m <= 49 ? "rgb(253, 60, 49)" : (m >= 90 ? "rgb(12, 206, 107)" : "rgb(255, 164, 0)");
248
+ var bg_color_desktop = d <= 49 ? "rgb(253, 60, 49, 0.1)" : (d >= 90 ? "rgb(12, 206, 107, 0.1)" : "rgb(255, 164, 0, 0.1)");
249
+ var bg_color_mobile = m <= 49 ? "rgb(253, 60, 49, 0.1)" : (m >= 90 ? "rgb(12, 206, 107, 0.1)" : "rgb(255, 164, 0, 0.1)");
250
+
251
+ jQuery('.speed_circle').each(function () {
252
+ var _this = this;
253
+ var val = desktop_score / 100;
254
+ var num = d;
255
+ var color = color_desktop;
256
+ var bg_color = bg_color_desktop;
257
+ if ( jQuery(this).data("id") === "mobile" ) {
258
+ val = mobile_score / 100;
259
+ num = m;
260
+ color = color_mobile;
261
+ bg_color = bg_color_mobile;
262
+ }
263
+ jQuery(_this).circleProgress({
264
+ value: val,
265
+ size: 78,
266
+ startAngle: -Math.PI / 4 * 2,
267
+ lineCap: 'round',
268
+ emptyFill: "rgba(255, 255, 255, 0)",
269
+ fill: {
270
+ color: color
271
+ }
272
+ }).on('circle-animation-progress', function ( event, progress ) {
273
+ jQuery(this).find('.circle_animated').html(Math.round(parseFloat(num) * progress)).css({"color": color});
274
+ jQuery(this).find('canvas').html(Math.round(parseFloat(num) * progress)).css({ "background": bg_color });
275
+ });
276
+ });
277
+ }
278
+
279
+ /**
280
+ * Run ajax action and count google score.
281
+ *
282
+ * @param that object
283
+ * @param url string
284
+ * @param last_api_key_index int/empty last index of array where keeped google api keys
285
+ */
286
+ function twb_get_google_score( that, url, last_api_key_index ) {
287
+ jQuery(".twb-error-msg").remove();
288
+ if (url === '') {
289
+ if (jQuery(that).hasClass("twb-disable-link")) {
290
+ return false;
291
+ }
292
+ jQuery(that).addClass('twb-disable-analyze');
293
+ jQuery(that).html('<div class="speed-loader-grey"></div>');
294
+ url = jQuery(".twb-analyze-input").val();
295
+ }
296
+
297
+ if (!isUrlValid(url)) {
298
+ jQuery(".twb-analyze-input").after('<p class="twb-error-msg">' + twb.wrong_url + '</p>');
299
+ jQuery(".twb-analyze-input-button").removeClass('twb-disable-analyze');
300
+ jQuery(".twb-analyze-input-button").text(twb.analyze_button_text);
301
+ return;
302
+ }
303
+ if ( jQuery(".speed_circle_loader").length === 0 ) {
304
+ jQuery(".speed_circle").after("<div class='speed_circle_loader'></div>");
305
+ }
306
+ jQuery(".speed_circle").addClass("twb-hidden");
307
+ jQuery(".twb-load-time-mobile span").text("-");
308
+ jQuery(".twb-load-time-desktop span").text("-");
309
+ jQuery.ajax({
310
+ url: ajaxurl,
311
+ type: "POST",
312
+ data: {
313
+ action: "twb",
314
+ task: "get_google_page_speed",
315
+ last_api_key_index: last_api_key_index,
316
+ twb_url: url,
317
+ speed_ajax_nonce: twb.speed_ajax_nonce
318
+ },
319
+ success: function (result) {
320
+ if( !isValidJSONString(result) ) {
321
+ google_speed_error_result('');
322
+ return;
323
+ } else {
324
+ var data = JSON.parse(result);
325
+ if ( data['error'] === 1 ) {
326
+ if ( typeof data['last_api_key_index'] !== 'undefined' ) {
327
+ twb_get_google_score(that, home_url, data['last_api_key_index'] );
328
+ return;
329
+ }
330
+ var msg = '';
331
+ if( typeof data['msg'] !== 'undefined') {
332
+ msg = data['msg'];
333
+ }
334
+ google_speed_error_result(msg);
335
+ return;
336
+ }
337
+ }
338
+
339
+ jQuery(".speed_circle_loader").remove();
340
+ jQuery(".speed_circle").removeClass("twb-hidden");
341
+ draw_score_circle(data['desktop_score'], data['mobile_score']);
342
+ jQuery(".twb-last-analyzed-page").text(url);
343
+ jQuery(".twb-last-analyzed-date").text(data['last_analyzed_time']);
344
+ jQuery(".twb-load-time-mobile span").text(data['mobile_loading_time']);
345
+ jQuery(".twb-load-time-desktop span").text(data['desktop_loading_time']);
346
+ },
347
+ error: function (xhr) {
348
+ google_speed_error_result('');
349
+ },
350
+ complete: function () {
351
+ jQuery('.twb-analyze-input-button.twb-disable-analyze').removeClass('twb-disable-analyze');
352
+ jQuery('.twb-analyze-input-button').text(twb.analyze_button_text);
353
+ }
354
+ });
355
+ }
356
+
357
+ /* Case when counting of score returns error. */
358
+ function google_speed_error_result( msg ) {
359
+ if ( msg !== '' ) {
360
+ twb.something_wrong = msg;
361
+ }
362
+ jQuery(".twb-analyze-input").after('<p class="twb-error-msg">' + twb.something_wrong + '</p>');
363
+ jQuery('.twb-analyze-input-button.twb-disable-analyze').removeClass('twb-disable-analyze');
364
+ jQuery('.twb-analyze-input-button').text(twb.analyze_button_text);
365
+ jQuery(".speed_circle_loader").remove();
366
+ jQuery(".speed_circle").removeClass("twb-hidden");
367
+ }
368
+
369
+ /**
370
+ * Check if value is email
371
+ *
372
+ * @param email string
373
+ *
374
+ * @return bool
375
+ */
376
+ function isEmail( email ) {
377
+ var EmailRegex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
378
+ return EmailRegex.test(email);
379
+ }
380
+
381
+ /**
382
+ * Check if value is URL
383
+ *
384
+ * @param url string
385
+ *
386
+ * @return bool
387
+ */
388
+ function isUrlValid(url) {
389
+ if (typeof url == 'undefined' || url == '') {
390
+ return false;
391
+ }
392
+ if ( url.indexOf("http") !== 0 && url.indexOf("www.") !== 0) {
393
+ return false;
394
+ }
395
+ regexp = /^(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/;
396
+ if (regexp.test(url)) {
397
+ return true;
398
+ } else {
399
+ return false;
400
+ }
401
+ }
402
+
403
+ /**
404
+ * Check if data is valid json
405
+ *
406
+ * @param str string
407
+ *
408
+ * @return bool
409
+ */
410
+ function isValidJSONString(str) {
411
+ try {
412
+ JSON.parse(str);
413
+ } catch (e) {
414
+ return false;
415
+ }
416
+ return true;
417
+ }
418
+
419
+ //var twb_leaving_popup = false;
420
+
421
+ //jQuery(".twb-speed-body").parents(".wrap").mouseleave(function () {
422
+ // if (twb_leaving_popup == false && jQuery(".twb-sign-up-input").is(":visible")) {
423
+ // jQuery(".twb-popup-overlay").removeClass("twb-hidden");
424
+ // }
425
+ //});
booster/controller.php ADDED
@@ -0,0 +1,611 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class SpeedController_twb
5
+ */
6
+ class BoosterController {
7
+ private $booster;
8
+ private $model;
9
+ private $view;
10
+
11
+ const PlUGIN_FILE = 'tenweb-speed-optimizer/tenweb_speed_optimizer.php';
12
+
13
+ const PLUGIN_ZIP = 'https://downloads.wordpress.org/plugin/tenweb-speed-optimizer.latest-stable.zip';
14
+
15
+ private $google_api_keys = array(
16
+ 'AIzaSyCQmF4ZSbZB8prjxci3GWVK4UWc-Yv7vbw',
17
+ 'AIzaSyAgXPc9Yp0auiap8L6BsHWoSVzkSYgHdrs',
18
+ 'AIzaSyCftPiteYkBsC2hamGbGax5D9JQ4CzexPU',
19
+ 'AIzaSyC-6oKLqdvufJnysAxd0O56VgZrCgyNMHg',
20
+ 'AIzaSyB1QHYGZZ6JIuUUce4VyBt5gF_-LwI5Xsk'
21
+ );
22
+
23
+ public function __construct($booster) {
24
+ $this->booster = $booster;
25
+ }
26
+
27
+ /**
28
+ * Execute.
29
+ */
30
+ public function execute($task = '', $params = array()) {
31
+ require_once($this->booster->plugin_dir . '/model.php');
32
+ $this->model = new BoosterModel();
33
+ require_once($this->booster->plugin_dir . '/view.php');
34
+ $this->view = new BoosterView();
35
+ if ( !$task ) {
36
+ $task = isset($_GET['task']) ? sanitize_text_field($_GET['task']) : (isset($_POST['task']) ? sanitize_text_field($_POST['task']) : '');
37
+ }
38
+ if ( $task != 'display' && method_exists($this, $task) ) {
39
+ $this->$task($params);
40
+ }
41
+ else {
42
+ $this->display();
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Display.
48
+ */
49
+ public function display() {
50
+ $params = array();
51
+ $params['submenu_section_optimize_images'] = $this->booster->page['section_optimize_images'];
52
+ $params['section_booster_title'] = $this->booster->page['section_booster_title'];
53
+ $params['section_booster_desc'] = $this->booster->page['section_booster_desc'];
54
+ $params['section_booster_success_title'] = $this->booster->page['section_booster_success_title'];
55
+ $params['section_booster_success_desc'] = $this->booster->page['section_booster_success_desc'];
56
+ $params['section_analyze_desc'] = $this->booster->page['section_analyze_desc'];
57
+ $params['submenu_section_analyze'] = $this->booster->page['section_analyze'];
58
+ $params['booster_plugin_status'] = $this->booster->booster_plugin_status;
59
+ $params['status'] = $this->booster->status;
60
+ $params['booster_is_connected'] = $this->booster->booster_is_connected;
61
+ $params['tenweb_is_paid'] = $this->booster->is_paid;
62
+ $params['is_plugin'] = $this->booster->is_plugin;
63
+ $params['submenu_parent_slug'] = $this->booster->submenu['parent_slug'];
64
+ $params['slug'] = $this->booster->slug;
65
+
66
+ $params['images_count'] = $this->get_images_count();
67
+ $params['images_total_size'] = get_option('twb_images_total_size', '0 KB');
68
+
69
+ $params['page_is_public'] = TRUE;
70
+
71
+ $twb_speed_score = get_option('twb_speed_score');
72
+ $data = array(
73
+ 'url' => get_home_url(),
74
+ 'desktop_score' => 0,
75
+ 'desktop_loading_time' => 0,
76
+ 'mobile_score' => 0,
77
+ 'mobile_loading_time' => 0,
78
+ 'last_analyzed_time' => '',
79
+ );
80
+ if ( !empty($twb_speed_score) && !empty($twb_speed_score['last']) && !empty($twb_speed_score['last']['url']) ) {
81
+ $last_url = $twb_speed_score['last']['url'];
82
+ if ( !empty($twb_speed_score[$last_url]['desktop_score'])
83
+ && !empty($twb_speed_score[$last_url]['desktop_loading_time'])
84
+ && !empty($twb_speed_score[$last_url]['mobile_score'])
85
+ && !empty($twb_speed_score[$last_url]['mobile_loading_time'])
86
+ && !empty($twb_speed_score[$last_url]['last_analyzed_time']) ) {
87
+ $data = array(
88
+ 'url' => $last_url,
89
+ 'desktop_score' => $twb_speed_score[$last_url]['desktop_score'],
90
+ 'desktop_loading_time' => $twb_speed_score[$last_url]['desktop_loading_time'],
91
+ 'mobile_score' => $twb_speed_score[$last_url]['mobile_score'],
92
+ 'mobile_loading_time' => $twb_speed_score[$last_url]['mobile_loading_time'],
93
+ 'last_analyzed_time' => $twb_speed_score[$last_url]['last_analyzed_time'],
94
+ );
95
+ }
96
+ }
97
+
98
+ $params['twb_speed_score'] = $data;
99
+ $domain_id = get_site_option('tenweb_domain_id');
100
+ $params['dashboard_booster_url'] = '';
101
+ if ( defined("TENWEB_DASHBOARD") && !empty($domain_id) ) {
102
+ $params['dashboard_booster_url'] = trim(TENWEB_DASHBOARD, '/') . '/websites/' . $domain_id . '/booster/frontend';
103
+ }
104
+
105
+ $params['pages_compressed'] = $this->get_pages_compressed($params);
106
+
107
+ $this->view->display($params);
108
+ }
109
+
110
+ /**
111
+ * Run function as ajax action and keep optimized images data in DB option
112
+ * Endpoint work once a day to prevent page loading time
113
+ */
114
+ public function set_compressed_pages() {
115
+ $twb_optimized_pages = get_transient("twb_optimized_pages");
116
+
117
+ if ( !empty($twb_optimized_pages) || !defined('TENWEBIO_MANAGER_PREFIX') ) {
118
+ die;
119
+ }
120
+
121
+ $workspace_id = (int) get_site_option(TENWEBIO_MANAGER_PREFIX . '_workspace_id', 0);
122
+ $domain_id = (int) get_option(TENWEBIO_MANAGER_PREFIX . '_domain_id', 0);
123
+ if ( $this->booster->booster_is_connected ||
124
+ $this->booster->is_paid ||
125
+ $workspace_id == 0 ||
126
+ $domain_id == 0 ||
127
+ !defined('TENWEBIO_API_URL')) {
128
+ die;
129
+ }
130
+
131
+ $url = TENWEBIO_API_URL . "/compress/workspaces/" . $workspace_id . "/domains/" . $domain_id."/stat";
132
+ $access_token = get_site_option('tenweb_access_token');
133
+
134
+ $args = array(
135
+ 'timeout' => 50,
136
+ 'headers' => array(
137
+ "accept" => "application/x.10weboptimizer.v3+json",
138
+ "authorization" => "Bearer " . $access_token,
139
+ ),
140
+ );
141
+ $response = wp_remote_get($url, $args);
142
+ if ( is_array($response) && !is_wp_error($response) ) {
143
+ $body = json_decode( $response['body'], 1 );
144
+ if ( isset($body['status']) && $body['status'] == 200 ) {
145
+ $data = $body['data'];
146
+ $total_not_compressed_images_size = isset($data['not_compressed']['total_size']) ? $data['not_compressed']['total_size'] : 0;
147
+ $total_not_compressed_images_size = TWBLibrary::formatBytes($total_not_compressed_images_size);
148
+ $total_not_compressed_images_count = intval($data['not_compressed']['full'] + $data['not_compressed']['thumbs'] + $data['not_compressed']['other']);
149
+
150
+ $pages_compressed_api = $data['pages_compressed'];
151
+
152
+ $twb_optimized_pages = \TenWebOptimizer\OptimizerUtils::getCriticalPages();
153
+
154
+ $total_compressed_images = 0;
155
+ $i = 0;
156
+ /* Adding new pages which are optimized but haven't images and endpoint doesn't have that pages in response */
157
+ foreach ( $twb_optimized_pages as $page_id => $val ) {
158
+ /* Permalink text for front_page should be Homepage */
159
+ $pages_compressed[$i]['page_id'] = $page_id;
160
+ if( $page_id == 'front_page' ) {
161
+ $pages_compressed[$i]['permalink'] = 'Homepage';
162
+ } else {
163
+ $pages_compressed[$i]['permalink'] = $val['url'];
164
+ }
165
+
166
+ /* Finding value with page_id key in the array from endpoint to get images_count */
167
+ $found = current(array_filter($pages_compressed_api, function($item) use($page_id) {
168
+ return isset($item['page_id']) && $page_id == $item['page_id'];
169
+ }));
170
+
171
+ if( !empty($found) ) {
172
+ $pages_compressed[$i]['images_count'] = $found['images_count'];
173
+ $total_compressed_images += $found['images_count'];
174
+ } else {
175
+ $pages_compressed[$i]['images_count'] = 0;
176
+ }
177
+ $i++;
178
+ }
179
+
180
+ $data['pages'] = $pages_compressed;
181
+ $data['compressed_pages_count'] = count($pages_compressed);
182
+ $data['total_compressed_images'] = (int) $total_compressed_images;
183
+ $data['total_not_compressed_images_size'] = $total_not_compressed_images_size;
184
+ $data['total_not_compressed_images_count'] = $total_not_compressed_images_count;
185
+ }
186
+
187
+ if ( $total_compressed_images != 0 || $total_not_compressed_images_size != 0 ) {
188
+ set_transient( 'twb_optimized_pages', $data, DAY_IN_SECONDS );
189
+ }
190
+ }
191
+ die;
192
+ }
193
+
194
+ /**
195
+ * Get copmpressed pages/images data from DB.
196
+ *
197
+ * @param $params array
198
+ *
199
+ * @return array
200
+ */
201
+ public function get_pages_compressed( $params ) {
202
+
203
+ $return_data = array(
204
+ 'pages' => array(),
205
+ 'total_compressed_images' => 0,
206
+ 'total_not_compressed_images_size' => '0 B',
207
+ 'total_not_compressed_images_count' => 0,
208
+ 'compressed_pages_count' => 0,
209
+ );
210
+
211
+ $twb_optimized_pages = get_transient("twb_optimized_pages");
212
+ if ( !empty($twb_optimized_pages) ) {
213
+ return $twb_optimized_pages;
214
+ } else {
215
+ /* in case of returned data is 0 just get from db last data or run PG functionality to get count/size */
216
+ $images_total_size = get_option('twb_images_total_size');
217
+ if ( !empty($images_total_size) ) {
218
+ $return_data['total_not_compressed_images_size'] = $images_total_size;
219
+ $return_data['total_not_compressed_images_count'] = $params['images_count'];
220
+ }
221
+ }
222
+
223
+ return $return_data;
224
+ }
225
+
226
+ /**
227
+ * Get total size of all images․
228
+ */
229
+ public function get_total_size_of_images() {
230
+ $total = get_option('twb_images_total_size');
231
+ if ( empty($total) ) {
232
+ $total = 0;
233
+ $allowed_types = array(
234
+ 'image/jpeg',
235
+ 'image/jpg',
236
+ 'image/png',
237
+ 'image/gif',
238
+ 'image/webp',
239
+ 'image/svg',
240
+ 'image/png'
241
+ );
242
+ $args = array(
243
+ 'post_type' => 'attachment',
244
+ 'numberposts' => -1,
245
+ 'post_status' => NULL,
246
+ 'post_parent' => NULL, // any parent
247
+ );
248
+ $attachments = get_posts($args);
249
+ if ( $attachments ) {
250
+ foreach ( $attachments as $post ) {
251
+ if ( !in_array($post->post_mime_type, $allowed_types) ) {
252
+ continue;
253
+ }
254
+ $meta = wp_get_attachment_metadata($post->ID);
255
+ if ( isset($meta['filesize']) ) {
256
+ $filesize = $meta['filesize'];
257
+ }
258
+ else {
259
+ $path = get_attached_file($post->ID);
260
+ if ( !file_exists($path) ) {
261
+ continue;
262
+ }
263
+ $filesize = filesize($path);
264
+ }
265
+ $total += $filesize;
266
+ }
267
+ }
268
+ $total = TWBLibrary::formatBytes( $total );
269
+ update_option('twb_images_total_size', $total, 1);
270
+ }
271
+
272
+ echo json_encode(array("size" => $total));
273
+ die;
274
+ }
275
+
276
+ /**
277
+ * Top banner.
278
+ */
279
+ public function top_banner($params = array()) {
280
+ if ( $this->booster->is_paid === FALSE ) {
281
+ $booster_is_active = ( $this->booster->booster_is_connected && $this->booster->booster_plugin_status == 2 ) ? TRUE : FALSE;
282
+ if ( $booster_is_active ) {
283
+ if ( !isset($params['title']) ) {
284
+ $params['title'] = __('Get 10Web Booster Pro', 'tenweb-booster');
285
+ }
286
+ if ( !isset($params['desc']) ) {
287
+ $params['desc'] = __('Automatically optimize the entire website with all images.', 'tenweb-booster');
288
+ }
289
+ if ( !isset($params['notice']) ) {
290
+ $params['notice'] = FALSE;
291
+ }
292
+ $params['button'] = array(
293
+ 'name' => __('Upgrade', 'tenweb-booster'),
294
+ 'url' => "https://my.10web.io/websites/" . get_site_option('tenweb_domain_id') . "/booster/frontend?pricing=1",
295
+ 'target' => 'target="_blank"',
296
+ );
297
+ }
298
+ else {
299
+ if ( !isset($params['title']) ) {
300
+ $single = __('%s image can be optimized', 'tenweb-booster');
301
+ $plural = __('%s images can be optimized', 'tenweb-booster');
302
+ $images_count = $this->get_images_count();
303
+ $params['title'] = wp_sprintf(_n($single, $plural, $images_count, 'tenweb-booster'), $images_count);
304
+ }
305
+ if ( !isset($params['desc']) ) {
306
+ $params['desc'] = __('Improve PageSpeed optimization by optimizing your website.', 'tenweb-booster');
307
+ }
308
+ if ( !isset($params['notice']) ) {
309
+ $params['notice'] = __('Heavy images negatively affect your website load time and PageSpeed optimization.', 'tenweb-booster');
310
+ }
311
+ $params['button'] = array(
312
+ 'name' => __('Optimize now', 'tenweb-booster'),
313
+ 'url' => add_query_arg(array( 'page' => TenWebBooster::PREFIX . '_' . $this->booster->slug ), admin_url('admin.php')),
314
+ 'target' => '',
315
+ );
316
+ }
317
+
318
+ $this->view->top_banner($params);
319
+ }
320
+ }
321
+
322
+ /**
323
+ * Install booster plugin
324
+ */
325
+ public function install_booster() {
326
+ $activated = $this->install_plugin();
327
+ // To change the plugin status on Dashboard.
328
+ if (class_exists('\Tenweb_Authorization\Helper')
329
+ && method_exists('\Tenweb_Authorization\Helper', "check_site_state") ) {
330
+ \Tenweb_Authorization\Helper::check_site_state(true);
331
+ }
332
+ // activate_plugin function returns null when the plugin activated successfully.
333
+ if ( is_null($activated) ) {
334
+ $this->booster = $this->booster->set_booster_data();
335
+ }
336
+ $params = array();
337
+ $params['booster_plugin_status'] = $this->booster->booster_plugin_status;
338
+ $params['status'] = $this->booster->status;
339
+ $params['is_plugin'] = $this->booster->is_plugin;
340
+ $params['submenu_parent_slug'] = $this->booster->submenu['parent_slug'];
341
+ $this->view->header($params);
342
+ die;
343
+ }
344
+
345
+ /**
346
+ * Install/activate the plugin.
347
+ *
348
+ * @param $status
349
+ *
350
+ * @return bool|int|true|WP_Error|null
351
+ */
352
+ private function install_plugin() {
353
+ $activated = FALSE;
354
+ if ( $this->booster->booster_plugin_status == 0 ) {
355
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
356
+ wp_cache_flush();
357
+ $upgrader = new Plugin_Upgrader();
358
+ $installed = $upgrader->install(self::PLUGIN_ZIP);
359
+ }
360
+ else {
361
+ $installed = TRUE;
362
+ }
363
+
364
+ if ( !is_wp_error( $installed ) && $installed ) {
365
+ $activated = activate_plugin(self::PlUGIN_FILE);
366
+ }
367
+
368
+ return $activated;
369
+ }
370
+
371
+ /**
372
+ * Get optimized media count.
373
+ *
374
+ * @return int
375
+ */
376
+ public function get_images_count() {
377
+ $allowed_types = array('image/jpeg','image/jpg','image/png','image/gif','image/webp','image/svg');
378
+ // Get all wp-media attachments.
379
+ $attachments = wp_count_attachments();
380
+ $total = 0;
381
+ if ( !empty($attachments) ) {
382
+ foreach ( $attachments as $key => $attachment ) {
383
+ if ( in_array($key, $allowed_types) ) {
384
+ $total += $attachment;
385
+ }
386
+ }
387
+ }
388
+
389
+ // Get all Photo gallery media.
390
+ global $wpdb;
391
+ $row = $wpdb->get_row( 'SELECT count(id) AS qty FROM `' . $wpdb->prefix . 'bwg_file_paths` WHERE is_dir = 0' );
392
+ if (!empty($row) && !empty($row->qty)) {
393
+ $total += intval($row->qty);
394
+ }
395
+
396
+ return intval($total);
397
+ }
398
+
399
+ /**
400
+ * Sign up to the Dashboard.
401
+ *
402
+ * @return bool
403
+ */
404
+ public function sign_up_dashboard() {
405
+ $email = isset($_POST['twb_email']) ? sanitize_email($_POST['twb_email']) : '';
406
+ $parent_slug = isset($_POST['parent_slug']) ? sanitize_text_field($_POST['parent_slug']) : '';
407
+ $slug = isset($_POST['slug']) ? sanitize_text_field($_POST['slug']) : '';
408
+ $is_plugin = isset($_POST['is_plugin']) ? sanitize_text_field($_POST['is_plugin']) : TRUE;
409
+
410
+
411
+ $body_data = array(
412
+ 'email' => $email,
413
+ 'first_name' => '10Webber',
414
+ 'last_name' => rand( 1000, 9999 ),
415
+ 'service_key' => 'gTcjslfqqBFFwJKBnFgQYhkQEJpplLaDKfj',
416
+ );
417
+
418
+ if ( $is_plugin ) {
419
+ switch ( $parent_slug ) {
420
+ case "manage_fm":
421
+ $body_data['product_id'] = '95';
422
+ break;
423
+ case "galleries_bwg":
424
+ $body_data['product_id'] = '101';
425
+ break;
426
+ default:
427
+ $body_data['product_slug'] = "plugin_" . $slug;
428
+ }
429
+ } else {
430
+ $body_data['product_slug'] = "theme_" . $slug;
431
+ }
432
+
433
+ $args = array(
434
+ 'method' => 'POST',
435
+ 'headers' => array(
436
+ 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',
437
+ 'Accept' => 'application/x.10webcore.v1+json'
438
+ ),
439
+ 'body' => $body_data,
440
+ );
441
+ $url = 'https://core.10web.io/api/checkout/signup-via-magic-link';
442
+ $result = wp_remote_post( $url, $args );
443
+ ob_clean();
444
+ if ( !empty($result) && isset( $result['body']) ) {
445
+ $result = $result['body'];
446
+ } else {
447
+ echo json_encode( array('status' => 'error' ) );
448
+ die;
449
+ }
450
+
451
+ $result = json_decode($result, 1);
452
+ if ( class_exists('\TenWebOptimizer\OptimizerUtils') ) {
453
+ $args = '';
454
+ if ( isset($result['status']) && isset($result['data']['magic_data']) && $result['status'] == "ok" ) {
455
+ $args = array( 'magic_data' => $result['data']['magic_data'] );
456
+ }
457
+ elseif ( isset($result['error']) && $result['error']['status_code'] == "422" ) {
458
+ $args = array( 'login_request_plugin' => $this->booster->slug );
459
+ }
460
+ if ( $args ) {
461
+ $connect_link = \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link('login', $args);
462
+ echo json_encode(array( 'status' => 'success', 'booster_connect_url' => $connect_link ));
463
+ die();
464
+ }
465
+ }
466
+ echo json_encode( array('status' => 'error') );
467
+ die();
468
+ }
469
+
470
+ /**
471
+ * Connect to dashboard.
472
+ *
473
+ * @return void
474
+ */
475
+ public function connect_to_dashboard() {
476
+ if ( class_exists('\TenWebOptimizer\OptimizerUtils') ) {
477
+ $twb_connect_link = \TenWebOptimizer\OptimizerUtils::get_tenweb_connection_link('login');
478
+ echo json_encode(array( 'status' => 'success', 'booster_connect_url' => $twb_connect_link ));
479
+ }
480
+ else {
481
+ echo json_encode(array( 'status' => 'error' ) );
482
+ }
483
+ die;
484
+ }
485
+
486
+ /**
487
+ * Get Google page speed score.
488
+ */
489
+ public function get_google_page_speed() {
490
+ $last_api_key_index = isset($_POST['last_api_key_index']) ? sanitize_text_field($_POST['last_api_key_index']) : '';
491
+
492
+ $url = isset($_POST['twb_url']) ? sanitize_url($_POST['twb_url']) : '';;
493
+
494
+ /* Check if url hasn't http or https add */
495
+ if ( strpos($url, 'http') !== 0 ){
496
+ if ( isset($_SERVER['HTTPS']) ) {
497
+ $url = 'https://'.$url;
498
+ } else {
499
+ $url = 'http://'.$url;
500
+ }
501
+ }
502
+
503
+ /* Check if the url is valid */
504
+ if ( !filter_var($url, FILTER_VALIDATE_URL) ) {
505
+ echo json_encode(array('error' => 1)); die;
506
+ }
507
+
508
+ $post_id = url_to_postid($url);
509
+ $home_url = get_home_url();
510
+ if ( $post_id !== 0 && get_post_status( $post_id ) != 'publish' && rtrim($url, "/") != rtrim($home_url, "/") ) {
511
+ echo json_encode( array('error' => 1, 'msg' => esc_html__('This page is not public. Please publish the page to check the score.', 'tenweb-booster')) );
512
+ die;
513
+ }
514
+
515
+ if ( $last_api_key_index != '' ) {
516
+ /* remove array value as this key already used and no need to try again during the retry */
517
+ unset($this->google_api_keys[$last_api_key_index]);
518
+ }
519
+ $random_index = array_rand( $this->google_api_keys );
520
+ $random_api_key = $this->google_api_keys[$random_index];
521
+ $result = $this->twb_google_speed_cron( $url, 'desktop', $random_api_key );
522
+ if ( !empty($result['error']) || empty($result)) {
523
+ /* Case when retry already done and $last_api_key_index is not empty */
524
+ if ( $last_api_key_index != '' ) {
525
+ echo json_encode(array( 'error' => 1 ));
526
+ }
527
+ else {
528
+ echo json_encode(array( 'error' => 1, 'last_api_key_index' => $random_index ));
529
+ }
530
+ die;
531
+ }
532
+ $score['desktop'] = $result['score']*100;
533
+ $score['desktop_loading_time'] = $result['loading_time'];
534
+
535
+ $result = $this->twb_google_speed_cron( $url, 'mobile', $random_api_key );
536
+ if ( !empty($result['error']) || empty($result) ) {
537
+ /* Case when retry already done and $last_api_key_index is not empty */
538
+ if ( $last_api_key_index != '' ) {
539
+ echo json_encode(array( 'error' => 1 ));
540
+ }
541
+ else {
542
+ echo json_encode(array( 'error' => 1, 'last_api_key_index' => $random_index ));
543
+ }
544
+ die;
545
+ }
546
+ $score['mobile'] = $result['score']*100;
547
+ $score['mobile_loading_time'] = $result['loading_time'];
548
+
549
+ $nowdate = current_time( 'mysql' );
550
+ $nowdate = date('d.m.Y h:i:s a', strtotime($nowdate));
551
+
552
+ $data = get_option('twb_speed_score');
553
+ $data[$url] = array(
554
+ 'desktop_score' => $score['desktop'],
555
+ 'desktop_loading_time' => $score['desktop_loading_time'],
556
+ 'mobile_score' => $score['mobile'],
557
+ 'mobile_loading_time' => $score['mobile_loading_time'],
558
+ 'last_analyzed_time' => $nowdate,
559
+ 'error' => 0
560
+ );
561
+ $data['last'] = array(
562
+ 'url' => $url
563
+ );
564
+ update_option('twb_speed_score', $data, 1);
565
+
566
+ $twb_hompage_optimized = get_option('twb_hompage_optimized');
567
+ if ( rtrim($url, "/") == rtrim($home_url, "/") && !empty($twb_hompage_optimized) && $twb_hompage_optimized == 1 ) {
568
+ update_option('twb_hompage_optimized', 2);
569
+ }
570
+ ob_clean();
571
+ echo json_encode(array(
572
+ 'desktop_score' => esc_html($score['desktop']),
573
+ 'desktop_loading_time' => esc_html($score['desktop_loading_time']),
574
+ 'mobile_score' => esc_html($score['mobile']),
575
+ 'mobile_loading_time' => esc_html($score['mobile_loading_time']),
576
+ 'last_analyzed_time' => esc_html($nowdate),
577
+ ));
578
+ die;
579
+ }
580
+
581
+ /**
582
+ * Remote get action to get google speed score
583
+ *
584
+ * @param $page_url string which is url of the page which speed should counted
585
+ * @param $strategy string parameter which get desktop or mobile
586
+ *
587
+ * @return array
588
+ */
589
+ public function twb_google_speed_cron( $page_url, $strategy, $key = 'AIzaSyCQmF4ZSbZB8prjxci3GWVK4UWc-Yv7vbw') {
590
+ $url = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=" . $page_url . "&key=".$key;
591
+ $url = ( $strategy == "mobile" ) ? $url . "&strategy=mobile" : $url;
592
+
593
+ $response = wp_remote_get($url, array('timeout' => 300));
594
+ $data = array();
595
+
596
+ if (is_array($response) && !is_wp_error($response)) {
597
+
598
+ $body = $response['body'];
599
+ $body = json_decode($body);
600
+ if (isset($body->error) ) {
601
+ $data['error'] = 1;
602
+ } else {
603
+ $data['score'] = $body->lighthouseResult->categories->performance->score;
604
+ $data['loading_time'] = $body->lighthouseResult->audits->interactive->displayValue;
605
+ }
606
+ } else {
607
+ $data['error'] = 1;
608
+ }
609
+ return $data;
610
+ }
611
+ }
booster/init.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('init', function() {
3
+ add_filter('tenweb_booster_sdk', function($path) {
4
+ $version = '1.0.0';
5
+ if ( !isset($path['version']) || version_compare($path['version'], $version) === -1 ) {
6
+ $path['version'] = $version;
7
+ if ( strpos(str_replace("/", "\\", plugin_dir_path( __FILE__ )), str_replace("/", "\\", WP_PLUGIN_DIR)) > -1 ) {
8
+ $path['path'] = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
9
+ } else {
10
+ $path['path'] = get_template_directory().'/booster/';
11
+ }
12
+ }
13
+
14
+ return $path;
15
+ });
16
+ }, 8);
17
+ add_action('init', function() {
18
+ if (!class_exists("TenWebBooster")) {
19
+ if ( strpos( str_replace("/", "\\", plugin_dir_path( __FILE__ )), str_replace("/", "\\", WP_PLUGIN_DIR) ) > -1 ) {
20
+ $plugin_dir = apply_filters('tenweb_booster_sdk', array(
21
+ 'version' => '1.0.0',
22
+ 'path' => WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)),
23
+ ));
24
+ } else {
25
+ $plugin_dir = apply_filters('tenweb_booster_sdk', array(
26
+ 'version' => '1.0.0',
27
+ 'path' => get_template_directory().'/booster/',
28
+ ));
29
+ }
30
+ require_once($plugin_dir['path'] . '/main.php');
31
+
32
+ function TWB($params = array()) {
33
+ if ( isset($params['is_plugin']) && !$params['is_plugin'] ) {
34
+ $plugin_dir = get_template_directory().'/booster';
35
+ $plugin_url = get_template_directory_uri() . "/booster";
36
+ } else {
37
+ $plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
38
+ $plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
39
+ }
40
+ $params['plugin_dir'] = $plugin_dir;
41
+ $params['plugin_url'] = $plugin_url;
42
+ return new TenWebBooster($params);
43
+ }
44
+ }
45
+ }, 10);
booster/main.php ADDED
@@ -0,0 +1,491 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class TenWebBooster {
3
+ const VERSION = '1.0.0';
4
+ const PREFIX = 'twb';
5
+ const BOOSTER_PlUGIN_FILE = 'tenweb-speed-optimizer/tenweb_speed_optimizer.php';
6
+
7
+ public $submenu = array(
8
+ 'parent_slug' => FALSE,
9
+ 'title' => 'Speed & Image Optimization',
10
+ 'icon' => '',
11
+ );
12
+ public $page = array(
13
+ 'section_booster_title' => 'Optimize images and boost PageSpeed score',
14
+ 'section_booster_desc' => 'Use the free 10Web Booster plugin to automatically optimize your images and boost PageSpeed score.',
15
+ 'section_booster_success_title' => 'Optimize all images',
16
+ 'section_booster_success_desc' => 'Speed up the entire website',
17
+ 'section_optimize_images' => TRUE,
18
+ 'section_analyze' => TRUE,
19
+ 'section_analyze_desc' => 'Speed up your website and increase PageSpeed score by optimizing all images.',
20
+ );
21
+
22
+ public $cta_button = array(
23
+ 'section_label' => '10Web Booster',
24
+ 'label' => 'Check PageSpeed score',
25
+ 'button_color' => '',
26
+ 'text_color' => '',
27
+ 'class' => 'twb-green-button',
28
+ );
29
+ private $admin_bar = TRUE;
30
+ private $gutenberg = TRUE;
31
+ private $elementor = TRUE;
32
+ private $list = TRUE;
33
+
34
+ public $slug = '';
35
+ private $abspath = '';
36
+ public $plugin_dir = '';
37
+ public $plugin_url = '';
38
+ public $booster_plugin_status = 0; //0-not installed, 1-not active, 2-active
39
+ public $booster_is_connected = FALSE;
40
+ public $is_paid = FALSE;
41
+ public $subscription_id = FALSE;
42
+ public $status = 'not_installed';
43
+ /* is booster SDK called from plugin or theme */
44
+ public $is_plugin = TRUE;
45
+ public $submenu_url = '';
46
+
47
+ public function __construct($params = array()) {
48
+ $this->define_params($params);
49
+ $this->change_defaults($params);
50
+ $this->set_booster_data();
51
+ $this->add_actions();
52
+ }
53
+
54
+ private function add_actions() {
55
+ add_action('init', array( $this, 'register_meta' ));
56
+ add_action('admin_enqueue_scripts', array( $this, 'register_admin_scripts' ));
57
+ add_action('wp_enqueue_scripts', array( $this, 'register_scripts' ));
58
+ if ( $this->submenu['parent_slug'] || !$this->is_plugin ) {
59
+ add_action('admin_menu', array( $this, 'add_submenu' ));
60
+ }
61
+ add_action('wp_ajax_' . self::PREFIX, array( $this, 'admin_ajax' ));
62
+ add_action('wp_ajax_twb_check_score', array( $this, 'check_score' ));
63
+ add_action('wp_ajax_twb_notif_check', array( $this, 'notif_check' ));
64
+
65
+ if ( $this->booster_plugin_status != 2 ) {
66
+
67
+ if( $this->admin_bar ) {
68
+ add_action('admin_bar_menu', array( $this, 'admin_bar_menu' ), 100);
69
+ }
70
+
71
+ if ( $this->elementor ) {
72
+ require_once('Elementor.php');
73
+ new TWBElementor($this);
74
+ }
75
+
76
+ if ( $this->gutenberg ) {
77
+ require_once('Gutenberg.php');
78
+ new TWBGutenberg($this);
79
+ }
80
+
81
+ if ( $this->list ) {
82
+ require_once('List.php');
83
+ $this->list = TWBList($this);
84
+ }
85
+ }
86
+ }
87
+
88
+ public function admin_ajax() {
89
+ $speed_ajax_nonce = isset($_POST['speed_ajax_nonce']) ? sanitize_text_field($_POST['speed_ajax_nonce']) : '';
90
+ if ( !wp_verify_nonce($speed_ajax_nonce, 'speed_ajax_nonce') ){
91
+ die('Permission Denied.');
92
+ }
93
+
94
+ if ( !isset($_POST['action']) ) {
95
+ return;
96
+ }
97
+ $page = sanitize_text_field($_POST['action']);
98
+ $allowed_pages = array( 'twb' );
99
+ if ( !in_array($page, $allowed_pages) ) {
100
+ return;
101
+ }
102
+ $this->admin_page();
103
+ }
104
+
105
+ public function check_score() {
106
+ $twb_nonce = isset($_POST['twb_nonce']) ? sanitize_text_field($_POST['twb_nonce']) : '';
107
+ if ( !wp_verify_nonce($twb_nonce, 'twb_nonce') ){
108
+ die('Permission Denied.');
109
+ }
110
+
111
+ if ( !isset($_POST['action']) ) {
112
+ return;
113
+ }
114
+ $page = sanitize_text_field($_POST['action']);
115
+ $allowed_pages = array( 'twb_check_score' );
116
+ if ( !in_array($page, $allowed_pages) ) {
117
+ return;
118
+ }
119
+ $post_id = isset($_POST["post_id"]) ? sanitize_text_field($_POST["post_id"]) : 0;
120
+
121
+ echo TWBLibrary::check_score($post_id);
122
+ die();
123
+ }
124
+
125
+ /* Ajax action which is checking if score count in progress/complete to show notification */
126
+ public function notif_check() {
127
+ $twb_nonce = isset($_POST['twb_nonce']) ? sanitize_text_field($_POST['twb_nonce']) : '';
128
+ if ( !wp_verify_nonce($twb_nonce, 'twb_nonce') ){
129
+ die('Permission Denied.');
130
+ }
131
+
132
+ if ( !isset($_POST['action']) ) {
133
+ return;
134
+ }
135
+ $page = sanitize_text_field($_POST['action']);
136
+ $allowed_pages = array( 'twb_notif_check' );
137
+ if ( !in_array($page, $allowed_pages) ) {
138
+ return;
139
+ }
140
+
141
+ require_once('AdminBar.php');
142
+ new TWBAdminBar('', $this);
143
+ }
144
+
145
+ private function define_params($params) {
146
+ require_once('TWBLibrary.php');
147
+ $submenu_icon_styles = array(
148
+ 'background-color: #22B339',
149
+ 'border-radius: 20px',
150
+ 'display: inline-block',
151
+ 'height: 6px',
152
+ 'margin: 0 0 1px 3px',
153
+ 'width: 6px',
154
+ );
155
+ $this->submenu['icon'] = '<span class="' . self::PREFIX . '-submenu-icon" style="' . implode(';', $submenu_icon_styles) . '"></span>';
156
+ if ( isset($params['page']['slug']) ) {
157
+ $this->slug = $params['page']['slug'];
158
+ }
159
+ else {
160
+ if ( isset($params['is_plugin']) && !$params['is_plugin'] ) {
161
+ $path = explode('/themes/', get_template_directory());
162
+ $this->slug = isset($path[1]) ? $path[1] : 'theme';
163
+ }
164
+ else {
165
+ $this->slug = str_replace(array( 'booster', '/' ), array( '', '' ), plugin_basename(dirname(__FILE__)));
166
+ }
167
+ }
168
+ $admin_page = admin_url((isset($params['is_plugin']) && !$params['is_plugin']) ? 'themes.php' : 'admin.php');
169
+ $this->submenu_url = add_query_arg( array('page' => TenWebBooster::PREFIX . '_' . $this->slug), $admin_page );
170
+
171
+ $this->abspath = $this->get_abspath();
172
+ }
173
+
174
+ private function change_defaults( $params = array()) {
175
+ foreach ( $params as $key => $param ) {
176
+ if ( is_array($param) ) {
177
+ foreach ( $param as $par_key => $par ) {
178
+ if ( isset($this->$key[$par_key]) ) {
179
+ $this->$key[$par_key] = sanitize_text_field($par);
180
+ }
181
+ }
182
+ }
183
+ else {
184
+ if ( isset($this->$key) ) {
185
+ $this->$key = sanitize_text_field($param);
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
+ public function register_scripts( ) {
192
+ $required_scripts = array( 'jquery' );
193
+ $required_styles = array( 'twb-open-sans' );
194
+ wp_register_style('twb-open-sans', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700,800&display=swap');
195
+ wp_register_style(self::PREFIX . '-global', $this->plugin_url . '/assets/css/global.css', $required_styles, self::VERSION);
196
+ if ( $this->cta_button['button_color'] || $this->cta_button['text_color'] ) {
197
+ $cutom_css = "
198
+ #wp-admin-bar-booster-top-button a.ab-item,
199
+ #wp-admin-bar-twb_adminbar_info .twb_admin_bar_menu_header:not(.twb_not_optimized),
200
+ #wp-admin-bar-booster-top-button a.ab-item:hover,
201
+ #wpadminbar:not(.mobile) .ab-top-menu>#wp-admin-bar-booster-top-button:hover>.ab-item {
202
+ background-color: " . $this->cta_button['button_color'] . " !important;
203
+ color: " . $this->cta_button['text_color'] . " !important;
204
+ }";
205
+ wp_add_inline_style(self::PREFIX . '-global', $cutom_css);
206
+ }
207
+ wp_register_script(self::PREFIX . '-circle', $this->plugin_url . '/assets/js/circle-progress.js', $required_scripts, '1.2.2');
208
+ array_push($required_scripts, self::PREFIX . '-circle');
209
+ wp_register_script(self::PREFIX . '-global', $this->plugin_url . '/assets/js/global.js', $required_scripts, self::VERSION);
210
+ wp_localize_script(self::PREFIX . '-global', 'twb', array(
211
+ 'nonce' => wp_create_nonce('twb_nonce'),
212
+ 'ajax_url' => admin_url('admin-ajax.php'),
213
+ 'plugin_url' => $this->plugin_url,
214
+ 'href' => $this->submenu_url,
215
+ ));
216
+ }
217
+
218
+ public function add_submenu() {
219
+ if ( $this->is_plugin ) {
220
+ add_submenu_page(
221
+ $this->submenu['parent_slug'],
222
+ $this->submenu['title'],
223
+ $this->submenu['title'] . $this->submenu['icon'],
224
+ 'manage_options',
225
+ self::PREFIX . '_' . $this->slug,
226
+ array($this, 'admin_page'),
227
+ 1,
228
+ );
229
+ }
230
+ else {
231
+ add_theme_page(
232
+ $this->submenu['title'],
233
+ $this->submenu['title'] . $this->submenu['icon'],
234
+ 'manage_options',
235
+ self::PREFIX . '_' . $this->slug,
236
+ array($this, 'admin_page')
237
+ );
238
+ }
239
+ }
240
+
241
+ /**
242
+ * Display page.
243
+ */
244
+ public function admin_page() {
245
+ require_once($this->plugin_dir . '/controller.php');
246
+
247
+ $controller = new BoosterController($this);
248
+ $controller->execute();
249
+ }
250
+
251
+ /**
252
+ * Top banner.
253
+ *
254
+ * @param $params
255
+ */
256
+ public function top_banner($params = array()) {
257
+ require_once($this->plugin_dir . '/controller.php');
258
+ $controller = new BoosterController($this);
259
+ $controller->execute('top_banner', $params);
260
+ }
261
+
262
+ /**
263
+ * Admin bar menu.
264
+ *
265
+ * @param $wp_admin_bar
266
+ */
267
+ public function admin_bar_menu( $wp_admin_bar ) {
268
+ require_once('AdminBar.php');
269
+ new TWBAdminBar($wp_admin_bar, $this);
270
+ }
271
+
272
+ /**
273
+ * Set the data for Booster.
274
+ *
275
+ * @return void
276
+ */
277
+ public function set_booster_data() {
278
+ $this->subscription_id = get_transient('tenweb_subscription_id');
279
+ $this->booster_plugin_status = $this->get_booster_status();
280
+
281
+ if ( ( defined('TENWEB_CONNECTED_SPEED') &&
282
+ class_exists('\Tenweb_Authorization\Login') &&
283
+ \Tenweb_Authorization\Login::get_instance()->check_logged_in() &&
284
+ \Tenweb_Authorization\Login::get_instance()->get_connection_type() == TENWEB_CONNECTED_SPEED ) ||
285
+ ( defined('TENWEB_SO_HOSTED_ON_10WEB') && TENWEB_SO_HOSTED_ON_10WEB ) ) {
286
+ $this->booster_is_connected = TRUE;
287
+
288
+ if ( method_exists('\TenWebOptimizer\OptimizerUtils', 'is_paid_user')
289
+ && TenWebOptimizer\OptimizerUtils::is_paid_user() ) {
290
+ $this->is_paid = TRUE;
291
+ }
292
+ }
293
+
294
+ if ( $this->booster_plugin_status == 2 ) {
295
+ if ( $this->booster_is_connected ) {
296
+ $this->status = 'connected';
297
+ }
298
+ else {
299
+ if ( $this->subscription_id ) {
300
+ $this->status = 'connect';
301
+ } else {
302
+ $this->status = 'sign_up';
303
+ }
304
+ }
305
+ }
306
+ return $this;
307
+ }
308
+
309
+ /**
310
+ * Check the plugin status.
311
+ *
312
+ * @return int 0-not installed, 1-not active, 2-active
313
+ */
314
+ private function get_booster_status() {
315
+ include_once( $this->abspath . 'wp-admin/includes/plugin.php' );
316
+ if ( is_plugin_active(self::BOOSTER_PlUGIN_FILE) ) {
317
+ return 2;
318
+ }
319
+ elseif ( $this->is_plugin_installed() ) {
320
+ return 1;
321
+ }
322
+ else {
323
+ return 0;
324
+ }
325
+ }
326
+
327
+ /**
328
+ * get ABSPATH from WP_CONTENT_DIR.
329
+ *
330
+ * @param string $dirpath
331
+ *
332
+ * @return string
333
+ */
334
+ private function get_abspath() {
335
+ $dirpath = defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : ABSPATH;
336
+ $array = explode( "wp-content", $dirpath );
337
+ if( isset( $array[0] ) && $array[0] != "" ) {
338
+ return $array[0];
339
+ }
340
+ return ABSPATH;
341
+ }
342
+
343
+ /**
344
+ * Check if the plugin already installed.
345
+ *
346
+ * @param string $slug plugin's slug
347
+ *
348
+ * @return bool
349
+ */
350
+ private function is_plugin_installed() {
351
+ if ( ! function_exists( 'get_plugins' ) ) {
352
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
353
+ }
354
+ $all_plugins = get_plugins();
355
+
356
+ return !empty($all_plugins[self::BOOSTER_PlUGIN_FILE]);
357
+ }
358
+
359
+ public function register_admin_scripts() {
360
+ $required_scripts = array( 'jquery' );
361
+ $required_styles = array('twb-open-sans');
362
+ wp_register_style('twb-open-sans', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700,800&display=swap');
363
+ wp_register_style(self::PREFIX . '-global', $this->plugin_url . '/assets/css/global.css', $required_styles, self::VERSION);
364
+
365
+ wp_register_script(self::PREFIX . '-circle', $this->plugin_url . '/assets/js/circle-progress.js', $required_scripts, '1.2.2');
366
+ array_push($required_scripts, self::PREFIX . '-circle');
367
+ wp_register_script(self::PREFIX . '-global', $this->plugin_url . '/assets/js/global.js', $required_scripts, self::VERSION);
368
+ wp_localize_script(self::PREFIX . '-global', 'twb', array(
369
+ 'nonce' => wp_create_nonce('twb_nonce'),
370
+ 'ajax_url' => admin_url('admin-ajax.php'),
371
+ 'cta_button' => $this->cta_button,
372
+ 'href' => $this->submenu_url,
373
+ ));
374
+ wp_register_style(self::PREFIX, $this->plugin_url . '/assets/css/speed.css', $required_styles, self::VERSION);
375
+ wp_register_style(self::PREFIX . '-top-banner', $this->plugin_url . '/assets/css/top_banner.css', $required_styles, self::VERSION);
376
+ wp_register_script(self::PREFIX . '-script', $this->plugin_url . '/assets/js/speed.js', $required_scripts, self::VERSION);
377
+ wp_localize_script(self::PREFIX . '-script', 'twb', array(
378
+ 'install_button_text' => __('Install 10Web Booster plugin', 'tenweb-booster'),
379
+ 'activate_button_text' => __('Activate 10Web Booster plugin', 'tenweb-booster'),
380
+ 'wrong_email' => __('Please enter a valid email address.', 'tenweb-booster'),
381
+ 'empty_email' => __('Email field should not be empty.', 'tenweb-booster'),
382
+ 'wrong_domain_url' => __('Please enter a URL from your domain.', 'tenweb-booster'),
383
+ 'wrong_url' => __('Please enter correct URL.', 'tenweb-booster'),
384
+ 'enter_page_url' => __('Please enter a Page URL.', 'tenweb-booster'),
385
+ 'page_is_not_public' => __('This page is not public. Please publish the page to check the score.', 'tenweb-booster'),
386
+ 'sign_up' => __('Sign up', 'tenweb-booster'),
387
+ 'connect' => __('Connect', 'tenweb-booster'),
388
+ 'home_url' => get_home_url(),
389
+ 'home_speed_status' => $this->check_home_speed_status(),
390
+ 'analyze_button_text' => __('Analyze', 'tenweb-booster'),
391
+ 'something_wrong' => __('Something went wrong, please try again.', 'tenweb-booster'),
392
+ 'speed_ajax_nonce' => wp_create_nonce('speed_ajax_nonce'),
393
+ 'compressed_pages_status' => $this->compressed_pages_status(),
394
+ 'nonce' => wp_create_nonce('twb_nonce'),
395
+ 'ajax_url' => admin_url('admin-ajax.php'),
396
+ 'cta_button' => $this->cta_button,
397
+ 'href' => $this->submenu_url,
398
+ ));
399
+ }
400
+
401
+ /**
402
+ * Check if data of optimized pages/images kept in DB
403
+ * Using to send localized status to js and run ajax if needed to get data from endpoint
404
+ *
405
+ * @return bool
406
+ */
407
+ public function compressed_pages_status() {
408
+ $data = get_transient( 'twb_optimized_pages' );
409
+ if( !empty( $data) ) {
410
+ return 1;
411
+ }
412
+ return 0;
413
+ }
414
+
415
+ public function check_home_speed_status() {
416
+ $twb_hompage_optimized = get_option('twb_hompage_optimized');
417
+ /* Case when homepage optimized but score not updated */
418
+ if ( !empty($twb_hompage_optimized) && $twb_hompage_optimized == 1 ) {
419
+ return 0;
420
+ }
421
+ $twb_speed_score = get_option('twb_speed_score');
422
+ if ( !empty($twb_speed_score) && isset($twb_speed_score['last']) && isset($twb_speed_score['last']['url']) ) {
423
+ $url = $twb_speed_score['last']['url'];
424
+ if ( isset($twb_speed_score[$url]) && $twb_speed_score[$url]['desktop_score'] && $twb_speed_score[$url]['mobile_score'] ) {
425
+ return array(
426
+ 'desktop_score' => $twb_speed_score[$url]['desktop_score'],
427
+ 'mobile_score' => $twb_speed_score[$url]['mobile_score'],
428
+ );
429
+ }
430
+ }
431
+
432
+ return 0;
433
+ }
434
+
435
+ public function register_meta() {
436
+ $allowed_post_types = array('post', 'page');
437
+ foreach ($allowed_post_types as $type) {
438
+ register_post_meta($type, 'two_page_speed', [
439
+ 'show_in_rest' => array(
440
+ 'schema' => array(
441
+ 'type' => 'object',
442
+ 'properties' => array(
443
+ 'previous_score' => array(
444
+ 'type' => 'object',
445
+ 'properties' => array(
446
+ 'desktop_score' => array(
447
+ 'type' => 'number',
448
+ ),
449
+ 'desktop_tti' => array(
450
+ 'type' => 'string',
451
+ ),
452
+ 'mobile_score' => array(
453
+ 'type' => 'number',
454
+ ),
455
+ 'mobile_tti' => array(
456
+ 'type' => 'string',
457
+ ),
458
+ 'date' => array(
459
+ 'type' => 'string',
460
+ ),
461
+ ),
462
+ ),
463
+ 'current_score' => array(
464
+ 'type' => 'object',
465
+ 'properties' => array(
466
+ 'desktop_score' => array(
467
+ 'type' => 'number',
468
+ ),
469
+ 'desktop_tti' => array(
470
+ 'type' => 'string',
471
+ ),
472
+ 'mobile_score' => array(
473
+ 'type' => 'number',
474
+ ),
475
+ 'mobile_tti' => array(
476
+ 'type' => 'string',
477
+ ),
478
+ 'date' => array(
479
+ 'type' => 'string',
480
+ ),
481
+ ),
482
+ ),
483
+ ),
484
+ ),
485
+ ),
486
+ 'single' => TRUE,
487
+ 'type' => 'object'
488
+ ]);
489
+ }
490
+ }
491
+ }
booster/model.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+
3
+ class BoosterModel {}
booster/view.php ADDED
@@ -0,0 +1,458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class BoosterView
5
+ */
6
+ class BoosterView {
7
+
8
+ public function __construct() {
9
+ wp_enqueue_style(TenWebBooster::PREFIX);
10
+ wp_enqueue_script(TenWebBooster::PREFIX . '-script');
11
+ }
12
+
13
+ /**
14
+ * Display page.
15
+ *
16
+ * @param $params
17
+ */
18
+ public function display( $params = array() ) {
19
+ ?>
20
+ <div class="wrap">
21
+ <?php //echo $this->popup(); ?>
22
+ <div class="twb-speed-header">
23
+ <?php
24
+ $this->header( $params );
25
+ ?>
26
+ </div>
27
+ <?php
28
+ if ( $params['submenu_section_optimize_images'] || $params['submenu_section_analyze'] ) {
29
+ ?>
30
+ <div class="twb-speed-body">
31
+ <div class="twb-speed-body-container">
32
+ <?php
33
+ if ( $params['submenu_section_optimize_images'] ) {
34
+ if ( $params['booster_is_connected'] && !$params['tenweb_is_paid'] ) {
35
+ $this->optimizer_on_free_connected($params);
36
+ }
37
+ elseif ( $params['booster_is_connected'] && $params['tenweb_is_paid'] ) {
38
+ $this->optimizer_on_pro($params);
39
+ }
40
+ else {
41
+ $this->optimizer_on_free_not_connected($params);
42
+ }
43
+ }
44
+ if ( $params['submenu_section_analyze'] ) {
45
+ $this->analyzer($params);
46
+ }
47
+ ?>
48
+ </div>
49
+ </div>
50
+ <?php
51
+ }
52
+ ?>
53
+ </div>
54
+ <?php
55
+ }
56
+
57
+ public function analyzer( $params ) {
58
+ ?>
59
+ <div class="twb-analyze">
60
+ <p class="twb-section-title"><?php esc_html_e('PageSpeed optimization', 'tenweb-booster'); ?></p>
61
+ <p class="twb-description"><?php echo $params['section_analyze_desc']; ?></p>
62
+ <div class="twb-analyze-input-container">
63
+ <input type="url" class="twb-analyze-input <?php esc_attr_e( ( $params['page_is_public'] === 0 ) ? 'twb-analyze-input-error' : ''); ?>" placeholder="<?php esc_html_e('Page URL', 'tenweb-booster') ?>" value="" />
64
+ <?php if ( $params['page_is_public'] === 0 ) { ?>
65
+ <p class="twb-error-msg"><?php esc_html_e('This page is not public. Please publish the page to check the score.', 'tenweb-booster'); ?></p>
66
+ <?php } ?>
67
+ <a class="twb-analyze-input-button <?php esc_attr_e( ( !$params['page_is_public'] ) ? 'twb-disable-analyze' : ''); ?>"><?php esc_html_e('Analyze', 'tenweb-booster') ?></a>
68
+ </div>
69
+ <div class="twb-analyze-info-container">
70
+ <div class="twb-analyze-info-left">
71
+ <div class="twb-analyze-info-left-cont">
72
+ <div class="twb-analyze-mobile-score">
73
+ <div class="speed_circle" data-thickness="6" data-id="mobile">
74
+ <p class="circle_animated"><?php echo esc_html($params['twb_speed_score']['mobile_score']); ?></p>
75
+ </div>
76
+ <p class="twb-score-name"><?php esc_html_e('Mobile Score', 'tenweb-booster'); ?></p>
77
+ <p class="twb-load-time twb-load-time-mobile"><?php esc_html_e('Load Time:', 'tenweb-booster'); ?> <span><?php echo esc_html($params['twb_speed_score']['mobile_loading_time']); ?></span></p>
78
+ </div>
79
+ <div class="twb-analyze-desktop-score">
80
+ <div class="speed_circle" data-thickness="6" data-id="desktop">
81
+ <p class="circle_animated"><?php echo esc_html($params['twb_speed_score']['desktop_score']); ?></p>
82
+ </div>
83
+ <p class="twb-score-name"><?php esc_html_e('Desktop Score', 'tenweb-booster'); ?></p>
84
+ <p class="twb-load-time twb-load-time-desktop"><?php esc_html_e('Load Time:', 'tenweb-booster'); ?> <span><?php echo esc_html($params['twb_speed_score']['desktop_loading_time']); ?></span></p>
85
+ </div>
86
+ </div>
87
+ <div class="twb-analyze-score-info">
88
+ <span><?php esc_html_e('Scale:', 'tenweb-booster') ?></span>
89
+ <span class="twb-fast-icon twb-score-icon"></span>90-100 <?php esc_html_e('(fast)', 'tenweb-booster'); ?>
90
+ <span class="twb-averege-icon twb-score-icon"></span>50-89 <?php esc_html_e('(average)', 'tenweb-booster'); ?>
91
+ <span class="twb-slow-icon twb-score-icon"></span>0-49 <?php esc_html_e('(slow)', 'tenweb-booster'); ?>
92
+ </div>
93
+ </div>
94
+ <div class="twb-analyze-info-right">
95
+ <p class="twb-analyze-info-right-sub-title"><?php echo sprintf(__('Check your score with %s', 'tenweb-booster'), '<a href="https://pagespeed.web.dev/" target="_blank">' . __('Google PageSpeed Insights', 'tenweb-booster') . '</a>'); ?></p>
96
+ <hr>
97
+ <h3><?php esc_html_e('Analyzed page:', 'tenweb-booster'); ?></h3>
98
+ <p class="twb-last-analyzed-page" title="<?php echo esc_html($params['twb_speed_score']['url']); ?>"><?php echo esc_html($params['twb_speed_score']['url']); ?></p>
99
+ <div class="twb-last-analyzed-date-container">
100
+ <h3><?php esc_html_e('Last analyzed:', 'tenweb-booster'); ?></h3>
101
+ <p class="twb-last-analyzed-date"><?php echo esc_html($params['twb_speed_score']['last_analyzed_time']); ?></p>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ <?php
107
+ }
108
+
109
+ public function header( $params ) {
110
+ $status = $params['status'];
111
+ if ( $status == 'not_installed' ) {
112
+ $step = 1;
113
+ $connected = FALSE;
114
+ $cont_class = '';
115
+ $title = $params['section_booster_title'];
116
+ $description = $params['section_booster_desc'];
117
+ ob_start();
118
+ ?>
119
+ <div class="twb-button-container-parent">
120
+ <div class="button-container">
121
+ <a class="twb-install-booster" onclick="twb_install_plugin( this )"><?php echo sprintf(__('%s 10Web Booster plugin', 'tenweb-booster'), ($params['booster_plugin_status'] == 0 ? __('Install', 'tenweb-booster') : __('Activate', 'tenweb-booster'))); ?></a>
122
+ <p><?php esc_html_e('Installing from WordPress repository', 'tenweb-booster') ?></p>
123
+ </div>
124
+ </div>
125
+ <?php
126
+ $html = ob_get_clean();
127
+ }
128
+ elseif ( $status == 'sign_up' ) {
129
+ $step = 2;
130
+ $connected = FALSE;
131
+ $cont_class = 'twb-sign_up-booster-container';
132
+ $title = __('10Web Booster plugin is installed!', 'tenweb-booster');
133
+ $description = $params['section_booster_desc'];
134
+ ob_start();
135
+ ?>
136
+ <input type="email" class="twb-sign-up-input" placeholder="<?php esc_html_e('Email address', 'tenweb-booster'); ?>" />
137
+ <div class="twb-sign-up-dashboard-button-container">
138
+ <a class="twb-booster-button twb-sign-up-dashboard-button"
139
+ data-parent_slug="<?php echo esc_attr($params['submenu_parent_slug']); ?>"
140
+ data-slug="<?php echo esc_attr($params['slug']); ?>"
141
+ data-is_plugin="<?php echo esc_attr($params['is_plugin']); ?>"
142
+ onclick="twb_sign_up_dashboard( this )"><?php esc_html_e('Sign up', 'tenweb-booster'); ?></a>
143
+ <div>
144
+ <?php
145
+ $terms_of_services = '<br /><a href="https://10web.io/terms-of-service/" target="_blank">' . __('Terms of Services', 'tenweb-booster') . '</a>';
146
+ $privacy_policy = '<a href="https://10web.io/privacy-policy/" target="_blank">' . __('Privacy Policy', 'tenweb-booster') . '</a>';
147
+ echo sprintf(__('By signing up, you agree to 10Web’s %s and %s', 'tenweb-booster'), $terms_of_services, $privacy_policy); ?>
148
+ </div>
149
+ </div>
150
+ <?php
151
+ $html = ob_get_clean();
152
+ }
153
+ elseif ( $status == 'connect' ) {
154
+ $step = 0;
155
+ $connected = FALSE;
156
+ $cont_class = 'twb-connect-to-dashboard-container';
157
+ $title = __('10Web Booster plugin is installed!', 'tenweb-booster');
158
+ $description = __('Connect to 10Web dashboard to activate 10Web Booster on your website and start optimization process. Optimization will start automatically.', 'tenweb-booster');
159
+ ob_start();
160
+ ?>
161
+ <div class="twb-sign-up-dashboard-button-container">
162
+ <a class="twb-booster-button twb-connect-to-dashboard-button" onclick="twb_connect_to_dashboard( this )"><?php esc_html_e('Connect', 'tenweb-booster'); ?></a>
163
+ </div>
164
+ <?php
165
+ $html = ob_get_clean();
166
+ }
167
+ elseif ( $status == 'connected' ) {
168
+ $step = $params['tenweb_is_paid'] ? 0 : 2;
169
+ $connected = TRUE;
170
+ $cont_class = 'twb-connected-booster-container' . (!$params['tenweb_is_paid'] ? ' twb-is-free' : '');
171
+ $title = __('10Web Booster is active', 'tenweb-booster');
172
+ $description = __('Our plugin is now optimizing your website.', 'tenweb-booster');
173
+ $description .= __('Manage optimization settings from the 10Web dashboard.', 'tenweb-booster');
174
+ ob_start();
175
+ ?>
176
+ <div class="button-container">
177
+ <a href="<?php echo esc_url($params['dashboard_booster_url']); ?>" target="_blank" class="twb-manage-booster">
178
+ <?php esc_html_e('Manage', 'tenweb-booster'); ?>
179
+ </a>
180
+ </div>
181
+ <?php
182
+ $html = ob_get_clean();
183
+ }
184
+ ?>
185
+ <div class="twb-page-header <?php echo esc_html($cont_class); ?>">
186
+ <?php if ($connected) { ?>
187
+ <div class="twb-connected-booster-done-cont">
188
+ <?php esc_html_e('Site is connected', 'tenweb-booster'); ?>
189
+ </div>
190
+ <?php } ?>
191
+ <?php if ($title) { ?>
192
+ <p class="twb-section-title"><?php echo esc_html($title); ?></p>
193
+ <?php } ?>
194
+ <?php if ($description) { ?>
195
+ <p class="twb-header-description"><?php echo esc_html($description); ?></p>
196
+ <?php } ?>
197
+ <?php if ($step) { ?>
198
+ <ul class="twb-install-booster-steps">
199
+ <li class="<?php echo esc_html($step > 1 ? 'twb_so_check_active' : ''); ?>">
200
+ <?php esc_html_e('Install 10Web Booster', 'tenweb-booster') ?>
201
+ <span><?php esc_html_e('Activate plugin on the website', 'tenweb-booster'); ?></span>
202
+ </li>
203
+ <li class="<?php echo esc_html($step > 2 ? 'twb_so_check_active' : ''); ?>">
204
+ <?php esc_html_e('Sign up and connect', 'tenweb-booster'); ?>
205
+ <span><?php esc_html_e('Start the optimization process', 'tenweb-booster') ?></span>
206
+ </li>
207
+ <li class="<?php echo esc_html($step > 3 ? 'twb_so_check_active' : ''); ?>">
208
+ <?php echo esc_html($params['section_booster_success_title']); ?>
209
+ <span><?php echo esc_html($params['section_booster_success_desc']); ?></span>
210
+ </li>
211
+ </ul>
212
+ <?php } ?>
213
+ <?php if ($html) {
214
+ echo $html;
215
+ } ?>
216
+ </div>
217
+ <?php
218
+ }
219
+
220
+ /**
221
+ * Optimizer section view when booster connected and is pro.
222
+ *
223
+ * @param string $params
224
+ */
225
+ public function optimizer_on_pro( $params ) {
226
+ ?>
227
+ <div class="twb-analyze-img_optimizer-container twb-optimize_on twb-optimize_done">
228
+ <div>
229
+ <p class="twb-section-title"><?php esc_html_e('You’re all set!', 'tenweb-booster') ?></p>
230
+ <p class="twb-header-description"><?php esc_html_e('All images in media library are optimized.', 'tenweb-booster') ?></p>
231
+ <ul>
232
+ <li><span></span><?php esc_html_e('Auto-optimize all uploaded images.', 'tenweb-booster') ?></li>
233
+ <li><span></span><?php esc_html_e('Configure WebP format conversion', 'tenweb-booster') ?></li>
234
+ </ul>
235
+ </div>
236
+ <div class="twb-optimize_on-button-cont">
237
+ <a href="<?php echo esc_url($params['dashboard_booster_url']); ?>" target="_blank"
238
+ class="twb-optimize-add-pages"><?php esc_html_e('Manage', 'tenweb-booster') ?></a>
239
+ </div>
240
+ </div>
241
+ <?php
242
+ }
243
+
244
+ /**
245
+ * Optimizer section view when booster connected and is free.
246
+ *
247
+ * @param string $params
248
+ */
249
+ public function optimizer_on_free_not_connected( $params ) {
250
+ ?>
251
+ <div class="twb-img_optimizer-container twb-img_optimizer-not-container">
252
+ <div class="twb-img_optimizer-left">
253
+ <span class="twb-not-optimized-info"><?php esc_html_e('Not Optimized', 'tenweb-booster') ?></span>
254
+ <h5><?php echo sprintf(_n('%d <span>image</span>', '%d <span>images</span>', $params['images_count'], 'tenweb-booster'), $params['images_count']); ?></h5>
255
+ <ul>
256
+ <li><?php esc_html_e('Optimize all uploaded images', 'tenweb-booster'); ?></li>
257
+ <li><?php esc_html_e('Serve Images in WebP format', 'tenweb-booster'); ?></li>
258
+ <li><?php esc_html_e('Speed up website and reduce load time', 'tenweb-booster'); ?></li>
259
+ </ul>
260
+ </div>
261
+ <div class="twb-img_optimizer-right">
262
+ <div class="twb-img_optimizer-button-container">
263
+ <div class="twb-img_optimizer-info">
264
+ <p class="twb-section-description"><?php esc_html_e('Reduce image size by up to 40% without compromising the quality.', 'tenweb-booster'); ?></p>
265
+ <p class="twb-total_size"><?php esc_html_e('Total size:', 'tenweb-booster'); ?></p>
266
+ <p class="twb-total_size_value"><?php echo esc_html($params['images_total_size']); ?></p>
267
+ </div>
268
+ <a class="twb-img_optimize-now-button"><?php esc_html_e('Optimize Now', 'tenweb-booster'); ?></a>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ <?php
273
+ }
274
+
275
+ /**
276
+ * Optimizer section view when booster connected and is free.
277
+ *
278
+ * @param string $params
279
+ */
280
+ public function optimizer_on_free_connected( $params ) {
281
+ $pages_compressed = $params['pages_compressed'];
282
+ ?>
283
+ <div class="twb-img_optimizer-container">
284
+ <div class="twb-img_optimizer-left">
285
+ <span class="twb-optimized-info"><?php esc_html_e('Optimized for free', 'tenweb-booster') ?></span>
286
+ <h5><?php echo sprintf(_n('%d <span>image</span>', '%d <span>images</span>', $pages_compressed['total_compressed_images'], 'tenweb-booster'), $pages_compressed['total_compressed_images']); ?></h5>
287
+ <p class="twb-section-description"><?php esc_html_e('Image optimization is performed only on 6 pages included in Free plan.', 'tenweb-booster') ?></p>
288
+ <div class="twb-line_info_container">
289
+ <span><?php esc_html_e('Optimized pages', 'tenweb-booster') ?></span>
290
+ <span><?php echo sprintf(__('%d of 6', 'tenweb-booster'), $pages_compressed['compressed_pages_count']); ?></span>
291
+ </div>
292
+ <div class="twb-line_container"><span class="twb-size_<?php echo esc_attr($pages_compressed['compressed_pages_count']); ?>"></span></div>
293
+ <div class="twb-section-bottom">
294
+ <?php
295
+ $home_page = '';
296
+ if ( !empty($pages_compressed['pages']) ) {
297
+ foreach ( $pages_compressed['pages'] as $page ) {
298
+ if ( $page['permalink'] == 'Homepage' ) {
299
+ $home_page = 'twb-hompage-path';
300
+ $path = $page['permalink'];
301
+ }
302
+ else {
303
+ $path = parse_url($page['permalink']);
304
+ $path["path"] = rtrim($path["path"], "/");
305
+ $explode = explode("/", $path["path"]);
306
+ if ( count($explode) > 1 ) {
307
+ $path = '.../' . end($explode);
308
+ }
309
+ else {
310
+ $path = '...' . $path['path'];
311
+ }
312
+ }
313
+ ?>
314
+ <div class="twb-most-image-cont">
315
+ <div class="twb-most-image-cont-path <?php echo esc_attr($home_page); ?>"><?php echo esc_html($path); ?></div>
316
+ <div class="twb-most-image-cont-img-count twb-optimized">
317
+ <?php
318
+ if ( $page['images_count'] ) {
319
+ echo sprintf(_n('%d image', '%d images', $page['images_count'], 'tenweb-booster'), $page['images_count']);
320
+ }
321
+ ?>
322
+ </div>
323
+ </div>
324
+ <?php
325
+ }
326
+ }
327
+ ?>
328
+ </div>
329
+ </div>
330
+ <div class="twb-img_optimizer-right">
331
+ <span class="twb-not-optimized-info"><?php esc_html_e('Not Optimized', 'tenweb-booster') ?></span>
332
+ <h5><?php echo sprintf(_n('%d <span>image</span>', '%d <span>images</span>', $pages_compressed['total_not_compressed_images_count'], 'tenweb-booster'), $pages_compressed['total_not_compressed_images_count']); ?></h5>
333
+ <ul>
334
+ <li><?php esc_html_e('Specify the most image-heavy pages', 'tenweb-booster') ?></li>
335
+ <li><?php esc_html_e('Optimize pages with photo galleries', 'tenweb-booster') ?></li>
336
+ </ul>
337
+ <p><?php esc_html_e('Add pages with images you’d like to optimize.', 'tenweb-booster') ?></p>
338
+ <div class="twb-img_optimizer-button-container">
339
+ <div class="twb-img_optimizer-info">
340
+ <p><?php esc_html_e('Total size:', 'tenweb-booster') ?></p>
341
+ <p><?php echo esc_html($pages_compressed['total_not_compressed_images_size']) ?></p>
342
+ </div>
343
+ <a class="twb-img_add_pages_button" target="_blank" href="<?php echo esc_url($params['dashboard_booster_url']); ?>"><?php esc_html_e('Add pages', 'tenweb-booster'); ?></a>
344
+ </div>
345
+ </div>
346
+ </div>
347
+ <?php
348
+ }
349
+
350
+ /**
351
+ * Top banner.
352
+ *
353
+ * @param array $params
354
+ */
355
+ public function top_banner( $params = array() ) {
356
+ wp_enqueue_style(TenWebBooster::PREFIX . '-top-banner');
357
+ $button = $params['button'];
358
+ ?>
359
+ <div class="twb-booster-top-banner">
360
+ <?php if ( $params['notice'] ) { ?>
361
+ <p class="twb-booster-top-banner-wrapper-note">
362
+ <span class="twb-booster-top-banner-wrapper-note--text">
363
+ <?php echo esc_html($params['notice']); ?>
364
+ </span>
365
+ </p>
366
+ <?php } ?>
367
+ <div class="twb-booster-top-banner-wrapper">
368
+ <div>
369
+ <p class="twb-booster-top-banner-wrappe--images-count">
370
+ <?php echo esc_html($params['title']); ?>
371
+ </p>
372
+ <p>
373
+ <?php echo esc_html($params['desc']); ?>
374
+ </p>
375
+ </div>
376
+ <div>
377
+ <a href="<?php echo esc_url($button['url']); ?>" <?php echo esc_attr($button['target']); ?> class="twb-booster-top-banner-wrappe--button"><?php echo esc_html($button['name']); ?></a>
378
+ </div>
379
+ </div>
380
+ </div>
381
+ <?php
382
+ }
383
+
384
+ /**
385
+ * @param $params
386
+ *
387
+ * @return false|string
388
+ */
389
+ protected function popup() {
390
+ $params = array(
391
+ 'title' => __('Image optimization is not active', 'tenweb-booster'),
392
+ 'description' => __('Complete the sign up process to optimize your images for better website performance.', 'tenweb-booster'),
393
+ 'html' => '<input type="email" class="twb-sign-up-input" placeholder="Email address" />',
394
+ 'button1' => array(
395
+ 'title' => __('Sign up', 'tenweb-booster'),
396
+ 'action' => 'onclick=\'twb_sign_up_dashboard( this );\'',
397
+ 'class' => 'twb-primary',
398
+ ),
399
+ 'html2' => sprintf(__('By signing up, you agree to 10Web’s. %s and %s', 'tenweb-booster'),
400
+ '<a href="https://10web.io/terms-of-service/" target="_blank">' . __('Terms of Services', 'tenweb-booster') . '</a>',
401
+ '<a href="https://10web.io/privacy-policy/" target="_blank">' . __('Privacy Policy', 'tenweb-booster') . '</a>'),
402
+ 'dismiss' => array(
403
+ 'action' => 'onclick=\'twb_leaving_popup = true; jQuery(".twb-popup-overlay").addClass("twb-hidden");\'',
404
+ ),
405
+ );
406
+ ob_start();
407
+ ?>
408
+ <div class="twb-hidden twb-popup-overlay">
409
+ <?php
410
+ if (isset($params['dismiss'])) {
411
+ ?>
412
+ <div class="twb-popup-dismiss" <?php echo $params['dismiss']['action']; ?>></div>
413
+ <?php
414
+ }
415
+ ?>
416
+ <div class="twb-popup">
417
+ <div class="twb-popup-content">
418
+ <div class="twb-popup-title"><?php echo esc_html($params['title']); ?></div>
419
+ <div class="twb-popup-description"><?php echo esc_html($params['description']); ?></div>
420
+ <?php
421
+ if (isset($params['html'])) {
422
+ ?>
423
+ <div class="twb-html"><?php echo ($params['html']); ?></div>
424
+ <?php
425
+ }
426
+ ?>
427
+ </div>
428
+ <?php
429
+ if (isset($params['button1']) || isset($params['button2'])) {
430
+ ?>
431
+ <div class="twb-popup-button">
432
+ <?php
433
+ if (isset($params['button1'])) {
434
+ ?>
435
+ <a <?php echo $params['button1']['action']; ?> class="wd-float-left <?php echo esc_html($params['button1']['class']); ?>"><?php echo esc_html($params['button1']['title']); ?></a>
436
+ <?php
437
+ }
438
+ if (isset($params['button2'])) {
439
+ ?>
440
+ <a <?php echo $params['button2']['action']; ?> class="wd-float-right <?php echo esc_html($params['button2']['class']); ?>"><?php echo esc_html($params['button2']['title']); ?></a>
441
+ <?php
442
+ }
443
+ if (isset($params['html2'])) {
444
+ ?>
445
+ <span class="twb-html"><?php echo ($params['html2']); ?></span>
446
+ <?php
447
+ }
448
+ ?>
449
+ </div>
450
+ <?php
451
+ }
452
+ ?>
453
+ </div>
454
+ </div>
455
+ <?php
456
+ return ob_get_clean();
457
+ }
458
+ }
css/bwg_frontend.css CHANGED
@@ -646,7 +646,6 @@ div[id^="bwg_container"] .bwg-border-box * {
646
  display: block;
647
  }
648
 
649
- #wp-admin-bar-booster-top-button #wp-admin-bar-booster-wrap.hidden,
650
  .hidden {
651
  display: none;
652
  }
@@ -2531,32 +2530,3 @@ div[id^='bwg_container1_'] div[id^='bwg_container2_'] span[class^='bwg_mosaic_pl
2531
  top: 10px;
2532
  z-index: 9999;
2533
  }
2534
-
2535
- #wp-admin-bar-booster-top-button .ab-item,
2536
- #wp-admin-bar-booster-top-button .ab-item:hover {
2537
- margin: 3px 0 0 10px !important;
2538
- height: 26px !important;
2539
- background: #22B339 0% 0% no-repeat padding-box;
2540
- border-radius: 2px;
2541
- font-weight: 600;
2542
- font-size: 12px;
2543
- line-height: 24px;
2544
- letter-spacing: 0.1px;
2545
- text-align: center;
2546
- color: #FFFFFF !important;
2547
- cursor: pointer;
2548
- }
2549
- #wp-admin-bar-booster-top-button .ab-item:before {
2550
- content: '';
2551
- top: 4px;
2552
- left: 0px;
2553
- width: 18px;
2554
- height: 18px;
2555
- background: transparent url("images/optimize.svg") 0% 0% no-repeat padding-box !important;
2556
- }
2557
-
2558
- #wpadminbar:not(.mobile) .ab-top-menu>#wp-admin-bar-booster-top-button:hover>.ab-item,
2559
- #wp-admin-bar-booster-top-button .ab-item:hover {
2560
- background: #22B339 0% 0% no-repeat padding-box !important;
2561
- color: #FFFFFF !important;
2562
- }
646
  display: block;
647
  }
648
 
 
649
  .hidden {
650
  display: none;
651
  }
2530
  top: 10px;
2531
  z-index: 9999;
2532
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/styles.min.css CHANGED
@@ -1 +1 @@
1
- .spider_popup_wrap .bwg_image_wrap figure{margin:0;padding:0;display:inline-block}figure.zoom{background-position:50% 50%;background-size:200%;position:relative;width:auto;overflow:hidden;cursor:zoom-in}figure.zoom img:hover{opacity:0}figure.zoom img{transition:opacity .5s;display:block}div[id^=bwg_container] p{padding:0!important;margin:0!important}div[id^=bwg_container] img{box-shadow:none!important}div[id^=bwg_container] *{margin:0}div[id^=bwg_container] .SumoSelect.open>.CaptionCont,div[id^=bwg_container] .SumoSelect:focus>.CaptionCont,div[id^=bwg_container] .SumoSelect:hover>.CaptionCont,div[id^=bwg_container] .SumoSelect>.CaptionCont{border:none;box-shadow:none}#bwg_tag_wrap{background-color:#fff;width:100%;font-family:inherit;margin:0 -5px 20px 0;z-index:200;position:relative}.bwg_search_loupe_container,.bwg_search_reset_container{font-size:18px;color:#ccc;cursor:pointer;position:relative}#bwg_tag_container p{text-align:center}#bwg_tag_container{border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;width:256px;float:right}#spider_popup_wrap a{border:none;box-shadow:none}div[id^=bwg_container].bwg_container .bwg-a{border:none;box-shadow:none!important;outline:0;font-size:0;line-height:normal;cursor:pointer;text-decoration:none}div[id^=bwg_container].bwg_container .bwg-masonry-thumb-description,div[id^=bwg_container].bwg_container .bwg-thumb-description{cursor:auto}div[id^=bwg_container] div[id^=bwg_container] .bwg_img_clear{max-height:none!important;max-width:none!important;padding:0!important}.tag_cloud_link{font-size:inherit!important}@media print{#spider_popup_left,#spider_popup_right,.bwg_image_info,[class^=bwg_slideshow_title_text_],[id^=bwg_slideshow_play_pause_],[id^=spider_slideshow_left_],[id^=spider_slideshow_right_]{background:0 0}}.bwg_spider_popup_loading,.footer-list-block .bwp_gallery .bwg_spider_popup_loading,.footer-list-block .bwp_gallery_tags .bwg_spider_popup_loading{background-image:url(../images/ajax_loader.png);background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:30px 30px;border:none!important;display:none;height:30px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:30px;z-index:10102}.bwg_filmstrip_thumbnail_img{max-width:none!important}.dashicons-arrow-down-alt2:before{content:"\f347";height:100%;display:inline-block}.footer-list-block .bwp_gallery .spider_popup_overlay,.footer-list-block .bwp_gallery_tags .spider_popup_overlay,.spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.bwp_gallery_tags div[id^=bwg_container] li{border:none}.spider_popup_close,.spider_popup_close_fullscreen{-moz-box-sizing:content-box!important;box-sizing:content-box!important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}.spider_popup_close_fullscreen{margin:10px 7px;right:7px}#spider_popup_left{left:0}#spider_popup_right{right:0}#spider_popup_left:hover,#spider_popup_right:hover{visibility:visible}#spider_popup_left:hover span{left:20px}#spider_popup_right:hover span{left:auto;right:20px}#spider_popup_left,#spider_popup_right{background:transparent url(../images/blank.gif) repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#bwg_image_container #spider_popup_left,#bwg_image_container #spider_popup_right{width:25%}#spider_popup_left-ico,#spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.bwg_captcha_refresh{background-image:url(../images/captcha_refresh.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%;border-width:0;cursor:pointer;display:inline-block;height:20px;width:20px;margin:0;padding:0;vertical-align:middle}.bwg_captcha_input{vertical-align:middle;width:75px!important}.bwg_captcha_img{cursor:pointer;margin:0 5px 0 5px;vertical-align:middle}.bwg_comment_error{color:red;display:block}.bwg_comment_waiting_message{display:none}.bwg_image_hit_container1,.bwg_image_info_container1,.bwg_image_rate_container1{height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_rate_container1{display:none}.bwg_image_hit_container2,.bwg_image_info_container2,.bwg_image_rate_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_hit_spun,.bwg_image_info_spun,.bwg_image_rate_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.bwg_image_hit,.bwg_image_info,.bwg_image_rate{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.bwg_image_rate{z-index:999!important}.bwg_image_rate_disabled{display:none;position:absolute;width:100%;height:40px;top:0}@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;width:auto;height:auto;opacity:1;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);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_load_more_ajax_loading.bwg-hidden{height:0}.bwg_loading_div_2{display:table;vertical-align:middle;width:100%;height:100%;background-color:#fff;opacity:.95}.bwg_loading_div_3{display:table-cell;text-align:center;position:relative;vertical-align:middle}.bwg_spider_ajax_loading{border:none!important;display:inline-block;text-align:center;position:relative;vertical-align:middle;background-image:url(../images/ajax_loader.png);float:none;width:30px;height:30px;background-size:30px 30px}.bwg-hidden{visibility:hidden}.bwg_container{position:relative;margin:20px auto}.bwg_inst_play_btn_cont,.bwg_inst_play_btn_cont .bwg_inst_play{display:block}#wp-admin-bar-booster-top-button #wp-admin-bar-booster-wrap.hidden,.hidden{display:none}.bwg-loading{width:100%;height:100%;opacity:.95;position:absolute;background-image:url(../images/ajax_loader.png);background-position:center;background-repeat:no-repeat;background-size:50px;z-index:100100;top:0;left:0}#bwg_download{display:inline-block}#bwg_download.hidden{display:none}.bwg_thumbnail.bwg_container .search_line.bwg_tag_select_view{min-height:50px;-webkit-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);-moz-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);box-shadow:0 5px 7px -5px rgba(0,0,0,.16);margin-bottom:10px;display:inline-block;width:100%}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:left;display:table-cell;text-align:left;vertical-align:middle}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap #bwg_tag_container,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select{border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .search_tags_container{width:25%;min-width:120px;max-width:180px;margin-right:20px;border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px;float:left;height:30px;padding:0;cursor:pointer;background:#fff}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select,.bwg_thumbnail.bwg_container .search_line .placeholder,.bwg_thumbnail.bwg_container .search_line .search-txt,.bwg_thumbnail.bwg_container .search_line .select-all,.bwg_thumbnail.bwg_container .search_line.SumoSelect .opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-weight:400;font-family:Ubuntu;margin:0;border:none}.bwg_thumbnail.bwg_container .search_line .select-all label{margin-bottom:0;line-height:13px}.bwg_thumbnail.bwg_container .search_line .SumoSelect ul.options:not(:empty){padding:15px 0 0 10px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect{padding:0 10px;width:initial;height:inherit;cursor:pointer;display:block;border:none;box-shadow:none;border-radius:0;max-width:100%;background-color:transparent;line-height:inherit;vertical-align:bottom}.bwg_thumbnail.bwg_container .search_line .bwg_search_input_container{height:30px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100%);margin:0;overflow:hidden}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{height:30px;padding:0 10px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100% - 64px);display:inline-table}.bwg_thumbnail.bwg_container .search_line .CaptionCont span{display:block!important;vertical-align:middle;color:#323a45!important;font-size:12px;text-transform:uppercase;font-family:Ubuntu;cursor:pointer;line-height:29px;max-width:calc(100% - 20px)}.bwg_thumbnail .search_tags{cursor:pointer}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all>span,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt span{margin-left:-35px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:25px}.bwg_thumbnail .bwg_search_input::-webkit-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input::-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu;line-height:30px}.bwg_thumbnail .bwg_search_input:-ms-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input:-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .search-txt::-webkit-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title{width:calc(100% - 20px);height:29px;text-align:center;display:inline-block;background:#fff;position:absolute;top:.5px;left:10px;white-space:nowrap;border-radius:15px;color:#4e4e4e;text-transform:uppercase;overflow:hidden}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title span{line-height:28px}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container{line-height:29px;display:inline-block;top:0;margin-right:10px;vertical-align:middle;float:none;padding-top:0;font-size:12px;font-family:Ubuntug}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container1{margin-left:0;float:left;top:0;line-height:30px;width:auto;height:30px;margin-left:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_reset_container{right:0;top:0;line-height:30px;width:11px;height:30px;margin-right:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:right;width:30%;min-width:120px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1 .bwg_search_container_2{width:100%!important;float:right}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all{padding:0 0 3px 35px!important;height:13px;line-height:13px;margin-bottom:15px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt{margin-bottom:15px;padding:0;list-style:none;color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{font-family:Ubuntu;font-size:12px;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background:0 0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;font-weight:400;margin-bottom:0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont{height:inherit;border:transparent;background:inherit;width:100%;cursor:pointer;max-height:calc(100% - 2px)}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label{margin:0;line-height:100%;cursor:pointer;width:20px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i{background:0 0;line-height:100%;height:100%}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.closed:before,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.opened:before{color:#323a45;font-size:10px;line-height:30px}.bwg_thumbnail.bwg_container .search_line .bwg_reset{position:absolute}.bwg_thumbnail.bwg_container .search_line .no-match{font-family:Ubuntu;font-size:12px;color:#323a45;padding:5px 25px!important;text-align:center}.bwg_thumbnail.bwg_container .search_line .search-txt{border:transparent;background:0 0;padding:4px 0!important;height:100%}.bwg_thumbnail.bwg_container .search_line .search-txt:focus{box-shadow:none}.bwg_thumbnail.bwg_container .search_line .bwg_order.SumoUnder{display:none}.bwg_slideshow_image_container{position:absolute}.bwg_slideshow_image_container>div>div{display:table;margin:0 auto}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_] img[id^=bwg_slideshow_image_]{display:inline-block}.bwg_thumbnail #bwg_tag_container p{text-align:left}.bwg_thumbnail .bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;background-color:#fff;max-width:100%;box-shadow:none;border:.5px solid rgba(0,0,0,.15);border-radius:15px}.bwg_thumbnail .bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;text-align:center}.bwg_thumbnail .SumoSelect>.optWrapper>.options li.opt:hover{background-color:transparent}.bwg-zoom-effect .bwg-zoom-effect-overlay{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0;-webkit-transition:all .45s ease-in-out;transition:all .45s ease-in-out}.bwg-zoom-effect-overlay{display:flex;align-items:center;justify-content:center}.bwg-zoom-effect:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@media (min-width:480px){.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.bwg_thumbnails_masonry .bwg-masonry-thumbnails{overflow:hidden}.bwg_thumbnails_masonry .bwg-masonry-thumbnails .bwg-item{box-sizing:border-box}.bwg-masonry-horizontal{flex-direction:row}.bwg-masonry-horizontal-parent{overflow-x:scroll;overflow-y:hidden}.bwg-masonry-horizontal-container{width:fit-content}.bwg-item.bwg-empty-item{border:0!important;padding:0!important}.bwg-background{background-color:rgba(0,0,0,0);position:relative;width:100%}.bwg-background .wd_error{color:#323a45;font-weight:700}div[id^=bwg_container] .bwg-carousel{margin:0 auto}.bwg_carousel_preload{background-image:url(../images/ajax_loader.png);background-size:50px!important;background-repeat:no-repeat;background-color:#fff;background-position:center}.bwg_container.bwg_carousel *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_]{position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_image_container_]{display:inline-block;position:absolute;text-align:center;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_] div{display:table;margin:0 auto}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_image_]{padding:0!important;display:inline-block;float:none!important;margin:4px!important;position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_],.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_]:hover{text-decoration:none;margin:4px;display:block;position:relative;z-index:17}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel-cont-child{max-width:100%;position:relative;overflow:hidden;height:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel-image{border:0;position:absolute;display:block;max-width:none;padding:0!important;margin:0!important;float:none!important;vertical-align:middle;height:100%;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel{position:relative;max-width:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature]{position:absolute;display:block;overflow:hidden;cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature] [class^=bwg_carousel-caption] [class^=bwg_carousel_title_text_]{text-decoration:none;position:absolute;z-index:15;display:inline-block;width:75%;top:0;text-align:center;word-wrap:break-word;word-break:break-word}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{bottom:38%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:0%;z-index:13;visibility:visible}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{right:0;left:auto;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left]{left:20px;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_video_hide]{width:100%;height:100%;position:absolute;z-index:22}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_] span,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:inline-table;line-height:0;margin-top:-15px;position:absolute;top:55%}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_]:hover,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]:hover{cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]{bottom:0;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:medium none;position:absolute;height:inherit;width:30%;left:35%;z-index:13}.bwg_container.bwg_carousel .bwg_carousel_play_pause:hover .bwg_carousel_play_pause-ico{display:inline-block!important}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]:hover span{position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_] span{display:flex;justify-content:center;align-items:center}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico{display:none!important;cursor:pointer;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico:hover{display:inline-block;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_]{padding:0!important;float:none!important;width:100%;height:100%;vertical-align:middle;position:relative;display:table;background-color:#000;text-align:center}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_video_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;position:relative;display:table-cell;background-color:#000;text-align:center}.bwg_thumbnail.bwg_container{padding:0 1px;min-height:140px}.bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive{display:inline-block}body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_order_cont,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_search_container_1,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .search_tags_container{width:100%;margin:0 0 10px 0;text-align:center;max-width:100%}.search_line .SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:26px}.bwg_container.bwg_blog_style .fluid-width-video-wrapper,.bwg_container.bwg_carousel .fluid-width-video-wrapper,.bwg_container.bwg_image_browser .fluid-width-video-wrapper{width:100%;position:unset!important;padding:0!important}.bwg_inst_play_btn_cont{width:100%;height:100%;position:absolute;z-index:1;cursor:pointer;top:0}.bwg_inst_play{position:absolute;width:50px;height:50px;background-position:center center;background-repeat:no-repeat;background-size:cover;transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-webkit-transition:background-image .2s ease-out;top:0;left:0;right:0;bottom:0;margin:auto}.bwg_inst_play:hover{background-position:center center;background-repeat:no-repeat;background-size:cover}.spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.spider_popup_wrap{display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.bwg_popup_image{width:auto;vertical-align:middle;display:inline-block}.bwg_slider img{display:inline-block}.bwg_popup_embed{width:100%;height:100%;vertical-align:middle;text-align:center;display:table}.bwg_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.bwg_toggle_btn{margin:0;padding:0}.bwg_ctrl_btn_container{position:absolute;width:100%;z-index:10150}.bwg_btn_container.bwg_no_ctrl_btn .bwg_ctrl_btn_container{background:0 0}.bwg_toggle_container{cursor:pointer;left:50%;line-height:0;position:absolute;text-align:center;z-index:10150}#spider_popup_left-ico span,#spider_popup_right-ico span,.spider_popup_close span{display:table-cell;text-align:center;vertical-align:middle}.bwg_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.bwg_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_comment_wrap,.bwg_ecommerce_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.bwg_comment_container,.bwg_ecommerce_container{-moz-box-sizing:border-box;height:100%;overflow:hidden;position:absolute;top:0;z-index:10103}#bwg_ecommerce{padding:10px}.bwg_ecommerce_body{background:0 0!important;border:none!important}.pge_tabs{list-style-type:none;margin:0;padding:0;background:0 0!important}.pge_tabs li a,.pge_tabs li a:hover,.pge_tabs li.pge_active a{text-decoration:none;display:block;width:100%;outline:0!important;padding:8px 5px!important;font-weight:700;font-size:13px}.pge_add_to_cart a{padding:5px 10px;text-decoration:none!important;display:block}.pge_add_to_cart{margin:5px 0 15px}.pge_add_to_cart_title{font-size:17px;padding:5px}.pge_add_to_cart div:first-child{float:left}.pge_add_to_cart div:last-child{float:right;margin-top:4px}.pge_add_to_cart:after,.pge_tabs:after{clear:both;content:"";display:table}#downloads table tr td,#downloads table tr th{padding:6px 10px!important;text-transform:none!important}.bwg_comments input[type=submit],.bwg_ecommerce_panel input[type=button]{cursor:pointer;font-size:15px;width:100%;margin-bottom:5px}.bwg_comments,.bwg_ecommerce_panel{bottom:0;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.bwg_comments{height:100%}.bwg_comment_body_p,.bwg_comments p{margin:5px!important;text-align:left;word-wrap:break-word;word-break:break-all}.bwg_ecommerce_panel p{padding:5px!important;text-align:left;word-wrap:break-word;word-break:break-all;margin:0!important}.bwg_comments .bwg-submit-disabled{opacity:.5}.bwg_comments textarea{height:120px;resize:vertical}.bwg_comment_delete_btn{color:#7a7a7a;cursor:pointer;float:right;font-size:14px;margin:2px}.bwg_comments_close,.bwg_ecommerce_close{cursor:pointer;line-height:0;position:relative;font-size:13px;margin:5px;z-index:10150}.bwg_ecommerce_panel a:hover{text-decoration:underline}.bwg_comment_textarea::-webkit-scrollbar{width:4px}.bwg_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}.bwg_ctrl_btn_container a,.bwg_ctrl_btn_container a:hover{text-decoration:none}.bwg_facebook:hover{color:#3b5998}.bwg_twitter:hover{color:#4099fb}.bwg_pinterest:hover{color:#cb2027}.bwg_tumblr:hover{color:#2f5070}.bwg_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.bwg_filmstrip_container{position:absolute;z-index:10150}.bwg_filmstrip{overflow:hidden;position:absolute;z-index:10106}.bwg_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.bwg_filmstrip_thumbnail{position:relative;background:0 0;float:left;cursor:pointer;overflow:hidden}.bwg_filmstrip_thumbnail .bwg_filmstrip_thumbnail_img_wrap{overflow:hidden}.bwg_thumb_active{opacity:1}.bwg_filmstrip_thumbnail_img{display:block;opacity:1}.bwg_filmstrip_left{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_filmstrip_right{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bwg_watermark_container{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_watermark_container>div{display:table;margin:0 auto}.bwg_watermark_spun{display:table-cell;overflow:hidden;position:relative}.bwg_watermark_image{margin:4px;position:relative;z-index:10141}.bwg_watermark_text,.bwg_watermark_text:hover{text-decoration:none;margin:4px;position:relative;z-index:10141}.bwg_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.bwg_slide_bg{margin:0 auto;width:inherit;height:inherit}.bwg_slider{height:inherit;width:inherit}.bwg_popup_image_spun{height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.bwg_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}.bwg_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.bwg_gridlet{opacity:1;position:absolute}.bwg_image_info::-webkit-scrollbar{width:4px}.bwg_image_info::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_image_info::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}#bwg_rate_form .bwg_hint{margin:0 5px;display:none}.bwg_star{display:inline-block;width:unset!important}.bwg_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}#bwg_comment_form label{display:block;font-weight:700;margin-top:17px;text-transform:uppercase}#bwg_comment_form .bwg-privacy-policy-box label{text-transform:unset;word-break:break-word}.bwg_popup_image_spun .bwg_popup_image_spun1{width:inherit;height:inherit}.bwg_popup_image_spun1 .bwg_popup_image_spun2{vertical-align:middle;text-align:center;height:100%}#embed_conteiner{table-layout:fixed;height:100%}#opacity_div{background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#loading_div{text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}#ecommerce_ajax_loading{position:absolute}#ecommerce_opacity_div{display:none;background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#ecommerce_loading_div{display:none;text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg_ecommerce_panel.bwg_popup_sidebar_panel.bwg_popup_sidebar{text-align:left}#ajax_loading{position:absolute}@media (max-width:480px){.bwg_image_count_container{display:none}.bwg_image_title,.bwg_image_title *{font-size:12px}.bwg_image_description,.bwg_image_description *{font-size:10px}}body[data-elementor-device-mode=mobile] .bwg-container.bwg-masonry-thumbnails .bwg-title1,body[data-elementor-device-mode=mobile] .bwg-container.bwg-standard-thumbnails .bwg-title1,body[data-elementor-device-mode=mobile] .bwg-mosaic-thumbnails,body[data-elementor-device-mode=tablet] .bwg-container.bwg-masonry-thumbnails .bwg-title1,body[data-elementor-device-mode=tablet] .bwg-container.bwg-standard-thumbnails .bwg-title1,body[data-elementor-device-mode=tablet] .bwg-mosaic-thumbnails{opacity:1!important}body[data-elementor-device-mode=mobile] .bwg-zoom-effect .bwg-zoom-effect-overlay,body[data-elementor-device-mode=mobile] .bwg-zoom-effect-overlay>span,body[data-elementor-device-mode=tablet] .bwg-zoom-effect .bwg-zoom-effect-overlay,body[data-elementor-device-mode=tablet] .bwg-zoom-effect-overlay>span{opacity:1!important;background-color:unset!important}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_] *{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_]{border-collapse:collapse;display:table;position:relative;text-align:center;margin:auto}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_image_]{display:inline-block;padding:0!important;margin:0!important;float:none!important;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_embed_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;display:inline-block;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_]{position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause{bottom:0;cursor:pointer;display:table;height:inherit;outline:medium none;position:absolute;width:30%;left:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span[id^=bwg_slideshow_play_pause-ico_]{display:inline-block!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span{position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]{display:none!important;cursor:pointer;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]:hover{display:inline-block;position:relative;z-index:13}.bwg_embed_frame .instagram-media,div[id^=bwg_container1_] div[id^=bwg_container2_] .instagram-media{margin:0 auto!important;min-width:unset!important}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,div[id^=bwg_container1_] div[id^=bwg_container2_] .bwg_slideshow_filmstrip_fix_count{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;width:auto;height:auto;opacity:1;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center}.lazy_loader{background-image:url(../images/ajax_loader.png);background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg-container-temp0{visibility:hidden!important;position:absolute!important}.bwg_image_browser .pagination-links{display:flex;padding:0}.bwg_image_browser .pagination-links_col1{flex-grow:3;text-align:left}.bwg_image_browser .pagination-links_col2{flex-grow:4;text-align:center}.bwg_image_browser .pagination-links_col3{flex-grow:3;text-align:right}.bwg_current_page[type=number]{width:35px;display:inline-block;-moz-appearance:textfield;line-height:normal!important}.bwg_current_page::-webkit-inner-spin-button,.bwg_current_page::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bwg_container .bwg_tag_button_view_container{display:flex;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-bottom:45px;position:relative;padding-top:3px;flex-wrap:wrap;overflow:hidden;clear:both}.bwg_container .bwg_tag_button_view_container button{cursor:pointer}.bwg_container .bwg_tag_button_view_container button.active{cursor:default}.bwg_container .bwg_tag_button_view_container .verLine{min-height:26px;margin:0 15px}.bwg_container .bwg_tag_button_see_all{margin-bottom:70px;position:relative;display:none}.bwg_container .bwg_tag_button_see_all .see_all_tags{text-transform:uppercase;position:absolute;padding:10px 25px;font-weight:600;cursor:pointer;left:47%;top:-23px}.bwg_container .bwg_tag_button_see_all .see_all_tags span{display:inline-block;line-height:normal;text-align:center;border-radius:50%;margin-right:10px;font-weight:500;color:#fff;height:18px;width:18px}.bwg_addThis{position:absolute;left:10px;top:10px;z-index:9999}#wp-admin-bar-booster-top-button .ab-item,#wp-admin-bar-booster-top-button .ab-item:hover{margin:3px 0 0 10px!important;height:26px!important;background:#22b339 0 0 no-repeat padding-box;border-radius:2px;font-weight:600;font-size:12px;line-height:24px;letter-spacing:.1px;text-align:center;color:#fff!important;cursor:pointer}#wp-admin-bar-booster-top-button .ab-item:before{content:'';top:4px;left:0;width:18px;height:18px;background:transparent url(images/optimize.svg) 0 0 no-repeat padding-box!important}#wp-admin-bar-booster-top-button .ab-item:hover,#wpadminbar:not(.mobile) .ab-top-menu>#wp-admin-bar-booster-top-button:hover>.ab-item{background:#22b339 0 0 no-repeat padding-box!important;color:#fff!important}
1
+ .spider_popup_wrap .bwg_image_wrap figure{margin:0;padding:0;display:inline-block}figure.zoom{background-position:50% 50%;background-size:200%;position:relative;width:auto;overflow:hidden;cursor:zoom-in}figure.zoom img:hover{opacity:0}figure.zoom img{transition:opacity .5s;display:block}div[id^=bwg_container] p{padding:0!important;margin:0!important}div[id^=bwg_container] img{box-shadow:none!important}div[id^=bwg_container] *{margin:0}div[id^=bwg_container] .SumoSelect.open>.CaptionCont,div[id^=bwg_container] .SumoSelect:focus>.CaptionCont,div[id^=bwg_container] .SumoSelect:hover>.CaptionCont,div[id^=bwg_container] .SumoSelect>.CaptionCont{border:none;box-shadow:none}#bwg_tag_wrap{background-color:#fff;width:100%;font-family:inherit;margin:0 -5px 20px 0;z-index:200;position:relative}.bwg_search_loupe_container,.bwg_search_reset_container{font-size:18px;color:#ccc;cursor:pointer;position:relative}#bwg_tag_container p{text-align:center}#bwg_tag_container{border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;width:256px;float:right}#spider_popup_wrap a{border:none;box-shadow:none}div[id^=bwg_container].bwg_container .bwg-a{border:none;box-shadow:none!important;outline:0;font-size:0;line-height:normal;cursor:pointer;text-decoration:none}div[id^=bwg_container].bwg_container .bwg-masonry-thumb-description,div[id^=bwg_container].bwg_container .bwg-thumb-description{cursor:auto}div[id^=bwg_container] div[id^=bwg_container] .bwg_img_clear{max-height:none!important;max-width:none!important;padding:0!important}.tag_cloud_link{font-size:inherit!important}@media print{#spider_popup_left,#spider_popup_right,.bwg_image_info,[class^=bwg_slideshow_title_text_],[id^=bwg_slideshow_play_pause_],[id^=spider_slideshow_left_],[id^=spider_slideshow_right_]{background:0 0}}.bwg_spider_popup_loading,.footer-list-block .bwp_gallery .bwg_spider_popup_loading,.footer-list-block .bwp_gallery_tags .bwg_spider_popup_loading{background-image:url(../images/ajax_loader.png);background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:30px 30px;border:none!important;display:none;height:30px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:30px;z-index:10102}.bwg_filmstrip_thumbnail_img{max-width:none!important}.dashicons-arrow-down-alt2:before{content:"\f347";height:100%;display:inline-block}.footer-list-block .bwp_gallery .spider_popup_overlay,.footer-list-block .bwp_gallery_tags .spider_popup_overlay,.spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.bwp_gallery_tags div[id^=bwg_container] li{border:none}.spider_popup_close,.spider_popup_close_fullscreen{-moz-box-sizing:content-box!important;box-sizing:content-box!important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}.spider_popup_close_fullscreen{margin:10px 7px;right:7px}#spider_popup_left{left:0}#spider_popup_right{right:0}#spider_popup_left:hover,#spider_popup_right:hover{visibility:visible}#spider_popup_left:hover span{left:20px}#spider_popup_right:hover span{left:auto;right:20px}#spider_popup_left,#spider_popup_right{background:transparent url(../images/blank.gif) repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#bwg_image_container #spider_popup_left,#bwg_image_container #spider_popup_right{width:25%}#spider_popup_left-ico,#spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.bwg_captcha_refresh{background-image:url(../images/captcha_refresh.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%;border-width:0;cursor:pointer;display:inline-block;height:20px;width:20px;margin:0;padding:0;vertical-align:middle}.bwg_captcha_input{vertical-align:middle;width:75px!important}.bwg_captcha_img{cursor:pointer;margin:0 5px 0 5px;vertical-align:middle}.bwg_comment_error{color:red;display:block}.bwg_comment_waiting_message{display:none}.bwg_image_hit_container1,.bwg_image_info_container1,.bwg_image_rate_container1{height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_rate_container1{display:none}.bwg_image_hit_container2,.bwg_image_info_container2,.bwg_image_rate_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_hit_spun,.bwg_image_info_spun,.bwg_image_rate_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.bwg_image_hit,.bwg_image_info,.bwg_image_rate{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.bwg_image_rate{z-index:999!important}.bwg_image_rate_disabled{display:none;position:absolute;width:100%;height:40px;top:0}@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;width:auto;height:auto;opacity:1;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);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_load_more_ajax_loading.bwg-hidden{height:0}.bwg_loading_div_2{display:table;vertical-align:middle;width:100%;height:100%;background-color:#fff;opacity:.95}.bwg_loading_div_3{display:table-cell;text-align:center;position:relative;vertical-align:middle}.bwg_spider_ajax_loading{border:none!important;display:inline-block;text-align:center;position:relative;vertical-align:middle;background-image:url(../images/ajax_loader.png);float:none;width:30px;height:30px;background-size:30px 30px}.bwg-hidden{visibility:hidden}.bwg_container{position:relative;margin:20px auto}.bwg_inst_play_btn_cont,.bwg_inst_play_btn_cont .bwg_inst_play{display:block}.hidden{display:none}.bwg-loading{width:100%;height:100%;opacity:.95;position:absolute;background-image:url(../images/ajax_loader.png);background-position:center;background-repeat:no-repeat;background-size:50px;z-index:100100;top:0;left:0}#bwg_download{display:inline-block}#bwg_download.hidden{display:none}.bwg_thumbnail.bwg_container .search_line.bwg_tag_select_view{min-height:50px;-webkit-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);-moz-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);box-shadow:0 5px 7px -5px rgba(0,0,0,.16);margin-bottom:10px;display:inline-block;width:100%}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:left;display:table-cell;text-align:left;vertical-align:middle}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap #bwg_tag_container,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select{border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .search_tags_container{width:25%;min-width:120px;max-width:180px;margin-right:20px;border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px;float:left;height:30px;padding:0;cursor:pointer;background:#fff}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select,.bwg_thumbnail.bwg_container .search_line .placeholder,.bwg_thumbnail.bwg_container .search_line .search-txt,.bwg_thumbnail.bwg_container .search_line .select-all,.bwg_thumbnail.bwg_container .search_line.SumoSelect .opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-weight:400;font-family:Ubuntu;margin:0;border:none}.bwg_thumbnail.bwg_container .search_line .select-all label{margin-bottom:0;line-height:13px}.bwg_thumbnail.bwg_container .search_line .SumoSelect ul.options:not(:empty){padding:15px 0 0 10px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect{padding:0 10px;width:initial;height:inherit;cursor:pointer;display:block;border:none;box-shadow:none;border-radius:0;max-width:100%;background-color:transparent;line-height:inherit;vertical-align:bottom}.bwg_thumbnail.bwg_container .search_line .bwg_search_input_container{height:30px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100%);margin:0;overflow:hidden}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{height:30px;padding:0 10px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100% - 64px);display:inline-table}.bwg_thumbnail.bwg_container .search_line .CaptionCont span{display:block!important;vertical-align:middle;color:#323a45!important;font-size:12px;text-transform:uppercase;font-family:Ubuntu;cursor:pointer;line-height:29px;max-width:calc(100% - 20px)}.bwg_thumbnail .search_tags{cursor:pointer}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all>span,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt span{margin-left:-35px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:25px}.bwg_thumbnail .bwg_search_input::-webkit-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input::-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu;line-height:30px}.bwg_thumbnail .bwg_search_input:-ms-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input:-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .search-txt::-webkit-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title{width:calc(100% - 20px);height:29px;text-align:center;display:inline-block;background:#fff;position:absolute;top:.5px;left:10px;white-space:nowrap;border-radius:15px;color:#4e4e4e;text-transform:uppercase;overflow:hidden}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title span{line-height:28px}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container{line-height:29px;display:inline-block;top:0;margin-right:10px;vertical-align:middle;float:none;padding-top:0;font-size:12px;font-family:Ubuntug}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container1{margin-left:0;float:left;top:0;line-height:30px;width:auto;height:30px;margin-left:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_reset_container{right:0;top:0;line-height:30px;width:11px;height:30px;margin-right:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:right;width:30%;min-width:120px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1 .bwg_search_container_2{width:100%!important;float:right}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all{padding:0 0 3px 35px!important;height:13px;line-height:13px;margin-bottom:15px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt{margin-bottom:15px;padding:0;list-style:none;color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{font-family:Ubuntu;font-size:12px;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background:0 0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;font-weight:400;margin-bottom:0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont{height:inherit;border:transparent;background:inherit;width:100%;cursor:pointer;max-height:calc(100% - 2px)}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label{margin:0;line-height:100%;cursor:pointer;width:20px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i{background:0 0;line-height:100%;height:100%}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.closed:before,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.opened:before{color:#323a45;font-size:10px;line-height:30px}.bwg_thumbnail.bwg_container .search_line .bwg_reset{position:absolute}.bwg_thumbnail.bwg_container .search_line .no-match{font-family:Ubuntu;font-size:12px;color:#323a45;padding:5px 25px!important;text-align:center}.bwg_thumbnail.bwg_container .search_line .search-txt{border:transparent;background:0 0;padding:4px 0!important;height:100%}.bwg_thumbnail.bwg_container .search_line .search-txt:focus{box-shadow:none}.bwg_thumbnail.bwg_container .search_line .bwg_order.SumoUnder{display:none}.bwg_slideshow_image_container{position:absolute}.bwg_slideshow_image_container>div>div{display:table;margin:0 auto}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_] img[id^=bwg_slideshow_image_]{display:inline-block}.bwg_thumbnail #bwg_tag_container p{text-align:left}.bwg_thumbnail .bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;background-color:#fff;max-width:100%;box-shadow:none;border:.5px solid rgba(0,0,0,.15);border-radius:15px}.bwg_thumbnail .bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;text-align:center}.bwg_thumbnail .SumoSelect>.optWrapper>.options li.opt:hover{background-color:transparent}.bwg-zoom-effect .bwg-zoom-effect-overlay{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0;-webkit-transition:all .45s ease-in-out;transition:all .45s ease-in-out}.bwg-zoom-effect-overlay{display:flex;align-items:center;justify-content:center}.bwg-zoom-effect:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@media (min-width:480px){.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.bwg_thumbnails_masonry .bwg-masonry-thumbnails{overflow:hidden}.bwg_thumbnails_masonry .bwg-masonry-thumbnails .bwg-item{box-sizing:border-box}.bwg-masonry-horizontal{flex-direction:row}.bwg-masonry-horizontal-parent{overflow-x:scroll;overflow-y:hidden}.bwg-masonry-horizontal-container{width:fit-content}.bwg-item.bwg-empty-item{border:0!important;padding:0!important}.bwg-background{background-color:rgba(0,0,0,0);position:relative;width:100%}.bwg-background .wd_error{color:#323a45;font-weight:700}div[id^=bwg_container] .bwg-carousel{margin:0 auto}.bwg_carousel_preload{background-image:url(../images/ajax_loader.png);background-size:50px!important;background-repeat:no-repeat;background-color:#fff;background-position:center}.bwg_container.bwg_carousel *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_]{position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_image_container_]{display:inline-block;position:absolute;text-align:center;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_] div{display:table;margin:0 auto}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_image_]{padding:0!important;display:inline-block;float:none!important;margin:4px!important;position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_],.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_]:hover{text-decoration:none;margin:4px;display:block;position:relative;z-index:17}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel-cont-child{max-width:100%;position:relative;overflow:hidden;height:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel-image{border:0;position:absolute;display:block;max-width:none;padding:0!important;margin:0!important;float:none!important;vertical-align:middle;height:100%;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel{position:relative;max-width:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature]{position:absolute;display:block;overflow:hidden;cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature] [class^=bwg_carousel-caption] [class^=bwg_carousel_title_text_]{text-decoration:none;position:absolute;z-index:15;display:inline-block;width:75%;top:0;text-align:center;word-wrap:break-word;word-break:break-word}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{bottom:38%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:0%;z-index:13;visibility:visible}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{right:0;left:auto;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left]{left:20px;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_video_hide]{width:100%;height:100%;position:absolute;z-index:22}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_] span,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:inline-table;line-height:0;margin-top:-15px;position:absolute;top:55%}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_]:hover,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]:hover{cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]{bottom:0;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:medium none;position:absolute;height:inherit;width:30%;left:35%;z-index:13}.bwg_container.bwg_carousel .bwg_carousel_play_pause:hover .bwg_carousel_play_pause-ico{display:inline-block!important}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]:hover span{position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_] span{display:flex;justify-content:center;align-items:center}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico{display:none!important;cursor:pointer;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico:hover{display:inline-block;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_]{padding:0!important;float:none!important;width:100%;height:100%;vertical-align:middle;position:relative;display:table;background-color:#000;text-align:center}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_video_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;position:relative;display:table-cell;background-color:#000;text-align:center}.bwg_thumbnail.bwg_container{padding:0 1px;min-height:140px}.bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive{display:inline-block}body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_order_cont,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_search_container_1,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .search_tags_container{width:100%;margin:0 0 10px 0;text-align:center;max-width:100%}.search_line .SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:26px}.bwg_container.bwg_blog_style .fluid-width-video-wrapper,.bwg_container.bwg_carousel .fluid-width-video-wrapper,.bwg_container.bwg_image_browser .fluid-width-video-wrapper{width:100%;position:unset!important;padding:0!important}.bwg_inst_play_btn_cont{width:100%;height:100%;position:absolute;z-index:1;cursor:pointer;top:0}.bwg_inst_play{position:absolute;width:50px;height:50px;background-position:center center;background-repeat:no-repeat;background-size:cover;transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-webkit-transition:background-image .2s ease-out;top:0;left:0;right:0;bottom:0;margin:auto}.bwg_inst_play:hover{background-position:center center;background-repeat:no-repeat;background-size:cover}.spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.spider_popup_wrap{display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.bwg_popup_image{width:auto;vertical-align:middle;display:inline-block}.bwg_slider img{display:inline-block}.bwg_popup_embed{width:100%;height:100%;vertical-align:middle;text-align:center;display:table}.bwg_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.bwg_toggle_btn{margin:0;padding:0}.bwg_ctrl_btn_container{position:absolute;width:100%;z-index:10150}.bwg_btn_container.bwg_no_ctrl_btn .bwg_ctrl_btn_container{background:0 0}.bwg_toggle_container{cursor:pointer;left:50%;line-height:0;position:absolute;text-align:center;z-index:10150}#spider_popup_left-ico span,#spider_popup_right-ico span,.spider_popup_close span{display:table-cell;text-align:center;vertical-align:middle}.bwg_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.bwg_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_comment_wrap,.bwg_ecommerce_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.bwg_comment_container,.bwg_ecommerce_container{-moz-box-sizing:border-box;height:100%;overflow:hidden;position:absolute;top:0;z-index:10103}#bwg_ecommerce{padding:10px}.bwg_ecommerce_body{background:0 0!important;border:none!important}.pge_tabs{list-style-type:none;margin:0;padding:0;background:0 0!important}.pge_tabs li a,.pge_tabs li a:hover,.pge_tabs li.pge_active a{text-decoration:none;display:block;width:100%;outline:0!important;padding:8px 5px!important;font-weight:700;font-size:13px}.pge_add_to_cart a{padding:5px 10px;text-decoration:none!important;display:block}.pge_add_to_cart{margin:5px 0 15px}.pge_add_to_cart_title{font-size:17px;padding:5px}.pge_add_to_cart div:first-child{float:left}.pge_add_to_cart div:last-child{float:right;margin-top:4px}.pge_add_to_cart:after,.pge_tabs:after{clear:both;content:"";display:table}#downloads table tr td,#downloads table tr th{padding:6px 10px!important;text-transform:none!important}.bwg_comments input[type=submit],.bwg_ecommerce_panel input[type=button]{cursor:pointer;font-size:15px;width:100%;margin-bottom:5px}.bwg_comments,.bwg_ecommerce_panel{bottom:0;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.bwg_comments{height:100%}.bwg_comment_body_p,.bwg_comments p{margin:5px!important;text-align:left;word-wrap:break-word;word-break:break-all}.bwg_ecommerce_panel p{padding:5px!important;text-align:left;word-wrap:break-word;word-break:break-all;margin:0!important}.bwg_comments .bwg-submit-disabled{opacity:.5}.bwg_comments textarea{height:120px;resize:vertical}.bwg_comment_delete_btn{color:#7a7a7a;cursor:pointer;float:right;font-size:14px;margin:2px}.bwg_comments_close,.bwg_ecommerce_close{cursor:pointer;line-height:0;position:relative;font-size:13px;margin:5px;z-index:10150}.bwg_ecommerce_panel a:hover{text-decoration:underline}.bwg_comment_textarea::-webkit-scrollbar{width:4px}.bwg_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}.bwg_ctrl_btn_container a,.bwg_ctrl_btn_container a:hover{text-decoration:none}.bwg_facebook:hover{color:#3b5998}.bwg_twitter:hover{color:#4099fb}.bwg_pinterest:hover{color:#cb2027}.bwg_tumblr:hover{color:#2f5070}.bwg_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.bwg_filmstrip_container{position:absolute;z-index:10150}.bwg_filmstrip{overflow:hidden;position:absolute;z-index:10106}.bwg_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.bwg_filmstrip_thumbnail{position:relative;background:0 0;float:left;cursor:pointer;overflow:hidden}.bwg_filmstrip_thumbnail .bwg_filmstrip_thumbnail_img_wrap{overflow:hidden}.bwg_thumb_active{opacity:1}.bwg_filmstrip_thumbnail_img{display:block;opacity:1}.bwg_filmstrip_left{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_filmstrip_right{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bwg_watermark_container{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_watermark_container>div{display:table;margin:0 auto}.bwg_watermark_spun{display:table-cell;overflow:hidden;position:relative}.bwg_watermark_image{margin:4px;position:relative;z-index:10141}.bwg_watermark_text,.bwg_watermark_text:hover{text-decoration:none;margin:4px;position:relative;z-index:10141}.bwg_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.bwg_slide_bg{margin:0 auto;width:inherit;height:inherit}.bwg_slider{height:inherit;width:inherit}.bwg_popup_image_spun{height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.bwg_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}.bwg_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.bwg_gridlet{opacity:1;position:absolute}.bwg_image_info::-webkit-scrollbar{width:4px}.bwg_image_info::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_image_info::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}#bwg_rate_form .bwg_hint{margin:0 5px;display:none}.bwg_star{display:inline-block;width:unset!important}.bwg_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}#bwg_comment_form label{display:block;font-weight:700;margin-top:17px;text-transform:uppercase}#bwg_comment_form .bwg-privacy-policy-box label{text-transform:unset;word-break:break-word}.bwg_popup_image_spun .bwg_popup_image_spun1{width:inherit;height:inherit}.bwg_popup_image_spun1 .bwg_popup_image_spun2{vertical-align:middle;text-align:center;height:100%}#embed_conteiner{table-layout:fixed;height:100%}#opacity_div{background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#loading_div{text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}#ecommerce_ajax_loading{position:absolute}#ecommerce_opacity_div{display:none;background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#ecommerce_loading_div{display:none;text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg_ecommerce_panel.bwg_popup_sidebar_panel.bwg_popup_sidebar{text-align:left}#ajax_loading{position:absolute}@media (max-width:480px){.bwg_image_count_container{display:none}.bwg_image_title,.bwg_image_title *{font-size:12px}.bwg_image_description,.bwg_image_description *{font-size:10px}}body[data-elementor-device-mode=mobile] .bwg-container.bwg-masonry-thumbnails .bwg-title1,body[data-elementor-device-mode=mobile] .bwg-container.bwg-standard-thumbnails .bwg-title1,body[data-elementor-device-mode=mobile] .bwg-mosaic-thumbnails,body[data-elementor-device-mode=tablet] .bwg-container.bwg-masonry-thumbnails .bwg-title1,body[data-elementor-device-mode=tablet] .bwg-container.bwg-standard-thumbnails .bwg-title1,body[data-elementor-device-mode=tablet] .bwg-mosaic-thumbnails{opacity:1!important}body[data-elementor-device-mode=mobile] .bwg-zoom-effect .bwg-zoom-effect-overlay,body[data-elementor-device-mode=mobile] .bwg-zoom-effect-overlay>span,body[data-elementor-device-mode=tablet] .bwg-zoom-effect .bwg-zoom-effect-overlay,body[data-elementor-device-mode=tablet] .bwg-zoom-effect-overlay>span{opacity:1!important;background-color:unset!important}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_] *{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_]{border-collapse:collapse;display:table;position:relative;text-align:center;margin:auto}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_image_]{display:inline-block;padding:0!important;margin:0!important;float:none!important;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_embed_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;display:inline-block;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_]{position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause{bottom:0;cursor:pointer;display:table;height:inherit;outline:medium none;position:absolute;width:30%;left:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span[id^=bwg_slideshow_play_pause-ico_]{display:inline-block!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span{position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]{display:none!important;cursor:pointer;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]:hover{display:inline-block;position:relative;z-index:13}.bwg_embed_frame .instagram-media,div[id^=bwg_container1_] div[id^=bwg_container2_] .instagram-media{margin:0 auto!important;min-width:unset!important}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,div[id^=bwg_container1_] div[id^=bwg_container2_] .bwg_slideshow_filmstrip_fix_count{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;width:auto;height:auto;opacity:1;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center}.lazy_loader{background-image:url(../images/ajax_loader.png);background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg-container-temp0{visibility:hidden!important;position:absolute!important}.bwg_image_browser .pagination-links{display:flex;padding:0}.bwg_image_browser .pagination-links_col1{flex-grow:3;text-align:left}.bwg_image_browser .pagination-links_col2{flex-grow:4;text-align:center}.bwg_image_browser .pagination-links_col3{flex-grow:3;text-align:right}.bwg_current_page[type=number]{width:35px;display:inline-block;-moz-appearance:textfield;line-height:normal!important}.bwg_current_page::-webkit-inner-spin-button,.bwg_current_page::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bwg_container .bwg_tag_button_view_container{display:flex;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-bottom:45px;position:relative;padding-top:3px;flex-wrap:wrap;overflow:hidden;clear:both}.bwg_container .bwg_tag_button_view_container button{cursor:pointer}.bwg_container .bwg_tag_button_view_container button.active{cursor:default}.bwg_container .bwg_tag_button_view_container .verLine{min-height:26px;margin:0 15px}.bwg_container .bwg_tag_button_see_all{margin-bottom:70px;position:relative;display:none}.bwg_container .bwg_tag_button_see_all .see_all_tags{text-transform:uppercase;position:absolute;padding:10px 25px;font-weight:600;cursor:pointer;left:47%;top:-23px}.bwg_container .bwg_tag_button_see_all .see_all_tags span{display:inline-block;line-height:normal;text-align:center;border-radius:50%;margin-right:10px;font-weight:500;color:#fff;height:18px;width:18px}.bwg_addThis{position:absolute;left:10px;top:10px;z-index:9999}
js/bwg_frontend.js CHANGED
@@ -16,11 +16,6 @@ jQuery(function () {
16
  jQuery(".bwg-container.bwg-standard-thumbnails .bwg-title1, .bwg-container.bwg-masonry-thumbnails .bwg-title1, .bwg-mosaic-thumbnails").css("opacity","1");
17
  jQuery(".bwg-zoom-effect .bwg-zoom-effect-overlay, .bwg-zoom-effect-overlay > span").css({"opacity":1,"background-color":"unset"});
18
  }
19
-
20
- if (jQuery(".bwg-container").length) {
21
- /* Show the "Optimize images" button only on pages with gallery in it.*/
22
- jQuery("#wp-admin-bar-booster-top-button").removeClass("hidden");
23
- }
24
  });
25
 
26
  jQuery(function () {
16
  jQuery(".bwg-container.bwg-standard-thumbnails .bwg-title1, .bwg-container.bwg-masonry-thumbnails .bwg-title1, .bwg-mosaic-thumbnails").css("opacity","1");
17
  jQuery(".bwg-zoom-effect .bwg-zoom-effect-overlay, .bwg-zoom-effect-overlay > span").css({"opacity":1,"background-color":"unset"});
18
  }
 
 
 
 
 
19
  });
20
 
21
  jQuery(function () {
js/bwg_speed.js DELETED
@@ -1,447 +0,0 @@
1
- jQuery(function () {
2
- jQuery(".bwg-install-booster").on("click", function () {
3
- install_booster_plugin( this );
4
- });
5
-
6
- jQuery(".bwg-sign-up-dashboard-button").on("click", function () {
7
- sign_up_dashboard( this );
8
- });
9
-
10
- jQuery(".bwg-connect-to-dashboard-button").on("click", function () {
11
- connect_to_dashboard( this );
12
- });
13
-
14
- jQuery(".bwg-analyze-input-button").on("click", function () {
15
- if ( !jQuery(this).hasClass("bwg-disable-analyze") ) {
16
- bwg_get_google_score(this, '', '');
17
- }
18
- });
19
-
20
- jQuery(document).on('change', '.bwg-analyze-input', function () {
21
- analize_input_change();
22
- });
23
-
24
- /* If there is no score of home page run google score and get homepage score */
25
- if( bwg_speed.home_speed_status === '0' ) {
26
- bwg_get_google_score('', bwg_speed.home_url, '');
27
- } else {
28
- /* Draw score circle if it is Speed Optimization page */
29
- if( jQuery(".bwg-analyze-desktop-score .speed_circle").length > 0 ) {
30
- draw_score_circle(bwg_speed.home_speed_status.desktop_score, bwg_speed.home_speed_status.mobile_score);
31
- }
32
- }
33
-
34
- /* Show/hide tooltip in Speed Optimization page bottom Image optimizer container */
35
- jQuery(".bwg-optimize-now-button").hover(function(){
36
- jQuery(".bwg-optimize-now-tooltip").removeClass("bwg-hidden");
37
- }, function(){
38
- jQuery(".bwg-optimize-now-tooltip").addClass("bwg-hidden");
39
- });
40
-
41
- get_total_size_of_images();
42
- });
43
-
44
- /* Count total size of images */
45
- function get_total_size_of_images() {
46
- jQuery.ajax( {
47
- url: ajaxurl,
48
- type: "POST",
49
- data: {
50
- action: "speed_bwg",
51
- task: "get_total_size_of_images",
52
- speed_ajax_nonce: bwg_speed.speed_ajax_nonce
53
- },
54
- success: function ( result ) {
55
- if( isValidJSONString(result) ) {
56
- var data = JSON.parse(result);
57
- jQuery(".bwg-total_size_value").text(data.size);
58
- }
59
- },
60
- });
61
- }
62
-
63
- function analize_input_change() {
64
- var bwg_analyze_input = jQuery(".bwg-analyze-input");
65
- bwg_analyze_input.removeClass("bwg-analyze-input-error");
66
- jQuery(".bwg-analyze-input-button").removeClass("bwg-disable-analyze");
67
- jQuery(".bwg-analyze-input-container .bwg-error-msg").remove();
68
- var domain = bwg_speed.home_url.replace(/^https?:\/\/|www./g, '');
69
- var url = bwg_analyze_input.val();
70
- var page_public = bwg_analyze_input.data('page-public');
71
-
72
- var error = false;
73
- var error_msg = '';
74
- if( url == '' ) {
75
- error = true;
76
- error_msg = bwg_speed.enter_page_url;
77
- }
78
- else if ( !isUrlValid(url) ) {
79
- error = true;
80
- error_msg = bwg_speed.wrong_url;
81
- }
82
- else if ( !url.includes(domain) ) {
83
- error = true;
84
- error_msg = bwg_speed.wrong_domain_url;
85
- }
86
- else if ( page_public === 0 ) {
87
- error = true;
88
- error_msg = bwg_speed.page_is_not_public;
89
- }
90
-
91
-
92
- if ( error === true ) {
93
- jQuery(".bwg-analyze-input-button").addClass("bwg-disable-analyze");
94
- jQuery(".bwg-analyze-input").addClass("bwg-analyze-input-error");
95
- jQuery(".bwg-analyze-input").after('<p class="bwg-error-msg">' + error_msg + '</p>');
96
- }
97
-
98
- }
99
-
100
- /**
101
- * Run ajax action and install/activate booster plugin
102
- *
103
- * @param that object
104
- */
105
- function install_booster_plugin( that ) {
106
- if ( jQuery(that).hasClass("bwg-disable-link") ) {
107
- return false;
108
- }
109
- jQuery(that).addClass('bwg-disable-link');
110
- jQuery(that).html('<div class="speed-loader-blue"></div>');
111
- jQuery.ajax( {
112
- url: ajaxurl,
113
- type: "POST",
114
- data: {
115
- action: "speed_bwg",
116
- task: "install_booster",
117
- speed_ajax_nonce: bwg_speed.speed_ajax_nonce
118
- },
119
- success: function ( result ) {
120
- /* Cut json from returned html data */
121
- var json = result.substring( result.indexOf('{"booster_plugin_status') );
122
- var data = JSON.parse(json);
123
- if( typeof data !== 'object' ) {
124
- jQuery('.bwg-install-booster').text(bwg_speed.install_button_text);
125
- jQuery(".bwg-install-booster").text(bwg_speed.install_button_text);
126
- return;
127
- }
128
- if ( parseInt(data.booster_plugin_status) === 2 ) {
129
- jQuery(".bwg-install-booster-container").addClass("bwg-hidden");
130
- if ( !data.booster_is_connected ) {
131
- if ( data.subscription_id ) {
132
- jQuery(".bwg-connect-to-dashboard-container").removeClass("bwg-hidden");
133
- }
134
- else {
135
- jQuery(".bwg-sign_up-booster-container").removeClass("bwg-hidden");
136
- }
137
- } else {
138
- jQuery(".bwg-connected-booster-container").removeClass("bwg-hidden");
139
- }
140
- } else if ( parseInt(data.booster_plugin_status) === 1 ) {
141
- jQuery('.bwg-install-booster').text(bwg_speed.activate_button_text);
142
- }
143
- },
144
- error: function ( xhr ) {
145
- jQuery(".bwg-install-booster").text(bwg_speed.install_button_text);
146
- },
147
- complete: function () {
148
- jQuery('.bwg-install-booster.bwg-disable-link').removeClass('bwg-disable-link');
149
- }
150
- });
151
- }
152
-
153
- /**
154
- * Run ajax action and Sign Up to dashboard
155
- *
156
- * @param that object
157
- */
158
- function sign_up_dashboard( that ) {
159
- if ( jQuery(that).hasClass("bwg-disable-link") ) {
160
- return false;
161
- }
162
-
163
- var email_input = jQuery(that).parent().parent().find(".bwg-sign-up-input");
164
-
165
- jQuery(".bwg-error-msg").remove();
166
- email_input.removeClass("bwg-input-error");
167
- jQuery(that).addClass('bwg-disable-link');
168
- jQuery(that).html('<div class="speed-loader-blue"></div>');
169
-
170
- var email = email_input.val();
171
- if (email === '') {
172
- email_input.after('<p class="bwg-error-msg">' + bwg_speed.empty_email + '</p>');
173
- email_input.addClass("bwg-input-error");
174
- jQuery(that).text(bwg_speed.sign_up);
175
- jQuery(that).removeClass('bwg-disable-link');
176
- return;
177
- }
178
- if (!isEmail(email)) {
179
- email_input.after('<p class="bwg-error-msg">' + bwg_speed.wrong_email + '</p>');
180
- email_input.addClass("bwg-input-error");
181
- jQuery(that).text(bwg_speed.sign_up);
182
- jQuery(that).removeClass('bwg-disable-link');
183
- return;
184
- }
185
- jQuery.ajax( {
186
- url: ajaxurl,
187
- type: "POST",
188
- data: {
189
- action: "speed_bwg",
190
- task: "sign_up_dashboard",
191
- bwg_email: email,
192
- speed_ajax_nonce: bwg_speed.speed_ajax_nonce
193
- },
194
- success: function (result) {
195
- if (!isValidJSONString(result)) {
196
- jQuery(that).text(bwg_speed.sign_up);
197
- jQuery(that).removeClass('bwg-disable-link');
198
- email_input.after('<p class="bwg-error-msg">' + bwg_speed.something_wrong + '</p>');
199
- return;
200
- }
201
- var data = JSON.parse(result);
202
- if (data['status'] === 'success') {
203
- window.location.href = data['booster_connect_url'];
204
- }
205
- else {
206
- jQuery(that).text(bwg_speed.sign_up);
207
- jQuery(that).removeClass('bwg-disable-link');
208
- email_input.after('<p class="bwg-error-msg">' + bwg_speed.something_wrong + '</p>');
209
- return;
210
- }
211
- },
212
- error: function (xhr) {
213
- jQuery(that).text(bwg_speed.sign_up);
214
- jQuery(that).removeClass('bwg-disable-link');
215
- email_input.after('<p class="bwg-error-msg">' + bwg_speed.something_wrong + '</p>');
216
- }
217
- });
218
- }
219
-
220
- function connect_to_dashboard( that ) {
221
- if ( jQuery(that).hasClass("bwg-disable-link") ) {
222
- return false;
223
- }
224
-
225
- jQuery.ajax( {
226
- url: ajaxurl,
227
- type: "POST",
228
- data: {
229
- action: "speed_bwg",
230
- task: "connect_to_dashboard",
231
- speed_ajax_nonce: bwg_speed.speed_ajax_nonce
232
- },
233
- success: function ( result ) {
234
- if ( !isValidJSONString(result) ) {
235
- jQuery(that).text(bwg_speed.connect);
236
- jQuery(that).removeClass('bwg-disable-link');
237
- return;
238
- }
239
- var data = JSON.parse(result);
240
- if ( data['status'] === 'success' ) {
241
- window.location.href = data['booster_connect_url'];
242
- } else {
243
- jQuery(that).text(bwg_speed.connect);
244
- jQuery(that).removeClass('bwg-disable-link');
245
- return;
246
- }
247
- },
248
- error: function ( xhr ) {
249
- jQuery(that).text(bwg_speed.connect);
250
- jQuery(that).removeClass('bwg-disable-link');
251
- }
252
- });
253
- }
254
-
255
- /**
256
- * Drawing score circle in different colors
257
- *
258
- * @param desktop_score int score value of desktop
259
- * @param mobile_score int score value of desktop
260
- */
261
- function draw_score_circle( desktop_score, mobile_score ) {
262
- var d = desktop_score;
263
- var m = mobile_score;
264
- var color_desktop = d <= 49 ? "rgb(253, 60, 49)" : (d >= 90 ? "rgb(12, 206, 107)" : "rgb(255, 164, 0)");
265
- var color_mobile = m <= 49 ? "rgb(253, 60, 49)" : (m >= 90 ? "rgb(12, 206, 107)" : "rgb(255, 164, 0)");
266
- var bg_color_desktop = d <= 49 ? "rgb(253, 60, 49, 0.1)" : (d >= 90 ? "rgb(12, 206, 107, 0.1)" : "rgb(255, 164, 0, 0.1)");
267
- var bg_color_mobile = m <= 49 ? "rgb(253, 60, 49, 0.1)" : (m >= 90 ? "rgb(12, 206, 107, 0.1)" : "rgb(255, 164, 0, 0.1)");
268
-
269
- jQuery('.speed_circle').each(function () {
270
- var _this = this;
271
- var val = desktop_score / 100;
272
- var num = d;
273
- var color = color_desktop;
274
- var bg_color = bg_color_desktop;
275
- if ( jQuery(this).data("id") === "mobile" ) {
276
- val = mobile_score / 100;
277
- num = m;
278
- color = color_mobile;
279
- bg_color = bg_color_mobile;
280
- }
281
- jQuery(_this).circleProgress({
282
- value: val,
283
- size: 78,
284
- startAngle: -Math.PI / 4 * 2,
285
- lineCap: 'round',
286
- emptyFill: "rgba(255, 255, 255, 0)",
287
- fill: {
288
- color: color
289
- }
290
- }).on('circle-animation-progress', function ( event, progress ) {
291
- jQuery(this).find('.circle_animated').html(Math.round(parseFloat(num) * progress)).css({"color": color});
292
- jQuery(this).find('canvas').html(Math.round(parseFloat(num) * progress)).css({ "background": bg_color });
293
- });
294
- });
295
- }
296
-
297
- /**
298
- * Run ajax action and icount google score
299
- *
300
- * @param that object
301
- * @param home_url string
302
- * @param bwg_from_retry int values 0 or 1 check if function called from retry or first time
303
- * @param last_api_key_index int/empty last index of array where keeped google api keys
304
- */
305
- function bwg_get_google_score( that, home_url, last_api_key_index ) {
306
- var url;
307
- jQuery(".bwg-error-msg").remove();
308
- if (home_url === '') {
309
- if (jQuery(that).hasClass("bwg-disable-link")) {
310
- return false;
311
- }
312
- jQuery(that).addClass('bwg-disable-analyze');
313
- jQuery(that).html('<div class="speed-loader-grey"></div>');
314
- url = jQuery(".bwg-analyze-input").val();
315
- }
316
- else {
317
- url = home_url;
318
- }
319
- if (!isUrlValid(url)) {
320
- jQuery(".bwg-analyze-input").after('<p class="bwg-error-msg">' + bwg_speed.wrong_url + '</p>');
321
- jQuery('.bwg-analyze-input-button.bwg-disable-analyze').removeClass('bwg-disable-analyze');
322
- jQuery('.bwg-analyze-input-button').text(bwg_speed.analyze_button_text);
323
- return;
324
- }
325
- if ( jQuery(".speed_circle_loader").length === 0 ) {
326
- jQuery(".speed_circle").after("<div class='speed_circle_loader'></div>");
327
- }
328
- jQuery(".speed_circle").addClass("bwg-hidden");
329
- jQuery(".bwg-load-time-mobile span").text("-");
330
- jQuery(".bwg-load-time-desktop span").text("-");
331
- jQuery.ajax({
332
- url: ajaxurl,
333
- type: "POST",
334
- data: {
335
- action: "speed_bwg",
336
- task: "get_google_page_speed",
337
- last_api_key_index: last_api_key_index,
338
- bwg_url: url,
339
- speed_ajax_nonce: bwg_speed.speed_ajax_nonce
340
- },
341
- success: function (result) {
342
- if( !isValidJSONString(result) ) {
343
- google_speed_error_result('');
344
- return;
345
- } else {
346
- var data = JSON.parse(result);
347
- if ( data['error'] === 1 ) {
348
- if ( typeof data['last_api_key_index'] !== 'undefined' ) {
349
- bwg_get_google_score(that, home_url, data['last_api_key_index'] );
350
- return;
351
- }
352
- var msg = '';
353
- if( typeof data['msg'] !== 'undefined') {
354
- msg = data['msg'];
355
- }
356
- google_speed_error_result(msg);
357
- return;
358
- }
359
- }
360
-
361
- jQuery(".speed_circle_loader").remove();
362
- jQuery(".speed_circle").removeClass("bwg-hidden");
363
- draw_score_circle(data['desktop_score'], data['mobile_score']);
364
- jQuery(".bwg-last-analyzed-page").text(url);
365
- jQuery(".bwg-last-analyzed-date").text(data['last_analyzed_time']);
366
- jQuery(".bwg-load-time-mobile span").text(data['mobile_loading_time']);
367
- jQuery(".bwg-load-time-desktop span").text(data['desktop_loading_time']);
368
- },
369
- error: function (xhr) {
370
- google_speed_error_result('');
371
- },
372
- complete: function () {
373
- jQuery('.bwg-analyze-input-button.bwg-disable-analyze').removeClass('bwg-disable-analyze');
374
- jQuery('.bwg-analyze-input-button').text(bwg_speed.analyze_button_text);
375
- }
376
- });
377
- }
378
-
379
- /* Case when counting of scor return error */
380
- function google_speed_error_result( msg ) {
381
- if( msg !== '' ) {
382
- bwg_speed.something_wrong = msg;
383
- }
384
- jQuery(".bwg-analyze-input").after('<p class="bwg-error-msg">' + bwg_speed.something_wrong + '</p>');
385
- jQuery('.bwg-analyze-input-button.bwg-disable-analyze').removeClass('bwg-disable-analyze');
386
- jQuery('.bwg-analyze-input-button').text(bwg_speed.analyze_button_text);
387
- jQuery(".speed_circle_loader").remove();
388
- jQuery(".speed_circle").removeClass("bwg-hidden");
389
- }
390
-
391
- /**
392
- * Check if value is email
393
- *
394
- * @param email string
395
- *
396
- * @return bool
397
- */
398
- function isEmail( email ) {
399
- var EmailRegex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
400
- return EmailRegex.test(email);
401
- }
402
-
403
- /**
404
- * Check if value is URL
405
- *
406
- * @param url string
407
- *
408
- * @return bool
409
- */
410
- function isUrlValid(url) {
411
- if (typeof url == 'undefined' || url == '') {
412
- return false;
413
- }
414
- if ( url.indexOf("http") !== 0 && url.indexOf("www.") !== 0) {
415
- return false;
416
- }
417
- regexp = /^(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/;
418
- if (regexp.test(url)) {
419
- return true;
420
- } else {
421
- return false;
422
- }
423
- }
424
-
425
- /**
426
- * Check if data is valid json
427
- *
428
- * @param str string
429
- *
430
- * @return bool
431
- */
432
- function isValidJSONString(str) {
433
- try {
434
- JSON.parse(str);
435
- } catch (e) {
436
- return false;
437
- }
438
- return true;
439
- }
440
-
441
- var bwg_leaving_popup = false;
442
-
443
- jQuery(".bwg-speed-body").parents(".wrap").mouseleave(function () {
444
- if (bwg_leaving_popup == false && jQuery(".bwg-sign-up-input").is(":visible")) {
445
- jQuery(".bwg-popup-overlay").removeClass("bwg-hidden");
446
- }
447
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/scripts.min.js CHANGED
@@ -1 +1 @@
1
- var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");void 0!==e&&bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&parseInt(jQuery(".spider_popup_close").css("right"))<0&&jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id)),1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):"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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}))}),"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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}):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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_zoom").on(a,function(){var e=["mousemove","touchmove"];jQuery("figure.bwg_popup_image").each(function(){var i=jQuery(this);i.hasClass("zoom")?jQuery.each(e,function(e,t){i.removeClass("zoom"),i.off(t)}):jQuery.each(e,function(e,t){i.addClass("zoom"),i.on(t,function(e){var t,i,a,r;window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause");var _=e.target,s=_.getBoundingClientRect();e.targetTouches&&(a=e.targetTouches[0].clientX-s.left,r=e.targetTouches[0].clientY-s.top),t=e.offsetX?e.offsetX:e.targetTouches?a:_.offsetHeight,i=e.offsetY?e.offsetY:e.targetTouches?r:_.offsetWidth,x=t/_.offsetWidth*100,y=i/_.offsetHeight*100,_.parentNode.style.backgroundPosition=x+"% "+y+"%"})})})}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,a,r,_,s,o,l){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+a+"px; height:"+r+"px; margin-top:-"+r/2+"px; margin-left: -"+a/2+'px; ">'+e+"</div>").hide().appendTo("body");if(gallery_box_ready(),spider_showpopup(s,o,t,_,l),"undefined"!=typeof addthis){jQuery(".addthis-smartlayers").show();var i=setInterval(function(){void 0!==addthis.layers.refresh&&(clearInterval(i),addthis.layers.refresh())},100)}},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());if(void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds)){instgrm.Embeds.process();var o=parseInt(jQuery("#bwg_image_container").height());jQuery(".bwg_embed_frame .instagram-media").css({"max-height":o+"px"})}}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){jQuery(".addthis-smartlayers").hide(),null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();history.pushState(history.state,null,window.location.origin+window.location.pathname+window.location.search),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){jQuery(".bwg_comments").mCustomScrollbar("destroy");var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i,e){var t={};t.image_id=jQuery("#rate_image_id").val(),t.rate=void 0!==e?e:jQuery("#"+i+" input[name='score']").val(),t.ajax_task=jQuery("#rate_ajax_task").val();var a=jQuery("#bwg_image_container").data("action");return jQuery.ajax({type:"POST",url:a,data:t,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=t.find(".cur_gal_id").val(),o=jQuery("#bwg_tag_id_"+s).val();o=o||0;var l=1==i?"&open_ecommerce=1":"",n=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";n=n||"",void 0!==a&&(r+="&gallery_id="+a);var b="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(b="&open_comment=1");var d=jQuery("#bwg_random_seed_"+_).val();spider_createpopup(r+"&bwg_gallery_type="+t.data("gallery-type")+"&bwg_random_seed="+d+"&image_id="+e+"&filter_tag="+o+l+b+"&filter_search_name="+n+g,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#rate_image_id").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,""==gallery_box_data.data[a].alt&&""==gallery_box_data.data[a].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show(),jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,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("#rate_image_id").val(r[a].id),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),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)),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"),b=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),w=jQuery(s).height(),d=jQuery(s).width(),u='<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"),u+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(b?"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=jQuery(".instagram-media"),m=jQuery(".bwg_embed_frame"),c=jQuery(".bwg_image_container").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),p=jQuery(".bwg_image_container").height()-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),y=r[a].image_width,f=r[a].image_height,j=bwg_resizing_ratio(y,f,c,p);m.attr("data-width",c),m.attr("data-height",p);var Q=j.width,v=j.height;Q<v?Q-=109:Q+=109,u+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":c,"data-height":p,"data-instagram-width":y,"data-instagram-height":f,style:"width:"+Q+"px; height:"+v+"px; vertical-align:middle; display:inline-block; position:relative;"}),h.css({"max-height":v+"px","min-width":Q+"px !important"})}else u+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(b?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});u+="</span>"}else{jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden");var x="'"+(gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()).split("?bwg")[0]+"'";gallery_box_data.popup_enable_zoom&&(u+='<figure style="max-height: '+w+"px; max-width: "+d+"px; background-image: url("+x+'); background-repeat: no-repeat" class="bwg_popup_image bwg_popup_watermark" alt="'+r[a].alt+'" />'),u+='<img style="max-height: '+w+"px; max-width: "+d+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />'}function z(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/intent/tweet?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&(bwg_slideshow_filmstrip_fix_dimension(),setTimeout(function(){bwg_disable_lightbox_filmstrip_left_right_arrow(gallery_box_data)},100)),bwg_resize_instagram_post()}if(gallery_box_data.popup_enable_zoom?u+="</figure></span></span>":u+="</span></span>",jQuery(o).html(u),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:d,maxHeight:w,height:"auto"}),l)z();else jQuery(o).find("img").one("load",function(){z()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").show())}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),1!=gallery_box_data.open_with_fullscreen&&(gallery_box_data.lightbox_close_btn_right<0&&jQuery("#spider_popup_wrap").width()-2*gallery_box_data.lightbox_close_btn_right>=jQuery(window).width()||gallery_box_data.lightbox_close_btn_top<0&&jQuery("#spider_popup_wrap").height()-2*gallery_box_data.lightbox_close_btn_top>=jQuery(window).height()?jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"):jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"));var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";if(0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)){var _=parseFloat(jQuery("#bwg_star").attr("data-score"));jQuery("#bwg_star").removeAttr("data-score").html("");var s={starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,noRatedMsg:"Not rated yet.",readOnly:!1,score:_,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};e||(s.click=function(e,t){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",e)).then(function(){gallery_box_data.data[a].rate=e,++gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating=_?((_+e)/2).toFixed(1):e.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)})}),jQuery("#bwg_star").raty(s),jQuery(".bwg_image_rate_disabled").hide(),e&&jQuery(".bwg_image_rate_disabled").show()}}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function bwg_disable_lightbox_filmstrip_left_arrow(e){"left"==e.left_or_top?0==parseInt(jQuery(".bwg_filmstrip_thumbnails").position().left)&&jQuery(".bwg_filmstrip_left").css({opacity:.3}):0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})}function bwg_disable_lightbox_filmstrip_right_arrow(e){"left"==e.left_or_top?"width"==e.width_or_height?parseInt(jQuery(".bwg_filmstrip_thumbnails").position().left)<=jQuery(".bwg_filmstrip").width()-jQuery(".bwg_filmstrip_thumbnails").width()+e.filmstrip_thumb_right_left_space+e.all_images_right_left_space&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):"width"==e.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):parseInt(jQuery(".bwg_filmstrip_thumbnails").position().top)<=jQuery(".bwg_filmstrip").height()-jQuery(".bwg_filmstrip_thumbnails").height()+gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.all_images_right_left_space&&jQuery(".bwg_filmstrip_right").css({opacity:.3})}function bwg_disable_lightbox_filmstrip_left_right_arrow(e){var t=jQuery(".bwg_filmstrip_thumbnails").position().left,i=jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width();"top"==e.left_or_top&&(t=jQuery(".bwg_filmstrip_thumbnails").position().top,i=jQuery(".bwg_filmstrip").height()>jQuery(".bwg_filmstrip_thumbnails").height()),jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"1"}),jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"1"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:first-child").index()!=jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&0!=t||jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"0.3"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:last-child").index()==jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),i&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"})}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+decodeURIComponent(t)+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var n=a["data-max-width"],g=a["data-max-height"];l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<img src="'+decodeURIComponent(t)+'" style="max-width:'+n+"px; max-height:"+g+'px; width: auto; height: auto">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=">",""!=t&&(l+='<div class="inner_instagram_iframe_'+obj_class+'" style="max-width: 100% !important; max-height: 100% !important; width: 100%; height: 100%; margin:0; vertical-align:middle;">'+atob(t)+"</div>"),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var b="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(b+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=b+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var w="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');w+=" >",""!=i&&(w+='<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+=w+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var d="<iframe ";for(attr in""!=i&&(d+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');r+=d+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=u+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var h="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(h+=" "+attr+'="'+a[attr]+'"');h+=" >",""!=i&&(h+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=h+="</div>";break;default:var m={content:""};jQuery(document).trigger("bwg_display_embed",[m,e,t,i,a]),r=m.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(bwg_ajax_url_nonce,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o,"instagram"),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_slideshow_filmstrip_thumbnail_timer=!1;window.bwg_slideshow_filmstrip_thumb={};var bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_remove_lazy_loader_icon(){1==bwg_objectsL10n.lazy_load&&jQuery("img.bwg_lazyload").Lazy({afterLoad:function(){jQuery(".lazy_loader").removeClass("lazy_loader")},onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}function bwg_main_ready(e){var t=e.data("bwg");1===e.data("scroll")&&(form_id="gal_front_form_"+t,jQuery("html, body").animate({scrollTop:jQuery("#"+form_id).offset().top-150},500)),bwg_remove_lazy_loader_icon(),0<e.find(".wd_error").length&&bwg_container_loaded(t);var i=e.find(".bwg-container");if("album"===e.data("is-album")&&i.hasClass("bwg-thumbnails"))var a="thumbnails";else a=e.data("gallery-type");switch(bwg_document_ready(e),a){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(i);break;case"thumbnails_mosaic":bwg_thumbnail_mosaic(i);break;case"slideshow":bwg_slideshow_ready(t);break;case"carousel":bwg_carousel_ready(t),bwg_carousel_onload(e);break;case"image_browser":bwg_image_browser_ready(e);break;case"blog_style":bwg_blog_style_ready(e)}}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_tags_button_section_visibility(){jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this),t=e.find(".current_view").val(),i=e.find(".show_bottom_tag").val(),a=e.find(".bwg_tags_container_"+t+" .bwg_tag_button_view_container");if(a.length)var r=a[0].scrollHeight;var _=a.find(".bwg_tags_filter_buttons").outerHeight(!0),s=parseInt(2*a.find(".bwg_tags_filter_buttons").outerHeight(!0)+3);s<r?(0===jQuery(this).find(".see_all_tags.bwg_hide").length&&a.css({"min-height":_,"max-height":s,overflow:"hidden"}),a.next(".bwg_tag_button_see_all").show()):(a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}),a.next(".bwg_tag_button_see_all").hide());var o=a.next().find(".see_all_tags").width()/2;a.next().find(".see_all_tags").attr("style","margin-left: -"+o+"px"),a.next().find(".see_all_tags").off("click").on("click",function(){jQuery(this).hasClass("bwg_show")?(jQuery(this).removeClass("bwg_show").addClass("bwg_hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"})):jQuery(this).hasClass("bwg_hide")&&(jQuery(this).removeClass("bwg_hide").addClass("bwg_show").html("<span>&#43;</span>"+bwg_objectsL10n.bwg_tag_see_all),a.css({"min-height":_,"max-height":s,overflow:"hidden"}))}),1==i&&(jQuery(this).find(".see_all_tags").removeClass("bwg_show").addClass("bwg_hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}))})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})})})}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());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(t){var e=t.data("bwg");bwg_container_loaded(e),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process();var i=!1;t.find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(e,t.closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(t.attr("data-image-id"),t.closest(".bwg_container"),!0),!1});var a=window.location.hash.substring(1);a&&"-1"!=a.indexOf("bwg")&&(bwg_hash_array=a.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_carousel_focus(){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery(".bwg_carousel_image_container_"+bwg).length&&jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-pause")&&bwg_params_carousel[bwg].carousel.start()})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_blur(e){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight||jQuery(".bwg_carousel_image_container_"+bwg).length&&void 0!==bwg_params_carousel[bwg]&&bwg_params_carousel[bwg].carousel.pause()})}function bwg_carousel_ready(t){if(bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var e=jQuery(".bwg_embed_frame_"+t),i=e.data("height");e.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+t+" #instagram-embed-"+t).css({"max-height":i+"px"}),e.css({display:"inline-block"})}jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");jQuery("#bwg_carousel-container"+e).length&&(bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start())})}function bwg_carousel_onload(e){var t=e.data("bwg"),i=e.find(".bwg_carousel-container"+t);i.length&&(bwg_params_carousel[t]=i.data("params"),bwg_params_carousel[t].parent_width=0,bwg_carousel_watermark(t),bwg_carousel_params(t,!1),bwg_container_loaded(t))}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;a<bwg_params_carousel[t].carousel_r_width?r=a/bwg_params_carousel[t].carousel_r_width:a=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].parent_width!=a&&(bwg_params_carousel[t].parent_width=a,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*r),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*r),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:a*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*r}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel-container"+t).css({width:a,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),bwg_params_carousel[t].carousel&&!e||(e&&bwg_params_carousel[t].carousel&&bwg_params_carousel[t].carousel.pause(),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:a*r,containerHeight:bwg_params_carousel[t].image_height*r,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*r,largeFeatureHeight:bwg_params_carousel[t].image_height*r,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})))}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(r){if(jQuery("#bwg_slideshow_image_container_"+r).length){bwg_params[r]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+r).attr("data-params")),bwg_params[r].event_stack=[];var e=".bwg_slideshow_filmstrip_"+r,t="bwg_slideshow_filmstrip_thumbnail_"+r;bwg_slideshow_filmstrip_thumb[t]={},bwg_slideshow_filmstrip_thumb[t].next_prev_index=0;var i=!1;2==bwg_params[r].slideshow_filmstrip_type&&(i=!0,e=".bwg_slideshow_filmstrip_fix_count_"+r),bwg_container_loaded(r);var a=bwg_params[r].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+r).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r)?(parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r))%a.length:a.length-1,a,"",r),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+r).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),parseInt(jQuery("#bwg_current_image_key_"+r).val())+bwg_iterator(r)%a.length,a,"",r),!1});var _=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(r),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"}),setTimeout(function(){bwg_change_watermark_container(r)},500),1==bwg_params[r].slideshow_filmstrip_type&&("horizontal"==bwg_params[r].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+r).height(jQuery(".bwg_slideshow_image_wrap_"+r).height()-bwg_params[r].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+r).width(jQuery(".bwg_slideshow_image_wrap_"+r).width()-bwg_params[r].slideshow_filmstrip_width));var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(e).bind(s,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_"+r).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+r).trigger("click"),!1});var o={bwg:r,params:bwg_params[r],slideshow_filmstrip_class_name:e};if(jQuery(".bwg_slideshow_filmstrip_right_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_next(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_next(o)}),jQuery(".bwg_slideshow_filmstrip_left_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_prev(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_prev(o)}),"width"==bwg_params[r].width_or_height?bwg_set_filmstrip_pos(jQuery(e).width(),r):bwg_set_filmstrip_pos(jQuery(e).height(),r),jQuery("#bwg_slideshow_play_pause_"+r).off(_).on(_,function(){jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-play")?(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).play()):(window.clearInterval(window["bwg_playInterval"+r]),jQuery(".bwg_slideshow_play_pause_"+r).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-play bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).pause())}),0!=bwg_params[r].enable_slideshow_autoplay&&(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&jQuery("#bwg_audio_"+r).length&&document.getElementById("bwg_audio_"+r).play()),bwg_params[r].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),r),jQuery(".bwg_slideshow_image_"+r).removeAttr("width"),jQuery(".bwg_slideshow_image_"+r).removeAttr("height"),jQuery("#instagram-embed-"+r).hide(),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var l=jQuery(".bwg_embed_frame_"+r),n=l.data("height");l.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+r+" #instagram-embed-"+r).css({"max-height":n+"px"}),l.css({display:"inline-block"})}if(0<jQuery(".elementor-editor-active .bwg_embed_frame_"+r).length){!function e(){var t=jQuery(document).find(".bwg_embed_frame_"+r+" iframe");if(0<t.length){var i=jQuery(".bwg_embed_frame_"+r),a=i.data("height");return void t.css({"max-height":a+"px"})}window.setTimeout(e,500)}()}}}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(e){var t=e.data("bwg");bwg_container_loaded(t),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process(),jQuery(".image_browser_images_conteiner_"+t).length&&(bwg_params_ib[t]=JSON.parse(jQuery(".image_browser_images_conteiner_"+t).attr("data-params")),setTimeout(function(){bwg_image_browser(t)},3))}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(e)}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i<o;i++)l.push(0);_.find(".bwg-item").each(function(){var e=l.indexOf(Math.min.apply(Math,l));jQuery(this).css({height:s,order:e+1}),l[e]+=jQuery(this)[0].getBoundingClientRect().width});var n=Math.max.apply(Math,l);for(_.width(n),i=0;i<o;i++)l[i]<n&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),b=_.data("thumbnail-border"),w=(_.data("thumbnail-padding"),o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o<w&&(w=o);var d=_.find(".bwg-item").length;d<w&&(w=d);var u,h,m=100/w,c=[];for(i=0;i<w;i++)c.push(0);_.find(".bwg-item").each(function(){var e=c.indexOf(Math.min.apply(Math,c)),t=jQuery(this).find("img");if(jQuery(this).css({width:m+"%",order:e+1}),void 0!==t.data("src")&&-1===t.data("src").indexOf("svg")&&0<t.attr("data-width").length&&0<t.attr("data-height").length){h=parseInt(t.data("width"))/parseInt(t.data("height")),u=t.width()/h;var i=(this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2")||!this.querySelector("a .bwg-title1 .bwg-title2")?0:this.querySelector("a .bwg-title1 .bwg-title2").getClientRects()[0].height)+(0<jQuery(this).find(".bwg-masonry-thumb-description").length?jQuery(this).find(".bwg-masonry-thumb-description").height():0);jQuery(this).height(Math.floor(u+i+2*b))}c[e]+=jQuery(this)[0].getBoundingClientRect().height});var p=Math.max.apply(Math,c);for(i=0;i<w;i++)c[i]<p&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:m+"%",order:i+1,height:p-c[i]}));_.outerWidth(w*(g+2*b)),_.height(p)}if(""!=a.html()){r.outerWidth(w*(g+2*b)),"0"!=p?(r.css("opacity","1"),r.height(p)):r.css("opacity","0"),r.empty();var y=a.html();r.append(y),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).data("src")&&""!=jQuery(this).data("src")&&(jQuery(this).attr("src",jQuery(this).data("src")),jQuery(this).on("load",function(){jQuery(this).removeClass("lazy_loader")}))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden"),jQuery(".bwg_container img").removeAttr("width").removeAttr("height")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,_=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var r=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*r;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*r;else s=r;else s=r;(p=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=p.get(e).naturalWidth,i=p.get(e).naturalHeight),t=t*s/i,p.eq(e).css({cssText:"width:"+t+"px !important; height:"+s+"px !important;"})});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*_,n=0,g=[];g[0]=0;var b=[],w=b[0]=0;p.each(function(e){row_cum_width2=w+p.eq(e).width()+2*_,row_cum_width2-o<0?(w=row_cum_width2,g[e]=n,b[n]++):e!==p.length-1?Math.abs(w-o)>Math.abs(row_cum_width2-o)||Math.abs(w-o)<=Math.abs(row_cum_width2-o)&&0==b[n]?e!==p.length-2?(w=row_cum_width2,g[e]=n,b[n]++,b[++n]=0,w=0):(w=row_cum_width2,g[e]=n,b[n]++):(b[++n]=1,g[e]=n,w=row_cum_width2-w):(w=row_cum_width2,g[e]=n,b[n]++)});for(var d=[],u=[],h=0;h<=n;h++)w=0,p.each(function(e){g[e]==h&&(w+=p.eq(e).width())}),d[h]=C=(o-2*b[h]*_)/w,u[h]=(l-2*_)*d[h]+2*_;if(0==n)for(h=0;h<=n;h++)u[h]>s&&(d[h]=1,u[h]=l);(T=[])[0]=0;var m=[],c=[];m[0]=0,c[0]=0;for(h=1;h<=n;h++)m[h]=m[0],c[h]=c[h-1]+u[h-1];p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[g[e]],r=i*d[g[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:c[g[e]],left:m[g[e]]}),m[g[e]]+=t*d[g[e]]+2*_,T[g[e]]=e}),jQuery("#"+i).height(c[n]+u[n]-c[0])}else{var p,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;var j=jQuery(".bwg_container").width();void 0!==j&&j<y&&(f=j)}(p=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){jQuery(this).removeAttr("style"),jQuery(this).parent().removeAttr("style");var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=p.get(e).naturalWidth,0!==(i=p.get(e).naturalHeight)&&""!==i||(i=f),0!==t&&""!==t||(t=f)),p.eq(e).css({cssText:"width:"+f+"px !important; height:"+i*f/t+"px !important;"})});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var Q=f+2*_<o?f:o-2*_,v=Math.min(Math.floor(o/(Q+2*_)),p.length),x=[];x[0]=0;for(var k=[],z=[],C=0;C<v;C++)z[C]=0,k[C]=0;p.each(function(e){for(var t=0,i=z[0],a=0;a<v;a++)i>z[a]&&(i=z[a],t=a);x[e]=t,k[t]++,A=i,H=0+t*(Q+2*_),p.eq(e).parent().css({top:A,left:H}),z[t]+=p.eq(e).height()+2*_}),(d=[])[0]=1;var I=0,E=[],M=0,S=0;for(C=0;C<v;C++)I+=Q,E[C]=0,p.each(function(e){x[e]==C&&(E[C]+=p.eq(e).height())}),0!=E[C]&&(M+=Q/E[C],S+=Q*k[C]*2*_/E[C]);var O=0;0!=M&&(O=(I+S)/M);for(C=0;C<v;C++)0!=E[C]&&(d[C]=(O-2*k[C]*_)/E[C]);var T,H=[];H[0]=0;for(C=1;C<=v;C++)H[C]=H[C-1]+Q*d[C-1]+2*_;var A=[];for(C=0;C<v;C++)A[C]=0;(T=[])[0]=0,p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[x[e]],r=i*d[x[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:A[x[e]],left:H[x[e]]}),A[x[e]]+=i*d[x[e]]+2*_,T[x[e]]=e}),jQuery("#"+i).width(H[v]).height(A[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(t.data("bwg"),t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(t,e,i){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+t).width();jQuery(this).find(".bwg_mosaic_title_spun1_"+t).width(e),jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:1,"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(e)})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(document).off("click",".bwg-album").on("click",".bwg-album",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(document).on("click",".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t,i="",a="",r=(a=jQuery(e).parent().parent().hasClass("bwg_tag_buttons_view")?jQuery(e).parent().parent():jQuery(e).parent().parent().parent()).find(".current_view").val(),_=a.find(".form_id").val(),s=a.find(".cur_gal_id").val(),o=a.find(".album_gallery_id").val(),l=a.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){i=i+jQuery(e).text()+","}),""==(i=i.slice(0,-1))&&(i=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",i),jQuery(e).parent().find(".CaptionCont .placeholder").html(i);var n=jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+s).val();t="string"==typeof n&&""!==n?n.split(","):[],"object"==typeof n&&(t=n),jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+r).val(t),bwg_select_tag(r,_,s,o,l,!1)}function bwg_document_ready(i){bwg_add_lightbox(),i.data("right-click-protection")&&bwg_disable_right_click(i);var e=i.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&e.length)for(var t=0;t<e[0].length;t++)void 0===e[0][t].attributes.selected&&(e[0][t].selected=!1);e.length&&(e.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),e.off("change").on("change",function(){bwg_filter_by_tag(this)})),bwg_search_tag_init(i);var a=i.find(".cur_gal_id").val(),r=i.find(".current_view").val(),_=i.find(".bwg_tags_container_"+r+" .bwg_tag_button_view_container"),s=i.find("#bwg_tag_id_"+a),o=parseInt(2*_.find(".bwg_tags_filter_buttons").outerHeight(!0));_.length&&(_.find(".bwg_tags_filter_buttons").off("click").on("click",function(){if(!jQuery(this).hasClass("active")){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1"),""==s.val()?s.val(jQuery(this).val()):s.val(s.val()+","+jQuery(this).val()),bwg_filter_by_tag(this)}return!1}),_.find(".bwg_all_tags").off("click").on("click",function(){return jQuery(this).hasClass("active")||(s.val(""),bwg_filter_by_tag(this)),!1}),""!=s.val()&&_.find(".bwg_all_tags").removeClass("active"),s.val().split(",").forEach(function(t){_.find(".bwg_tags_filter_buttons").each(function(){if(jQuery(this).val()==t){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1")}})}),bwg_tags_button_section_visibility());var l=i.find(".bwg_order");l.length&&l.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed"),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))}),jQuery(".search_tags").on("sumo:opened",function(){var e=jQuery(this).parents(".bwg_container").height(),t=(jQuery(this).parents(".bwg_container").find(".wd_error").length,jQuery(this).parent(".SumoSelect").find(".optWrapper>.options"));void 0!==t&&(e-50<t.height()&&t.css("max-height",e-50));0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var n=window.location.hash.substring(1);if(n&&"-1"!=n.indexOf("bwg")){bwg_hash_array=n.replace("bwg","").split("/");var g=jQuery(".bwg_container");g&&bwg_gallery_box(bwg_hash_array[1],g,!1,bwg_hash_array[0])}bwg_resize_search_line()}function bwg_search_tag_init(e){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)}))}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return"Enter"!=t.key||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,n,g,b){if("1"!=bwg_objectsL10n.front_ajax||!0===n){n?(jQuery(".bwg_loading_div_1").addClass("bwg_load_more_ajax_loading").removeClass("bwg_loading_div_1"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()})):jQuery(".bwg_load_more_ajax_loading").addClass("bwg_loading_div_1").removeClass("bwg_load_more_ajax_loading").removeAttr("style"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),"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"),d=0;if(void 0===n)n=!1;var u,h=jQuery("#page_number_"+i).val(),m=jQuery("#bwg_search_input_"+i).val(),c={},p=jQuery("#bwg_album_breadcrumb_"+i).val();if(p&&!0!==n){var y=JSON.parse(p);if("back"==r){y.splice(-1,1);var f=y.slice(-1)[0];r=f.id,h=f.page,c["action_"+i]="back"}else"numeric"===n||s?(y.splice(-1,1),y.push({id:r,page:h,search:m})):(y.push({id:r,page:1}),h=1);c["bwg_album_breadcrumb_"+i]=JSON.stringify(y)}if(c["bwg-preview-type"]=jQuery("#"+t).data("gallery-type"),c.gallery_type=jQuery("#"+t).data("gallery-type"),c.gallery_id=jQuery("#"+t).data("gallery-id"),c.tag=jQuery("#"+t).data("tag"),c.album_id=jQuery("#"+t).data("album-id"),c.theme_id=jQuery("#"+t).data("theme-id"),c.shortcode_id=jQuery("#"+t).data("shortcode-id"),c.bwg=i,c.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(h=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(void 0===b)b=!0;if(1==b&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),c["page_number_"+i]=h,c["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),c["album_gallery_id_"+i]=r,c["type_"+i]=_,c["title_"+i]=o,c["description_"+i]=g,c["sortImagesByValue_"+i]=l,c["bwg_random_seed_"+i]=jQuery("#bwg_random_seed_"+i).val(),0<jQuery("#bwg_search_input_"+i).length&&(c["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==c["bwg_album_breadcrumb_"+i]){var j=JSON.parse(c["bwg_album_breadcrumb_"+i]);jQuery.each(j,function(e,t){c["bwg_search_"+i]="",r==t.id&&(c["bwg_search_"+i]=t.search)})}var Q=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val();return u="string"==typeof Q&&""!==Q?Q.split(","):[],"object"==typeof Q&&(u=Q),c["bwg_tag_id_"+a]=u,n?(jQuery(".bwg_loading_div_1").addClass("bwg_load_more_ajax_loading").removeClass("bwg_loading_div_1"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()})):jQuery(".bwg_load_more_ajax_loading").addClass("bwg_loading_div_1").removeClass("bwg_load_more_ajax_loading").removeAttr("style"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery.ajax({type:"POST",url:w,data:c,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,d=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):a=="bwg_thumbnails_masonry_"+i?jQuery(".bwg-container-temp"+i).append(jQuery(e).closest(".bwg-container-"+i).html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e),bwg_remove_lazy_loader_icon()},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()}),""==u&&(u=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val(u),u.forEach(function(t){jQuery(".bwg_tags_container_"+i+" .bwg_tags_filter_buttons").each(function(){var e=parseInt(2*jQuery(this).outerHeight(!0));jQuery(this).val()==t&&(jQuery(this).addClass("active"),e<jQuery(this).position().top&&jQuery(".bwg_tags_container_"+i+" .show_bottom_tag").val("1"),jQuery(".bwg_tags_container_"+i+" .bwg_all_tags").removeClass("active"))})}),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(jQuery("#bwg_container1_"+i));var e=jQuery("#bwg_container1_"+i).data("gallery-view-type");if(jQuery("#bwg_container1_"+i+" .bwg-album-thumbnails").length){bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i)}else{switch(e){case"thumbnails":case"thumbnail":case"masonry":case"mosaic":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(".bwg-container-"+i);break;case"slideshow":bwg_slideshow_ready(i);break;case"carousel":bwg_carousel_ready(i),bwg_carousel_onload(jQuery("#bwg_container1_"+i));break;case"image_browser":bwg_image_browser_ready(jQuery("#bwg_container1_"+i));break;case"blog_style":bwg_blog_style_ready(jQuery("#bwg_container1_"+i))}bwg_mosaic_ajax(i,d)}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(c["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();jQuery("#bwg_container2_"+i+" .cur_gal_id").val();""==u&&(u=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+i).val(u)}}),!1}if("back"===r)return-1==document.referrer.indexOf(window.location.host)?(str=jQuery(location).attr("href"),void window.location.replace(str.substring(0,str.indexOf("type_0")))):void window.history.back();var v=jQuery("#bwg_search_input_"+i).val(),x=jQuery(".bwg_tags_container_"+i+" .cur_gal_id").val(),k=window.location.href,z="",C=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+x).val();if(jQuery(".bwg_tags_container_"+i).parent().hasClass("bwg_tag_select_view")&&(C=C.toString()),"#"==k.substr(-1)&&(k=k.slice(0,-1)),""!==v&&void 0!==v?!1!==(z=bwg_add_url_parameter(z=bwg_remove_url_parameter("page_number_"+i,k),"bwg_search_"+i,v))&&(k=z):!1!==(z=bwg_remove_url_parameter("bwg_search_"+i,k))&&(k=z),void 0!==l&&""!==l&&!1!==(z=bwg_add_url_parameter(k,"sort_by_"+i,l))&&(k=z),null!=C&&0<C.length){var I="",E=C.split(",");jQuery.each(E,function(e){var t=",";e===E.length-1&&(t=""),I+=E[e]+t}),""!==I&&!1!==(z=bwg_add_url_parameter(k,"filter_tag_"+i,I))&&(k=z)}else!1!==(z=bwg_remove_url_parameter("filter_tag_"+i,z))&&(k=z);window.location.href=k}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery(".bwg_tags_container_"+e+" #bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,n,g){var b,w=!1,d="";if(void 0!==g&&""!==g){w=!0,bwg_params[g].bwg_trans_in_progress=!0,d="_"+g,b=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else b=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 u(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+d).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(""),w){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()}w?(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"+d).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+d).css({transition:"all "+b+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+d).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(u)),0==b&&u()}function bwg_cubeH(e,t,i,a){var r=jQuery(e).width()/2;"right"==i?bwg_cube(r,r,0,0,90,0,-90,e,t,i,a):"left"==i&&bwg_cube(r,-r,0,0,-90,0,90,e,t,i,a)}function bwg_cubeV(e,t,i,a){var r=jQuery(e).height()/2;"right"==i?bwg_cube(r,0,-r,90,0,-90,0,e,t,i,a):"left"==i&&bwg_cube(r,0,r,-90,0,90,0,e,t,i,a)}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_grid(e,t,i,a,r,_,s,o,l,n,g){var b,w=!1,d="";if(event_stack=void 0!==g&&""!==g?(w=!0,bwg_params[g].bwg_trans_in_progress=!0,d="_"+g,b=bwg_params[g].bwg_transition_duration,bwg_params[g].event_stack):(b=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.event_stack),!bwg_testBrowser_cssTransitions())return bwg_fallback(o,l,n);w?(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+d).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+d).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"));var u=b/(e+t);var h=jQuery(o).find("img"),m=jQuery(o).find("figure"),c=(jQuery(o).find("iframe").css("opacity",0),jQuery('<span style="display: block;" />').addClass("bwg_grid"+d));jQuery(o).prepend(c);var p,y,f,j,Q,v,x,k,z,C,I,E=jQuery(".bwg_slide_bg"+d),M=h.width(),S=h.height(),O=E.width(),T=E.height(),H=Math.floor(O/e),A=Math.floor(T/t),L=O-e*H,B=Math.ceil(L/e),W=T-t*A,D=Math.ceil(W/t),R=0,F=Math.ceil((jQuery(".bwg_slide_bg"+d).width()-h.width())/2),N=void 0===h.attr("src")?"":h.attr("src");a="min-auto"===(a="auto"===a?O:a)?-O:a,r="min-auto"===(r="auto"===r?T:r)?-T:r;for(var P=0;P<e;P++){var U=0,V=Math.floor((jQuery(".bwg_slide_bg"+d).height()-h.height())/2),q=H;if(0<L){var J=B<=L?B:L;q+=J,L-=J}for(var G=0;G<t;G++){var Y=A,$=W;0<$&&(Y+=J=D<=$?D:W,$-=J),c.append((p=q,y=Y,f=U,j=V,Q=R,v=F,x=N,k=M,z=S,C=g,void 0,I=(P+G)*u,jQuery('<span class="bwg_gridlet'+d+'" />').css({display:"block",width:p,height:y,top:f,left:Q,backgroundImage:'url("'+x+'")',backgroundColor:w?jQuery(".bwg_slideshow_image_wrap_"+C).css("background-color"):jQuery(".spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:v+"px "+j+"px",backgroundSize:k+"px "+z+"px",transition:"all "+b+"ms ease-in-out "+I+"ms",transform:"none"}))),U+=Y,V-=Y}F-=q,R+=q}var X=c.children().last();function K(){if(jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),h.css("opacity",1),m.css("opacity",1),c.remove(),w){bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].event_stack,t=bwg_params[g].data}else{gallery_box_data.bwg_trans_in_progress=!1;e=gallery_box_data.event_stack,t=""}if(jQuery(".bwg_image_info").show(),jQuery(o).html(""),void 0!==e&&0<e.length){var i=e[0].split("-");e.shift(),bwg_change_image(i[0],i[1],t,!0,g)}w?bwg_change_watermark_container(g):bwg_change_watermark_container()}c.show(),h.css("opacity",0),m.css("opacity",0),c.children().first().addClass("rs-top-left"),c.children().last().addClass("rs-bottom-right"),c.children().eq(t-1).addClass("rs-bottom-left"),c.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){c.children().css({opacity:s,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+_+")"})},1),jQuery(l).css("opacity",1),jQuery(X).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(K)),0==b&&K()}function bwg_sliceH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,8,0,r,0,1,0,e,t,i,a)}function bwg_sliceV(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(10,1,0,0,r,1,0,e,t,i,a)}function bwg_slideV(e,t,i,a){if("right"==i)var r="auto";else if("left"==i)r="min-auto";bwg_grid(1,1,0,0,r,1,1,e,t,i,a)}function bwg_slideH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,1,0,r,0,1,1,e,t,i,a)}function bwg_scaleOut(e,t,i,a){bwg_grid(1,1,0,0,0,1.5,0,e,t,i,a)}function bwg_scaleIn(e,t,i,a){bwg_grid(1,1,0,0,0,.5,0,e,t,i,a)}function bwg_blockScale(e,t,i,a){bwg_grid(8,6,0,0,0,.6,0,e,t,i,a)}function bwg_kaleidoscope(e,t,i,a){bwg_grid(10,8,0,0,0,1,0,e,t,i,a)}function bwg_fan(e,t,i,a){if("right"==i)var r=45,_=100;else if("left"==i)r=-45,_=-100;bwg_grid(1,10,r,_,0,1,0,e,t,i,a)}function bwg_blindV(e,t,i,a){bwg_grid(1,8,0,0,0,.7,0,e,t,"",a)}function bwg_blindH(e,t,i,a){bwg_grid(10,1,0,0,0,.7,0,e,t,"",a)}function bwg_random(e,t,i,a){var r=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["bwg_"+r[Math.floor(Math.random()*r.length)]](e,t,i,a)}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+o&&(o=0),0<n+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+o},{duration:500,complete:function(){void 0!==i&&bwg_disable_lightbox_filmstrip_left_right_arrow(i)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+s},{duration:500,complete:function(){void 0!==i&&bwg_disable_lightbox_filmstrip_left_right_arrow(i)}})}function bwg_slideshow_filmstrip_fix_dimension(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e&&void 0!==bwg_params[e].outerWidth_or_outerHeight?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e&&void 0!==bwg_params[e].left_or_top?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}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500})))}function bwg_slideshow_filmstrip_fix_count(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_fix_count"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip_fix_count"+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}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500})))}function bwg_resize_slideshow_filmstrip_fix_count(e){var _=e.bwg,t=e.parent_width,i=e.params,a=i.filmstrip_direction,r=i.data,s=i.filmstrip_thumb_margin_hor,o=jQuery(window).width()<=767&&5<i.slideshow_thumbnails_count,l=o?5:i.slideshow_thumbnails_count,n="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_container_"+_,g="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_,b="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnails_"+_,w="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnails_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_,d="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_image_container_"+_,u=jQuery(d).data("filmstrip-position"),h=(jQuery(d).data("filmstrip-size"),i.slideshow_filmstrip_rl_btn_size);if(jQuery("#bwg_container1_"+_).css({width:"100%"}),jQuery("#bwg_container1_"+_+" #bwg_container2_"+_).css({width:t}),"undefined"==typeof resize_in_progress||!1===resize_in_progress){window.resize_in_progress=!0,void 0!==m&&clearTimeout(m);var m=setTimeout(function(){resize_in_progress=!1;var e={};"bottom"==u||"top"==u?e.left=0:e.top=0,jQuery(b).css(e);var t="horizontal"==a?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+_).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+_).css({display:t}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+_).css({display:t}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+_).css({display:"none"})},500)}if(bwg_resize_instagram_post(_),bwg_change_watermark_container(_),"horizontal"==a){var c=i.image_height/i.image_width,p=t-40,y=Math.round(c*p),f=(p-s*l)/l,j=Math.round(c*f);jQuery(n).css({width:t,height:j}),jQuery(g).css({width:p,height:j}),jQuery(w).css({width:f,height:j}),jQuery.each(r,function(e,t){var i=f,a=j;if(""!=t.image_width&&""!=t.image_height){var r=Math.max(f/t.image_width,j/t.image_height);i=t.image_width*r,a=t.thumb_height*r}""!=t.thumb_width&&""!=t.thumb_height&&(i=t.thumb_width,a=t.thumb_height);i*=r=Math.max(f/i,j/a),a*=r;jQuery(".bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_+" .bwg_slideshow_filmstrip_thumbnail_img_"+_).css({width:f,height:j,"margin-left":0,"margin-top":0})}),jQuery(b).css({width:f*r.length+s*r.length,height:j}),jQuery(".bwg_slideshow_image_wrap_"+_).css({width:t,height:t*i.image_height/i.image_width}),(Q={width:t,height:t*(i.image_height/i.image_width)-j})[u]=j,jQuery(".bwg_slideshow_image_container_"+_).css(Q),jQuery(".bwg_slideshow_image_"+_).css({cssText:"max-width:"+t+"px !important; max-height:"+(t*(i.image_height/i.image_width)-j)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+_).css({cssText:"width:"+t+"px !important; height:"+(t*(i.image_height/i.image_width)-j)+"px !important;"}),jQuery(".bwg_embed_frame_"+_).css({"max-width":t+"px","max-height":t*(i.image_height/i.image_width)-j+"px"}),jQuery(".bwg_embed_frame_"+_).attr("data-width",t),jQuery(".bwg_embed_frame_"+_).attr("data-height",t*(i.image_height/i.image_width)-j),j<h&&(h=j),jQuery(n).find(".bwg-icon-angle-left").css({"font-size":h}),jQuery(n).find(".bwg-icon-angle-right").css({"font-size":h})}else{var Q,v=t*i.image_height/i.image_width;c=i.image_width/i.image_height,y=v-40,p=Math.round(c*y),j=(y-s*l)/l,f=Math.round(c*j);jQuery.each(r,function(e,t){var i=f,a=j;if(""!=t.image_width&&""!=t.image_height){var r=Math.max(f/t.image_width,j/t.image_height);i=t.image_width*r,a=t.thumb_height*r}""!=t.thumb_width&&""!=t.thumb_height&&(i=t.thumb_width,a=t.thumb_height);r=Math.max(f/i,j/a),i*=r,a*=r;jQuery(".bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_+" .bwg_slideshow_filmstrip_thumbnail_img_"+_).css({width:f,height:j,"margin-left":0,"margin-top":0})}),jQuery(n).css({width:f,height:v}),jQuery(g).css({width:f,height:y}),jQuery(b).css({width:f,height:j*r.length+s*r.length}),jQuery(w).css({width:f,height:j}),jQuery(".bwg_slideshow_image_wrap_"+_).css({width:t,height:v}),(Q={width:t-f,height:v})[u]=f,jQuery(d).css(Q),jQuery(".bwg_slideshow_image_"+_).css({cssText:"max-width:"+(t-f)+"px !important; max-height:"+v+"px !important;"}),jQuery(".bwg_slideshow_embed_"+_).css({cssText:"width:"+(t-f)+"px !important; height:"+v+"px !important;"}),jQuery(".bwg_embed_frame_"+_).css({"max-width":t-f+"px","max-height":v+"px"}),jQuery(".bwg_embed_frame_"+_).attr("data-width",t-f),jQuery(".bwg_embed_frame_"+_).attr("data-height",v),f<h&&(h=f),jQuery(n).find(".bwg-icon-angle-up").css({"font-size":h}),jQuery(n).find(".bwg-icon-angle-down").css({"font-size":h})}o&&(jQuery(n).find(".bwg-icon-angle-left").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-right").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-up").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-down").removeAttr("style"))}function bwg_resize_slideshow_filmstrip_fix_dimension(e){var t=e.bwg,i=e.parent_width,a=e.params,r=a.filmstrip_direction,_=a.slideshow_filmstrip_width,s=a.slideshow_filmstrip_height,o="#bwg_container1_"+t+" #bwg_container2_"+t,l=o+" .bwg_slideshow_image_wrap_"+t,n=o+" .bwg_slideshow_image_container_"+t,g=o+" .bwg_slideshow_image_"+t,b=o+" .bwg_slideshow_embed_"+t,w=l+" .bwg_slideshow_filmstrip_container_"+t,d=w+" .bwg_slideshow_filmstrip_"+t,u=i,h=u*(a.image_height/a.image_width);jQuery(l).css({width:u,height:h}),jQuery(n).css({width:u-("horizontal"==r?0:_),height:h-("horizontal"==r?s:0)}),jQuery(g).css({display:"inline-block","max-width":u-("horizontal"==r?0:_),"max-height":h-("horizontal"==r?s:0)}),jQuery(b).css({cssText:"width: "+(u-("horizontal"==r?0:_))+"px !important; height: "+(h-("horizontal"==r?s:0)-1)+"px !important;"}),bwg_resize_instagram_post(t),bwg_change_watermark_container(t),"horizontal"==r?(jQuery(w).css({width:u}),jQuery(d).css({width:u-40})):(jQuery(w).css({height:h}),jQuery(d).css({height:h-40}))}function bwg_calculate_slideshow_filmstrip_thumbnail_size(e){var t=e.bwg,i=e.params,a=i.slideshow_filmstrip_width;if(2==i.slideshow_filmstrip_type){var r="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_fix_count_"+t+" .bwg_slideshow_filmstrip_thumbnail_"+t;a=(i.left_or_top,"width"==i.width_or_height?jQuery(r).width():jQuery(r).height())}return parseFloat(a)}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}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500}))}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"),b=jQuery(s).height(),w=jQuery(s).width(),d='<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(d+='<span style="height: '+b+"px; width: "+w+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(d+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var u=jQuery(".bwg_embed_frame"),h=jQuery(".bwg_slideshow_image_container_"+r).width(),m=jQuery(".bwg_slideshow_image_container_"+r).height(),c=i[t].image_width,p=i[t].image_height,y=bwg_resizing_ratio(c,p,h,m);u.attr("data-width",h),u.attr("data-height",m);var f=y.width,j=y.height;f<j?f-=109:f+=109,d+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame","data-width":h,"data-height":m,"data-instagram-width":c,"data-instagram-height":p,style:"width: 100%; height: 100%; max-width: 100%; max-height: 100%; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen","data-max-width":w,"data-max-height":b,style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});d+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var Q="";"open_lightbox"==bwg_params[r].thumb_click_action?Q+=' class="bwg_lightbox" data-image-id="'+i[t].id+'" data-elementor-open-lightbox="no"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(Q+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),d+="<a "+Q+">"}d+='<img style="max-height: '+b+"px !important; max-width: "+w+'px !important; display:inline-block;" ',d+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',d+=' id="bwg_slideshow_image_'+r+'" ',d+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}d+="</span></span>",jQuery(o).html(d),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),1==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_dimension(r):2==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_count(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();var v="horizontal"==bwg_params[r].filmstrip_direction?"table-cell":"block",x=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).prev(),k=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).next(),z=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_"+r),C=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_disabled_"+r),I=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_"+r),E=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_disabled_"+r);x.length?(z.css({display:v}),C.css({display:"none"})):(z.css({display:"none"}),C.css({display:v}),I.css({display:v}),E.css({display:"none"})),k.length?(I.css({display:v}),E.css({display:"none"})):(I.css({display:"none"}),E.css({display:v}),z.css({display:v}),C.css({display:"none"})),void 0!==i[t]&&"EMBED_OEMBED_INSTAGRAM_POST"==i[t].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").css({"max-height":j+"px","min-width":f+"px !important"}),jQuery(".instagram-media").show())}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=".bwg_slideshow_filmstrip_"+e;2==bwg_params[e].slideshow_filmstrip_type&&(t=".bwg_slideshow_filmstrip_fix_count_"+e);var i=jQuery("#bwg_container1_"+e).parent();i.hasClass("content-area")&&i.width(i.closest(".content-area").width()),i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=bwg_params[e].data;if(a>=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 _="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,s="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);if(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:_}),jQuery(t).css({cssText:s}),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}),2==bwg_params[e].slideshow_filmstrip_type){var o=bwg_params[e].filmstrip_direction,l="#bwg_container1_"+e+" #bwg_container2_"+e;jQuery(l).removeAttr("style");var n=l+" .bwg_slideshow_filmstrip_container_"+e,g=bwg_params[e].slideshow_filmstrip_rl_btn_size,b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).width();"horizontal"==o&&(b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).height());var w="horizontal"==o?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+e).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+e).css({display:"none"}),b<g?(g=b,jQuery(n).find(".bwg-icon-angle-left").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-right").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-up").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-down").css({"font-size":g})):(jQuery(n).find(".bwg-icon-angle-left").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-right").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-up").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-down").removeAttr("style"));var d=l+" .bwg_slideshow_filmstrip_thumbnails_"+e;jQuery(d).removeAttr("style"),jQuery(d+" .bwg_slideshow_filmstrip_thumbnail_"+e).each(function(e,t){jQuery(t).attr("style",jQuery(t).attr("data-style")),jQuery(t).find("img").attr("style",jQuery(t).attr("data-style"))});var u="#bwg_container1_"+e+" #bwg_container2_"+e+" .bwg_slideshow_image_container_"+e,h=(jQuery(u).data("filmstrip-position"),jQuery(u).data("filmstrip-size"));jQuery(u).css({filmstrip_position:h});var m="bwg_slideshow_filmstrip_thumbnail_"+e;window.bwg_slideshow_filmstrip_thumb[m].next_prev_index&&(window.bwg_slideshow_filmstrip_thumb[m].next_prev_index=0)}}else 1==bwg_params[e].slideshow_filmstrip_type&&bwg_resize_slideshow_filmstrip_fix_dimension({bwg:e,params:bwg_params[e],parent_width:a}),2==bwg_params[e].slideshow_filmstrip_type&&bwg_resize_slideshow_filmstrip_fix_count({bwg:e,params:bwg_params[e],parent_width:a}),0==bwg_params[e].slideshow_filmstrip_type&&(jQuery(".bwg_slideshow_image_wrap_"+e).css({width:a,height:a*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:a-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width),height:a*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: "+(a-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(a*(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_embed_frame_"+e+", .bwg_slideshow_embed_"+e).css({"max-width":a+"px","max-height":a*(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"}),jQuery(".bwg_embed_frame_"+e).attr("data-width",a),jQuery(".bwg_embed_frame_"+e).attr("data-height",a*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)),jQuery(".bwg_slideshow_dots_container_"+e).css({width:a}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:a*(bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:a*(bwg_params[e].watermark_width/bwg_params[e].image_width),maxHeight:a*(bwg_params[e].watermark_height/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:a*(bwg_params[e].watermark_font_size/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*a*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*a*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width});var c=jQuery(".bwg_slide_container_"+e),p=c.width(),y=c.height();jQuery(".bwg_popup_embed").css({width:p+"px",height:y+"px"}),r[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){var t=!1;if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){t=!0;var i=jQuery("#instagram-embed-"+e),a=jQuery(".bwg_slideshow_embed_"+e),r=jQuery(".bwg_embed_frame_"+e),_=void 0!==a.width()?a.width():jQuery(".bwg_slideshow_embed_"+e).width(),s=void 0!==a.height()?a.height():jQuery(".bwg_slideshow_embed_"+e).height(),o=r.data("instagram-width"),l=r.data("instagram-height");bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=!0;i=jQuery(".instagram-media"),r=jQuery(".bwg_embed_frame"),_=jQuery(".bwg_image_container").width(),s=jQuery(".bwg_image_container").height(),o=r.data("instagram-width"),l=r.data("instagram-height");bwg_change_watermark_container()}if(!0===t){var n=bwg_resizing_ratio(o,l,_,s);r.attr("data-width",_),r.attr("data-height",s);var g=n.width;g<n.height?g-=109:g+=109,r.css({width:"100%",height:"100%","max-width":_,"max-height":s}),i.css({"min-width":g+"px !important","max-height":s+"px"})}}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)}var i=(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;jQuery(".bwg_embed_frame_instapost_"+e).height(i),jQuery(".inner_instagram_iframe_bwg_embed_frame_instapost_"+e).find('iframe[id^="instagram-embed-"]').css({"max-height":i+"px"});var a=jQuery(".image_browser_images_"+e).width();a<=108?jQuery(".paging-input_"+e).css("display","none"):(a<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):a<=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")}function bwg_resizing_ratio(e,t,i,a){var r=[i/e,a/t];return{width:e*(r=Math.min(r[0],r[1])),height:t*r}}function bwg_slideshow_filmstrip_next(e){var t=e.bwg,i=e.params,a=e.slideshow_filmstrip_class_name,r=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),_="bwg_slideshow_filmstrip_thumbnail_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,n="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,g="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-parseInt(i.filmstrip_thumb_margin_hor)+r)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-parseInt(i.filmstrip_thumb_margin_hor)+r},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[_].next_prev_index=bwg_slideshow_filmstrip_thumb[_].next_prev_index+1}function bwg_slideshow_filmstrip_prev(e){var t=e.bwg,i=e.params,a=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),r="bwg_slideshow_filmstrip_thumbnail_"+t,_="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,n="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[r].next_prev_index=bwg_slideshow_filmstrip_thumb[r].next_prev_index-1}jQuery(function(){isMobile&&(jQuery(".bwg-container.bwg-standard-thumbnails .bwg-title1, .bwg-container.bwg-masonry-thumbnails .bwg-title1, .bwg-mosaic-thumbnails").css("opacity","1"),jQuery(".bwg-zoom-effect .bwg-zoom-effect-overlay, .bwg-zoom-effect-overlay > span").css({opacity:1,"background-color":"unset"})),jQuery(".bwg-container").length&&jQuery("#wp-admin-bar-booster-top-button").removeClass("hidden")}),jQuery(function(){function i(e){bwg_slideshow_blur(e),bwg_carousel_blur(e),0<jQuery(".bwg_play_pause").length&&window.clearInterval(gallery_box_data.bwg_playInterval)}function a(e){e&&bwg_main_ready(e),bwg_slideshow_focus(),bwg_carousel_focus(),jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")&&bwg_play(gallery_box_data.data)}var r=!1;jQuery(".bwg_container").each(function(){if(0<jQuery(this).find(".wd_error").length&&(r=!0),!r){var e=jQuery(this);if(e[0].offsetHeight)var t=0;else t=1;setInterval(function(){e[0].offsetHeight?1==t&&(t=0,a(e)):0==t&&i(!(t=1))},200)}}),r||jQuery(window).focus(function(){a()}).blur(function(){i(!0)})}),jQuery(window).on("resize",function(){setTimeout(function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),bwg_tags_button_section_visibility(),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()},0)}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
1
+ var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");void 0!==e&&bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&parseInt(jQuery(".spider_popup_close").css("right"))<0&&jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id)),1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):"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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}))}),"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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}):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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):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",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_zoom").on(a,function(){var e=["mousemove","touchmove"];jQuery("figure.bwg_popup_image").each(function(){var i=jQuery(this);i.hasClass("zoom")?jQuery.each(e,function(e,t){i.removeClass("zoom"),i.off(t)}):jQuery.each(e,function(e,t){i.addClass("zoom"),i.on(t,function(e){var t,i,a,r;window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause");var _=e.target,s=_.getBoundingClientRect();e.targetTouches&&(a=e.targetTouches[0].clientX-s.left,r=e.targetTouches[0].clientY-s.top),t=e.offsetX?e.offsetX:e.targetTouches?a:_.offsetHeight,i=e.offsetY?e.offsetY:e.targetTouches?r:_.offsetWidth,x=t/_.offsetWidth*100,y=i/_.offsetHeight*100,_.parentNode.style.backgroundPosition=x+"% "+y+"%"})})})}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,a,r,_,s,o,l){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+a+"px; height:"+r+"px; margin-top:-"+r/2+"px; margin-left: -"+a/2+'px; ">'+e+"</div>").hide().appendTo("body");if(gallery_box_ready(),spider_showpopup(s,o,t,_,l),"undefined"!=typeof addthis){jQuery(".addthis-smartlayers").show();var i=setInterval(function(){void 0!==addthis.layers.refresh&&(clearInterval(i),addthis.layers.refresh())},100)}},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());if(void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds)){instgrm.Embeds.process();var o=parseInt(jQuery("#bwg_image_container").height());jQuery(".bwg_embed_frame .instagram-media").css({"max-height":o+"px"})}}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){jQuery(".addthis-smartlayers").hide(),null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();history.pushState(history.state,null,window.location.origin+window.location.pathname+window.location.search),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){jQuery(".bwg_comments").mCustomScrollbar("destroy");var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i,e){var t={};t.image_id=jQuery("#rate_image_id").val(),t.rate=void 0!==e?e:jQuery("#"+i+" input[name='score']").val(),t.ajax_task=jQuery("#rate_ajax_task").val();var a=jQuery("#bwg_image_container").data("action");return jQuery.ajax({type:"POST",url:a,data:t,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=t.find(".cur_gal_id").val(),o=jQuery("#bwg_tag_id_"+s).val();o=o||0;var l=1==i?"&open_ecommerce=1":"",n=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";n=n||"",void 0!==a&&(r+="&gallery_id="+a);var b="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(b="&open_comment=1");var d=jQuery("#bwg_random_seed_"+_).val();spider_createpopup(r+"&bwg_gallery_type="+t.data("gallery-type")+"&bwg_random_seed="+d+"&image_id="+e+"&filter_tag="+o+l+b+"&filter_search_name="+n+g,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#rate_image_id").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,""==gallery_box_data.data[a].alt&&""==gallery_box_data.data[a].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show(),jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,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("#rate_image_id").val(r[a].id),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),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)),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"),b=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),w=jQuery(s).height(),d=jQuery(s).width(),u='<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"),u+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(b?"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=jQuery(".instagram-media"),m=jQuery(".bwg_embed_frame"),c=jQuery(".bwg_image_container").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),p=jQuery(".bwg_image_container").height()-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),y=r[a].image_width,f=r[a].image_height,j=bwg_resizing_ratio(y,f,c,p);m.attr("data-width",c),m.attr("data-height",p);var Q=j.width,v=j.height;Q<v?Q-=109:Q+=109,u+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":c,"data-height":p,"data-instagram-width":y,"data-instagram-height":f,style:"width:"+Q+"px; height:"+v+"px; vertical-align:middle; display:inline-block; position:relative;"}),h.css({"max-height":v+"px","min-width":Q+"px !important"})}else u+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(b?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});u+="</span>"}else{jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden");var x="'"+(gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()).split("?bwg")[0]+"'";gallery_box_data.popup_enable_zoom&&(u+='<figure style="max-height: '+w+"px; max-width: "+d+"px; background-image: url("+x+'); background-repeat: no-repeat" class="bwg_popup_image bwg_popup_watermark" alt="'+r[a].alt+'" />'),u+='<img style="max-height: '+w+"px; max-width: "+d+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />'}function z(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/intent/tweet?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&(bwg_slideshow_filmstrip_fix_dimension(),setTimeout(function(){bwg_disable_lightbox_filmstrip_left_right_arrow(gallery_box_data)},100)),bwg_resize_instagram_post()}if(gallery_box_data.popup_enable_zoom?u+="</figure></span></span>":u+="</span></span>",jQuery(o).html(u),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:d,maxHeight:w,height:"auto"}),l)z();else jQuery(o).find("img").one("load",function(){z()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").show())}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),1!=gallery_box_data.open_with_fullscreen&&(gallery_box_data.lightbox_close_btn_right<0&&jQuery("#spider_popup_wrap").width()-2*gallery_box_data.lightbox_close_btn_right>=jQuery(window).width()||gallery_box_data.lightbox_close_btn_top<0&&jQuery("#spider_popup_wrap").height()-2*gallery_box_data.lightbox_close_btn_top>=jQuery(window).height()?jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"):jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"));var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";if(0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)){var _=parseFloat(jQuery("#bwg_star").attr("data-score"));jQuery("#bwg_star").removeAttr("data-score").html("");var s={starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,noRatedMsg:"Not rated yet.",readOnly:!1,score:_,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};e||(s.click=function(e,t){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",e)).then(function(){gallery_box_data.data[a].rate=e,++gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating=_?((_+e)/2).toFixed(1):e.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)})}),jQuery("#bwg_star").raty(s),jQuery(".bwg_image_rate_disabled").hide(),e&&jQuery(".bwg_image_rate_disabled").show()}}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function bwg_disable_lightbox_filmstrip_left_arrow(e){"left"==e.left_or_top?0==parseInt(jQuery(".bwg_filmstrip_thumbnails").position().left)&&jQuery(".bwg_filmstrip_left").css({opacity:.3}):0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})}function bwg_disable_lightbox_filmstrip_right_arrow(e){"left"==e.left_or_top?"width"==e.width_or_height?parseInt(jQuery(".bwg_filmstrip_thumbnails").position().left)<=jQuery(".bwg_filmstrip").width()-jQuery(".bwg_filmstrip_thumbnails").width()+e.filmstrip_thumb_right_left_space+e.all_images_right_left_space&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):"width"==e.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):parseInt(jQuery(".bwg_filmstrip_thumbnails").position().top)<=jQuery(".bwg_filmstrip").height()-jQuery(".bwg_filmstrip_thumbnails").height()+gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.all_images_right_left_space&&jQuery(".bwg_filmstrip_right").css({opacity:.3})}function bwg_disable_lightbox_filmstrip_left_right_arrow(e){var t=jQuery(".bwg_filmstrip_thumbnails").position().left,i=jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width();"top"==e.left_or_top&&(t=jQuery(".bwg_filmstrip_thumbnails").position().top,i=jQuery(".bwg_filmstrip").height()>jQuery(".bwg_filmstrip_thumbnails").height()),jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"1"}),jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"1"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:first-child").index()!=jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&0!=t||jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"0.3"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:last-child").index()==jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),i&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"})}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+decodeURIComponent(t)+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var n=a["data-max-width"],g=a["data-max-height"];l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<img src="'+decodeURIComponent(t)+'" style="max-width:'+n+"px; max-height:"+g+'px; width: auto; height: auto">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=">",""!=t&&(l+='<div class="inner_instagram_iframe_'+obj_class+'" style="max-width: 100% !important; max-height: 100% !important; width: 100%; height: 100%; margin:0; vertical-align:middle;">'+atob(t)+"</div>"),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var b="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(b+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=b+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var w="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');w+=" >",""!=i&&(w+='<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+=w+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var d="<iframe ";for(attr in""!=i&&(d+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');r+=d+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=u+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var h="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(h+=" "+attr+'="'+a[attr]+'"');h+=" >",""!=i&&(h+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=h+="</div>";break;default:var m={content:""};jQuery(document).trigger("bwg_display_embed",[m,e,t,i,a]),r=m.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(bwg_ajax_url_nonce,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o,"instagram"),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_slideshow_filmstrip_thumbnail_timer=!1;window.bwg_slideshow_filmstrip_thumb={};var bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_remove_lazy_loader_icon(){1==bwg_objectsL10n.lazy_load&&jQuery("img.bwg_lazyload").Lazy({afterLoad:function(){jQuery(".lazy_loader").removeClass("lazy_loader")},onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}function bwg_main_ready(e){var t=e.data("bwg");1===e.data("scroll")&&(form_id="gal_front_form_"+t,jQuery("html, body").animate({scrollTop:jQuery("#"+form_id).offset().top-150},500)),bwg_remove_lazy_loader_icon(),0<e.find(".wd_error").length&&bwg_container_loaded(t);var i=e.find(".bwg-container");if("album"===e.data("is-album")&&i.hasClass("bwg-thumbnails"))var a="thumbnails";else a=e.data("gallery-type");switch(bwg_document_ready(e),a){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(i);break;case"thumbnails_mosaic":bwg_thumbnail_mosaic(i);break;case"slideshow":bwg_slideshow_ready(t);break;case"carousel":bwg_carousel_ready(t),bwg_carousel_onload(e);break;case"image_browser":bwg_image_browser_ready(e);break;case"blog_style":bwg_blog_style_ready(e)}}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_tags_button_section_visibility(){jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this),t=e.find(".current_view").val(),i=e.find(".show_bottom_tag").val(),a=e.find(".bwg_tags_container_"+t+" .bwg_tag_button_view_container");if(a.length)var r=a[0].scrollHeight;var _=a.find(".bwg_tags_filter_buttons").outerHeight(!0),s=parseInt(2*a.find(".bwg_tags_filter_buttons").outerHeight(!0)+3);s<r?(0===jQuery(this).find(".see_all_tags.bwg_hide").length&&a.css({"min-height":_,"max-height":s,overflow:"hidden"}),a.next(".bwg_tag_button_see_all").show()):(a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}),a.next(".bwg_tag_button_see_all").hide());var o=a.next().find(".see_all_tags").width()/2;a.next().find(".see_all_tags").attr("style","margin-left: -"+o+"px"),a.next().find(".see_all_tags").off("click").on("click",function(){jQuery(this).hasClass("bwg_show")?(jQuery(this).removeClass("bwg_show").addClass("bwg_hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"})):jQuery(this).hasClass("bwg_hide")&&(jQuery(this).removeClass("bwg_hide").addClass("bwg_show").html("<span>&#43;</span>"+bwg_objectsL10n.bwg_tag_see_all),a.css({"min-height":_,"max-height":s,overflow:"hidden"}))}),1==i&&(jQuery(this).find(".see_all_tags").removeClass("bwg_show").addClass("bwg_hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}))})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})})})}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());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(t){var e=t.data("bwg");bwg_container_loaded(e),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process();var i=!1;t.find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(e,t.closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(t.attr("data-image-id"),t.closest(".bwg_container"),!0),!1});var a=window.location.hash.substring(1);a&&"-1"!=a.indexOf("bwg")&&(bwg_hash_array=a.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_carousel_focus(){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery(".bwg_carousel_image_container_"+bwg).length&&jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-pause")&&bwg_params_carousel[bwg].carousel.start()})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_blur(e){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight||jQuery(".bwg_carousel_image_container_"+bwg).length&&void 0!==bwg_params_carousel[bwg]&&bwg_params_carousel[bwg].carousel.pause()})}function bwg_carousel_ready(t){if(bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var e=jQuery(".bwg_embed_frame_"+t),i=e.data("height");e.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+t+" #instagram-embed-"+t).css({"max-height":i+"px"}),e.css({display:"inline-block"})}jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");jQuery("#bwg_carousel-container"+e).length&&(bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start())})}function bwg_carousel_onload(e){var t=e.data("bwg"),i=e.find(".bwg_carousel-container"+t);i.length&&(bwg_params_carousel[t]=i.data("params"),bwg_params_carousel[t].parent_width=0,bwg_carousel_watermark(t),bwg_carousel_params(t,!1),bwg_container_loaded(t))}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;a<bwg_params_carousel[t].carousel_r_width?r=a/bwg_params_carousel[t].carousel_r_width:a=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].parent_width!=a&&(bwg_params_carousel[t].parent_width=a,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*r),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*r),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:a*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*r}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel-container"+t).css({width:a,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),bwg_params_carousel[t].carousel&&!e||(e&&bwg_params_carousel[t].carousel&&bwg_params_carousel[t].carousel.pause(),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:a*r,containerHeight:bwg_params_carousel[t].image_height*r,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*r,largeFeatureHeight:bwg_params_carousel[t].image_height*r,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})))}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(r){if(jQuery("#bwg_slideshow_image_container_"+r).length){bwg_params[r]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+r).attr("data-params")),bwg_params[r].event_stack=[];var e=".bwg_slideshow_filmstrip_"+r,t="bwg_slideshow_filmstrip_thumbnail_"+r;bwg_slideshow_filmstrip_thumb[t]={},bwg_slideshow_filmstrip_thumb[t].next_prev_index=0;var i=!1;2==bwg_params[r].slideshow_filmstrip_type&&(i=!0,e=".bwg_slideshow_filmstrip_fix_count_"+r),bwg_container_loaded(r);var a=bwg_params[r].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+r).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r)?(parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r))%a.length:a.length-1,a,"",r),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+r).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),parseInt(jQuery("#bwg_current_image_key_"+r).val())+bwg_iterator(r)%a.length,a,"",r),!1});var _=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(r),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"}),setTimeout(function(){bwg_change_watermark_container(r)},500),1==bwg_params[r].slideshow_filmstrip_type&&("horizontal"==bwg_params[r].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+r).height(jQuery(".bwg_slideshow_image_wrap_"+r).height()-bwg_params[r].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+r).width(jQuery(".bwg_slideshow_image_wrap_"+r).width()-bwg_params[r].slideshow_filmstrip_width));var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(e).bind(s,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_"+r).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+r).trigger("click"),!1});var o={bwg:r,params:bwg_params[r],slideshow_filmstrip_class_name:e};if(jQuery(".bwg_slideshow_filmstrip_right_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_next(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_next(o)}),jQuery(".bwg_slideshow_filmstrip_left_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_prev(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_prev(o)}),"width"==bwg_params[r].width_or_height?bwg_set_filmstrip_pos(jQuery(e).width(),r):bwg_set_filmstrip_pos(jQuery(e).height(),r),jQuery("#bwg_slideshow_play_pause_"+r).off(_).on(_,function(){jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-play")?(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).play()):(window.clearInterval(window["bwg_playInterval"+r]),jQuery(".bwg_slideshow_play_pause_"+r).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-play bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).pause())}),0!=bwg_params[r].enable_slideshow_autoplay&&(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&jQuery("#bwg_audio_"+r).length&&document.getElementById("bwg_audio_"+r).play()),bwg_params[r].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),r),jQuery(".bwg_slideshow_image_"+r).removeAttr("width"),jQuery(".bwg_slideshow_image_"+r).removeAttr("height"),jQuery("#instagram-embed-"+r).hide(),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var l=jQuery(".bwg_embed_frame_"+r),n=l.data("height");l.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+r+" #instagram-embed-"+r).css({"max-height":n+"px"}),l.css({display:"inline-block"})}if(0<jQuery(".elementor-editor-active .bwg_embed_frame_"+r).length){!function e(){var t=jQuery(document).find(".bwg_embed_frame_"+r+" iframe");if(0<t.length){var i=jQuery(".bwg_embed_frame_"+r),a=i.data("height");return void t.css({"max-height":a+"px"})}window.setTimeout(e,500)}()}}}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(e){var t=e.data("bwg");bwg_container_loaded(t),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process(),jQuery(".image_browser_images_conteiner_"+t).length&&(bwg_params_ib[t]=JSON.parse(jQuery(".image_browser_images_conteiner_"+t).attr("data-params")),setTimeout(function(){bwg_image_browser(t)},3))}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(e)}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i<o;i++)l.push(0);_.find(".bwg-item").each(function(){var e=l.indexOf(Math.min.apply(Math,l));jQuery(this).css({height:s,order:e+1}),l[e]+=jQuery(this)[0].getBoundingClientRect().width});var n=Math.max.apply(Math,l);for(_.width(n),i=0;i<o;i++)l[i]<n&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),b=_.data("thumbnail-border"),w=(_.data("thumbnail-padding"),o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o<w&&(w=o);var d=_.find(".bwg-item").length;d<w&&(w=d);var u,h,m=100/w,c=[];for(i=0;i<w;i++)c.push(0);_.find(".bwg-item").each(function(){var e=c.indexOf(Math.min.apply(Math,c)),t=jQuery(this).find("img");if(jQuery(this).css({width:m+"%",order:e+1}),void 0!==t.data("src")&&-1===t.data("src").indexOf("svg")&&0<t.attr("data-width").length&&0<t.attr("data-height").length){h=parseInt(t.data("width"))/parseInt(t.data("height")),u=t.width()/h;var i=(this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2")||!this.querySelector("a .bwg-title1 .bwg-title2")?0:this.querySelector("a .bwg-title1 .bwg-title2").getClientRects()[0].height)+(0<jQuery(this).find(".bwg-masonry-thumb-description").length?jQuery(this).find(".bwg-masonry-thumb-description").height():0);jQuery(this).height(Math.floor(u+i+2*b))}c[e]+=jQuery(this)[0].getBoundingClientRect().height});var p=Math.max.apply(Math,c);for(i=0;i<w;i++)c[i]<p&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:m+"%",order:i+1,height:p-c[i]}));_.outerWidth(w*(g+2*b)),_.height(p)}if(""!=a.html()){r.outerWidth(w*(g+2*b)),"0"!=p?(r.css("opacity","1"),r.height(p)):r.css("opacity","0"),r.empty();var y=a.html();r.append(y),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).data("src")&&""!=jQuery(this).data("src")&&(jQuery(this).attr("src",jQuery(this).data("src")),jQuery(this).on("load",function(){jQuery(this).removeClass("lazy_loader")}))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden"),jQuery(".bwg_container img").removeAttr("width").removeAttr("height")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,_=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var r=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*r;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*r;else s=r;else s=r;(p=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=p.get(e).naturalWidth,i=p.get(e).naturalHeight),t=t*s/i,p.eq(e).css({cssText:"width:"+t+"px !important; height:"+s+"px !important;"})});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*_,n=0,g=[];g[0]=0;var b=[],w=b[0]=0;p.each(function(e){row_cum_width2=w+p.eq(e).width()+2*_,row_cum_width2-o<0?(w=row_cum_width2,g[e]=n,b[n]++):e!==p.length-1?Math.abs(w-o)>Math.abs(row_cum_width2-o)||Math.abs(w-o)<=Math.abs(row_cum_width2-o)&&0==b[n]?e!==p.length-2?(w=row_cum_width2,g[e]=n,b[n]++,b[++n]=0,w=0):(w=row_cum_width2,g[e]=n,b[n]++):(b[++n]=1,g[e]=n,w=row_cum_width2-w):(w=row_cum_width2,g[e]=n,b[n]++)});for(var d=[],u=[],h=0;h<=n;h++)w=0,p.each(function(e){g[e]==h&&(w+=p.eq(e).width())}),d[h]=C=(o-2*b[h]*_)/w,u[h]=(l-2*_)*d[h]+2*_;if(0==n)for(h=0;h<=n;h++)u[h]>s&&(d[h]=1,u[h]=l);(T=[])[0]=0;var m=[],c=[];m[0]=0,c[0]=0;for(h=1;h<=n;h++)m[h]=m[0],c[h]=c[h-1]+u[h-1];p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[g[e]],r=i*d[g[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:c[g[e]],left:m[g[e]]}),m[g[e]]+=t*d[g[e]]+2*_,T[g[e]]=e}),jQuery("#"+i).height(c[n]+u[n]-c[0])}else{var p,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;var j=jQuery(".bwg_container").width();void 0!==j&&j<y&&(f=j)}(p=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){jQuery(this).removeAttr("style"),jQuery(this).parent().removeAttr("style");var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=p.get(e).naturalWidth,0!==(i=p.get(e).naturalHeight)&&""!==i||(i=f),0!==t&&""!==t||(t=f)),p.eq(e).css({cssText:"width:"+f+"px !important; height:"+i*f/t+"px !important;"})});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var Q=f+2*_<o?f:o-2*_,v=Math.min(Math.floor(o/(Q+2*_)),p.length),x=[];x[0]=0;for(var k=[],z=[],C=0;C<v;C++)z[C]=0,k[C]=0;p.each(function(e){for(var t=0,i=z[0],a=0;a<v;a++)i>z[a]&&(i=z[a],t=a);x[e]=t,k[t]++,A=i,H=0+t*(Q+2*_),p.eq(e).parent().css({top:A,left:H}),z[t]+=p.eq(e).height()+2*_}),(d=[])[0]=1;var I=0,E=[],M=0,S=0;for(C=0;C<v;C++)I+=Q,E[C]=0,p.each(function(e){x[e]==C&&(E[C]+=p.eq(e).height())}),0!=E[C]&&(M+=Q/E[C],S+=Q*k[C]*2*_/E[C]);var O=0;0!=M&&(O=(I+S)/M);for(C=0;C<v;C++)0!=E[C]&&(d[C]=(O-2*k[C]*_)/E[C]);var T,H=[];H[0]=0;for(C=1;C<=v;C++)H[C]=H[C-1]+Q*d[C-1]+2*_;var A=[];for(C=0;C<v;C++)A[C]=0;(T=[])[0]=0,p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[x[e]],r=i*d[x[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:A[x[e]],left:H[x[e]]}),A[x[e]]+=i*d[x[e]]+2*_,T[x[e]]=e}),jQuery("#"+i).width(H[v]).height(A[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(t.data("bwg"),t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(t,e,i){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+t).width();jQuery(this).find(".bwg_mosaic_title_spun1_"+t).width(e),jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:1,"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(e)})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(document).off("click",".bwg-album").on("click",".bwg-album",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(document).on("click",".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t,i="",a="",r=(a=jQuery(e).parent().parent().hasClass("bwg_tag_buttons_view")?jQuery(e).parent().parent():jQuery(e).parent().parent().parent()).find(".current_view").val(),_=a.find(".form_id").val(),s=a.find(".cur_gal_id").val(),o=a.find(".album_gallery_id").val(),l=a.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){i=i+jQuery(e).text()+","}),""==(i=i.slice(0,-1))&&(i=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",i),jQuery(e).parent().find(".CaptionCont .placeholder").html(i);var n=jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+s).val();t="string"==typeof n&&""!==n?n.split(","):[],"object"==typeof n&&(t=n),jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+r).val(t),bwg_select_tag(r,_,s,o,l,!1)}function bwg_document_ready(i){bwg_add_lightbox(),i.data("right-click-protection")&&bwg_disable_right_click(i);var e=i.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&e.length)for(var t=0;t<e[0].length;t++)void 0===e[0][t].attributes.selected&&(e[0][t].selected=!1);e.length&&(e.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),e.off("change").on("change",function(){bwg_filter_by_tag(this)})),bwg_search_tag_init(i);var a=i.find(".cur_gal_id").val(),r=i.find(".current_view").val(),_=i.find(".bwg_tags_container_"+r+" .bwg_tag_button_view_container"),s=i.find("#bwg_tag_id_"+a),o=parseInt(2*_.find(".bwg_tags_filter_buttons").outerHeight(!0));_.length&&(_.find(".bwg_tags_filter_buttons").off("click").on("click",function(){if(!jQuery(this).hasClass("active")){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1"),""==s.val()?s.val(jQuery(this).val()):s.val(s.val()+","+jQuery(this).val()),bwg_filter_by_tag(this)}return!1}),_.find(".bwg_all_tags").off("click").on("click",function(){return jQuery(this).hasClass("active")||(s.val(""),bwg_filter_by_tag(this)),!1}),""!=s.val()&&_.find(".bwg_all_tags").removeClass("active"),s.val().split(",").forEach(function(t){_.find(".bwg_tags_filter_buttons").each(function(){if(jQuery(this).val()==t){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1")}})}),bwg_tags_button_section_visibility());var l=i.find(".bwg_order");l.length&&l.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed"),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))}),jQuery(".search_tags").on("sumo:opened",function(){var e=jQuery(this).parents(".bwg_container").height(),t=(jQuery(this).parents(".bwg_container").find(".wd_error").length,jQuery(this).parent(".SumoSelect").find(".optWrapper>.options"));void 0!==t&&(e-50<t.height()&&t.css("max-height",e-50));0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var n=window.location.hash.substring(1);if(n&&"-1"!=n.indexOf("bwg")){bwg_hash_array=n.replace("bwg","").split("/");var g=jQuery(".bwg_container");g&&bwg_gallery_box(bwg_hash_array[1],g,!1,bwg_hash_array[0])}bwg_resize_search_line()}function bwg_search_tag_init(e){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)}))}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return"Enter"!=t.key||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,n,g,b){if("1"!=bwg_objectsL10n.front_ajax||!0===n){n?(jQuery(".bwg_loading_div_1").addClass("bwg_load_more_ajax_loading").removeClass("bwg_loading_div_1"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()})):jQuery(".bwg_load_more_ajax_loading").addClass("bwg_loading_div_1").removeClass("bwg_load_more_ajax_loading").removeAttr("style"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),"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"),d=0;if(void 0===n)n=!1;var u,h=jQuery("#page_number_"+i).val(),m=jQuery("#bwg_search_input_"+i).val(),c={},p=jQuery("#bwg_album_breadcrumb_"+i).val();if(p&&!0!==n){var y=JSON.parse(p);if("back"==r){y.splice(-1,1);var f=y.slice(-1)[0];r=f.id,h=f.page,c["action_"+i]="back"}else"numeric"===n||s?(y.splice(-1,1),y.push({id:r,page:h,search:m})):(y.push({id:r,page:1}),h=1);c["bwg_album_breadcrumb_"+i]=JSON.stringify(y)}if(c["bwg-preview-type"]=jQuery("#"+t).data("gallery-type"),c.gallery_type=jQuery("#"+t).data("gallery-type"),c.gallery_id=jQuery("#"+t).data("gallery-id"),c.tag=jQuery("#"+t).data("tag"),c.album_id=jQuery("#"+t).data("album-id"),c.theme_id=jQuery("#"+t).data("theme-id"),c.shortcode_id=jQuery("#"+t).data("shortcode-id"),c.bwg=i,c.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(h=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(void 0===b)b=!0;if(1==b&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),c["page_number_"+i]=h,c["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),c["album_gallery_id_"+i]=r,c["type_"+i]=_,c["title_"+i]=o,c["description_"+i]=g,c["sortImagesByValue_"+i]=l,c["bwg_random_seed_"+i]=jQuery("#bwg_random_seed_"+i).val(),0<jQuery("#bwg_search_input_"+i).length&&(c["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==c["bwg_album_breadcrumb_"+i]){var j=JSON.parse(c["bwg_album_breadcrumb_"+i]);jQuery.each(j,function(e,t){c["bwg_search_"+i]="",r==t.id&&(c["bwg_search_"+i]=t.search)})}var Q=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val();return u="string"==typeof Q&&""!==Q?Q.split(","):[],"object"==typeof Q&&(u=Q),c["bwg_tag_id_"+a]=u,n?(jQuery(".bwg_loading_div_1").addClass("bwg_load_more_ajax_loading").removeClass("bwg_loading_div_1"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()})):jQuery(".bwg_load_more_ajax_loading").addClass("bwg_loading_div_1").removeClass("bwg_load_more_ajax_loading").removeAttr("style"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery.ajax({type:"POST",url:w,data:c,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,d=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):a=="bwg_thumbnails_masonry_"+i?jQuery(".bwg-container-temp"+i).append(jQuery(e).closest(".bwg-container-"+i).html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e),bwg_remove_lazy_loader_icon()},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()}),""==u&&(u=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val(u),u.forEach(function(t){jQuery(".bwg_tags_container_"+i+" .bwg_tags_filter_buttons").each(function(){var e=parseInt(2*jQuery(this).outerHeight(!0));jQuery(this).val()==t&&(jQuery(this).addClass("active"),e<jQuery(this).position().top&&jQuery(".bwg_tags_container_"+i+" .show_bottom_tag").val("1"),jQuery(".bwg_tags_container_"+i+" .bwg_all_tags").removeClass("active"))})}),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(jQuery("#bwg_container1_"+i));var e=jQuery("#bwg_container1_"+i).data("gallery-view-type");if(jQuery("#bwg_container1_"+i+" .bwg-album-thumbnails").length){bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i)}else{switch(e){case"thumbnails":case"thumbnail":case"masonry":case"mosaic":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(".bwg-container-"+i);break;case"slideshow":bwg_slideshow_ready(i);break;case"carousel":bwg_carousel_ready(i),bwg_carousel_onload(jQuery("#bwg_container1_"+i));break;case"image_browser":bwg_image_browser_ready(jQuery("#bwg_container1_"+i));break;case"blog_style":bwg_blog_style_ready(jQuery("#bwg_container1_"+i))}bwg_mosaic_ajax(i,d)}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(c["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();jQuery("#bwg_container2_"+i+" .cur_gal_id").val();""==u&&(u=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+i).val(u)}}),!1}if("back"===r)return-1==document.referrer.indexOf(window.location.host)?(str=jQuery(location).attr("href"),void window.location.replace(str.substring(0,str.indexOf("type_0")))):void window.history.back();var v=jQuery("#bwg_search_input_"+i).val(),x=jQuery(".bwg_tags_container_"+i+" .cur_gal_id").val(),k=window.location.href,z="",C=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+x).val();if(jQuery(".bwg_tags_container_"+i).parent().hasClass("bwg_tag_select_view")&&(C=C.toString()),"#"==k.substr(-1)&&(k=k.slice(0,-1)),""!==v&&void 0!==v?!1!==(z=bwg_add_url_parameter(z=bwg_remove_url_parameter("page_number_"+i,k),"bwg_search_"+i,v))&&(k=z):!1!==(z=bwg_remove_url_parameter("bwg_search_"+i,k))&&(k=z),void 0!==l&&""!==l&&!1!==(z=bwg_add_url_parameter(k,"sort_by_"+i,l))&&(k=z),null!=C&&0<C.length){var I="",E=C.split(",");jQuery.each(E,function(e){var t=",";e===E.length-1&&(t=""),I+=E[e]+t}),""!==I&&!1!==(z=bwg_add_url_parameter(k,"filter_tag_"+i,I))&&(k=z)}else!1!==(z=bwg_remove_url_parameter("filter_tag_"+i,z))&&(k=z);window.location.href=k}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery(".bwg_tags_container_"+e+" #bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,n,g){var b,w=!1,d="";if(void 0!==g&&""!==g){w=!0,bwg_params[g].bwg_trans_in_progress=!0,d="_"+g,b=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else b=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 u(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+d).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(""),w){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()}w?(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"+d).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+d).css({transition:"all "+b+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+d).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(u)),0==b&&u()}function bwg_cubeH(e,t,i,a){var r=jQuery(e).width()/2;"right"==i?bwg_cube(r,r,0,0,90,0,-90,e,t,i,a):"left"==i&&bwg_cube(r,-r,0,0,-90,0,90,e,t,i,a)}function bwg_cubeV(e,t,i,a){var r=jQuery(e).height()/2;"right"==i?bwg_cube(r,0,-r,90,0,-90,0,e,t,i,a):"left"==i&&bwg_cube(r,0,r,-90,0,90,0,e,t,i,a)}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_grid(e,t,i,a,r,_,s,o,l,n,g){var b,w=!1,d="";if(event_stack=void 0!==g&&""!==g?(w=!0,bwg_params[g].bwg_trans_in_progress=!0,d="_"+g,b=bwg_params[g].bwg_transition_duration,bwg_params[g].event_stack):(b=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.event_stack),!bwg_testBrowser_cssTransitions())return bwg_fallback(o,l,n);w?(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+d).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+d).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"));var u=b/(e+t);var h=jQuery(o).find("img"),m=jQuery(o).find("figure"),c=(jQuery(o).find("iframe").css("opacity",0),jQuery('<span style="display: block;" />').addClass("bwg_grid"+d));jQuery(o).prepend(c);var p,y,f,j,Q,v,x,k,z,C,I,E=jQuery(".bwg_slide_bg"+d),M=h.width(),S=h.height(),O=E.width(),T=E.height(),H=Math.floor(O/e),A=Math.floor(T/t),L=O-e*H,B=Math.ceil(L/e),W=T-t*A,D=Math.ceil(W/t),R=0,F=Math.ceil((jQuery(".bwg_slide_bg"+d).width()-h.width())/2),N=void 0===h.attr("src")?"":h.attr("src");a="min-auto"===(a="auto"===a?O:a)?-O:a,r="min-auto"===(r="auto"===r?T:r)?-T:r;for(var P=0;P<e;P++){var U=0,V=Math.floor((jQuery(".bwg_slide_bg"+d).height()-h.height())/2),q=H;if(0<L){var J=B<=L?B:L;q+=J,L-=J}for(var G=0;G<t;G++){var Y=A,$=W;0<$&&(Y+=J=D<=$?D:W,$-=J),c.append((p=q,y=Y,f=U,j=V,Q=R,v=F,x=N,k=M,z=S,C=g,void 0,I=(P+G)*u,jQuery('<span class="bwg_gridlet'+d+'" />').css({display:"block",width:p,height:y,top:f,left:Q,backgroundImage:'url("'+x+'")',backgroundColor:w?jQuery(".bwg_slideshow_image_wrap_"+C).css("background-color"):jQuery(".spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:v+"px "+j+"px",backgroundSize:k+"px "+z+"px",transition:"all "+b+"ms ease-in-out "+I+"ms",transform:"none"}))),U+=Y,V-=Y}F-=q,R+=q}var X=c.children().last();function K(){if(jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),h.css("opacity",1),m.css("opacity",1),c.remove(),w){bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].event_stack,t=bwg_params[g].data}else{gallery_box_data.bwg_trans_in_progress=!1;e=gallery_box_data.event_stack,t=""}if(jQuery(".bwg_image_info").show(),jQuery(o).html(""),void 0!==e&&0<e.length){var i=e[0].split("-");e.shift(),bwg_change_image(i[0],i[1],t,!0,g)}w?bwg_change_watermark_container(g):bwg_change_watermark_container()}c.show(),h.css("opacity",0),m.css("opacity",0),c.children().first().addClass("rs-top-left"),c.children().last().addClass("rs-bottom-right"),c.children().eq(t-1).addClass("rs-bottom-left"),c.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){c.children().css({opacity:s,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+_+")"})},1),jQuery(l).css("opacity",1),jQuery(X).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(K)),0==b&&K()}function bwg_sliceH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,8,0,r,0,1,0,e,t,i,a)}function bwg_sliceV(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(10,1,0,0,r,1,0,e,t,i,a)}function bwg_slideV(e,t,i,a){if("right"==i)var r="auto";else if("left"==i)r="min-auto";bwg_grid(1,1,0,0,r,1,1,e,t,i,a)}function bwg_slideH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,1,0,r,0,1,1,e,t,i,a)}function bwg_scaleOut(e,t,i,a){bwg_grid(1,1,0,0,0,1.5,0,e,t,i,a)}function bwg_scaleIn(e,t,i,a){bwg_grid(1,1,0,0,0,.5,0,e,t,i,a)}function bwg_blockScale(e,t,i,a){bwg_grid(8,6,0,0,0,.6,0,e,t,i,a)}function bwg_kaleidoscope(e,t,i,a){bwg_grid(10,8,0,0,0,1,0,e,t,i,a)}function bwg_fan(e,t,i,a){if("right"==i)var r=45,_=100;else if("left"==i)r=-45,_=-100;bwg_grid(1,10,r,_,0,1,0,e,t,i,a)}function bwg_blindV(e,t,i,a){bwg_grid(1,8,0,0,0,.7,0,e,t,"",a)}function bwg_blindH(e,t,i,a){bwg_grid(10,1,0,0,0,.7,0,e,t,"",a)}function bwg_random(e,t,i,a){var r=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["bwg_"+r[Math.floor(Math.random()*r.length)]](e,t,i,a)}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+o&&(o=0),0<n+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+o},{duration:500,complete:function(){void 0!==i&&bwg_disable_lightbox_filmstrip_left_right_arrow(i)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+s},{duration:500,complete:function(){void 0!==i&&bwg_disable_lightbox_filmstrip_left_right_arrow(i)}})}function bwg_slideshow_filmstrip_fix_dimension(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e&&void 0!==bwg_params[e].outerWidth_or_outerHeight?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e&&void 0!==bwg_params[e].left_or_top?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}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500})))}function bwg_slideshow_filmstrip_fix_count(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_fix_count"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip_fix_count"+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}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500})))}function bwg_resize_slideshow_filmstrip_fix_count(e){var _=e.bwg,t=e.parent_width,i=e.params,a=i.filmstrip_direction,r=i.data,s=i.filmstrip_thumb_margin_hor,o=jQuery(window).width()<=767&&5<i.slideshow_thumbnails_count,l=o?5:i.slideshow_thumbnails_count,n="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_container_"+_,g="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_,b="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnails_"+_,w="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnails_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_,d="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_image_container_"+_,u=jQuery(d).data("filmstrip-position"),h=(jQuery(d).data("filmstrip-size"),i.slideshow_filmstrip_rl_btn_size);if(jQuery("#bwg_container1_"+_).css({width:"100%"}),jQuery("#bwg_container1_"+_+" #bwg_container2_"+_).css({width:t}),"undefined"==typeof resize_in_progress||!1===resize_in_progress){window.resize_in_progress=!0,void 0!==m&&clearTimeout(m);var m=setTimeout(function(){resize_in_progress=!1;var e={};"bottom"==u||"top"==u?e.left=0:e.top=0,jQuery(b).css(e);var t="horizontal"==a?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+_).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+_).css({display:t}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+_).css({display:t}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+_).css({display:"none"})},500)}if(bwg_resize_instagram_post(_),bwg_change_watermark_container(_),"horizontal"==a){var c=i.image_height/i.image_width,p=t-40,y=Math.round(c*p),f=(p-s*l)/l,j=Math.round(c*f);jQuery(n).css({width:t,height:j}),jQuery(g).css({width:p,height:j}),jQuery(w).css({width:f,height:j}),jQuery.each(r,function(e,t){var i=f,a=j;if(""!=t.image_width&&""!=t.image_height){var r=Math.max(f/t.image_width,j/t.image_height);i=t.image_width*r,a=t.thumb_height*r}""!=t.thumb_width&&""!=t.thumb_height&&(i=t.thumb_width,a=t.thumb_height);i*=r=Math.max(f/i,j/a),a*=r;jQuery(".bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_+" .bwg_slideshow_filmstrip_thumbnail_img_"+_).css({width:f,height:j,"margin-left":0,"margin-top":0})}),jQuery(b).css({width:f*r.length+s*r.length,height:j}),jQuery(".bwg_slideshow_image_wrap_"+_).css({width:t,height:t*i.image_height/i.image_width}),(Q={width:t,height:t*(i.image_height/i.image_width)-j})[u]=j,jQuery(".bwg_slideshow_image_container_"+_).css(Q),jQuery(".bwg_slideshow_image_"+_).css({cssText:"max-width:"+t+"px !important; max-height:"+(t*(i.image_height/i.image_width)-j)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+_).css({cssText:"width:"+t+"px !important; height:"+(t*(i.image_height/i.image_width)-j)+"px !important;"}),jQuery(".bwg_embed_frame_"+_).css({"max-width":t+"px","max-height":t*(i.image_height/i.image_width)-j+"px"}),jQuery(".bwg_embed_frame_"+_).attr("data-width",t),jQuery(".bwg_embed_frame_"+_).attr("data-height",t*(i.image_height/i.image_width)-j),j<h&&(h=j),jQuery(n).find(".bwg-icon-angle-left").css({"font-size":h}),jQuery(n).find(".bwg-icon-angle-right").css({"font-size":h})}else{var Q,v=t*i.image_height/i.image_width;c=i.image_width/i.image_height,y=v-40,p=Math.round(c*y),j=(y-s*l)/l,f=Math.round(c*j);jQuery.each(r,function(e,t){var i=f,a=j;if(""!=t.image_width&&""!=t.image_height){var r=Math.max(f/t.image_width,j/t.image_height);i=t.image_width*r,a=t.thumb_height*r}""!=t.thumb_width&&""!=t.thumb_height&&(i=t.thumb_width,a=t.thumb_height);r=Math.max(f/i,j/a),i*=r,a*=r;jQuery(".bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_+" .bwg_slideshow_filmstrip_thumbnail_img_"+_).css({width:f,height:j,"margin-left":0,"margin-top":0})}),jQuery(n).css({width:f,height:v}),jQuery(g).css({width:f,height:y}),jQuery(b).css({width:f,height:j*r.length+s*r.length}),jQuery(w).css({width:f,height:j}),jQuery(".bwg_slideshow_image_wrap_"+_).css({width:t,height:v}),(Q={width:t-f,height:v})[u]=f,jQuery(d).css(Q),jQuery(".bwg_slideshow_image_"+_).css({cssText:"max-width:"+(t-f)+"px !important; max-height:"+v+"px !important;"}),jQuery(".bwg_slideshow_embed_"+_).css({cssText:"width:"+(t-f)+"px !important; height:"+v+"px !important;"}),jQuery(".bwg_embed_frame_"+_).css({"max-width":t-f+"px","max-height":v+"px"}),jQuery(".bwg_embed_frame_"+_).attr("data-width",t-f),jQuery(".bwg_embed_frame_"+_).attr("data-height",v),f<h&&(h=f),jQuery(n).find(".bwg-icon-angle-up").css({"font-size":h}),jQuery(n).find(".bwg-icon-angle-down").css({"font-size":h})}o&&(jQuery(n).find(".bwg-icon-angle-left").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-right").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-up").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-down").removeAttr("style"))}function bwg_resize_slideshow_filmstrip_fix_dimension(e){var t=e.bwg,i=e.parent_width,a=e.params,r=a.filmstrip_direction,_=a.slideshow_filmstrip_width,s=a.slideshow_filmstrip_height,o="#bwg_container1_"+t+" #bwg_container2_"+t,l=o+" .bwg_slideshow_image_wrap_"+t,n=o+" .bwg_slideshow_image_container_"+t,g=o+" .bwg_slideshow_image_"+t,b=o+" .bwg_slideshow_embed_"+t,w=l+" .bwg_slideshow_filmstrip_container_"+t,d=w+" .bwg_slideshow_filmstrip_"+t,u=i,h=u*(a.image_height/a.image_width);jQuery(l).css({width:u,height:h}),jQuery(n).css({width:u-("horizontal"==r?0:_),height:h-("horizontal"==r?s:0)}),jQuery(g).css({display:"inline-block","max-width":u-("horizontal"==r?0:_),"max-height":h-("horizontal"==r?s:0)}),jQuery(b).css({cssText:"width: "+(u-("horizontal"==r?0:_))+"px !important; height: "+(h-("horizontal"==r?s:0)-1)+"px !important;"}),bwg_resize_instagram_post(t),bwg_change_watermark_container(t),"horizontal"==r?(jQuery(w).css({width:u}),jQuery(d).css({width:u-40})):(jQuery(w).css({height:h}),jQuery(d).css({height:h-40}))}function bwg_calculate_slideshow_filmstrip_thumbnail_size(e){var t=e.bwg,i=e.params,a=i.slideshow_filmstrip_width;if(2==i.slideshow_filmstrip_type){var r="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_fix_count_"+t+" .bwg_slideshow_filmstrip_thumbnail_"+t;a=(i.left_or_top,"width"==i.width_or_height?jQuery(r).width():jQuery(r).height())}return parseFloat(a)}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}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500}))}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"),b=jQuery(s).height(),w=jQuery(s).width(),d='<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(d+='<span style="height: '+b+"px; width: "+w+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(d+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var u=jQuery(".bwg_embed_frame"),h=jQuery(".bwg_slideshow_image_container_"+r).width(),m=jQuery(".bwg_slideshow_image_container_"+r).height(),c=i[t].image_width,p=i[t].image_height,y=bwg_resizing_ratio(c,p,h,m);u.attr("data-width",h),u.attr("data-height",m);var f=y.width,j=y.height;f<j?f-=109:f+=109,d+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame","data-width":h,"data-height":m,"data-instagram-width":c,"data-instagram-height":p,style:"width: 100%; height: 100%; max-width: 100%; max-height: 100%; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen","data-max-width":w,"data-max-height":b,style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});d+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var Q="";"open_lightbox"==bwg_params[r].thumb_click_action?Q+=' class="bwg_lightbox" data-image-id="'+i[t].id+'" data-elementor-open-lightbox="no"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(Q+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),d+="<a "+Q+">"}d+='<img style="max-height: '+b+"px !important; max-width: "+w+'px !important; display:inline-block;" ',d+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',d+=' id="bwg_slideshow_image_'+r+'" ',d+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}d+="</span></span>",jQuery(o).html(d),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),1==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_dimension(r):2==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_count(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();var v="horizontal"==bwg_params[r].filmstrip_direction?"table-cell":"block",x=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).prev(),k=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).next(),z=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_"+r),C=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_disabled_"+r),I=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_"+r),E=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_disabled_"+r);x.length?(z.css({display:v}),C.css({display:"none"})):(z.css({display:"none"}),C.css({display:v}),I.css({display:v}),E.css({display:"none"})),k.length?(I.css({display:v}),E.css({display:"none"})):(I.css({display:"none"}),E.css({display:v}),z.css({display:v}),C.css({display:"none"})),void 0!==i[t]&&"EMBED_OEMBED_INSTAGRAM_POST"==i[t].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").css({"max-height":j+"px","min-width":f+"px !important"}),jQuery(".instagram-media").show())}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=".bwg_slideshow_filmstrip_"+e;2==bwg_params[e].slideshow_filmstrip_type&&(t=".bwg_slideshow_filmstrip_fix_count_"+e);var i=jQuery("#bwg_container1_"+e).parent();i.hasClass("content-area")&&i.width(i.closest(".content-area").width()),i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=bwg_params[e].data;if(a>=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 _="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,s="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);if(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:_}),jQuery(t).css({cssText:s}),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}),2==bwg_params[e].slideshow_filmstrip_type){var o=bwg_params[e].filmstrip_direction,l="#bwg_container1_"+e+" #bwg_container2_"+e;jQuery(l).removeAttr("style");var n=l+" .bwg_slideshow_filmstrip_container_"+e,g=bwg_params[e].slideshow_filmstrip_rl_btn_size,b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).width();"horizontal"==o&&(b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).height());var w="horizontal"==o?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+e).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+e).css({display:"none"}),b<g?(g=b,jQuery(n).find(".bwg-icon-angle-left").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-right").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-up").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-down").css({"font-size":g})):(jQuery(n).find(".bwg-icon-angle-left").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-right").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-up").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-down").removeAttr("style"));var d=l+" .bwg_slideshow_filmstrip_thumbnails_"+e;jQuery(d).removeAttr("style"),jQuery(d+" .bwg_slideshow_filmstrip_thumbnail_"+e).each(function(e,t){jQuery(t).attr("style",jQuery(t).attr("data-style")),jQuery(t).find("img").attr("style",jQuery(t).attr("data-style"))});var u="#bwg_container1_"+e+" #bwg_container2_"+e+" .bwg_slideshow_image_container_"+e,h=(jQuery(u).data("filmstrip-position"),jQuery(u).data("filmstrip-size"));jQuery(u).css({filmstrip_position:h});var m="bwg_slideshow_filmstrip_thumbnail_"+e;window.bwg_slideshow_filmstrip_thumb[m].next_prev_index&&(window.bwg_slideshow_filmstrip_thumb[m].next_prev_index=0)}}else 1==bwg_params[e].slideshow_filmstrip_type&&bwg_resize_slideshow_filmstrip_fix_dimension({bwg:e,params:bwg_params[e],parent_width:a}),2==bwg_params[e].slideshow_filmstrip_type&&bwg_resize_slideshow_filmstrip_fix_count({bwg:e,params:bwg_params[e],parent_width:a}),0==bwg_params[e].slideshow_filmstrip_type&&(jQuery(".bwg_slideshow_image_wrap_"+e).css({width:a,height:a*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:a-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width),height:a*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: "+(a-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(a*(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_embed_frame_"+e+", .bwg_slideshow_embed_"+e).css({"max-width":a+"px","max-height":a*(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"}),jQuery(".bwg_embed_frame_"+e).attr("data-width",a),jQuery(".bwg_embed_frame_"+e).attr("data-height",a*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)),jQuery(".bwg_slideshow_dots_container_"+e).css({width:a}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:a*(bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:a*(bwg_params[e].watermark_width/bwg_params[e].image_width),maxHeight:a*(bwg_params[e].watermark_height/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:a*(bwg_params[e].watermark_font_size/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*a*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*a*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width});var c=jQuery(".bwg_slide_container_"+e),p=c.width(),y=c.height();jQuery(".bwg_popup_embed").css({width:p+"px",height:y+"px"}),r[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){var t=!1;if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){t=!0;var i=jQuery("#instagram-embed-"+e),a=jQuery(".bwg_slideshow_embed_"+e),r=jQuery(".bwg_embed_frame_"+e),_=void 0!==a.width()?a.width():jQuery(".bwg_slideshow_embed_"+e).width(),s=void 0!==a.height()?a.height():jQuery(".bwg_slideshow_embed_"+e).height(),o=r.data("instagram-width"),l=r.data("instagram-height");bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=!0;i=jQuery(".instagram-media"),r=jQuery(".bwg_embed_frame"),_=jQuery(".bwg_image_container").width(),s=jQuery(".bwg_image_container").height(),o=r.data("instagram-width"),l=r.data("instagram-height");bwg_change_watermark_container()}if(!0===t){var n=bwg_resizing_ratio(o,l,_,s);r.attr("data-width",_),r.attr("data-height",s);var g=n.width;g<n.height?g-=109:g+=109,r.css({width:"100%",height:"100%","max-width":_,"max-height":s}),i.css({"min-width":g+"px !important","max-height":s+"px"})}}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)}var i=(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;jQuery(".bwg_embed_frame_instapost_"+e).height(i),jQuery(".inner_instagram_iframe_bwg_embed_frame_instapost_"+e).find('iframe[id^="instagram-embed-"]').css({"max-height":i+"px"});var a=jQuery(".image_browser_images_"+e).width();a<=108?jQuery(".paging-input_"+e).css("display","none"):(a<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):a<=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")}function bwg_resizing_ratio(e,t,i,a){var r=[i/e,a/t];return{width:e*(r=Math.min(r[0],r[1])),height:t*r}}function bwg_slideshow_filmstrip_next(e){var t=e.bwg,i=e.params,a=e.slideshow_filmstrip_class_name,r=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),_="bwg_slideshow_filmstrip_thumbnail_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,n="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,g="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-parseInt(i.filmstrip_thumb_margin_hor)+r)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-parseInt(i.filmstrip_thumb_margin_hor)+r},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[_].next_prev_index=bwg_slideshow_filmstrip_thumb[_].next_prev_index+1}function bwg_slideshow_filmstrip_prev(e){var t=e.bwg,i=e.params,a=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),r="bwg_slideshow_filmstrip_thumbnail_"+t,_="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,n="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[r].next_prev_index=bwg_slideshow_filmstrip_thumb[r].next_prev_index-1}jQuery(function(){isMobile&&(jQuery(".bwg-container.bwg-standard-thumbnails .bwg-title1, .bwg-container.bwg-masonry-thumbnails .bwg-title1, .bwg-mosaic-thumbnails").css("opacity","1"),jQuery(".bwg-zoom-effect .bwg-zoom-effect-overlay, .bwg-zoom-effect-overlay > span").css({opacity:1,"background-color":"unset"}))}),jQuery(function(){function i(e){bwg_slideshow_blur(e),bwg_carousel_blur(e),0<jQuery(".bwg_play_pause").length&&window.clearInterval(gallery_box_data.bwg_playInterval)}function a(e){e&&bwg_main_ready(e),bwg_slideshow_focus(),bwg_carousel_focus(),jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")&&bwg_play(gallery_box_data.data)}var r=!1;jQuery(".bwg_container").each(function(){if(0<jQuery(this).find(".wd_error").length&&(r=!0),!r){var e=jQuery(this);if(e[0].offsetHeight)var t=0;else t=1;setInterval(function(){e[0].offsetHeight?1==t&&(t=0,a(e)):0==t&&i(!(t=1))},200)}}),r||jQuery(window).focus(function(){a()}).blur(function(){i(!0)})}),jQuery(window).on("resize",function(){setTimeout(function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),bwg_tags_button_section_visibility(),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()},0)}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
photo-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/?utm_source=photo_gallery&utm_medium=free_plugin
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
- * Version: 1.8.1
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/plugins/?utm_source=photo_gallery&utm_medium=free_plugin
9
  * Text Domain: photo-gallery
@@ -107,8 +107,8 @@ final class BWG {
107
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
108
  $this->front_url = $this->plugin_url;
109
  $this->main_file = plugin_basename(__FILE__);
110
- $this->plugin_version = '1.8.1';
111
- $this->db_version = '1.8.1';
112
  $this->prefix = 'bwg';
113
  $this->nicename = __('Photo Gallery', 'photo-gallery');
114
  require_once($this->plugin_dir . '/framework/WDWLibrary.php');
@@ -163,7 +163,6 @@ final class BWG {
163
  add_action('wp_ajax_options_' . $this->prefix, array($this, 'admin_ajax'));
164
  add_action('wp_ajax_addInstagramGallery', array( $this, 'bwg_add_embed_ajax' ));
165
  add_action('wp_ajax_addFacebookGallery', array( $this, 'bwg_add_embed_ajax' ));
166
- add_action('wp_ajax_speed_' . $this->prefix, array($this, 'admin_ajax'));
167
 
168
  if ( !is_admin() ) {
169
  add_shortcode('Best_Wordpress_Gallery', array($this, 'shortcode'));
@@ -274,19 +273,6 @@ final class BWG {
274
  add_filter('wp_image_editors', array( $this, 'bwg_change_image_editors_library'), 9, 1);
275
  }
276
 
277
- /*
278
- * Count google page speed score for home page
279
- * */
280
- public function count_homapage_speed() {
281
- require_once($this->plugin_dir . '/admin/controllers/Speed.php');
282
- // Checking page class.
283
- if ( !class_exists('SpeedController_bwg') ) {
284
- return FALSE;
285
- }
286
- $controller = new SpeedController_bwg();
287
- $controller->count_homapage_speed();
288
- }
289
-
290
  /**
291
  * Add plugin action links.
292
  *
@@ -417,19 +403,6 @@ final class BWG {
417
  $this->overview();
418
  add_action('init', array($this, 'language_load'));
419
  add_action('init', array($this, 'create_post_types'));
420
- if ( !is_admin() ) {
421
- add_action('admin_bar_menu', array( $this, 'admin_bar_menu' ), 100);
422
- }
423
- add_action('bwg_hompage_optimized', array( $this, 'bwg_hompage_optimized' ) );
424
- }
425
-
426
- /**
427
- * Run from booster plugin using hook and update status of home page that already optimized.
428
- * 1 - optimized but score not updated in gallery DB
429
- * 2 - optimized and score recounted
430
- */
431
- public function bwg_hompage_optimized() {
432
- update_option('bwg_hompage_optimized', 1);
433
  }
434
 
435
  /**
@@ -514,22 +487,6 @@ final class BWG {
514
 
515
  add_submenu_page($parent_slug, __('Global Settings', 'photo-gallery'), __('Global Settings', 'photo-gallery'), $settings_permission, 'options_' . $this->prefix, array($this , 'admin_pages'));
516
 
517
- if ( !$this->is_appsumo_subscription() ) {
518
- add_submenu_page($parent_slug,
519
- __('Speed & Image Optimization', 'photo-gallery'),
520
- __('Speed & Image Optimization' . sprintf('<span class="bwg_submenu_so_icon"
521
- style="width: 6px;
522
- height: 6px;
523
- background-color: #22B339;
524
- display: inline-block;
525
- border-radius: 20px;
526
- margin-left: 3px;
527
- margin-bottom: 1px;"></span>'), 'photo-gallery'),
528
- 'manage_options', 'speed_' . $this->prefix, array(
529
- $this,
530
- 'admin_pages'
531
- ));
532
- }
533
  $themes_page = add_submenu_page($parent_slug, __('Themes', 'photo-gallery'), __('Themes', 'photo-gallery'), $themes_permission, 'themes_' . $this->prefix, array($this , 'admin_pages'));
534
  add_action('load-' . $themes_page, array($this, 'themes_per_page_option'));
535
 
@@ -582,7 +539,6 @@ final class BWG {
582
  'galleries_' . $this->prefix,
583
  'albums_' . $this->prefix,
584
  'options_' . $this->prefix,
585
- 'speed_' . $this->prefix,
586
  'themes_' . $this->prefix,
587
  'comments_' . $this->prefix,
588
  'ratings_' . $this->prefix,
@@ -663,28 +619,6 @@ final class BWG {
663
  wp_register_style($this->prefix . '_tables', $this->plugin_url . '/css/bwg_tables.css', $required_styles, $this->plugin_version);
664
  wp_register_style($this->prefix . '_gallery-upgrade', $this->plugin_url . '/css/gallery-upgrade.css', $required_styles, $this->plugin_version);
665
 
666
- wp_register_script($this->prefix . '_speed_circle', $this->plugin_url . '/js/circle-progress.js', $required_scripts, $this->plugin_version);
667
- wp_register_style($this->prefix . '_speed', $this->plugin_url . '/css/bwg_speed.css', $required_styles, $this->plugin_version);
668
- wp_register_script($this->prefix . '_speed', $this->plugin_url . '/js/bwg_speed.js', $required_scripts, $this->plugin_version);
669
- wp_localize_script($this->prefix . '_speed', 'bwg_speed', array(
670
- 'install_button_text' => __('Install 10Web Booster plugin', 'photo-gallery'),
671
- 'activate_button_text' => __('Activate 10Web Booster plugin', 'photo-gallery'),
672
- 'loading_url' => $this->plugin_url."/images//ajax_loader.png",
673
- 'wrong_email' => __('Please enter a valid email address.', 'photo-gallery'),
674
- 'empty_email' => __('Email field should not be empty.', 'photo-gallery'),
675
- 'wrong_domain_url' => __('Please enter a URL from your domain.', 'photo-gallery'),
676
- 'wrong_url' => __('Please enter correct URL.', 'photo-gallery'),
677
- 'enter_page_url' => __('Please enter a Page URL.', 'photo-gallery'),
678
- 'page_is_not_public' => __('This page is not public. Please publish the page to check the score.', 'photo-gallery'),
679
- 'sign_up' => __('Sign up', 'photo-gallery'),
680
- 'connect' => __('Connect', 'photo-gallery'),
681
- 'home_url' => get_home_url(),
682
- 'home_speed_status' => $this->check_home_speed_status(),
683
- 'analyze_button_text' => __('Analyze', 'photo-gallery'),
684
- 'something_wrong' => __('Something went wrong, please try again', 'photo-gallery'),
685
- 'speed_ajax_nonce' => wp_create_nonce('speed_ajax_nonce'),
686
- 'dashboard_login' => __('An account with your email is already registered. <a href="#">Login to continue</a>.', 'photo-gallery' ),
687
- ));
688
  wp_register_script($this->prefix . '_admin', $this->plugin_url . '/js/bwg.js', $required_scripts, $this->plugin_version);
689
  wp_localize_script($this->prefix . '_admin', 'bwg', array(
690
  'delete_confirmation' => __('Do you want to delete selected items?', 'photo-gallery'),
@@ -768,25 +702,6 @@ final class BWG {
768
  }
769
  }
770
 
771
- public function check_home_speed_status() {
772
- $bwg_hompage_optimized = get_option('bwg_hompage_optimized');
773
- /* Case when hompage optimized but score not updated */
774
- if ( !empty($bwg_hompage_optimized) && $bwg_hompage_optimized == 1 ) {
775
- return 0;
776
- }
777
- $bwg_speed_score = get_option('bwg_speed_score');
778
- if ( !empty($bwg_speed_score) && isset($bwg_speed_score['last']) && isset($bwg_speed_score['last']['url']) ) {
779
- $url = $bwg_speed_score['last']['url'];
780
- if ( isset($bwg_speed_score[$url]) && $bwg_speed_score[$url]['desktop_score'] && $bwg_speed_score[$url]['mobile_score'] ) {
781
- return array(
782
- 'desktop_score' => $bwg_speed_score[$url]['desktop_score'],
783
- 'mobile_score' => $bwg_speed_score[$url]['mobile_score'],
784
- );
785
- }
786
- }
787
- return 0;
788
- }
789
-
790
  /**
791
  * Frontend AJAX actions.
792
  */
@@ -1038,7 +953,6 @@ final class BWG {
1038
  'shortcode_' . $this->prefix,
1039
  'editimage_' . $this->prefix,
1040
  'options_' . $this->prefix,
1041
- 'speed_' . $this->prefix,
1042
  );
1043
  if ( !empty($page) && in_array($page, $allowed_pages) ) {
1044
  $page = WDWLibrary::clean_page_prefix($page);
@@ -1507,9 +1421,6 @@ final class BWG {
1507
  if ( !function_exists('is_plugin_active') ) {
1508
  include_once(ABSPATH . 'wp-admin/includes/plugin.php');
1509
  }
1510
- if ( is_plugin_active('tenweb-speed-optimizer/tenweb_speed_optimizer.php') ) {
1511
- wp_enqueue_script($this->prefix . '_circle');
1512
- }
1513
 
1514
  if( BWG()->options->lazyload_images ) {
1515
  wp_enqueue_script($this->prefix . '_lazyload');
@@ -1521,7 +1432,6 @@ final class BWG {
1521
  }
1522
 
1523
  $current_url = urlencode((is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
1524
- $bwg_speed_score = get_option('bwg_speed_score');
1525
  wp_localize_script($this->prefix . '_frontend', 'bwg_objectsL10n', array(
1526
  'bwg_field_required' => __('field is required.', 'photo-gallery'),
1527
  'bwg_mail_validation' => __('This is not a valid email address.', 'photo-gallery'),
@@ -1558,11 +1468,7 @@ final class BWG {
1558
  'front_ajax' => BWG()->options->front_ajax,
1559
  'bwg_tag_see_all' => __('see all tags', 'photo-gallery'),
1560
  'bwg_tag_see_less' => __('see less tags', 'photo-gallery'),
1561
- 'page_speed' => isset($bwg_speed_score[urldecode($current_url)]) ? json_encode($bwg_speed_score[urldecode($current_url)]) : false,
1562
  ));
1563
-
1564
- wp_register_script($this->prefix . '_speed_circle', $this->plugin_url . '/js/circle-progress.js', $required_scripts, $this->plugin_version);
1565
- wp_enqueue_script($this->prefix . '_speed_circle');
1566
  }
1567
 
1568
  /**
@@ -2112,36 +2018,6 @@ final class BWG {
2112
  function bwg_change_image_editors_library() {
2113
  return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
2114
  }
2115
-
2116
- /**
2117
- * Admin bar menu.
2118
- *
2119
- * @param $wp_admin_bar
2120
- */
2121
- public function admin_bar_menu( $wp_admin_bar ) {
2122
- global $post;
2123
- if (!isset($post)) {
2124
- return;
2125
- }
2126
- $data = WDWLibrary::get_booster_data();
2127
- if ($data['booster_is_connected']) {
2128
- return;
2129
- }
2130
- $args = array(
2131
- 'page' => 'speed_' . $this->prefix,
2132
- );
2133
- $speed_page = add_query_arg( $args, admin_url('admin.php'));
2134
-
2135
- $wp_admin_bar->add_menu(array(
2136
- 'id' => 'booster-top-button',
2137
- 'title' => __('Optimize Images', 'photo-gallery'),
2138
- 'href' => $speed_page,
2139
- 'meta' => array(
2140
- 'target' => '_blank',
2141
- 'class' => 'hidden'
2142
- ),
2143
- ));
2144
- }
2145
  }
2146
 
2147
  /**
@@ -2163,3 +2039,15 @@ BWG();
2163
  function photo_gallery( $id ) {
2164
  echo BWG()->shortcode(array( 'id' => $id ));
2165
  }
 
 
 
 
 
 
 
 
 
 
 
 
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.8.2
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/plugins/?utm_source=photo_gallery&utm_medium=free_plugin
9
  * Text Domain: photo-gallery
107
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
108
  $this->front_url = $this->plugin_url;
109
  $this->main_file = plugin_basename(__FILE__);
110
+ $this->plugin_version = '1.8.2';
111
+ $this->db_version = '1.8.2';
112
  $this->prefix = 'bwg';
113
  $this->nicename = __('Photo Gallery', 'photo-gallery');
114
  require_once($this->plugin_dir . '/framework/WDWLibrary.php');
163
  add_action('wp_ajax_options_' . $this->prefix, array($this, 'admin_ajax'));
164
  add_action('wp_ajax_addInstagramGallery', array( $this, 'bwg_add_embed_ajax' ));
165
  add_action('wp_ajax_addFacebookGallery', array( $this, 'bwg_add_embed_ajax' ));
 
166
 
167
  if ( !is_admin() ) {
168
  add_shortcode('Best_Wordpress_Gallery', array($this, 'shortcode'));
273
  add_filter('wp_image_editors', array( $this, 'bwg_change_image_editors_library'), 9, 1);
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  /**
277
  * Add plugin action links.
278
  *
403
  $this->overview();
404
  add_action('init', array($this, 'language_load'));
405
  add_action('init', array($this, 'create_post_types'));
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  }
407
 
408
  /**
487
 
488
  add_submenu_page($parent_slug, __('Global Settings', 'photo-gallery'), __('Global Settings', 'photo-gallery'), $settings_permission, 'options_' . $this->prefix, array($this , 'admin_pages'));
489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  $themes_page = add_submenu_page($parent_slug, __('Themes', 'photo-gallery'), __('Themes', 'photo-gallery'), $themes_permission, 'themes_' . $this->prefix, array($this , 'admin_pages'));
491
  add_action('load-' . $themes_page, array($this, 'themes_per_page_option'));
492
 
539
  'galleries_' . $this->prefix,
540
  'albums_' . $this->prefix,
541
  'options_' . $this->prefix,
 
542
  'themes_' . $this->prefix,
543
  'comments_' . $this->prefix,
544
  'ratings_' . $this->prefix,
619
  wp_register_style($this->prefix . '_tables', $this->plugin_url . '/css/bwg_tables.css', $required_styles, $this->plugin_version);
620
  wp_register_style($this->prefix . '_gallery-upgrade', $this->plugin_url . '/css/gallery-upgrade.css', $required_styles, $this->plugin_version);
621
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  wp_register_script($this->prefix . '_admin', $this->plugin_url . '/js/bwg.js', $required_scripts, $this->plugin_version);
623
  wp_localize_script($this->prefix . '_admin', 'bwg', array(
624
  'delete_confirmation' => __('Do you want to delete selected items?', 'photo-gallery'),
702
  }
703
  }
704
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
705
  /**
706
  * Frontend AJAX actions.
707
  */
953
  'shortcode_' . $this->prefix,
954
  'editimage_' . $this->prefix,
955
  'options_' . $this->prefix,
 
956
  );
957
  if ( !empty($page) && in_array($page, $allowed_pages) ) {
958
  $page = WDWLibrary::clean_page_prefix($page);
1421
  if ( !function_exists('is_plugin_active') ) {
1422
  include_once(ABSPATH . 'wp-admin/includes/plugin.php');
1423
  }
 
 
 
1424
 
1425
  if( BWG()->options->lazyload_images ) {
1426
  wp_enqueue_script($this->prefix . '_lazyload');
1432
  }
1433
 
1434
  $current_url = urlencode((is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
 
1435
  wp_localize_script($this->prefix . '_frontend', 'bwg_objectsL10n', array(
1436
  'bwg_field_required' => __('field is required.', 'photo-gallery'),
1437
  'bwg_mail_validation' => __('This is not a valid email address.', 'photo-gallery'),
1468
  'front_ajax' => BWG()->options->front_ajax,
1469
  'bwg_tag_see_all' => __('see all tags', 'photo-gallery'),
1470
  'bwg_tag_see_less' => __('see less tags', 'photo-gallery'),
 
1471
  ));
 
 
 
1472
  }
1473
 
1474
  /**
2018
  function bwg_change_image_editors_library() {
2019
  return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
2020
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2021
  }
2022
 
2023
  /**
2039
  function photo_gallery( $id ) {
2040
  echo BWG()->shortcode(array( 'id' => $id ));
2041
  }
2042
+
2043
+ require_once(WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)) . '/booster/init.php');
2044
+ add_action('init', function() {
2045
+ TWB(array(
2046
+ 'submenu' => array(
2047
+ 'parent_slug' => 'galleries_bwg',
2048
+ ),
2049
+ 'page' => array(
2050
+ 'slug' => 'photo-gallery',
2051
+ ),
2052
+ ));
2053
+ }, 11);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,wdsupport,photogallerysupport,10web
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 4.6
5
  Tested up to: 6.1
6
- Stable tag: 1.8.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -273,6 +273,9 @@ Choose whether to display random or the first/last specific number of images.
273
 
274
  == Changelog ==
275
 
 
 
 
276
  = 1.8.1 =
277
  * Fixed: Open Redirect and XSS Reflected vulnerability.
278
  * Fixed: Tags cloud widget with specified number of items.
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 4.6
5
  Tested up to: 6.1
6
+ Stable tag: 1.8.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
273
 
274
  == Changelog ==
275
 
276
+ = 1.8.2 =
277
+ * Improved: 10Web Booster integration.
278
+
279
  = 1.8.1 =
280
  * Fixed: Open Redirect and XSS Reflected vulnerability.
281
  * Fixed: Tags cloud widget with specified number of items.