WP Photo Album Plus - Version 8.0.00.012

Version Description

= 7.7.07 =

  • This version addresses various minor bug fixes and feature requests.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 8.0.00.012
Comparing to
See all releases

Code changes from version 7.7.07.007 to 8.0.00.012

Files changed (62) hide show
  1. changelog.txt +17 -0
  2. js/wppa-admin-scripts.js +3 -817
  3. js/wppa-admin-scripts.min.js +1 -1
  4. js/wppa-ajax-front.js +7 -6
  5. js/wppa-ajax-front.min.js +1 -1
  6. js/wppa-all.js +7 -7
  7. js/wppa-lightbox.js +36 -30
  8. js/wppa-lightbox.min.js +1 -1
  9. js/wppa-slideshow.js +3 -3
  10. js/wppa-slideshow.min.js +1 -1
  11. js/wppa-spheric.js +20 -24
  12. js/wppa-spheric.min.js +1 -1
  13. js/wppa-utils.js +22 -12
  14. js/wppa-utils.min.js +1 -1
  15. js/wppa-zoom.js +15 -13
  16. js/wppa-zoom.min.js +1 -1
  17. js/wppa.js +33 -42
  18. js/wppa.min.js +1 -1
  19. theme/wppa-style.css +22 -2
  20. theme/wppa-theme.php +4 -4
  21. vendor/nicescroll/jquery.nicescroll.js +2 -1
  22. vendor/nicescroll/jquery.nicescroll.min.js +1 -1
  23. wppa-admin-functions.php +1 -6
  24. wppa-admin.php +29 -9
  25. wppa-adminbar.php +1 -8
  26. wppa-ajax-front.php +0 -30
  27. wppa-ajax.php +83 -249
  28. wppa-album-admin-autosave.php +26 -44
  29. wppa-album-covers.php +43 -40
  30. wppa-album-navigator-widget.php +4 -4
  31. wppa-album-widget.php +6 -6
  32. wppa-audio.php +16 -2
  33. wppa-boxes-html.php +29 -44
  34. wppa-breadcrumb.php +2 -2
  35. wppa-comment-widget.php +5 -2
  36. wppa-common-functions.php +6 -11
  37. wppa-cron.php +15 -1
  38. wppa-dashboard-widgets.php +5 -1
  39. wppa-defaults.php +18 -109
  40. wppa-exif-iptc-common.php +6 -34
  41. wppa-filter.php +17 -90
  42. wppa-functions.php +53 -65
  43. wppa-gp-widget.php +0 -161
  44. wppa-gutenberg-wppa.php +6 -13
  45. wppa-import.php +9 -35
  46. wppa-init.php +35 -27
  47. wppa-lasten-widget.php +21 -21
  48. wppa-links.php +64 -225
  49. wppa-local-cdn.php +1 -7
  50. wppa-mailing.php +4 -2
  51. wppa-maintenance.php +2 -2
  52. wppa-non-admin.php +115 -126
  53. wppa-notify-widget.php +5 -2
  54. wppa-photo-admin-autosave.php +4 -4
  55. wppa-photo-files.php +8 -32
  56. wppa-picture.php +53 -59
  57. wppa-potd-admin.php +0 -683
  58. wppa-potd-widget.php +12 -22
  59. wppa-search-widget.php +4 -9
  60. wppa-setting-functions.php +1031 -0
  61. wppa-setting-see-also.php +210 -0
  62. wppa-settings-autosave.php +52 -53
changelog.txt CHANGED
@@ -1,5 +1,22 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 7.7.07 =
4
 
5
  * Shortcode virtual album attribute album="#related,... did not work. Fixed.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 8 =
4
+
5
+ * Restructured and greatly simplified settings page. Removed obsolete and redundant settings. Made the layout more friendly.
6
+ * Photo of the day admin page is now in the Settings page under Photos.
7
+ * Custom css settings are being fased out. One is encouraged to move that to the wp customizer.
8
+ On the settings page you will only see the custom css items that are not empty. The help text encourages you to move the content to the wp customizer.
9
+ * Ajax method changed. No longer possible to choose between admin or non admin ajax.
10
+ Ajax is always activated, because there can no longer be conflicts due to inaccessibility of both ajax files from the frontend by http request.
11
+ * Photo count treshold has been removed because one can select a childrens image as cover image of any album.
12
+ * Nice scroller is no longer loaded on mobile devives. Scrollbars on mobile are nice enough by themselves and this improves performance.
13
+ * Removed WPPA+ Text widget. You can now use the WP Custom HTML widget instead.
14
+ * HTML in descriptions is now automatically allowed for those users who have HTML edit rights.
15
+ * Widgets do no longer show up anywhere if the corresponding feature is not enabled. e.g. Notify widget - Enable email. etc.
16
+ * The shortcode to display the most recently uploaded photo did not work when additionally the album was specified e.g.
17
+ [wppa type="photo" photo="#last,12"] or [wppa type="photo" album="12" photo="#last"]. Fixed. Works also for type="mphoto" and type="xphoto".
18
+ * Fixed a slideshow filmstrip layout issue for theme twentytwentyone.
19
+
20
  = 7.7.07 =
21
 
22
  * Shortcode virtual album attribute album="#related,... did not work. Fixed.
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 7.7.07.005
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -17,8 +17,8 @@ var wppaCropper = [];
17
  jQuery( document ).ready(function() {
18
 
19
  // Make Lazy load images visible
20
- jQuery(window).on('DOMContentLoaded load resize scroll', wppaMakeLazyVisible);
21
- wppaMakeLazyVisible();
22
  });
23
 
24
  /* Check if jQuery library revision is high enough, othewise give a message and uncheck checkbox elm */
@@ -178,256 +178,12 @@ function wppaReUpload( event, photo, expectedName, reload ) {
178
  xhr.send( formData );
179
  }
180
 
181
- /* This functions does the init after loading settings page. do not put this code in the document.ready function!!! */
182
- function wppaInitSettings() {
183
- wppaCheckBreadcrumb();
184
- wppaCheckFullHalign();
185
- wppaCheckUseThumbOpacity();
186
- wppaCheckUseCoverOpacity();
187
- wppaCheckThumbType();
188
- wppaCheckThumbLink();
189
- wppaCheckTopTenLink();
190
- wppaCheckFeaTenLink();
191
- wppaCheckLasTenLink();
192
- wppaCheckThumbnailWLink();
193
- wppaCheckCommentLink();
194
- wppaCheckXphotoLink();
195
- wppaCheckMphotoLink();
196
- wppaCheckSphotoLink();
197
- wppaCheckSlidePhotoLink();
198
- wppaCheckSlideOnlyLink();
199
- wppaCheckAlbumWidgetLink();
200
- wppaCheckAlbumNavigatorWidgetLink();
201
- wppaCheckSlideLink();
202
- wppaCheckCoverImg();
203
- wppaCheckPotdLink();
204
- wppaCheckTagLink()
205
- wppaCheckRating();
206
- wppaCheckComments();
207
- wppaCheckCustom();
208
- wppaCheckResize();
209
- wppaCheckNumbar();
210
- wppaCheckWatermark();
211
- wppaCheckPopup();
212
- wppaCheckGravatar();
213
- wppaCheckUserUpload();
214
- wppaCheckAjax();
215
- wppaCheckFotomoto();
216
- wppaCheckLinkPageErr('sphoto');
217
- wppaCheckLinkPageErr('mphoto');
218
- wppaCheckLinkPageErr('xphoto');
219
- wppaCheckLinkPageErr('topten_widget');
220
- wppaCheckLinkPageErr('slideonly_widget');
221
- wppaCheckLinkPageErr('potd');
222
- wppaCheckLinkPageErr('comment_widget');
223
- wppaCheckLinkPageErr('thumbnail_widget');
224
- wppaCheckLinkPageErr('lasten_widget');
225
- wppaCheckLinkPageErr('album_widget');
226
- wppaCheckLinkPageErr('tagcloud');
227
- wppaCheckLinkPageErr('multitag');
228
- wppaCheckLinkPageErr('super_view');
229
- wppaCheckSplitNamedesc();
230
- wppaCheckShares();
231
- wppaCheckCoverType();
232
- wppaCheckNewpag();
233
- wppaCheckCDN();
234
- wppaCheckAutoPage();
235
- wppaCheckGps();
236
- wppaCheckFontPreview();
237
- wppaCheckCheck( 'wppa_enable_video', 'wppa-video' );
238
- wppaCheckCheck( 'wppa_custom_fields', 'custfields' );
239
- wppaCheckCheck( 'wppa_album_custom_fields', 'albumcustfields' );
240
- wppaCheckCheck( 'wppa_new_mod_label_is_text', 'nmtxt' );
241
- wppaCheckCheck( 'wppa_coverphoto_responsive', 'cvpr' );
242
- wppaCheckSmWidgetLink();
243
-
244
- var tab = new Array('O','I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII');
245
- var sub = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','X','Y');
246
-
247
- for (table=1; table<13; table++) {
248
- var cookie = wppa_getCookie('table_'+table);
249
- if (cookie == 'on') {
250
- wppaShowTable(table); // Refreshes cookie, so it 'never' forgets
251
- }
252
- else {
253
- wppaHideTable(table); // Refreshes cookie, so it 'never' forgets
254
- }
255
- for (subtab=0; subtab<15; subtab++) {
256
- cookie = wppa_getCookie('table_'+tab[table-1]+'-'+sub[subtab]);
257
- if (cookie == 'on') {
258
- wppaToggleSubTable(tab[table-1],sub[subtab]);
259
- }
260
- }
261
- wppaToggleSubTable(tab[table-1],'Z');
262
- }
263
- }
264
-
265
- // Quick sel on settings page will be released at version 5.5.0
266
- function wppaQuickSel() {
267
- var tab = new Array('O','I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII');
268
- var sub = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','X','Y');
269
- var tag;
270
- var _cls;
271
-
272
- // Open Tables and subtables
273
- for ( table = 1; table < 13; table++ ) {
274
- if ( table < 13 ) {
275
- wppaShowTable(table); // was Show Refreshes cookie, so it 'never' forgets
276
- }
277
- else {
278
- wppaHideTable(table); // Refreshes cookie, so it 'never' forgets
279
- }
280
- wppa_tablecookieoff(table);
281
- for (subtab=0; subtab<15; subtab++) {
282
- cookie = wppa_getCookie('table_'+tab[table-1]+'-'+sub[subtab]);
283
- if (cookie == 'on') {
284
- wppaToggleSubTable(tab[table-1],sub[subtab]);
285
- }
286
- var selection = jQuery('.wppa-'+tab[table-1]+'-'+sub[subtab]);
287
- if ( selection.length > 0 ) {
288
- selection.removeClass('wppa-none');
289
- // For compatibility we fake all subtables are closed, because we close almost everything later on
290
- wppaSubTabOn[tab[table-1]+'-'+sub[subtab]] = false;//true;
291
- wppa_tablecookieoff(tab[table-1]+'-'+sub[subtab]);
292
- }
293
- }
294
- }
295
-
296
- // Find tags
297
- tag1 = jQuery("#wppa-quick-selbox-1").val();
298
- tag2 = jQuery("#wppa-quick-selbox-2").val();
299
-
300
- // Both empty? close all (sub)tables
301
- if ( tag1 == '-' && tag2 == '-' ) {
302
- jQuery( '._wppatag-' ).addClass( 'wppa-none' );
303
- for ( table = 1; table < 13; table++ ) {
304
- wppaHideTable( table );
305
- }
306
- }
307
- // Hide not wanted items
308
- else {
309
- if ( tag1 != '-' ) {
310
- jQuery( '._wppatag-'+tag1 ).addClass('wppa-none');
311
- }
312
- if ( tag2 != '-' ) {
313
- jQuery( '._wppatag-'+tag2 ).addClass('wppa-none');
314
- }
315
- }
316
- }
317
-
318
- function wppaToggleTable(table) {
319
- if (jQuery('#wppa_table_'+table).css('display')=='none') {
320
- jQuery('#wppa_table_'+table).css('display', 'inline');
321
- wppa_tablecookieon(table);
322
- }
323
- else {
324
- jQuery('#wppa_table_'+table).css('display', 'none');
325
- wppa_tablecookieoff(table);
326
- }
327
-
328
- }
329
-
330
- var wppaSubTabOn = new Array();
331
-
332
- function wppaToggleSubTable(table,subtable) {
333
-
334
- // Hide
335
- if (wppaSubTabOn[table+'-'+subtable]) {
336
- jQuery('.wppa-'+table+'-'+subtable).addClass('wppa-none');
337
- jQuery('.wppa-'+table+'-'+subtable+'-help').css('display','none');
338
- wppaSubTabOn[table+'-'+subtable] = false;
339
- wppa_tablecookieoff(table+'-'+subtable);
340
- }
341
-
342
- // Show
343
- else {
344
- jQuery('.wppa-'+table+'-'+subtable).removeClass('wppa-none');
345
- jQuery('.wppa-'+table+'-'+subtable+'-h').css('display','');
346
- wppaSubTabOn[table+'-'+subtable] = true;
347
- wppa_tablecookieon(table+'-'+subtable);
348
- }
349
-
350
- }
351
-
352
- function wppaHideTable(table) {
353
- jQuery('#wppa_table_'+table).css('display', 'none');
354
- jQuery('#wppa_tableHide-'+table).css('display', 'none');
355
- jQuery('#wppa_tableShow-'+table).css('display', 'inline');
356
- wppa_tablecookieoff(table);
357
- }
358
-
359
- function wppaShowTable(table) {
360
- jQuery('#wppa_table_'+table).css('display', 'block');
361
- jQuery('#wppa_tableHide-'+table).css('display', 'inline');
362
- jQuery('#wppa_tableShow-'+table).css('display', 'none');
363
- wppa_tablecookieon(table);
364
- }
365
 
366
  var _wppaRefreshAfter = false;
367
  function wppaRefreshAfter() {
368
  _wppaRefreshAfter = true;
369
  }
370
 
371
- function wppaFollow( id, clas ) {
372
-
373
- if ( jQuery('#'+id).prop('checked') ) {
374
- jQuery('.'+clas).css('display', '');
375
- }
376
- else {
377
- jQuery('.'+clas).css('display', 'none');
378
- }
379
- }
380
-
381
- function wppaCheckCheck( xslug, clas ) {
382
- //wppaConsoleLog( 'CheckCheck slug = '+slug, 'force' );
383
-
384
- var slug = xslug.substring(5);
385
- var on = document.getElementById( slug ).checked;
386
- if ( on ) {
387
- jQuery( '.'+clas ).css( 'display', '' );
388
- jQuery( '.-'+clas ).css( 'display', 'none' );
389
- }
390
- else {
391
- jQuery( '.'+clas ).css( 'display', 'none' );
392
- jQuery( '.-'+clas ).css( 'display', '' );
393
- }
394
- }
395
-
396
- // Check for concurrent lightbox and video.
397
- // This is not possible because the controls can not be reached.
398
- function wppaCheckSlideVideoControls() {
399
-
400
- var link = document.getElementById( 'slideshow_linktype' ).value;
401
- if ( link == 'none' ) {
402
- return;
403
- }
404
-
405
- alert('Warning! '+
406
- "\n"+
407
- 'You can not have video controls on a videoslide when there is a link on the slide.'+
408
- "\n"+
409
- 'The videoslide will not show controls and will also not autoplay');
410
- }
411
-
412
- function wppaCheckFotomoto() {
413
- var on = document.getElementById("fotomoto_on").checked;
414
- if ( on ) {
415
- jQuery(".wppa_fotomoto").css('display', '');
416
- }
417
- else {
418
- jQuery(".wppa_fotomoto").css('display', 'none');
419
- }
420
- }
421
-
422
- function wppaCheckFontPreview() {
423
- var font = document.getElementById('textual_watermark_font').value;
424
- var type = document.getElementById('textual_watermark_type').value;
425
- var fsrc = wppaFontDirectory+'wmf'+font+'-'+type+'.png';
426
- var tsrc = wppaFontDirectory+'wmf'+type+'-'+font+'.png';
427
- jQuery('#wm-font-preview').attr('src', fsrc);
428
- jQuery('#wm-type-preview').attr('src', tsrc);
429
- }
430
-
431
  /* Adjust visibility of selection radiobutton if fixed photo is chosen or not */
432
  /* Also: hide/show order# stuff */
433
  function wppaCheckWidgetMethod() {
@@ -469,563 +225,7 @@ function wppaCheckWidgetMethod() {
469
  }
470
  }
471
 
472
- /* Enables or disables the setting of full size horizontal alignment. Only when fullsize is unequal to column width */
473
- /* also no hor align if vertical align is ---default-- */
474
- /* Also show/hide initial colwidth for resp themem ( Table I-A1.1 ) */
475
- function wppaCheckFullHalign() {
476
- var fs = document.getElementById('fullsize').value;
477
- var cs = document.getElementById('colwidth').value;
478
- var va = document.getElementById('fullvalign').value;
479
- if ((fs != cs) && (va != 'default')) {
480
- jQuery('.wppa_ha').css('display', '');
481
- }
482
- else {
483
- jQuery('.wppa_ha').css('display', 'none');
484
- }
485
- if ( cs == 'auto' ) {
486
- jQuery('.wppa_init_resp_width').css('display', '');
487
- }
488
- else {
489
- jQuery('.wppa_init_resp_width').css('display', 'none');
490
- }
491
- }
492
 
493
- /* Check for CDN type */
494
- function wppaCheckCDN() {
495
- var cdn = document.getElementById('cdn_service').value;
496
- if ( cdn == 'cloudinary' || cdn == 'cloudinarymaintenance' ) jQuery('.cloudinary').css('display', '');
497
- else jQuery('.cloudinary').css('display', 'none');
498
- }
499
-
500
- /* Check GPX Implementation */
501
- function wppaCheckGps() {
502
- var gpx = document.getElementById('gpx_implementation').value;
503
- if ( gpx == 'wppa-plus-embedded' ) {
504
- jQuery('.wppa_gpx_native').css('display', '');
505
- jQuery('.wppa_gpx_plugin').css('display', 'none');
506
- }
507
- else {
508
- jQuery('.wppa_gpx_native').css('display', 'none');
509
- jQuery('.wppa_gpx_plugin').css('display', '');
510
- }
511
- }
512
-
513
- /* Enables or disables popup thumbnail settings according to availability */
514
- function wppaCheckThumbType() {
515
- var ttype = document.getElementById('thumbtype').value;
516
- if (ttype == 'default') {
517
- jQuery('.tt_normal').css('display', '');
518
- jQuery('.tt_ascovers').css('display', 'none');
519
- jQuery('.tt_always').css('display', '');
520
- wppaCheckUseThumbOpacity();
521
- }
522
- if (ttype == 'ascovers'||ttype == 'ascovers-mcr') {
523
- jQuery('.tt_normal').css('display', 'none');
524
- jQuery('.tt_ascovers').css('display', '');
525
- jQuery('.tt_always').css('display', '');
526
- }
527
- if (ttype == 'masonry') {
528
- jQuery('.tt_normal').css('display', 'none');
529
- jQuery('.tt_ascovers').css('display', 'none');
530
- jQuery('.tt_always').css('display', '');
531
- jQuery('.tt_masonry').css('display', '');
532
- }
533
- }
534
-
535
- function wppaCheckAutoPage() {
536
- var auto = document.getElementById('auto_page').checked;
537
- if ( auto ) jQuery('.autopage').css('display', '');
538
- else jQuery('.autopage').css('display', 'none');
539
- }
540
-
541
- /* Enables or disables thumb opacity dependant on whether feature is selected */
542
- function wppaCheckUseThumbOpacity() {
543
- var topac = document.getElementById('use_thumb_opacity').checked;
544
- if (topac) {
545
- jQuery('.thumb_opacity').css('color', '#333');
546
- jQuery('.thumb_opacity_html').css('visibility', 'visible');
547
- }
548
- else {
549
- jQuery('.thumb_opacity').css('color', '#999');
550
- jQuery('.thumb_opacity_html').css('visibility', 'hidden');
551
- }
552
- }
553
-
554
- /* Enables or disables coverphoto opacity dependant on whether feature is selected */
555
- function wppaCheckUseCoverOpacity() {
556
- var copac = document.getElementById('use_cover_opacity').checked;
557
- if (copac) {
558
- jQuery('.cover_opacity').css('color', '#333');
559
- jQuery('.cover_opacity_html').css('visibility', 'visible');
560
- }
561
- else {
562
- jQuery('.cover_opacity').css('color', '#999');
563
- jQuery('.cover_opacity_html').css('visibility', 'hidden');
564
- }
565
- }
566
-
567
- /* Enables or disables secundairy breadcrumb settings */
568
- function wppaCheckBreadcrumb() {
569
- var Bca = document.getElementById('show_bread_posts').checked;
570
- var Bcb = document.getElementById('show_bread_pages').checked;
571
- var Bc = Bca || Bcb;
572
- if (Bc) {
573
- jQuery('.wppa_bc').css('display', '');
574
- jQuery('.wppa_bc_html').css('display', '');
575
- var BcVal = document.getElementById('bc_separator').value;
576
- if (BcVal == 'txt') {
577
- jQuery('.wppa_bc_txt').css('display', '');
578
- jQuery('.wppa_bc_url').css('display', 'none');
579
-
580
- jQuery('.wppa_bc_txt_html').css('display', '');
581
- jQuery('.wppa_bc_url_html').css('display', 'none');
582
- }
583
- else {
584
- if (BcVal == 'url') {
585
- jQuery('.wppa_bc_txt').css('display', 'none');
586
- jQuery('.wppa_bc_url').css('display', '');
587
-
588
- jQuery('.wppa_bc_txt_html').css('display', 'none');
589
- jQuery('.wppa_bc_url_html').css('display', '');
590
- }
591
- else {
592
- jQuery('.wppa_bc_txt').css('display', 'none');
593
- jQuery('.wppa_bc_url').css('display', 'none');
594
- }
595
- }
596
- }
597
- else {
598
- jQuery('.wppa_bc').css('display', 'none');
599
- jQuery('.wppa_bc_txt').css('display', 'none');
600
- jQuery('.wppa_bc_url').css('display', 'none');
601
- }
602
- }
603
-
604
- /* Enables or disables rating system settings */
605
- function wppaCheckRating() {
606
- var Rt = document.getElementById('rating_on').checked;
607
- if (Rt) {
608
- jQuery('.wppa_rating').css('color', '#333');
609
- jQuery('.wppa_rating_html').css('visibility', 'visible');
610
- jQuery('.wppa_rating_').css('display', '');
611
- }
612
- else {
613
- jQuery('.wppa_rating').css('color', '#999');
614
- jQuery('.wppa_rating_html').css('visibility', 'hidden');
615
- jQuery('.wppa_rating_').css('display', 'none');
616
- }
617
- }
618
-
619
- function wppaCheckComments() {
620
- var Cm = document.getElementById('show_comments').checked;
621
- if (Cm) {
622
- jQuery('.wppa_comment').css('color', '#333');
623
- jQuery('.wppa_comment_html').css('visibility', 'visible');
624
- jQuery('.wppa_comment_').css('display', '');
625
- }
626
- else {
627
- jQuery('.wppa_comment').css('color', '#999');
628
- jQuery('.wppa_comment_html').css('visibility', 'hidden');
629
- jQuery('.wppa_comment_').css('display', 'none');
630
- }
631
-
632
- }
633
-
634
- function wppaCheckAjax() {
635
- var Aa = document.getElementById('allow_ajax').checked;
636
- if (Aa) {
637
- jQuery('.wppa_allow_ajax_').css('display', '');
638
- }
639
- else {
640
- jQuery('.wppa_allow_ajax_').css('display', 'none');
641
- }
642
- }
643
-
644
- function wppaCheckShares() {
645
- var Sh = document.getElementById('share_on').checked || document.getElementById('share_on_widget').checked || document.getElementById('share_on_lightbox').checked || document.getElementById('share_on_thumbs').checked || document.getElementById('share_on_mphoto').checked;
646
- if (Sh) jQuery('.wppa_share').css('display', '');
647
- else jQuery('.wppa_share').css('display', 'none');
648
- }
649
-
650
- function wppaCheckCoverType() {
651
- var Type = document.getElementById('cover_type').value;
652
- var Pos = document.getElementById('coverphoto_pos').value;
653
-
654
- if ( Type == 'imagefactory' || Type == 'imagefactory-mcr' ) {
655
- jQuery('.wppa_imgfact_').css('display', '');
656
- /* if ( Pos == 'left' || Pos == 'right' )
657
- alert('To avoid layout problems: please set Cover photo position ( Table IV-D3 ) to \'top\' or \'bottom\'!');
658
- */ }
659
- else jQuery('.wppa_imgfact_').css('display', 'none');
660
-
661
- if ( Type == 'longdesc' ) {
662
- /* if ( Pos == 'top' || Pos == 'bottom' )
663
- alert('To avoid layout problems: please set Cover photo position ( Table IV-D3 ) to \'left\' or \'right\'!');
664
- */ }
665
- }
666
-
667
- function wppaCheckNewpag() {
668
- var Np = document.getElementById('newpag_create').checked;
669
- if ( Np ) jQuery('.wppa_newpag').css('display', '');
670
- else jQuery('.wppa_newpag').css('display', 'none');
671
- }
672
-
673
- function wppaCheckCustom() {
674
- var Cm = document.getElementById('custom_on').checked;
675
- if (Cm) {
676
- jQuery('.wppa_custom').css('color', '#333');
677
- jQuery('.wppa_custom_html').css('visibility', 'visible');
678
- jQuery('.wppa_custom_').css('display', '');
679
- }
680
- else {
681
- jQuery('.wppa_custom').css('color', '#999');
682
- jQuery('.wppa_custom_html').css('visibility', 'hidden');
683
- jQuery('.wppa_custom_').css('display', 'none');
684
- }
685
- }
686
-
687
- function wppaCheckWidgetLink() {
688
- if (document.getElementById('wlp').value == '-1') {
689
- jQuery('.wppa_wlu').css('display', '');
690
- jQuery('.wppa_wlt').css('visibility', 'hidden');
691
- }
692
- else {
693
- jQuery('.wppa_wlu').css('display', 'none');
694
- jQuery('.wppa_wlt').css('visibility', 'visible');
695
- }
696
- }
697
-
698
- function wppaCheckSmWidgetLink() {
699
- if (document.getElementById('widget_sm_linktype').value == 'home') {
700
- jQuery('.wppa_smrp').css('visibility', 'hidden');
701
- }
702
- else {
703
- jQuery('.wppa_smrp').css('visibility', '');
704
- }
705
- }
706
-
707
- function wppaCheckThumbLink() {
708
- var lvalue = document.getElementById('thumb_linktype').value;
709
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
710
- jQuery('.wppa_tlp').css('visibility', 'hidden');
711
- }
712
- else {
713
- jQuery('.wppa_tlp').css('visibility', 'visible');
714
- }
715
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
716
- jQuery('.wppa_tlb').css('visibility', 'hidden');
717
- }
718
- else {
719
- jQuery('.wppa_tlb').css('visibility', 'visible');
720
- }
721
- }
722
-
723
- function wppaCheckTopTenLink() {
724
- var lvalue = document.getElementById('topten_widget_linktype').value;
725
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
726
- jQuery('.wppa_ttlp').css('visibility', 'hidden');
727
- }
728
- else {
729
- jQuery('.wppa_ttlp').css('visibility', 'visible');
730
- }
731
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
732
- jQuery('.wppa_ttlb').css('visibility', 'hidden');
733
- }
734
- else {
735
- jQuery('.wppa_ttlb').css('visibility', 'visible');
736
- }
737
- }
738
-
739
- function wppaCheckFeaTenLink() {
740
- var lvalue = document.getElementById('featen_widget_linktype').value;
741
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
742
- jQuery('.wppa_ftlp').css('visibility', 'hidden');
743
- }
744
- else {
745
- jQuery('.wppa_ftlp').css('visibility', 'visible');
746
- }
747
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
748
- jQuery('.wppa_ftlb').css('visibility', 'hidden');
749
- }
750
- else {
751
- jQuery('.wppa_ftlb').css('visibility', 'visible');
752
- }
753
- }
754
-
755
- function wppaCheckLasTenLink() {
756
- var lvalue = document.getElementById('lasten_widget_linktype').value;
757
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
758
- jQuery('.wppa_ltlp').css('visibility', 'hidden');
759
- }
760
- else {
761
- jQuery('.wppa_ltlp').css('visibility', 'visible');
762
- }
763
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
764
- jQuery('.wppa_ltlb').css('visibility', 'hidden');
765
- }
766
- else {
767
- jQuery('.wppa_ltlb').css('visibility', 'visible');
768
- }
769
- }
770
-
771
- function wppaCheckThumbnailWLink() {
772
- var lvalue = document.getElementById('thumbnail_widget_linktype').value;
773
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
774
- jQuery('.wppa_tnlp').css('visibility', 'hidden');
775
- }
776
- else {
777
- jQuery('.wppa_tnlp').css('visibility', 'visible');
778
- }
779
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
780
- jQuery('.wppa_tnlb').css('visibility', 'hidden');
781
- }
782
- else {
783
- jQuery('.wppa_tnlb').css('visibility', 'visible');
784
- }
785
- }
786
-
787
- function wppaCheckCommentLink() {
788
- var lvalue = document.getElementById('comment_widget_linktype').value;
789
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
790
- jQuery('.wppa_cmlp').css('visibility', 'hidden');
791
- }
792
- else {
793
- jQuery('.wppa_cmlp').css('visibility', 'visible');
794
- }
795
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
796
- jQuery('.wppa_cmlb').css('visibility', 'hidden');
797
- }
798
- else {
799
- jQuery('.wppa_cmlb').css('visibility', 'visible');
800
- }
801
- }
802
-
803
- function wppaCheckSlideOnlyLink() {
804
- var lvalue = document.getElementById('slideonly_widget_linktype').value;
805
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'widget' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
806
- jQuery('.wppa_solp').css('visibility', 'hidden');
807
- }
808
- else {
809
- jQuery('.wppa_solp').css('visibility', 'visible');
810
- }
811
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
812
- jQuery('.wppa_solb').css('visibility', 'hidden');
813
- }
814
- else {
815
- jQuery('.wppa_solb').css('visibility', 'visible');
816
- }
817
- }
818
-
819
- function wppaCheckAlbumWidgetLink() {
820
- var lvalue = document.getElementById('album_widget_linktype').value;
821
- if (lvalue == 'lightbox') {
822
- jQuery('.wppa_awlp').css('visibility', 'hidden');
823
- }
824
- else {
825
- jQuery('.wppa_awlp').css('visibility', 'visible');
826
- }
827
- if (lvalue == 'lightbox') {
828
- jQuery('.wppa_awlb').css('visibility', 'hidden');
829
- }
830
- else {
831
- jQuery('.wppa_awlb').css('visibility', 'visible');
832
- }
833
- }
834
-
835
- function wppaCheckAlbumNavigatorWidgetLink() {
836
- var lvalue = document.getElementById('album_navigator_widget_linktype').value;
837
- if (lvalue == 'lightbox') {
838
- jQuery('.wppa_anwlp').css('visibility', 'hidden');
839
- }
840
- else {
841
- jQuery('.wppa_anwlp').css('visibility', 'visible');
842
- }
843
- if (lvalue == 'lightbox') {
844
- jQuery('.wppa_anwlb').css('visibility', 'hidden');
845
- }
846
- else {
847
- jQuery('.wppa_anwlb').css('visibility', 'visible');
848
- }
849
- }
850
-
851
- function wppaCheckSlideLink() {
852
- var lvalue = document.getElementById('slideshow_linktype').value;
853
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
854
- jQuery('.wppa_sslb').css('visibility', 'hidden');
855
- }
856
- else {
857
- jQuery('.wppa_sslb').css('visibility', 'visible');
858
- }
859
- }
860
-
861
- function wppaCheckCoverImg() {
862
- var lvalue = document.getElementById('coverimg_linktype').value;
863
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
864
- jQuery('.wppa_covimgbl').css('visibility', 'hidden');
865
- }
866
- else {
867
- jQuery('.wppa_covimgbl').css('visibility', 'visible');
868
- }
869
- }
870
-
871
- function wppaCheckPotdLink() {
872
- var lvalue = document.getElementById('potd_linktype').value;
873
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'file' || lvalue == 'custom') {
874
- jQuery('.wppa_potdlp').css('visibility', 'hidden');
875
- }
876
- else {
877
- jQuery('.wppa_potdlp').css('visibility', 'visible');
878
- }
879
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'fullpopup') {
880
- jQuery('.wppa_potdlb').css('visibility', 'hidden');
881
- }
882
- else {
883
- jQuery('.wppa_potdlb').css('visibility', 'visible');
884
- }
885
- }
886
-
887
- function wppaCheckTagLink() {
888
- var lvalue = document.getElementById('tagcloud_linktype').value;
889
- /* */
890
- }
891
-
892
- function wppaCheckMTagLink() {
893
- var lvalue = document.getElementById('multitag_linktype').value;
894
- /* */
895
- }
896
-
897
- function wppaCheckXphotoLink() {
898
- var lvalue = document.getElementById('xphoto_linktype').value;
899
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' ) {
900
- jQuery('.wppa_xlp').css('visibility', 'hidden');
901
- }
902
- else {
903
- jQuery('.wppa_xlp').css('visibility', 'visible');
904
- }
905
- if (lvalue == 'none' || lvalue == 'lightbox' ) {
906
- jQuery('.wppa_xlb').css('visibility', 'hidden');
907
- }
908
- else {
909
- jQuery('.wppa_xlb').css('visibility', 'visible');
910
- }
911
- }
912
-
913
- function wppaCheckMphotoLink() {
914
- var lvalue = document.getElementById('mphoto_linktype').value;
915
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' ) {
916
- jQuery('.wppa_mlp').css('visibility', 'hidden');
917
- }
918
- else {
919
- jQuery('.wppa_mlp').css('visibility', 'visible');
920
- }
921
- if (lvalue == 'none' || lvalue == 'lightbox' ) {
922
- jQuery('.wppa_mlb').css('visibility', 'hidden');
923
- }
924
- else {
925
- jQuery('.wppa_mlb').css('visibility', 'visible');
926
- }
927
- }
928
-
929
- function wppaCheckSphotoLink() {
930
- var lvalue = document.getElementById('sphoto_linktype').value;
931
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' ) {
932
- jQuery('.wppa_slp').css('visibility', 'hidden');
933
- }
934
- else {
935
- jQuery('.wppa_slp').css('visibility', 'visible');
936
- }
937
- if (lvalue == 'none' || lvalue == 'lightbox' ) {
938
- jQuery('.wppa_slb').css('visibility', 'hidden');
939
- }
940
- else {
941
- jQuery('.wppa_slb').css('visibility', 'visible');
942
- }
943
- }
944
-
945
- function wppaCheckSlidePhotoLink() {
946
- var lvalue = document.getElementById('slideshow_linktype').value;
947
- if (lvalue == 'none' || lvalue == 'file' || lvalue == 'lightbox' || lvalue == 'lightboxsingle' || lvalue == 'fullpopup' ) {
948
- jQuery('.wppa_sslp').css('visibility', 'hidden');
949
- }
950
- else {
951
- jQuery('.wppa_sslp').css('visibility', 'visible');
952
- }
953
- if (lvalue == 'none' || lvalue == 'lightbox' || lvalue == 'lightboxsingle' || lvalue == 'fullpopup' ) {
954
- jQuery('.wppa_sslb').css('visibility', 'hidden');
955
- }
956
- else {
957
- jQuery('.wppa_sslb').css('visibility', 'visible');
958
- }
959
- }
960
-
961
- function wppaCheckResize() {
962
- var Rs = document.getElementById('resize_on_upload').checked;
963
- if (Rs) {
964
- jQuery('.re_up').css('display', '');
965
- }
966
- else {
967
- jQuery('.re_up').css('display', 'none');
968
- }
969
- }
970
-
971
- function wppaCheckNumbar() {
972
- var Nb = document.getElementById('show_slideshownumbar').checked;
973
- if (Nb) {
974
- jQuery('.wppa_numbar').css('display', '');
975
- }
976
- else {
977
- jQuery('.wppa_numbar').css('display', 'none');
978
- }
979
- }
980
-
981
- function wppaCheckWatermark() {
982
- var Wm = document.getElementById('watermark_on').checked;
983
- if (Wm) {
984
- jQuery('.wppa_watermark').css('display', '');
985
- }
986
- else {
987
- jQuery('.wppa_watermark').css('display', 'none');
988
- }
989
- }
990
-
991
- function wppaCheckPopup() {
992
- if (document.getElementById('use_thumb_popup').checked) {
993
- jQuery('.wppa_popup').css('display', '');
994
- }
995
- else {
996
- jQuery('.wppa_popup').css('display', 'none');
997
- }
998
- }
999
-
1000
- function wppaCheckGravatar() {
1001
- if ( ! document.getElementById('comment_gravatar') ) return;
1002
- if (document.getElementById('comment_gravatar').value == 'url') {
1003
- jQuery('.wppa_grav').css('display', '');
1004
- }
1005
- else {
1006
- jQuery('.wppa_grav').css('display', 'none');
1007
- }
1008
- }
1009
-
1010
- function wppaCheckUserUpload() {
1011
- if (document.getElementById('user_upload_on').checked) {
1012
- jQuery('.wppa_feup').css('display', '');
1013
- }
1014
- else {
1015
- jQuery('.wppa_feup').css('display', 'none');
1016
- }
1017
- }
1018
-
1019
- function wppaCheckSplitNamedesc() {
1020
- if (document.getElementById('split_namedesc').checked) {
1021
- jQuery('.swap_namedesc').css('display', 'none');
1022
- jQuery('.hide_empty').css('display', '');
1023
- }
1024
- else {
1025
- jQuery('.swap_namedesc').css('display', '');
1026
- jQuery('.hide_empty').css('display', 'none');
1027
- }
1028
- }
1029
 
1030
  function wppa_tablecookieon(i) {
1031
  wppa_setCookie('table_'+i, 'on', '365');
@@ -2274,20 +1474,6 @@ function wppaSetComBgCol( id ) {
2274
  }
2275
  }
2276
 
2277
- function wppaCheckLinkPageErr(slug) {
2278
-
2279
- var type = 'nil';
2280
- if ( document.getElementById(slug+'_linktype') ) type = document.getElementById(slug+'_linktype').value;
2281
- var page = document.getElementById(slug+'_linkpage').value;
2282
-
2283
- if ( page == '0' && ( type == 'nil' || type == 'photo' || type == 'single' || type == 'album' || type == 'content' || type == 'slide' || type == 'plainpage' )) {
2284
- jQuery('#'+slug+'-err').css({display:''});
2285
- }
2286
- else {
2287
- jQuery('#'+slug+'-err').css({display:'none'});
2288
- }
2289
- }
2290
-
2291
  function wppaAddCat(val, id) {
2292
  wppaAddTag(val, id);
2293
  }
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 8.0.00.011
5
  /* Various js routines used in admin pages
6
  */
7
 
17
  jQuery( document ).ready(function() {
18
 
19
  // Make Lazy load images visible
20
+ jQuery(window).on('DOMContentLoaded load resize scroll', function(){wppaMakeLazyVisible('windowon')});
21
+ wppaMakeLazyVisible('docready');
22
  });
23
 
24
  /* Check if jQuery library revision is high enough, othewise give a message and uncheck checkbox elm */
178
  xhr.send( formData );
179
  }
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
 
182
  var _wppaRefreshAfter = false;
183
  function wppaRefreshAfter() {
184
  _wppaRefreshAfter = true;
185
  }
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  /* Adjust visibility of selection radiobutton if fixed photo is chosen or not */
188
  /* Also: hide/show order# stuff */
189
  function wppaCheckWidgetMethod() {
225
  }
226
  }
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
 
230
  function wppa_tablecookieon(i) {
231
  wppa_setCookie('table_'+i, 'on', '365');
1474
  }
1475
  }
1476
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1477
  function wppaAddCat(val, id) {
1478
  wppaAddTag(val, id);
1479
  }
js/wppa-admin-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album",wppaCropper=[];function checkjQueryRev(e,t,p){var a=parseFloat(jQuery.fn.jquery);t.checked&&a<p&&(alert(e+"\nThe version of your jQuery library: "+a+" is too low for this feature. It requires version "+p),t.checked="")}function wppaReUpload(e,i,t,o){document.getElementById("wppa-re-up-form-"+i);var p=document.getElementById("wppa-re-up-file-"+i),l=document.getElementById("wppa-re-up-butn-"+i);e.preventDefault();p=p.files[0];if(p.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+p.name);else if(p.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+i).css("display","none");l.value="Uploading...",l.style.color="black";t=new FormData;t.append("photo",p,p.name);var s=new XMLHttpRequest,p="?action=wppa&wppa-action=update-photo&photo-id="+i+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+i).value;s.open("POST",wppaAjaxUrl+p,!0),s.onload=function(){if(200===s.status){var e=wppaTrim(s.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,p,a,n=JSON.parse(e[2]);for(t in n)switch(a=n[t],t){case"remark":a=(a=(a=a.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),p="0"!=e[1]?'<span style="color:red;" >'+a+"</span>":'<span style="color:green;" >'+a+"</span>",o&&(p+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(p);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(a):jQuery("#photourl-"+i).attr("src",a),jQuery("#thumba-"+i).attr("href",a);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",a);break;case"magickstack":jQuery("#magickstack-"+i).html(a),0<a.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+t+"-"+i).html(a)}l.value="Upload",jQuery("#re-up-"+i).css("display","none");break;case"99":document.getElementById("photoitem-"+i).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+i).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",l.value="Error occured",l.style.color="red"}}else alert("An error occurred!")},s.send(t)}else alert("File is not an image file!")}function wppaInitSettings(){wppaCheckBreadcrumb(),wppaCheckFullHalign(),wppaCheckUseThumbOpacity(),wppaCheckUseCoverOpacity(),wppaCheckThumbType(),wppaCheckThumbLink(),wppaCheckTopTenLink(),wppaCheckFeaTenLink(),wppaCheckLasTenLink(),wppaCheckThumbnailWLink(),wppaCheckCommentLink(),wppaCheckXphotoLink(),wppaCheckMphotoLink(),wppaCheckSphotoLink(),wppaCheckSlidePhotoLink(),wppaCheckSlideOnlyLink(),wppaCheckAlbumWidgetLink(),wppaCheckAlbumNavigatorWidgetLink(),wppaCheckSlideLink(),wppaCheckCoverImg(),wppaCheckPotdLink(),wppaCheckTagLink(),wppaCheckRating(),wppaCheckComments(),wppaCheckCustom(),wppaCheckResize(),wppaCheckNumbar(),wppaCheckWatermark(),wppaCheckPopup(),wppaCheckGravatar(),wppaCheckUserUpload(),wppaCheckAjax(),wppaCheckFotomoto(),wppaCheckLinkPageErr("sphoto"),wppaCheckLinkPageErr("mphoto"),wppaCheckLinkPageErr("xphoto"),wppaCheckLinkPageErr("topten_widget"),wppaCheckLinkPageErr("slideonly_widget"),wppaCheckLinkPageErr("potd"),wppaCheckLinkPageErr("comment_widget"),wppaCheckLinkPageErr("thumbnail_widget"),wppaCheckLinkPageErr("lasten_widget"),wppaCheckLinkPageErr("album_widget"),wppaCheckLinkPageErr("tagcloud"),wppaCheckLinkPageErr("multitag"),wppaCheckLinkPageErr("super_view"),wppaCheckSplitNamedesc(),wppaCheckShares(),wppaCheckCoverType(),wppaCheckNewpag(),wppaCheckCDN(),wppaCheckAutoPage(),wppaCheckGps(),wppaCheckFontPreview(),wppaCheckCheck("wppa_enable_video","wppa-video"),wppaCheckCheck("wppa_custom_fields","custfields"),wppaCheckCheck("wppa_album_custom_fields","albumcustfields"),wppaCheckCheck("wppa_new_mod_label_is_text","nmtxt"),wppaCheckCheck("wppa_coverphoto_responsive","cvpr"),wppaCheckSmWidgetLink();var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","X","Y");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for(("on"==p?wppaShowTable:wppaHideTable)(table),subtab=0;subtab<15;subtab++)"on"==wppa_getCookie("table_"+e[table-1]+"-"+t[subtab])&&wppaToggleSubTable(e[table-1],t[subtab]);wppaToggleSubTable(e[table-1],"Z")}}function wppaQuickSel(){var e=new Array("O","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"),t=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","X","Y");for(table=1;table<13;table++)for((table<13?wppaShowTable:wppaHideTable)(table),wppa_tablecookieoff(table),subtab=0;subtab<15;subtab++){cookie=wppa_getCookie("table_"+e[table-1]+"-"+t[subtab]),"on"==cookie&&wppaToggleSubTable(e[table-1],t[subtab]);var p=jQuery(".wppa-"+e[table-1]+"-"+t[subtab]);0<p.length&&(p.removeClass("wppa-none"),wppaSubTabOn[e[table-1]+"-"+t[subtab]]=!1,wppa_tablecookieoff(e[table-1]+"-"+t[subtab]))}if(tag1=jQuery("#wppa-quick-selbox-1").val(),tag2=jQuery("#wppa-quick-selbox-2").val(),"-"==tag1&&"-"==tag2)for(jQuery("._wppatag-").addClass("wppa-none"),table=1;table<13;table++)wppaHideTable(table);else"-"!=tag1&&jQuery("._wppatag-"+tag1).addClass("wppa-none"),"-"!=tag2&&jQuery("._wppatag-"+tag2).addClass("wppa-none")}function wppaToggleTable(e){"none"==jQuery("#wppa_table_"+e).css("display")?(jQuery("#wppa_table_"+e).css("display","inline"),wppa_tablecookieon(e)):(jQuery("#wppa_table_"+e).css("display","none"),wppa_tablecookieoff(e))}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible()});var wppaSubTabOn=new Array;function wppaToggleSubTable(e,t){wppaSubTabOn[e+"-"+t]?(jQuery(".wppa-"+e+"-"+t).addClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-help").css("display","none"),wppaSubTabOn[e+"-"+t]=!1,wppa_tablecookieoff(e+"-"+t)):(jQuery(".wppa-"+e+"-"+t).removeClass("wppa-none"),jQuery(".wppa-"+e+"-"+t+"-h").css("display",""),wppaSubTabOn[e+"-"+t]=!0,wppa_tablecookieon(e+"-"+t))}function wppaHideTable(e){jQuery("#wppa_table_"+e).css("display","none"),jQuery("#wppa_tableHide-"+e).css("display","none"),jQuery("#wppa_tableShow-"+e).css("display","inline"),wppa_tablecookieoff(e)}function wppaShowTable(e){jQuery("#wppa_table_"+e).css("display","block"),jQuery("#wppa_tableHide-"+e).css("display","inline"),jQuery("#wppa_tableShow-"+e).css("display","none"),wppa_tablecookieon(e)}var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaFollow(e,t){jQuery("#"+e).prop("checked")?jQuery("."+t).css("display",""):jQuery("."+t).css("display","none")}function wppaCheckCheck(e,t){e=e.substring(5);document.getElementById(e).checked?(jQuery("."+t).css("display",""),jQuery(".-"+t).css("display","none")):(jQuery("."+t).css("display","none"),jQuery(".-"+t).css("display",""))}function wppaCheckSlideVideoControls(){"none"!=document.getElementById("slideshow_linktype").value&&alert("Warning! \nYou can not have video controls on a videoslide when there is a link on the slide.\nThe videoslide will not show controls and will also not autoplay")}function wppaCheckFotomoto(){document.getElementById("fotomoto_on").checked?jQuery(".wppa_fotomoto").css("display",""):jQuery(".wppa_fotomoto").css("display","none")}function wppaCheckFontPreview(){var e=document.getElementById("textual_watermark_font").value,t=document.getElementById("textual_watermark_type").value,p=wppaFontDirectory+"wmf"+e+"-"+t+".png",e=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",e)}function wppaCheckWidgetMethod(){var e,t,p;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(p=jQuery("#wppa-wp").val())||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppaCheckFullHalign(){var e=document.getElementById("fullsize").value,t=document.getElementById("colwidth").value,p=document.getElementById("fullvalign").value;e!=t&&"default"!=p?jQuery(".wppa_ha").css("display",""):jQuery(".wppa_ha").css("display","none"),"auto"==t?jQuery(".wppa_init_resp_width").css("display",""):jQuery(".wppa_init_resp_width").css("display","none")}function wppaCheckCDN(){var e=document.getElementById("cdn_service").value;"cloudinary"==e||"cloudinarymaintenance"==e?jQuery(".cloudinary").css("display",""):jQuery(".cloudinary").css("display","none")}function wppaCheckGps(){"wppa-plus-embedded"==document.getElementById("gpx_implementation").value?(jQuery(".wppa_gpx_native").css("display",""),jQuery(".wppa_gpx_plugin").css("display","none")):(jQuery(".wppa_gpx_native").css("display","none"),jQuery(".wppa_gpx_plugin").css("display",""))}function wppaCheckThumbType(){var e=document.getElementById("thumbtype").value;"default"==e&&(jQuery(".tt_normal").css("display",""),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),wppaCheckUseThumbOpacity()),"ascovers"!=e&&"ascovers-mcr"!=e||(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display",""),jQuery(".tt_always").css("display","")),"masonry"==e&&(jQuery(".tt_normal").css("display","none"),jQuery(".tt_ascovers").css("display","none"),jQuery(".tt_always").css("display",""),jQuery(".tt_masonry").css("display",""))}function wppaCheckAutoPage(){document.getElementById("auto_page").checked?jQuery(".autopage").css("display",""):jQuery(".autopage").css("display","none")}function wppaCheckUseThumbOpacity(){document.getElementById("use_thumb_opacity").checked?(jQuery(".thumb_opacity").css("color","#333"),jQuery(".thumb_opacity_html").css("visibility","visible")):(jQuery(".thumb_opacity").css("color","#999"),jQuery(".thumb_opacity_html").css("visibility","hidden"))}function wppaCheckUseCoverOpacity(){document.getElementById("use_cover_opacity").checked?(jQuery(".cover_opacity").css("color","#333"),jQuery(".cover_opacity_html").css("visibility","visible")):(jQuery(".cover_opacity").css("color","#999"),jQuery(".cover_opacity_html").css("visibility","hidden"))}function wppaCheckBreadcrumb(){var e=document.getElementById("show_bread_posts").checked,t=document.getElementById("show_bread_pages").checked;e||t?(jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display",""),"txt"==(t=document.getElementById("bc_separator").value)?(jQuery(".wppa_bc_txt").css("display",""),jQuery(".wppa_bc_url").css("display","none"),jQuery(".wppa_bc_txt_html").css("display",""),jQuery(".wppa_bc_url_html").css("display","none")):"url"==t?(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display",""),jQuery(".wppa_bc_txt_html").css("display","none"),jQuery(".wppa_bc_url_html").css("display","")):(jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))):(jQuery(".wppa_bc").css("display","none"),jQuery(".wppa_bc_txt").css("display","none"),jQuery(".wppa_bc_url").css("display","none"))}function wppaCheckRating(){document.getElementById("rating_on").checked?(jQuery(".wppa_rating").css("color","#333"),jQuery(".wppa_rating_html").css("visibility","visible"),jQuery(".wppa_rating_").css("display","")):(jQuery(".wppa_rating").css("color","#999"),jQuery(".wppa_rating_html").css("visibility","hidden"),jQuery(".wppa_rating_").css("display","none"))}function wppaCheckComments(){document.getElementById("show_comments").checked?(jQuery(".wppa_comment").css("color","#333"),jQuery(".wppa_comment_html").css("visibility","visible"),jQuery(".wppa_comment_").css("display","")):(jQuery(".wppa_comment").css("color","#999"),jQuery(".wppa_comment_html").css("visibility","hidden"),jQuery(".wppa_comment_").css("display","none"))}function wppaCheckAjax(){document.getElementById("allow_ajax").checked?jQuery(".wppa_allow_ajax_").css("display",""):jQuery(".wppa_allow_ajax_").css("display","none")}function wppaCheckShares(){document.getElementById("share_on").checked||document.getElementById("share_on_widget").checked||document.getElementById("share_on_lightbox").checked||document.getElementById("share_on_thumbs").checked||document.getElementById("share_on_mphoto").checked?jQuery(".wppa_share").css("display",""):jQuery(".wppa_share").css("display","none")}function wppaCheckCoverType(){var e=document.getElementById("cover_type").value;document.getElementById("coverphoto_pos").value;"imagefactory"==e||"imagefactory-mcr"==e?jQuery(".wppa_imgfact_").css("display",""):jQuery(".wppa_imgfact_").css("display","none")}function wppaCheckNewpag(){document.getElementById("newpag_create").checked?jQuery(".wppa_newpag").css("display",""):jQuery(".wppa_newpag").css("display","none")}function wppaCheckCustom(){document.getElementById("custom_on").checked?(jQuery(".wppa_custom").css("color","#333"),jQuery(".wppa_custom_html").css("visibility","visible"),jQuery(".wppa_custom_").css("display","")):(jQuery(".wppa_custom").css("color","#999"),jQuery(".wppa_custom_html").css("visibility","hidden"),jQuery(".wppa_custom_").css("display","none"))}function wppaCheckWidgetLink(){"-1"==document.getElementById("wlp").value?(jQuery(".wppa_wlu").css("display",""),jQuery(".wppa_wlt").css("visibility","hidden")):(jQuery(".wppa_wlu").css("display","none"),jQuery(".wppa_wlt").css("visibility","visible"))}function wppaCheckSmWidgetLink(){"home"==document.getElementById("widget_sm_linktype").value?jQuery(".wppa_smrp").css("visibility","hidden"):jQuery(".wppa_smrp").css("visibility","")}function wppaCheckThumbLink(){var e=document.getElementById("thumb_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlp").css("visibility","hidden"):jQuery(".wppa_tlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tlb").css("visibility","hidden"):jQuery(".wppa_tlb").css("visibility","visible")}function wppaCheckTopTenLink(){var e=document.getElementById("topten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlp").css("visibility","hidden"):jQuery(".wppa_ttlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ttlb").css("visibility","hidden"):jQuery(".wppa_ttlb").css("visibility","visible")}function wppaCheckFeaTenLink(){var e=document.getElementById("featen_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlp").css("visibility","hidden"):jQuery(".wppa_ftlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ftlb").css("visibility","hidden"):jQuery(".wppa_ftlb").css("visibility","visible")}function wppaCheckLasTenLink(){var e=document.getElementById("lasten_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlp").css("visibility","hidden"):jQuery(".wppa_ltlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_ltlb").css("visibility","hidden"):jQuery(".wppa_ltlb").css("visibility","visible")}function wppaCheckThumbnailWLink(){var e=document.getElementById("thumbnail_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlp").css("visibility","hidden"):jQuery(".wppa_tnlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_tnlb").css("visibility","hidden"):jQuery(".wppa_tnlb").css("visibility","visible")}function wppaCheckCommentLink(){var e=document.getElementById("comment_widget_linktype").value;"none"==e||"file"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlp").css("visibility","hidden"):jQuery(".wppa_cmlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_cmlb").css("visibility","hidden"):jQuery(".wppa_cmlb").css("visibility","visible")}function wppaCheckSlideOnlyLink(){var e=document.getElementById("slideonly_widget_linktype").value;"none"==e||"file"==e||"widget"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solp").css("visibility","hidden"):jQuery(".wppa_solp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_solb").css("visibility","hidden"):jQuery(".wppa_solb").css("visibility","visible")}function wppaCheckAlbumWidgetLink(){var e=document.getElementById("album_widget_linktype").value;"lightbox"==e?jQuery(".wppa_awlp").css("visibility","hidden"):jQuery(".wppa_awlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_awlb").css("visibility","hidden"):jQuery(".wppa_awlb").css("visibility","visible")}function wppaCheckAlbumNavigatorWidgetLink(){var e=document.getElementById("album_navigator_widget_linktype").value;"lightbox"==e?jQuery(".wppa_anwlp").css("visibility","hidden"):jQuery(".wppa_anwlp").css("visibility","visible"),"lightbox"==e?jQuery(".wppa_anwlb").css("visibility","hidden"):jQuery(".wppa_anwlb").css("visibility","visible")}function wppaCheckSlideLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckCoverImg(){var e=document.getElementById("coverimg_linktype").value;"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_covimgbl").css("visibility","hidden"):jQuery(".wppa_covimgbl").css("visibility","visible")}function wppaCheckPotdLink(){var e=document.getElementById("potd_linktype").value;"none"==e||"lightbox"==e||"file"==e||"custom"==e?jQuery(".wppa_potdlp").css("visibility","hidden"):jQuery(".wppa_potdlp").css("visibility","visible"),"none"==e||"lightbox"==e||"fullpopup"==e?jQuery(".wppa_potdlb").css("visibility","hidden"):jQuery(".wppa_potdlb").css("visibility","visible")}function wppaCheckTagLink(){document.getElementById("tagcloud_linktype").value}function wppaCheckMTagLink(){document.getElementById("multitag_linktype").value}function wppaCheckXphotoLink(){var e=document.getElementById("xphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_xlp").css("visibility","hidden"):jQuery(".wppa_xlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_xlb").css("visibility","hidden"):jQuery(".wppa_xlb").css("visibility","visible")}function wppaCheckMphotoLink(){var e=document.getElementById("mphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_mlp").css("visibility","hidden"):jQuery(".wppa_mlp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_mlb").css("visibility","hidden"):jQuery(".wppa_mlb").css("visibility","visible")}function wppaCheckSphotoLink(){var e=document.getElementById("sphoto_linktype").value;"none"==e||"file"==e||"lightbox"==e?jQuery(".wppa_slp").css("visibility","hidden"):jQuery(".wppa_slp").css("visibility","visible"),"none"==e||"lightbox"==e?jQuery(".wppa_slb").css("visibility","hidden"):jQuery(".wppa_slb").css("visibility","visible")}function wppaCheckSlidePhotoLink(){var e=document.getElementById("slideshow_linktype").value;"none"==e||"file"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslp").css("visibility","hidden"):jQuery(".wppa_sslp").css("visibility","visible"),"none"==e||"lightbox"==e||"lightboxsingle"==e||"fullpopup"==e?jQuery(".wppa_sslb").css("visibility","hidden"):jQuery(".wppa_sslb").css("visibility","visible")}function wppaCheckResize(){document.getElementById("resize_on_upload").checked?jQuery(".re_up").css("display",""):jQuery(".re_up").css("display","none")}function wppaCheckNumbar(){document.getElementById("show_slideshownumbar").checked?jQuery(".wppa_numbar").css("display",""):jQuery(".wppa_numbar").css("display","none")}function wppaCheckWatermark(){document.getElementById("watermark_on").checked?jQuery(".wppa_watermark").css("display",""):jQuery(".wppa_watermark").css("display","none")}function wppaCheckPopup(){document.getElementById("use_thumb_popup").checked?jQuery(".wppa_popup").css("display",""):jQuery(".wppa_popup").css("display","none")}function wppaCheckGravatar(){document.getElementById("comment_gravatar")&&("url"==document.getElementById("comment_gravatar").value?jQuery(".wppa_grav").css("display",""):jQuery(".wppa_grav").css("display","none"))}function wppaCheckUserUpload(){document.getElementById("user_upload_on").checked?jQuery(".wppa_feup").css("display",""):jQuery(".wppa_feup").css("display","none")}function wppaCheckSplitNamedesc(){document.getElementById("split_namedesc").checked?(jQuery(".swap_namedesc").css("display","none"),jQuery(".hide_empty").css("display","")):(jQuery(".swap_namedesc").css("display",""),jQuery(".hide_empty").css("display","none"))}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,p){var a="",n="",a=e||'<div style="padding-left:5px;" >';p?n=p:aftrer="</div>",wppaFeAjaxLog("in");var i=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",p,!0),i.send(),i.onreadystatechange=function(){switch(i.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==i.status?("ER"==(e=wppaTrim(i.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=a+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=a+'<span style="color:red;" >Comm error '+i.status+": "+i.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,p.open("GET",e,!0),p.send(),p.onreadystatechange=function(){switch(p.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==p.status?("ER"==(e=wppaTrim(p.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),p&&(n+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(n),a.onreadystatechange=function(){var e;4==a.readyState&&(200==a.status?(""!=(e=wppaTrim(a.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")}}function wppaAjaxUpdateIptc(s,e,t,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+s+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(t)+"&tagname="+p,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+s).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),"99"===a[1])jQuery("#photoitem-"+s).html(bef+'<span style="color:red">'+a[2]+"</span>"+aft);else{var n,i,o,l=JSON.parse(a[2]);for(n in l)switch(o=l[n],n){case"remark":o=(o=(o=o.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),i="0"!=a[1]?'<span style="color:red;" >'+o+"</span>":'<span style="color:green;" >'+o+"</span>",jQuery("#remark-"+s).html(i);break;case"photourl":wppaCropper[s]?wppaCropper[s].replace(o):jQuery("#photourl-"+s).attr("src",o),jQuery("#thumba-"+s).attr("href",o);break;case"thumburl":jQuery("#thumburl-"+s).attr("src",o);break;case"magickstack":jQuery("#magickstack-"+s).html(o),0<o.length?jQuery("#imstackbutton-"+s).css("display","inline"):jQuery("#imstackbutton-"+s).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(s,r,e,u,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+s+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+s).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+s).css({visibility:"visible"}),jQuery("#remark-"+s).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),"99"===a[1])jQuery("#photoitem-"+s).html(c+'<span style="color:red">'+a[2]+"</span>"+d);else{var n,i,o,l=JSON.parse(a[2]);for(n in l)switch(o=l[n],n){case"remark":o=(o=(o=o.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),i="0"!=a[1]?'<span style="color:red;" >'+o+"</span>":'<span style="color:green;" >'+o+"</span>",u&&(i+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+s).html(i);break;case"photourl":wppaCropper[s]?wppaCropper[s].replace(o):jQuery("#photourl-"+s).attr("src",o),jQuery("#thumba-"+s).attr("href",o);break;case"thumburl":jQuery("#thumburl-"+s).attr("src",o);break;case"magickstack":jQuery("#magickstack-"+s).html(o),0<o.length?jQuery("#imstackbutton-"+s).css("display","inline"):jQuery("#imstackbutton-"+s).css("display","none");break;default:jQuery("#"+n+"-"+s).html(o)}}"description"==r&&jQuery("#wppa-photo-spin-"+s).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+s).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){var a=(a=document.location.href).replace(/&pano-val=./,"");u?setTimeout(function(){document.location.href=a},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,p,a){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var i=wppaAlbumUpdateMatrix.length,o=0,l=!1,s=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(l=!0,s=o),o++;l||(wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],s=i),wppaAlbumUpdateMatrix[s][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[s][5]=a,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,p=0;p<t;)wppaAlbumUpdateMatrix[p][2]==wppaAlbumUpdateMatrix[p][3]||wppaAlbumUpdateMatrix[p][4]||(wppaAlbumUpdateMatrix[p][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[p][0],wppaAlbumUpdateMatrix[p][1],wppaAlbumUpdateMatrix[p][3],e,wppaAlbumUpdateMatrix[p][5])),p++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(o,l,s,r,u){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+o+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+o).value+"&value="+wppaEncode(s),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+o).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+o).html(e[2]):jQuery("#albumstatus-"+o).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+o).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),u&&"0"==e[1])return jQuery("#albumstatus-"+o).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==l&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var a=0,n=-1,i=wppaAlbumUpdateMatrix.length;a<i;)wppaAlbumUpdateMatrix[a][0]==o&&wppaAlbumUpdateMatrix[a][1]==l&&(n=a),a++;wppaAlbumUpdateMatrix[n][2]=s||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(r)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+o).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+p+", status = "+t,"force")},complete:function(e,t,p){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,p,e){var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+p+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;a.onreadystatechange=function(){var e;4==a.readyState&&(200==a.status?(""!=(e=wppaTrim(a.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"))},a.open("GET",e,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(p.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+p.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+p.status)),wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(a,e,o){if(!o&&!e&&"yes"==document.getElementById(a+"_continue").value)return document.getElementById(a+"_continue").value="no",document.getElementById(a+"_button").value="Start!",void(0<jQuery("#"+a+"_togo").html()&&(jQuery("#"+a+"_status").html("Pausing..."),jQuery("#"+a+"_button").css("display","none")));o||(document.getElementById(a+"_continue").value="yes",document.getElementById(a+"_button").value="Stop!",""==jQuery("#"+a+"_status").html()&&jQuery("#"+a+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(o?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("||"),n=a[1],i=!1;return n?(10<a[0].length&&(alert("An error occurred:\n"+a[0]),i=!0),jQuery("#"+n+"_status").html(a[2]),jQuery("#"+n+"_togo").html(a[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==a[3]?"reload"==a[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?o||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,p){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+a+", Error = "+p+", status = "+t,"force"),jQuery("#"+a+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==a&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==a&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==a&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+a+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(e),4==p.readyState&&200==p.status&&(p=(e=wppaEntityDecode(p.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+p+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText))}function wppaAjaxUpdateOptionValue(s,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(s)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+s,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+s.replace("#","H")).attr("title",e[2]),e[4])for(var a,n,i,o=e[4].split(";"),l=0;l<o.length;)a=o[l].split(":"),n=jQuery("#"+a[0]).html(),i=a[1],""!=n&&""==i&&(i='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+a[0]).html(i),l++},error:function(e){jQuery("#img_"+s.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+s).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=s&&"icon_corner_style"!=s||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=s&&"svg_bg_color"!=s||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=s&&"ovl_svg_bg_color"!=s||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(a=(a=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),p=0,a="";p<t.length;)a+=t[p],++p<t.length&&(a+="||PLUS||");return a}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var p=0;p<t.length;)"jpg"!=t[p]&&"JPG"!=t[p]||jQuery("#psdesc-"+e).css({display:""}),p++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaCheckLinkPageErr(e){var t="nil";document.getElementById(e+"_linktype")&&(t=document.getElementById(e+"_linktype").value),"0"!=document.getElementById(e+"_linkpage").value||"nil"!=t&&"photo"!=t&&"single"!=t&&"album"!=t&&"content"!=t&&"slide"!=t&&"plainpage"!=t?jQuery("#"+e+"-err").css({display:"none"}):jQuery("#"+e+"-err").css({display:""})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",n=-1,i=-2,o=0,l=!1,s=0;s<e.length;)0!=(p=e[s].valueOf())&&(o=n,p==++o?l=!0:l?(a+=n==i?t+n+t+p:t+t+n+t+p,l=!1):a+=t+p,l||(i=p,i++),n=p),s++;for(l&&(a+=".."+n);"."==a.substr(0,1);)a=a.substr(1);for(;a.substr(0,1)==t;)a=a.substr(1);return a}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var p,a=[],n=0,i=0;for(t=t||".",p=jQuery(e),i=n=0;n<p.length;)p[n].selected&&(a[i]=p[n].value,i++),n++;return wppaArrayToEnum(a,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+a,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+a+"-spin").css("display","inline")},success:function(e,t,p){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,p){alert("Export Db Table "+a+" failed. Error = "+p+", status = "+t)},complete:function(e,t,p){jQuery("#"+a+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+n+"_togo").html(a[0]);e=jQuery("#"+n+"_status").html(),a=a[1];""!=e&&""==a&&(a='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n+"_status").html(a),setTimeout(function(){wppaAjaxUpdateTogo(n)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){e=e.split("|");jQuery("#"+a).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var p=0,a=0;function n(e){(e=e||window.event).preventDefault(),p=a-e.clientY,a=e.clientY,t.style.top=t.offsetTop-p+"px"}function i(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,a=e.clientY,document.onmouseup=i,document.onmousemove=n}}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,p){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}
1
+ var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album",wppaCropper=[];function checkjQueryRev(e,t,a){var p=parseFloat(jQuery.fn.jquery);t.checked&&p<a&&(alert(e+"\nThe version of your jQuery library: "+p+" is too low for this feature. It requires version "+a),t.checked="")}function wppaReUpload(e,o,t,r){document.getElementById("wppa-re-up-form-"+o);var a=document.getElementById("wppa-re-up-file-"+o),u=document.getElementById("wppa-re-up-butn-"+o);e.preventDefault();a=a.files[0];if(a.type.match("image.*")){if(0==t.length)alert("Filename will be set to "+a.name);else if(a.name!=t&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+o).css("display","none");u.value="Uploading...",u.style.color="black";t=new FormData;t.append("photo",a,a.name);var i=new XMLHttpRequest,a="?action=wppa&wppa-action=update-photo&photo-id="+o+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+o).value;i.open("POST",wppaAjaxUrl+a,!0),i.onload=function(){if(200===i.status){var e=wppaTrim(i.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":var t,a,p,n=JSON.parse(e[2]);for(t in n)switch(p=n[t],t){case"remark":p=(p=(p=p.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),a="0"!=e[1]?'<span style="color:red;" >'+p+"</span>":'<span style="color:green;" >'+p+"</span>",r&&(a+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+o).html(a);break;case"photourl":wppaCropper[o]?wppaCropper[o].replace(p):jQuery("#photourl-"+o).attr("src",p),jQuery("#thumba-"+o).attr("href",p);break;case"thumburl":jQuery("#thumburl-"+o).attr("src",p);break;case"magickstack":jQuery("#magickstack-"+o).html(p),0<p.length?jQuery("#imstackbutton-"+o).css("display","inline"):jQuery("#imstackbutton-"+o).css("display","none");break;default:jQuery("#"+t+"-"+o).html(p)}u.value="Upload",jQuery("#re-up-"+o).css("display","none");break;case"99":document.getElementById("photoitem-"+o).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+o).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",u.value="Error occured",u.style.color="red"}}else alert("An error occurred!")},i.send(t)}else alert("File is not an image file!")}jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",function(){wppaMakeLazyVisible("windowon")}),wppaMakeLazyVisible("docready")});var _wppaRefreshAfter=!1;function wppaRefreshAfter(){_wppaRefreshAfter=!0}function wppaCheckWidgetMethod(){var e,t,a;if("4"==document.getElementById("wppa-wm").value?(document.getElementById("wppa-wp").style.visibility="visible","day-of-week"==(a=jQuery("#wppa-wp").val())||"day-of-month"==a||"day-of-year"==a?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")):(document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden")),"1"==document.getElementById("wppa-wm").value)for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="visible",t++;else for(e=document.getElementsByName("wppa-widget-photo"),t=0;t<e.length;)e[t].style.visibility="hidden",t++}function wppa_tablecookieon(e){wppa_setCookie("table_"+e,"on","365")}function wppa_tablecookieoff(e){wppa_setCookie("table_"+e,"off","365")}function wppaCookieCheckbox(e,t){e.checked?wppa_setCookie(t,"on","365"):wppa_setCookie(t,"off","365")}function wppa_move_up(e){document.location=wppa_moveup_url+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value}function checkColor(e){var t=e.substr(5),e=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",e)}function checkAll(e,t){e=document.getElementById(e);e&&(e.checked?jQuery(t).prop("checked",!0):jQuery(t).prop("checked",!1))}function impUpd(e,t){e.checked?(jQuery(t).val(wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).val(wppa_import),jQuery(".hideifupdate").css("display",""))}function wppaAjaxDeletePhoto(t,e,a){var p="",n="",p=e||'<div style="padding-left:5px;" >';a?n=a:aftrer="</div>",wppaFeAjaxLog("in");var o=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;a+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,o.open("GET",a,!0),o.send(),o.onreadystatechange=function(){switch(o.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==o.status?("ER"==(e=wppaTrim(o.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:(document.getElementById("photoitem-"+t).innerHTML=p+e[2]+n,wppaProcessFull(e[3],e[4])),jQuery(window).trigger("scroll"),wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=p+'<span style="color:red;" >Comm error '+o.status+": "+o.statusText+"</span>"+n}}}function wppaAjaxUndeletePhoto(t){wppaFeAjaxLog("in");var a=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+t;e+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,a.open("GET",e,!0),a.send(),a.onreadystatechange=function(){switch(a.readyState){case 1:document.getElementById("remark-"+t).innerHTML="server connection established";break;case 2:document.getElementById("remark-"+t).innerHTML="request received";break;case 3:document.getElementById("remark-"+t).innerHTML="processing request";break;case 4:var e;200==a.status?("ER"==(e=wppaTrim(a.responseText).split("||"))[0]?(e[3]&&alert(e[3]),jQuery("#wppa-delete-"+t).css("text-decoration","line-through")):""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),0==e[1]?document.getElementById("remark-"+t).innerHTML=e[2]:document.getElementById("photoitem-"+t).innerHTML='<div style="padding-left:5px;" >'+e[2]+"</div>",wppaFeAjaxLog("out")):document.getElementById("photoitem-"+t).innerHTML=before+'<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(t,e,a){wppaFeAjaxLog("in");var p=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+t).css({visibility:"visible"});var n="action=wppa&wppa-action=watermark-photo&photo-id="+t;n+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,e&&(n+="&wppa-watermark-file="+e),a&&(n+="&wppa-watermark-pos="+a),p.open("POST",wppaAjaxUrl,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?(document.getElementById("remark-"+t).innerHTML=e[2],setTimeout(function(){document.location.reload(!0)},500)):document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>",jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")):document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>")}}function wppaAjaxUpdateIptc(i,e,t,a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-iptc&photo-id="+i+"&item="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(t)+"&tagname="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(bef+'<span style="color:red">'+p[2]+"</span>"+aft);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none")}}wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll")}})}function wppaAjaxUpdatePhoto(i,l,e,s,c,d){c=c||"",d=d||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+i+"&item="+l+"&wppa-nonce="+document.getElementById("photo-nonce-"+i).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"visible"}),jQuery("#remark-"+i).html("Working, please wait...")},success:function(e,t,a){var p=wppaTrim(e).split("||");if(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),"99"===p[1])jQuery("#photoitem-"+i).html(c+'<span style="color:red">'+p[2]+"</span>"+d);else{var n,o,r,u=JSON.parse(p[2]);for(n in u)switch(r=u[n],n){case"remark":r=(r=(r=r.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),o="0"!=p[1]?'<span style="color:red;" >'+r+"</span>":'<span style="color:green;" >'+r+"</span>",s&&(o+=' <span style="color:blue;" >Reloading...</span>'),jQuery("#remark-"+i).html(o);break;case"photourl":wppaCropper[i]?wppaCropper[i].replace(r):jQuery("#photourl-"+i).attr("src",r),jQuery("#thumba-"+i).attr("href",r);break;case"thumburl":jQuery("#thumburl-"+i).attr("src",r);break;case"magickstack":jQuery("#magickstack-"+i).html(r),0<r.length?jQuery("#imstackbutton-"+i).css("display","inline"):jQuery("#imstackbutton-"+i).css("display","none");break;default:jQuery("#"+n+"-"+i).html(r)}}"description"==l&&jQuery("#wppa-photo-spin-"+i).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,a){jQuery("#remark-"+i).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){var p=(p=document.location.href).replace(/&pano-val=./,"");s?setTimeout(function(){document.location.href=p},300):(jQuery("#wppa-admin-spinner").css("display","none"),jQuery(window).trigger("scroll"))}})}function wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",Math.rand()))}function wppaChangeScheduleDelAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetimedel-"+e).css("display","inline"):(jQuery(".wppa-datetimedel-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledel",Math.rand()))}var _wppaRefreshAfter=!1,wppaAjaxAlbumCount=0,wppaAlbumUpdateMatrix=new Array;function wppaAjaxUpdateAlbum(e,t,a,p){var n=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var o=wppaAlbumUpdateMatrix.length,r=0,u=!1,i=-1;r<o;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=!0,i=r),r++;u||(wppaAlbumUpdateMatrix[o]=[e,t,"undefined",!1,!1,p],i=o),wppaAlbumUpdateMatrix[i][3]="number"==typeof a?a:a.value,wppaAlbumUpdateMatrix[i][5]=p,wppaAjaxUpdateAlbumMonitor(n)}function wppaAjaxUpdateAlbumMonitor(e){for(var t=wppaAlbumUpdateMatrix.length,a=0;a<t;)wppaAlbumUpdateMatrix[a][2]==wppaAlbumUpdateMatrix[a][3]||wppaAlbumUpdateMatrix[a][4]||(wppaAlbumUpdateMatrix[a][4]=!0,_wppaAjaxUpdateAlbum(wppaAlbumUpdateMatrix[a][0],wppaAlbumUpdateMatrix[a][1],wppaAlbumUpdateMatrix[a][3],e,wppaAlbumUpdateMatrix[a][5])),a++;e&&jQuery("#wppaalbumdesc-tmce").click()}function _wppaAjaxUpdateAlbum(r,u,i,l,s){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+r+"&item="+u+"&wppa-nonce="+document.getElementById("album-nonce-"+r).value+"&value="+wppaEncode(i),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==u&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,a){e=wppaTrim(e).split("||");if(wppaAjaxAlbumCount--,""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+r).html(e[2]):jQuery("#albumstatus-"+r).html("Working, please wait... ("+wppaAjaxAlbumCount+")"):jQuery("#albumstatus-"+r).html='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",void 0!==e[3]&&wppaProcessFull(e[3],e[4]),s&&"0"==e[1])return jQuery("#albumstatus-"+r).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==u&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var p=0,n=-1,o=wppaAlbumUpdateMatrix.length;p<o;)wppaAlbumUpdateMatrix[p][0]==r&&wppaAlbumUpdateMatrix[p][1]==u&&(n=p),p++;wppaAlbumUpdateMatrix[n][2]=i||0,wppaAlbumUpdateMatrix[n][4]=!1,wppaAlbumUpdateMatrix[n][5]=!1,wppaAjaxUpdateAlbumMonitor(l)},error:function(e,t,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+r).html('<span style="color:red;" >Comm error '+t+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+t,"force")},complete:function(e,t,a){}})}function wppaProcessFull(e,t){"full"==e&&(jQuery("#full").css("display",""),jQuery("#notfull").css("display","none")),"notfull"==e&&(jQuery("#full").css("display","none"),0<t?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(t,a,e){var p=wppaGetXmlHttp(),e=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+t+"&wppa-comment-id="+a+"&wppa-comment-status="+e+"&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;p.onreadystatechange=function(){var e;4==p.readyState&&(200==p.status?(""!=(e=wppaTrim(p.responseText).split("||"))[0]&&alert("The server returned unexpected output:\n"+e[0]),"0"===e[1]?jQuery("#remark-"+t).html(e[2]):jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>"),jQuery("#wppa-comment-spin-"+a).css("visibility","hidden")):jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+p.status+": "+p.statusText+"</span>"))},p.open("GET",e,!0),p.send()}function wppaAjaxUpdateOptionCheckBox(t,e){var a=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+t;p+="&wppa-nonce="+document.getElementById("wppa-nonce").value,e.checked?p+="&value=yes":p+="&value=no",a.onreadystatechange=function(){switch(a.readyState){case 1:case 2:case 3:jQuery("#img_"+t).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var e=wppaTrim(a.responseText).split("||");""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=a.status?("0"===e[1]?(jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2])):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Error #"+e[1]+", message: "+e[2]+", status: "+a.status)),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+t).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+t).attr("title","Communication error, status = "+a.status)),wppaCheckInconsistencies()}},a.open("GET",p,!0),a.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(p,e,r){if(!r&&!e&&"yes"==document.getElementById(p+"_continue").value)return document.getElementById(p+"_continue").value="no",document.getElementById(p+"_button").value="Start!",void(0<jQuery("#"+p+"_togo").html()&&(jQuery("#"+p+"_status").html("Pausing..."),jQuery("#"+p+"_button").css("display","none")));r||(document.getElementById(p+"_continue").value="yes",document.getElementById(p+"_button").value="Stop!",""==jQuery("#"+p+"_status").html()&&jQuery("#"+p+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(r?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("||"),n=p[1],o=!1;return n?(10<p[0].length&&(alert("An error occurred:\n"+p[0]),o=!0),jQuery("#"+n+"_status").html(p[2]),jQuery("#"+n+"_togo").html(p[3]),jQuery("#"+n+"_button").css("display",""),o||"0"==p[3]?"reload"==p[4]?(alert("This page will now be reloaded to finish the operation. Please stay tuned..."),void wppaReload()):void setTimeout("wppaMaintenanceProc('"+n+"', false)",20):void("yes"!=document.getElementById(n+"_continue").value?r||jQuery("#"+n+"_status").html("Pending"):setTimeout("wppaMaintenanceProc('"+n+"', true)",20))):(alert("The server returned unexpected output:\n"+e+"\nIf the current procedure has a Skip One button, press it before retrying. Reloading page..."),void wppaReload())},error:function(e,t,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+p+", Error = "+a+", status = "+t,"force"),jQuery("#"+p+"_status").html("Server error #"+(11-wppaAlwaysContinue));t=!1;--wppaAlwaysContinue<1&&(t=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(t||0<wppaAlwaysContinue)&&("wppa_remake"==p&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==p&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==p&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+p+"', true)",2e3))},complete:function(e,t,a){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":0;break;case"wppa_list_errorlog":0;break;case"wppa_list_rating":0;break;case"wppa_list_session":0;break;case"wppa_list_comments":0}var t=.9*wppaWindowWidth(),a=wppaGetXmlHttp(),p=wppaAjaxUrl,e="action=wppa&wppa-action=maintenancepopup&slug="+e;e+="&wppa-nonce="+document.getElementById("wppa-nonce").value,a.open("POST",p,!1),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(e),4==a.readyState&&200==a.status&&(a=(e=wppaEntityDecode(a.responseText).split("|"))[0],e[0]="",e=e.join("|").substring(1),t={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText},jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery("#wppa-modal-container").css({width:"100%"}),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+a+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText))}function wppaAjaxUpdateOptionValue(i,e,t){var a="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(i)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(a+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+i,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,a){e=wppaTrim(e).split("||");if(""!=e[0])alert("The server returned unexpected output:\n"+e[0]);else if("0"===e[1]?(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))):(jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),e[3]&&alert(e[3])),jQuery("#img_"+i.replace("#","H")).attr("title",e[2]),e[4])for(var p,n,o,r=e[4].split(";"),u=0;u<r.length;)p=r[u].split(":"),n=jQuery("#"+p[0]).html(),o=p[1],""!=n&&""==o&&(o='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(o),u++},error:function(e){jQuery("#img_"+i.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+i).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=i&&"icon_corner_style"!=i||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=i&&"svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=i&&"ovl_svg_bg_color"!=i||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){if(void 0!==e){if("number"==typeof e)return e;for(var t=(p=(p=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,p="";a<t.length;)p+=t[a],++a<t.length&&(p+="||PLUS||");return p}}function wppaCheckInconsistencies(){jQuery("#use_thumb_popup").prop("checked")&&"lightbox"==jQuery("#thumb_linktype").val()?jQuery(".popup-lightbox-err").css("display",""):jQuery(".popup-lightbox-err").css("display","none")}function wppaGetXmlHttp(){return xmlhttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp}function wppaPhotoStatusChange(e){if(jQuery("#psdesc-"+e).css({display:"none"}),jQuery("#status-"+e)){if(elm=document.getElementById("status-"+e),"pending"!=elm.value&&"scheduled"!=elm.value||jQuery("#photoitem-"+e).css({backgroundColor:"#ffebe8",borderColor:"#cc0000"}),"publish"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffe0",borderColor:"#e6db55"}),"featured"==elm.value){jQuery("#photoitem-"+e).css({backgroundColor:"#e0ffe0",borderColor:"#55ee55"});var t=document.getElementById("pname-"+e).value.split(".");if(1<t.length)for(var a=0;a<t.length;)"jpg"!=t[a]&&"JPG"!=t[a]||jQuery("#psdesc-"+e).css({display:""}),a++}"gold"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#eeeecc",borderColor:"#ddddbb"}),"silver"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ffffff",borderColor:"#eeeeee"}),"bronze"==elm.value&&jQuery("#photoitem-"+e).css({backgroundColor:"#ddddbb",borderColor:"#ccccaa"}),"scheduled"==elm.value?jQuery(".wppa-datetime-"+e).css("display",""):jQuery(".wppa-datetime-"+e).css("display","none"),jQuery("#scheduledel-"+e).prop("checked")?jQuery(".wppa-del-datetime-"+e).css("display",""):jQuery(".wppa-del-datetime-"+e).css("display","none")}}function wppaSetComBgCol(e){"approved"==jQuery("#com-stat-"+e).val()?jQuery("#com-tr-"+e).css({backgroundColor:"#ffffe0"}):jQuery("#com-tr-"+e).css({backgroundColor:"#ffebe8"})}function wppaAddCat(e,t){wppaAddTag(e,t)}function wppaAddTag(e,t){t=document.getElementById(t);e&&(t.value?t.value+=","+e:t.value=e,"-clear-"==e&&(t.value=""))}function wppaRefresh(e){e=new String(document.location).split("#")[0]+"#"+e;document.location=e}function wppaReload(e){e?(url=document.location.href.split("#"),document.location.href=url[0]+e,setTimeout(function(){document.location.reload(!0)},10)):document.location.reload(!0)}var wppaFeCount=0;function wppaFeAjaxLog(e){"in"==e&&(0==wppaFeCount&&jQuery("#wppa-fe-exit").css("display","none"),wppaFeCount++,jQuery("#wppa-fe-count").html(wppaFeCount)),"out"==e&&(1==wppaFeCount&&(jQuery("#wppa-fe-count").html(""),jQuery("#wppa-fe-exit").css("display","inline"),wppaFeCount--),1<wppaFeCount&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var a,p="",n=-1,o=-2,r=0,u=!1,i=0;i<e.length;)0!=(a=e[i].valueOf())&&(r=n,a==++r?u=!0:u?(p+=n==o?t+n+t+a:t+t+n+t+a,u=!1):p+=t+a,u||(o=a,o++),n=a),i++;for(u&&(p+=".."+n);"."==p.substr(0,1);)p=p.substr(1);for(;p.substr(0,1)==t;)p=p.substr(1);return p}function wppaGetSelEnumToId(e,t){p=jQuery("."+e);var a=[];for(i=0,j=0;i<p.length;)p[i].selected&&(a[j]=p[i].value,j++),i++;jQuery("#"+t).val(wppaArrayToEnum(a,"."))}function wppaGetSelectionEnumByClass(e,t){var a,p=[],n=0,o=0;for(t=t||".",a=jQuery(e),o=n=0;n<a.length;)a[n].selected&&(p[o]=a[n].value,o++),n++;return wppaArrayToEnum(p,t)}function wppaEditSearch(e,t){t=jQuery("#"+t).val();0==t.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+t}function wppaEditTrash(e){document.location.href=e}function wppaExportDbTable(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+p,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#"+p+"-spin").css("display","inline")},success:function(e,t,a){e=e.split("||");"0"==e[1]?document.location=e[2]:alert("Error: "+e[1]+"\n\n"+e[2])},error:function(e,t,a){alert("Export Db Table "+p+" failed. Error = "+a+", status = "+t)},complete:function(e,t,a){jQuery("#"+p+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+n,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){var p=e.split("|");jQuery("#"+n+"_togo").html(p[0]);e=jQuery("#"+n+"_status").html(),p=p[1];""!=e&&""==p&&(p='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+n+"_status").html(p),setTimeout(function(){wppaAjaxUpdateTogo(n)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return(null==e||void 0===e||""==e||0==e)&&!0}function wppaTimedConfirm(e){var t={modal:!0,resizable:!1,width:400,show:{effect:"fadeIn",duration:800},closeText:"X",buttons:[{text:"NO",click:function(){jQuery(this).dialog("close")}},{text:"YES",click:function(){jQuery(this).dialog("close")}}]};jQuery("#wppa-modal-container").html(e).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",padding:"8px",backgroundColor:"#cccccc",boxSizing:"content-box",zIndex:"9999"}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({float:"right",position:"relative",bottom:"40px"}),jQuery(".ui-dialog-titlebar-close").css({display:"none"}),jQuery(".ui-button").attr("title",wppaCloseText),setTimeout(function(){jQuery(".ui-button").trigger("click")},6e4)}function wppaAjaxGetSpinnerHtml(e,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-option&wppa-option=getspinnerpreview&type="+e+"&wppa-nonce="+document.getElementById("wppa-nonce").value,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,a){e=e.split("|");jQuery("#"+p).html(e[0])},error:function(e){},complete:function(e){}})}function wppaDragHorizon(t){var a=0,p=0;function n(e){(e=e||window.event).preventDefault(),a=p-e.clientY,p=e.clientY,t.style.top=t.offsetTop-a+"px"}function o(){document.onmouseup=null,document.onmousemove=null}t.onmousedown=function(e){(e=e||window.event).preventDefault(),pos3=e.clientX,p=e.clientY,document.onmouseup=o,document.onmousemove=n}}function wppaAjaxReplaceLog(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenancepopup&slug=wppa_list_errorlog&raw=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:1e5,beforeSend:function(e){jQuery("#wppa-spinner").show()},success:function(e,t,a){e=wppaEntityDecode(e),jQuery("#wppa-logbody").html(e),jQuery("#wppa-spinner").hide()}})}
js/wppa-ajax-front.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsAjaxVersion = '7.7.03.002';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -141,11 +141,12 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
141
  wppaConsoleLog( 'wppaDoAjaxRender failed. Error = ' + error + ', status = ' + status, 'force' );
142
 
143
  // Do it by reload
144
- document.location.href = newurl;
145
-
146
- // Run Autocol?
147
- wppaColWidth[mocc] = 0; // force a recalc and triggers autocol if needed
148
- _wppaDoAutocol( mocc, 'ajax' );
 
149
  },
150
  complete: function( xhr, status, newurl ) {
151
  wppaWaitForCounter++;
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '8.0.00.001';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
141
  wppaConsoleLog( 'wppaDoAjaxRender failed. Error = ' + error + ', status = ' + status, 'force' );
142
 
143
  // Do it by reload
144
+ if ( newurl ) {
145
+ document.location.href = newurl;
146
+ }
147
+ else {
148
+ document.location.reload(true);
149
+ }
150
  },
151
  complete: function( xhr, status, newurl ) {
152
  wppaWaitForCounter++;
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="7.7.03.002",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
1
+ var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
js/wppa-all.js CHANGED
@@ -1,18 +1,18 @@
1
  // wppa-utils
2
- var wppaDebug;wppaJsUtilsVersion="7.7.07.003";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,a,t,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),i&&setTimeout(i,10)):jQuery(e).stop().animate(a,t,p,i)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){e=wppaTrimLeft(e,a);return e=wppaTrimRight(e,a)}function wppaTrimLeft(e,a){var t,p,i,n,r,o,s;switch(typeof a){case"string":for(p=(t=e).length,i=a.length;i<=p&&t.substr(0,i)==a;)p=(t=t.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<a.length;)s=wppaTrimLeft(s,a[n]),n++;r=o==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,i,n,r,o,s;switch(typeof a){case"string":for(p=(t=e).length,i=a.length;i<=p&&t.substr(p-i)==a;)p=(t=t.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<a.length;)s=wppaTrimRight(s,a[n]),n++;r=o==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);p=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var a,t,p=document.cookie.split(";"),i=0;i<p.length;i++)if(a=p[i].substr(0,p[i].indexOf("=")),t=p[i].substr(p[i].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(t);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){var t,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=a||(t=(new Date).getTime()%864e5,t-=60*(p=Math.floor(t/36e5))*60*1e3,t-=60*(i=Math.floor(t/6e4))*1e3,a=Math.floor(t/1e3),console.log("At: "+p+":"+i+":"+a+"."+(t-=1e3*a)+" message: "+e))}function wppaSvgHtml(e,a,t,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}a=a||"32px",t="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):t?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==t&&(t="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(a?"height:"+a+";":"")+"fill:"+s+";background-color:"+t+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":l+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":l+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(){if(!wppaLazyBusy&&(wppaLazyBusy=!0,wppaInitMasonryPlus(),wppaLazyLoad)){var e,a=new Date,t=a.getTime();if(t<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible()},100),void(wppaLazyBusy=!1);wppaLastLazy=t,clearTimeout(wppaLazyTimer);var p=0;jQuery("*[data-src]").each(function(){e=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),p++)}),0<p&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize()},500)),t=(a=new Date).getTime(),wppaLastLazy=t,wppaLazyBusy=!1}}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var a=jQuery(e);a[0]&&"BODY"!=a[0].nodeName;){if("none"==jQuery(a[0]).css("display"))return!1;a=jQuery(a[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,a,t){t=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==t?a:(wppaIsMini[e]?t/2:t)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,a,t=jQuery;wppaOvlOpen&&(a=wppaIsFs()?(t(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(t(".wppa-pctl-div-lb").css({position:"initial"}),t("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(a-=20),a<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(a/12-4))&&(t(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),t(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,t(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),t(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?t(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):t(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),t(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,a,t){},error:function(e,a,t){wppaConsoleLog("wppaServerLog failed. Error = "+t+", status = "+a,"force")}})}function wppaTimNow(){return(new Date).getTime()}
3
  // wppa
4
- wppaWppaVer="7.7.07.003";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisible()},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisible)}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+wppaExtendedResizeDelay?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,wppaExtendedResizeDelay):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
5
  // wppa-slideshow
6
- var wppaJsSlideshowVersion="7.7.07.003";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),S="default",""!=c?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(R="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+R+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=y,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(_wppaStopping[p])_wppaStopping[p]=0;else{if(!e&&!wppaIsSlidshowVisible(p))return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+t+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(n=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",n,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",n,!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,e,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(a=_wppaDsc[p][_wppaCurIdx[p]])||"&nbsp;"==a?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])),_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var i=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(i=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(t=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<t.length&&"hidden"!=jQuery(t).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<e.length?setTimeout(function(){jQuery(e).trigger("click")},wppaGetSlideshowTimeout(p)):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(t=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((t=t[t.length-1])&&(wppaAudioPlaying[p]||t.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,g,x,f,e=wppaStretch;if(u)j=w-d,h=y=0,x=S=w,f=g=(c=parseInt(j*n/o))+d,jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c});else{if(s<(x=w)&&(x=s),S=x,g=f=parseInt(x*l),e||x-d<=o||f-d<=n?l<(n+d)/(o+d)?(c=f-d,j=parseInt(c*o/n)):(j=x-d,c=parseInt(j*n/o)):(j=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":h=0;break;case"center":h=parseInt((f-(c+d))/2);break;case"bottom":h=f-(c+d);break;case"fit":h=0,g=f=c+d}jQuery("#"+a).css({marginTop:h,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-x)/2);break;case"right":y=w-x}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var i=jQuery(r).height(),I=(x-j)/2;i&&0<i&&(wppaAudioHeight=i,jQuery(r).css({height:wppaAudioHeight,width:j,left:I}))}var j=parseInt(x/3),I=2*j,r=0<r.length?f-wppaAudioHeight-wppaSlideBorderWidth-h:f;jQuery("#bbb-"+p+"-l").css({height:r,width:j,left:0}),jQuery("#bbb-"+p+"-r").css({height:r,width:j,left:I})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if("void"==_wppaFullNames[p][_wppaCurIdx[p]])return jQuery("#namebox-"+p).hide(),"";if(jQuery("#namebox-"+p).show(),wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w+"px"}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible(p,!0),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var n=0;n<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}r||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?jQuery("#wppa-next-pagelink-"+p).trigger("click"):0<e.length&&jQuery(e).trigger("click")):_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e;document.getElementById("wppa-filmstrip-"+p)&&((e=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=e&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(e>i-1&&e<i&&(r+="&nbsp;( "+e+" )&nbsp;"),r+='<span class="wppa-rating-numeric" style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(r)}0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(a+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t,i="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(i).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(i).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":if(wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a){if(!wppaSlideWrap[p])return void wppaPrev(p);(t=_wppaCurIdx[p]-1)<0&&(t=_wppaSlides[p].length-1)}if("r"==a){if(!wppaSlideWrap[p])return void wppaNext(p);(t=_wppaCurIdx[p]+1)==_wppaSlides[p].length&&(t=0)}wppaGotoKeepState(p,t);break;default:alert("Unimplemented instruction: "+e+" on: "+i)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}
7
  // wppa-ajax-front
8
- var wppaJsAjaxVersion="7.7.03.002",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
9
  // wppa-lightbox
10
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="7.7.03.001",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(0<wppaOvlActivePanorama||e("#wppa-overlay-ic").css({top:"50%",left:"50%"}),e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,d=0;d<n.length;d++)1<(l=!!e(o=n[d]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama?p("#wppa-overlay-ic").css({top:0,left:0}):p("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"}),wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),p("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",p("#wppa-overlay-ic").html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-ic").hide(),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaOvlShowSame),e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a=wppaIsMobile?"ontouchstart":"onclick",p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" '+a+'="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" '+a+'="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" '+a+'="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" '+a+'="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" '+a+'="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(p+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" '+a+'="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" '+a+'="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
11
  // wppa-popup
12
  var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(a?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,i){var a=i+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+a+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(a-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
13
  // wppa-touch
14
  var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
  // wppa-zoom
16
- var wppaJsZoomVersion="7.7.03.001";function wppaDoZoomPan(n,a){var m=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&m("#wppa-ovl-spin").show(),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=m("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=m("#wppa-pctl-left-"+o.itemId),o.right=m("#wppa-pctl-right-"+o.itemId),o.up=m("#wppa-pctl-up-"+o.itemId),o.down=m("#wppa-pctl-down-"+o.itemId),o.zoomin=m("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=m("#wppa-pctl-zoomout-"+o.itemId),o.prev=m("#wppa-pctl-prev-"+o.itemId),o.next=m("#wppa-pctl-next-"+o.itemId),o.exit=m("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,wppaIsMobile?(o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)}))):(o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&p(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),p(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)})),o.isLightbox&&(m("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),m(o.canvas).hide(),m("#wppa-pctl-div-"+o.itemId).hide()}),m("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),m("#wppa-ovl-spin").hide(),wppaProtect()}function p(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+a+" "+wppaDebugCounter),(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(m("#wppa-overlay-ic").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-pan-container").css({marginTop:r}),m("#wppa-overlay-ic").css({marginTop:0,marginLeft:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(m("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?m("#wppa-overlay-ic").css({left:4}):m("#wppa-overlay-ic").css({left:(o-i)/2})):(m("#wppa-overlay-ic").css({marginLeft:0}),m("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){p(a)},250))}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),p(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),p(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),p(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),p(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=wppaIsMobile?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=wppaIsMobile?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
17
  // wppa-spheric
18
- var wppaJsSphericVersion="7.7.06.006";function wppaDoSphericPan(a,n){var c=jQuery;n&&(wppaSphericData[a]=n);var s=v(a,s);if(!s.initialized&&!s.abort&&(!s.isLightbox||wppaOvlOpen)){if(!s.isLightbox&&!wppaIsElementInViewport(c("#wppa-pan-div-"+a)))return setTimeout(function(){wppaDoSphericPan(a)},1e3),void v(a,{vtime:b()});s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&c("#wppa-ovl-spin").show(),s.manCtrl=!1,s.butDown=!1,s.lon=180,s.lat=0,s.dFov=0,s.abort=!1,s.aspect=2,s.div=c("#wppa-pan-div-"+a),s.left=c("#wppa-pctl-left-"+a),s.right=c("#wppa-pctl-right-"+a),s.up=c("#wppa-pctl-up-"+a),s.down=c("#wppa-pctl-down-"+a),s.zoomin=c("#wppa-pctl-zoomin-"+a),s.zoomout=c("#wppa-pctl-zoomout-"+a),s.prev=c("#wppa-pctl-prev-"+a),s.next=c("#wppa-pctl-next-"+a),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),c(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),c(s.div).append(s.wppaRenderer.domElement),s.wppaScene=new THREE.Scene,s.wppaSphere=new THREE.SphereGeometry(100,100,40),s.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),s.texture=(new THREE.TextureLoader).load(s.url),s.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:s.texture}),s.wppaSphereMesh=new THREE.Mesh(s.wppaSphere,s.wppaSphereMaterial),s.wppaScene.add(s.wppaSphereMesh),wppaIsMobile?(s.right.on("touchstart",function(n){u(a)}),s.right.on("touchend",function(n){f(a)}),s.left.on("touchstart",function(n){l(a)}),s.left.on("touchend",function(n){f(a)}),s.up.on("touchstart",function(n){h(a)}),s.up.on("touchend",function(n){f(a)}),s.down.on("touchstart",function(n){m(a)}),s.down.on("touchend",function(n){f(a)}),s.zoomin.on("touchstart",function(n){i(a)}),s.zoomin.on("touchend",function(n){f(a)}),s.zoomout.on("touchstart",function(n){r(a)}),s.zoomout.on("touchend",function(n){f(a)}),s.enableManual&&0<c("#wppa-pan-div-"+a+" canvas").length&&(c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchstart",function(n){t(a,n)}),c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchmove",function(n){o(a,n)}),c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchend",function(n){p(a)}))):(s.right.on("mousedown",function(n){u(a)}),s.right.on("mouseup",function(n){f(a)}),s.left.on("mousedown",function(n){l(a)}),s.left.on("mouseup",function(n){f(a)}),s.up.on("mousedown",function(n){h(a)}),s.up.on("mouseup",function(n){f(a)}),s.down.on("mousedown",function(n){m(a)}),s.down.on("mouseup",function(n){f(a)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(n){i(a)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(n){f(a)}),s.zoomout.on("mousedown",function(n){r(a)}),s.zoomout.on("mouseup",function(n){f(a)}),s.enableManual&&0<c("#wppa-pan-div-"+a+" canvas").length&&(c("#wppa-pan-div-"+a+" canvas").on("mousedown",function(n){t(a,n)}),c("#wppa-pan-div-"+a+" canvas").on("mousemove",function(n){o(a,n)}),c("#wppa-pan-div-"+a+" canvas").on("mouseup",function(n){p(a)}),c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("wheel",function(n){var e;e=a,(n=n).preventDefault(),n.stopPropagation(),s=v(e),v(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*s.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){v(e,{dFov:0})},25)}))),s.isLightbox&&(c("body").on("quitimage",function(n){var e;s=v(e=a,{abort:!0,autorun:!1}),clearTimeout(s.timer),c("#wppa-pan-div-"+e+" canvas").hide(),c("#wppa-pctl-div-"+e).hide()}),c("#wppa-pctl-div-"+a).on("click",function(n){wppaKillEvent(n)})),v(a,s),s.isLightbox?(c(window).off("wpparesizeend",wppaOvlShowSame),c(window).on("wpparesizeend",wppaOvlShowSame)):c(window).on("wpparesizeend",function(n){e(a)}),wppaProtect(),c(document).on("tabbychange",function(n){var e;e=a,s.wppaRenderer.state.reset(),s=v(e,{initialized:!1,abort:!0}),setTimeout(function(){v(e,{abort:!1}),wppaDoSphericPan(e)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+e)}),e(a)}function w(n){var e=v(n),a=wppaIsElementInViewport(c("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25)){if(!a)return!(b()<e.vtime+1e3)&&(setTimeout(function(){w(n)},1e3),void v(n,{vtime:b()}));v(n,{time:b()}),e.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0),e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),c("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),v(n,e))}}function e(n){var e=!wppaIsFs();if(s=v(n)){if(s.isLightbox){if(!wppaOvlOpen)return;c("#wppa-overlay-ic").css("display",""),c("#wppa-overlay-ic").css("width","");var a,t,o=(e=!wppaIsFs())?(t=window.innerWidth||screen.width,window.innerHeight||screen.height):(t=screen.width,screen.height),p=8,i=8+(s.controls?s.icsize+10:0)+30;e&&(p+=2*s.borderWidth,i+=2*s.borderWidth),a=(t-p)/2+i<o,i=e?a?(o-(u=(r=t-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),s.aspect=r/u,c("#wppa-ovl-pan-container").css({top:i}),c("#wppa-overlay-ic").css({top:0}),e?(c("#wppa-ovl-pan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:r,marginLeft:0}),a?c("#wppa-overlay-ic").css({left:4,marginLeft:0}):c("#wppa-overlay-ic").css({left:(t-r)/2,marginLeft:0})):(c("#wppa-overlay-ic").css({marginLeft:0}),c("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(t-r)/2})),s.wppaRenderer.setSize(r,u)}else{var r=c(s.div).parent().width(),u=parseInt(r/2);if(!s.wppaRenderer)return;s.wppaRenderer.setSize(r,u)}s.width=r,s.height=u,v(n,s),s.timer=setTimeout(function(){w(n)},250)}}function t(n,e){e.preventDefault(),e.stopPropagation(),s=v(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),wppaIsMobile?v(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):v(n,{sX:e.clientX,sY:e.clientY}),v(n,{sLon:s.lon,sLat:s.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(s=v(n)).manCtrl&&(wppaIsMobile?v(n,{lon:.1*(s.sX-e.touches[0].clientX)+s.sLon,lat:.1*(e.touches[0].clientY-s.sY)+s.sLat,pause:!1}):v(n,{lon:.1*(s.sX-e.clientX)+s.sLon,lat:.1*(e.clientY-s.sY)+s.sLat,pause:!1}),w(n))}function p(n){v(n,{manCtrl:!1})}function i(n){s=v(n),v(n,{dFov:-.4*s.mFakt,butDown:!0}),w(n)}function r(n){s=v(n),v(n,{dFov:.4*s.mFakt,butDown:!0}),w(n)}function u(n){s=v(n),v(n,{dX:.2*s.mFakt,butDown:!0}),w(n)}function l(n){s=v(n),v(n,{dX:-.2*s.mFakt,butDown:!0}),w(n)}function h(n){s=v(n),v(n,{dY:.2*s.mFakt,butDown:!0}),w(n)}function m(n){s=v(n),v(n,{dY:-.2*s.mFakt,butDown:!0}),w(n)}function f(n){s=v(n),v(n,{dX:0,dY:0,dFov:0,butDown:!1})}function v(n,e){if(!wppaSphericData[n])return!1;if(e)for(var a in e)wppaSphericData[n][a]=e[a];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}}
1
  // wppa-utils
2
+ var wppaDebug;wppaJsUtilsVersion="8.0.00.007";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":l+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":l+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(function(){wppaMakeLazyVisible("scrollend")},wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(e){if(wppaLazyLoad&&(wppaConsoleLog("Doing wppaMakeLazyVisible("+e+")","force"),!wppaLazyBusy)){wppaLazyBusy=!0;var t,a=new Date,p=a.getTime(),i=p-wppaLastLazy;if(p<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible("selftimer")},100),void(wppaLazyBusy=!1);wppaInitMasonryPlus(),wppaLastLazy=p,clearTimeout(wppaLazyTimer);var n=0,e=jQuery("*[data-src]");e.each(function(){t=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),n++)}),0<n&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&(setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery("div").getNiceScroll().resize()},1500)),setTimeout(function(){jQuery(".wppa-box").trigger("scroll"),jQuery("body").trigger("scroll")},250)),wppaConsoleLog("MakeLazyVisible done after "+i+" ms in "+((p=(a=new Date).getTime())-wppaLastLazy)+" ms. Processed "+n+" out of "+e.length+" elements","force"),wppaLastLazy=p,wppaLazyBusy=!1}}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
3
  // wppa
4
+ wppaWppaVer="8.0.00.011";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeNiceTimer,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitwindowon")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitnicewrapon")}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){wppaResizeNice()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){void 0!==jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisibleScrollEnd("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisibleScrollEnd)}function wppaResizeNice(){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice()},200)}function _wppaResizeNice(){wppaConsoleLog("Doing wppaResizeNice","force"),"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery("div").each(function(){"function"==typeof jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
5
  // wppa-slideshow
6
+ var wppaJsSlideshowVersion="8.0.00.006";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),S="default",""!=c?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(R="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+R+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=y,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(_wppaStopping[p])_wppaStopping[p]=0;else{if(!e&&!wppaIsSlidshowVisible(p))return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+t+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(n=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",n,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",n,!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,e,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(a=_wppaDsc[p][_wppaCurIdx[p]])||"&nbsp;"==a?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])),_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var i=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(i=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(t=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<t.length&&"hidden"!=jQuery(t).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<e.length?setTimeout(function(){jQuery(e).trigger("click")},wppaGetSlideshowTimeout(p)):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(t=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((t=t[t.length-1])&&(wppaAudioPlaying[p]||t.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,g,x,f,e=wppaStretch;if(u)j=w-d,h=y=0,x=S=w,f=g=(c=parseInt(j*n/o))+d,jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c});else{if(s<(x=w)&&(x=s),S=x,g=f=parseInt(x*l),e||x-d<=o||f-d<=n?l<(n+d)/(o+d)?(c=f-d,j=parseInt(c*o/n)):(j=x-d,c=parseInt(j*n/o)):(j=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":h=0;break;case"center":h=parseInt((f-(c+d))/2);break;case"bottom":h=f-(c+d);break;case"fit":h=0,g=f=c+d}jQuery("#"+a).css({marginTop:h,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-x)/2);break;case"right":y=w-x}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var i=jQuery(r).height(),I=(x-j)/2;i&&0<i&&(wppaAudioHeight=i,jQuery(r).css({height:wppaAudioHeight,width:j,left:I}))}var j=parseInt(x/3),I=2*j,r=0<r.length?f-wppaAudioHeight-wppaSlideBorderWidth-h:f;jQuery("#bbb-"+p+"-l").css({height:r,width:j,left:0}),jQuery("#bbb-"+p+"-r").css({height:r,width:j,left:I})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if("void"==_wppaFullNames[p][_wppaCurIdx[p]])return jQuery("#namebox-"+p).hide(),"";if(jQuery("#namebox-"+p).show(),wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w+"px"}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible("filmstripmocc="+p),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var n=0;n<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}r||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?jQuery("#wppa-next-pagelink-"+p).trigger("click"):0<e.length&&jQuery(e).trigger("click")):_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e;document.getElementById("wppa-filmstrip-"+p)&&((e=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=e&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(e>i-1&&e<i&&(r+="&nbsp;( "+e+" )&nbsp;"),r+='<span class="wppa-rating-numeric" style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(r)}0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(a+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t,i="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(i).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(i).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":if(wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a){if(!wppaSlideWrap[p])return void wppaPrev(p);(t=_wppaCurIdx[p]-1)<0&&(t=_wppaSlides[p].length-1)}if("r"==a){if(!wppaSlideWrap[p])return void wppaNext(p);(t=_wppaCurIdx[p]+1)==_wppaSlides[p].length&&(t=0)}wppaGotoKeepState(p,t);break;default:alert("Unimplemented instruction: "+e+" on: "+i)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}
7
  // wppa-ajax-front
8
+ var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
9
  // wppa-lightbox
10
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.012",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}window.addEventListener("orientationchange",wppaOvlShowSame),e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
11
  // wppa-popup
12
  var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(a?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,i){var a=i+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+a+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(a-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
13
  // wppa-touch
14
  var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
  // wppa-zoom
16
+ var wppaJsZoomVersion="8.0.00.012";function wppaDoZoomPan(n,t){var p=jQuery;t&&(wppaZoomData[n]=t);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&(p("#wppa-ovl-spin").show(),p("#wppa-ovl-pan-container").hide()),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),p(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=p("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=p("#wppa-pctl-left-"+o.itemId),o.right=p("#wppa-pctl-right-"+o.itemId),o.up=p("#wppa-pctl-up-"+o.itemId),o.down=p("#wppa-pctl-down-"+o.itemId),o.zoomin=p("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=p("#wppa-pctl-zoomout-"+o.itemId),o.prev=p("#wppa-pctl-prev-"+o.itemId),o.next=p("#wppa-pctl-next-"+o.itemId),o.exit=p("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(t){e(n)}),o.right.on("touchend",function(t){h(n)}),o.left.on("touchstart",function(t){i(n)}),o.left.on("touchend",function(t){h(n)}),o.up.on("touchstart",function(t){s(n)}),o.up.on("touchend",function(t){h(n)}),o.down.on("touchstart",function(t){r(n)}),o.down.on("touchend",function(t){h(n)}),o.zoomin.on("touchstart",function(t){c(n)}),o.zoomin.on("touchend",function(t){h(n)}),o.zoomout.on("touchstart",function(t){u(n)}),o.zoomout.on("touchend",function(t){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(t){f(n,t)}),o.canvas.addEventListener("touchmove",function(t){w(n,t)}),o.canvas.addEventListener("touchend",function(t){g(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(t){f(n,t)}),o.canvas.addEventListener("mousemove",function(t){w(n,t)}),o.canvas.addEventListener("mouseup",function(t){g(n)}),o.canvas.addEventListener("mouseleave",function(t){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(t){var a;l(a=n,{pause:!1}).manual&&m(a)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(t){var a;a=n,(t=t).preventDefault(),t.stopPropagation(),o=l(a),l(a,{deltaFactor:1+t.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),m(a),setTimeout(function(){l(a,{deltaFactor:1})},25)})),o.right.on("mousedown",function(t){e(n)}),o.right.on("mouseup",function(t){h(n)}),o.left.on("mousedown",function(t){i(n)}),o.left.on("mouseup",function(t){h(n)}),o.up.on("mousedown",function(t){s(n)}),o.up.on("mouseup",function(t){h(n)}),o.down.on("mousedown",function(t){r(n)}),o.down.on("mouseup",function(t){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(t){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(t){h(n)}),o.zoomout.on("mousedown",function(t){u(n)}),o.zoomout.on("mouseup",function(t){h(n)}),o.isLightbox&&(p("body").on("quitimage",function(t){var a;a=n,wppaConsoleLog("Zoom Quit Image"),o=l(a,{abort:!0}),p(o.canvas).hide(),p("#wppa-pctl-div-"+o.itemId).hide()}),p("#wppa-pctl-div-"+o.itemId).on("click",function(t){wppaKillEvent(t)})),o.isLightbox?(p(window).off("resize",wppaOvlShowSame),p(window).on("resize",wppaOvlShowSame)):p(window).on("resize",function(t){a(n)}),a(n),o.initialized=!0,l(n,o),p("#wppa-ovl-spin").hide(),wppaProtect()}function m(t){var a,n,o,e,i,s=l(t);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+t):(l(t,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+t+" "+wppaDebugCounter),(s=l(t,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,a=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<a&&1!=s.deltaFactor&&(wppaIsFs()||a<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(a-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=a):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&a>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(t,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){m(t)},10),s.pause&&l(t,{pause:!1}))))}function a(t){var a,n,o,e,i,s,r,c,d,u=l(t);u&&(u.isLightbox?(p("#wppa-overlay-pc").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,a=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&a&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!a&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&a&&(i=(s=screen.height)*u.imageRatio,r=0),n||a||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),p("#wppa-ovl-pan-container").css({top:r,width:i}),p("#wppa-overlay-pc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(p("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),a?p("#wppa-overlay-pc").css({left:4}):p("#wppa-overlay-pc").css({left:(o-i)/2})):(p("#wppa-overlay-pc").css({marginLeft:0}),p("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=p(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(t,u),setTimeout(function(){m(t)},250),p("#wppa-ovl-pan-container").show())}function e(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),m(t)}function i(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),m(t)}function s(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),m(t)}function r(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),m(t)}function c(t){l(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),m(t)}function u(t){l(t,{deltaFactor:.995,buttondown:!0,manual:!1}),m(t)}function h(t){l(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(t,a){var n=l(t),o=v(a).X,e=v(a).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(t,{manual:!0,savedCanvasX:o=b(t,a).X,savedCanvasY:e=b(t,a).Y,buttondown:!1}),m(t))}function w(t,a){var n,o=l(t),e=b(t,a).X,i=b(t,a).Y;o.manual&&(n=o.canvas.width/o.fromWidth,a=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<a&&0<n&&a+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(t,{fromX:a,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function g(t){l(t,{manual:!1})}function l(t,a){if(!wppaZoomData[t])return!1;if(a)for(var n in a)wppaZoomData[t][n]=a[n];return wppaZoomData[t]}function v(t){var a;return t=t.touches?(a=t.touches[0].screenX,t.touches[0].screenY):(a=t.screenX,t.screenY),{X:a,Y:t}}function b(t,a){var n;return a=a.touches?(t=l(t),n=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(n=a.offsetX,a.offsetY),{X:n,Y:a}}function L(){return d=new Date,d.getTime()}}
17
  // wppa-spheric
18
+ var wppaJsSphericVersion="8.0.00.012";function wppaDoSphericPan(t,n){var c=jQuery;n&&(wppaSphericData[t]=n);var s=f(t,s);if(!s.initialized&&!s.abort&&(!s.isLightbox||wppaOvlOpen)){if(!s.isLightbox&&!wppaIsElementInViewport(c("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&(c("#wppa-ovl-spin").show(),c("#wppa-overlay-ic").html("")),s.manCtrl=!1,s.butDown=!1,s.lon=180,s.lat=0,s.dFov=0,s.abort=!1,s.aspect=2,s.div=c("#wppa-pan-div-"+t),s.left=c("#wppa-pctl-left-"+t),s.right=c("#wppa-pctl-right-"+t),s.up=c("#wppa-pctl-up-"+t),s.down=c("#wppa-pctl-down-"+t),s.zoomin=c("#wppa-pctl-zoomin-"+t),s.zoomout=c("#wppa-pctl-zoomout-"+t),s.prev=c("#wppa-pctl-prev-"+t),s.next=c("#wppa-pctl-next-"+t),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),c(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),c(s.div).append(s.wppaRenderer.domElement),s.wppaScene=new THREE.Scene,s.wppaSphere=new THREE.SphereGeometry(100,100,40),s.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),s.texture=(new THREE.TextureLoader).load(s.url),s.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:s.texture}),s.wppaSphereMesh=new THREE.Mesh(s.wppaSphere,s.wppaSphereMaterial),s.wppaScene.add(s.wppaSphereMesh),s.right.on("touchstart",function(n){u(t)}),s.right.on("touchend",function(n){v(t)}),s.left.on("touchstart",function(n){l(t)}),s.left.on("touchend",function(n){v(t)}),s.up.on("touchstart",function(n){h(t)}),s.up.on("touchend",function(n){v(t)}),s.down.on("touchstart",function(n){m(t)}),s.down.on("touchend",function(n){v(t)}),s.zoomin.on("touchstart",function(n){i(t)}),s.zoomin.on("touchend",function(n){v(t)}),s.zoomout.on("touchstart",function(n){r(t)}),s.zoomout.on("touchend",function(n){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(n){a(t,n)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(n){o(t,n)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(n){p(t)})),s.right.on("mousedown",function(n){u(t)}),s.right.on("mouseup",function(n){v(t)}),s.left.on("mousedown",function(n){l(t)}),s.left.on("mouseup",function(n){v(t)}),s.up.on("mousedown",function(n){h(t)}),s.up.on("mouseup",function(n){v(t)}),s.down.on("mousedown",function(n){m(t)}),s.down.on("mouseup",function(n){v(t)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(n){i(t)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(n){v(t)}),s.zoomout.on("mousedown",function(n){r(t)}),s.zoomout.on("mouseup",function(n){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas").on("mousedown",function(n){a(t,n)}),c("#wppa-pan-div-"+t+" canvas").on("mousemove",function(n){o(t,n)}),c("#wppa-pan-div-"+t+" canvas").on("mouseup",function(n){p(t)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(n){var e;e=t,(n=n).preventDefault(),n.stopPropagation(),s=f(e),f(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*s.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){f(e,{dFov:0})},25)})),s.isLightbox&&(c("body").on("quitimage",function(n){var e;s=f(e=t,{abort:!0,autorun:!1}),clearTimeout(s.timer),clearInterval(s.intervalTimer),c("#wppa-pan-div-"+e+" canvas").hide(),c("#wppa-pctl-div-"+e).hide()}),c("#wppa-pctl-div-"+t).on("click",function(n){wppaKillEvent(n)})),f(t,s),s.isLightbox?(c(window).off("wpparesizeend",wppaOvlShowSame),c(window).on("wpparesizeend",wppaOvlShowSame)):c(window).on("wpparesizeend",function(n){e(t)}),wppaProtect(),c(document).on("tabbychange",function(n){var e;e=t,s.wppaRenderer.state.reset(),s=f(e,{initialized:!1,abort:!0}),setTimeout(function(){f(e,{abort:!1}),wppaDoSphericPan(e)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+e)}),e(t),s.intervalTimer=setInterval(function(){e(t)},1e3)}function w(n){var e=f(n),t=wppaIsElementInViewport(c("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25)){if(!t)return!(b()<e.vtime+1e3)&&(setTimeout(function(){w(n)},1e3),void f(n,{vtime:b()}));f(n,{time:b()}),e.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0),e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),c("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),f(n,e))}}function e(n){var e=!wppaIsFs();if(s=f(n)){if(s.isLightbox){if(!wppaOvlOpen)return;c("#wppa-overlay-pc").css("display",""),c("#wppa-overlay-pc").css("width","");var t,a,o=(e=!wppaIsFs())?(a=window.innerWidth||screen.width,window.innerHeight||screen.height):(a=screen.width,screen.height),p=8,i=8+(s.controls?s.icsize+10:0)+30;e&&(p+=2*s.borderWidth,i+=2*s.borderWidth),t=(a-p)/2+i<o,i=e?t?(o-(u=(r=a-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),s.aspect=r/u,c("#wppa-ovl-pan-container").css({top:i}),c("#wppa-overlay-pc").css({top:0}),e?(c("#wppa-ovl-pan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:r}),t?c("#wppa-overlay-pc").css({left:4}):c("#wppa-overlay-pc").css({left:(a-r)/2})):c("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(a-r)/2}),s.wppaRenderer.setSize(r,u)}else{var r=c(s.div).parent().width(),u=parseInt(r/2);if(!s.wppaRenderer)return;s.wppaRenderer.setSize(r,u)}s.width=r,s.height=u,f(n,s),s.timer=setTimeout(function(){w(n)},250)}}function a(n,e){e.preventDefault(),e.stopPropagation(),s=f(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),e.touches?f(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):f(n,{sX:e.clientX,sY:e.clientY}),f(n,{sLon:s.lon,sLat:s.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(s=f(n)).manCtrl&&(e.touches?f(n,{lon:.1*(s.sX-e.touches[0].clientX)+s.sLon,lat:.1*(e.touches[0].clientY-s.sY)+s.sLat,pause:!1}):f(n,{lon:.1*(s.sX-e.clientX)+s.sLon,lat:.1*(e.clientY-s.sY)+s.sLat,pause:!1}),w(n))}function p(n){f(n,{manCtrl:!1})}function i(n){s=f(n),f(n,{dFov:-.4*s.mFakt,butDown:!0}),w(n)}function r(n){s=f(n),f(n,{dFov:.4*s.mFakt,butDown:!0}),w(n)}function u(n){s=f(n),f(n,{dX:.2*s.mFakt,butDown:!0}),w(n)}function l(n){s=f(n),f(n,{dX:-.2*s.mFakt,butDown:!0}),w(n)}function h(n){s=f(n),f(n,{dY:.2*s.mFakt,butDown:!0}),w(n)}function m(n){s=f(n),f(n,{dY:-.2*s.mFakt,butDown:!0}),w(n)}function v(n){s=f(n),f(n,{dX:0,dY:0,dFov:0,butDown:!1})}function f(n,e){if(!wppaSphericData[n])return!1;if(e)for(var t in e)wppaSphericData[n][t]=e[t];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}}
js/wppa-lightbox.js CHANGED
@@ -4,7 +4,7 @@
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
  //
7
- var wppaJsLightboxVersion = '7.7.03.001';
8
 
9
  // Global inits
10
  var wppaIsVideo = false;
@@ -103,10 +103,6 @@ function wppaOvlShow( arg ) {
103
  // Panorama requires image container top=0 left=0
104
  // Non panorama: 50%
105
  if ( wppaOvlActivePanorama > 0 ) {
106
- // $( '#wppa-overlay-ic' ).css({top:0,left:0}); // not here yet
107
- }
108
- else {
109
- $( '#wppa-overlay-ic' ).css({top:'50%',left:'50%'});
110
  }
111
 
112
  // Make sure background is present
@@ -293,6 +289,8 @@ function _wppaOvlShow( idx ) {
293
 
294
  var $ = jQuery;
295
 
 
 
296
  // Globalize index
297
  wppaOvlCurIdx = idx;
298
  // wppaConsoleLog( 'Current index = ' + wppaOvlCurIdx );
@@ -346,13 +344,7 @@ function _wppaOvlShow( idx ) {
346
  // Panorama requires image container top=0 left=0
347
  // Non panorama: 50%
348
  wppaOvlActivePanorama = wppaOvlPanoramaIds[idx];
349
- if ( wppaOvlActivePanorama ) { //wppaOvlPanoramaIds[idx] > 0 ) {
350
- // wppaOvlActivePanorama = wppaOvlPanoramaIds[idx];
351
- $( '#wppa-overlay-ic' ).css({top:0,left:0});
352
- }
353
- else {
354
- // wppaOvlActivePanorama = 0;
355
- $( '#wppa-overlay-ic' ).css({top:'50%',left:'50%',display:'block'});
356
  }
357
 
358
  // Fullsize?
@@ -453,7 +445,14 @@ function _wppaOvlShow( idx ) {
453
  if ( ( ! wppaIsVideo && ! wppaHasAudio ) || wppaOvlFsPhotoId != wppaPhotoId || wppaPhotoId == 0 ) {
454
  wppaStopVideo( 0 );
455
  wppaStopAudio();
456
- $( '#wppa-overlay-ic' ).html( html );
 
 
 
 
 
 
 
457
  }
458
 
459
  // If panorama and single, hide panorama browse buttons
@@ -497,11 +496,13 @@ function _wppaOvlShow( idx ) {
497
  var showNav = wppaOvlUrls.length > 1;
498
 
499
  // Initial sizing of image container ( contains image, borders and subtext )
500
- $( '#wppa-overlay-ic' ).css( {
 
501
  width:wppaSavedContainerWidth,
502
  marginLeft:wppaSavedMarginLeft,
503
  marginTop:wppaSavedMarginTop,
504
  });
 
505
 
506
  // Make the html
507
  var html = '';
@@ -688,7 +689,14 @@ function _wppaOvlShow( idx ) {
688
  '</div>';
689
 
690
  // Insert the html
691
- $( '#wppa-overlay-ic' ).html( html );
 
 
 
 
 
 
 
692
 
693
  // Restore opacity of fs and exit buttons
694
  wppaFsShow();
@@ -921,6 +929,7 @@ function wppaOvlFormatFull() {
921
  $( '#wppa-ovl-full-bg' ).scrollLeft( scrollLeft );
922
  $( '#wppa-ovl-spin' ).hide();
923
  $('#wppa-ovl-full-bg').css({visibility:'hidden'});
 
924
  // Add navbar
925
  html = $( '#wppa-overlay-ic' ).html();
926
  html += '<div style="position:fixed;bottom:0;left:0;right:0;" >' + wppaOvlNavBar() + '</div>';
@@ -1124,7 +1133,9 @@ function wppaOvlHide(keepState) {
1124
  // setTimeout( function(){
1125
  // Clear image container
1126
  $( '#wppa-overlay-ic' ).html( '' );
1127
- $( '#wppa-overlay-ic' ).hide();
 
 
1128
 
1129
  // // Remove background optionally
1130
  // if ( ! keepState ) $( '#wppa-overlay-bg' ).hide();
@@ -1281,10 +1292,8 @@ function wppaInitOverlay() {
1281
  }
1282
  }
1283
 
1284
- // Install orientationchange handler if mobile
1285
- if ( wppaIsMobile ) {
1286
- window.addEventListener( 'orientationchange', wppaOvlShowSame);
1287
- }
1288
 
1289
  // Install fullscreen navigation bar positioning
1290
  $(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaAdjustControlbar );
@@ -1326,9 +1335,6 @@ function wppaOvlImgClick( event ) {
1326
  // Make the navbar html
1327
  function wppaOvlNavBar() {
1328
 
1329
- // Mobile?
1330
- var e = wppaIsMobile ? 'ontouchstart' : 'onclick';
1331
-
1332
  // Init
1333
  var html = '';
1334
 
@@ -1339,7 +1345,7 @@ function wppaOvlNavBar() {
1339
  '<span' +
1340
  ' id="wppa-ovl-prev-btn"' +
1341
  ' style="margin:0 2px 0 0;float:left;display:block;"' +
1342
- ' ' + e + '="wppaOvlShowPrev()"' +
1343
  ' >' +
1344
  wppaSvgHtml( 'Prev-Button', wppaOvlIconSize, true, true ) +
1345
  '</span>' +
@@ -1347,7 +1353,7 @@ function wppaOvlNavBar() {
1347
  ' id="wppa-ovl-start-btn"' +
1348
  ' style="margin:0 2px;float:left;display:' + ( wppaOvlRunning ? 'none' : 'block' ) + ';"' +
1349
  ' title="Start"' +
1350
- ' ' + e + '="wppaOvlStartStop()"' +
1351
  ' >' +
1352
  wppaSvgHtml( 'Play-Button', wppaOvlIconSize, true, true ) +
1353
  '</span>' +
@@ -1355,7 +1361,7 @@ function wppaOvlNavBar() {
1355
  ' id="wppa-ovl-stop-btn"' +
1356
  ' style="margin:0 2px;float:left;display:' + ( wppaOvlRunning ? 'block' : 'none' ) + ';"' +
1357
  ' title="Stop"' +
1358
- ' ' + e + '="wppaOvlStartStop()"' +
1359
  ' >' +
1360
  wppaSvgHtml( 'Pause-Button', wppaOvlIconSize, true, true ) +
1361
  '</span>';
@@ -1364,7 +1370,7 @@ function wppaOvlNavBar() {
1364
  '<span' +
1365
  ' id="wppa-ovl-next-btn"' +
1366
  ' style="margin:0 2px;float:right;display:block;"' +
1367
- ' ' + e + '="wppaOvlShowNext()"' +
1368
  ' >' +
1369
  wppaSvgHtml( 'Next-Button', wppaOvlIconSize, true, true ) +
1370
  '</span>';
@@ -1377,7 +1383,7 @@ function wppaOvlNavBar() {
1377
  ' id="wppa-exit-btn-2"' +
1378
  ' style="margin:0 2px;float:right;display:block;"' +
1379
  ' title="Exit"' +
1380
- ' ' + e + '="wppaOvlHide()"' +
1381
  ' >' +
1382
  wppaSvgHtml( 'Exit-2', wppaOvlIconSize, true, true ) +
1383
  '</span>';
@@ -1390,7 +1396,7 @@ function wppaOvlNavBar() {
1390
  ' class="wppa-fulls-btn"' +
1391
  ' style="margin:0 2px;float:right;display:none;"' +
1392
  ' title="Enter fullscreen"' +
1393
- ' ' + e + '="wppaFsOn()"' +
1394
  ' >' +
1395
  wppaSvgHtml( 'Full-Screen-2', wppaOvlIconSize, true, true ) +
1396
  '</span>' +
@@ -1399,7 +1405,7 @@ function wppaOvlNavBar() {
1399
  ' class="wppa-exit-fulls-btn"' +
1400
  ' style="margin:0 2px;float:right;display:none;"' +
1401
  ' title="Leave fullscreen"' +
1402
- ' ' + e + '="wppaFsOff()"' +
1403
  ' >' +
1404
  wppaSvgHtml( 'Exit-Full-Screen-2', wppaOvlIconSize, true, true ) +
1405
  '</span>';
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
  //
7
+ var wppaJsLightboxVersion = '8.0.00.012';
8
 
9
  // Global inits
10
  var wppaIsVideo = false;
103
  // Panorama requires image container top=0 left=0
104
  // Non panorama: 50%
105
  if ( wppaOvlActivePanorama > 0 ) {
 
 
 
 
106
  }
107
 
108
  // Make sure background is present
289
 
290
  var $ = jQuery;
291
 
292
+ $( '#wppa-overlay-pc' ).html( '' );
293
+
294
  // Globalize index
295
  wppaOvlCurIdx = idx;
296
  // wppaConsoleLog( 'Current index = ' + wppaOvlCurIdx );
344
  // Panorama requires image container top=0 left=0
345
  // Non panorama: 50%
346
  wppaOvlActivePanorama = wppaOvlPanoramaIds[idx];
347
+ if ( wppaOvlActivePanorama ) {
 
 
 
 
 
 
348
  }
349
 
350
  // Fullsize?
445
  if ( ( ! wppaIsVideo && ! wppaHasAudio ) || wppaOvlFsPhotoId != wppaPhotoId || wppaPhotoId == 0 ) {
446
  wppaStopVideo( 0 );
447
  wppaStopAudio();
448
+ if ( wppaOvlActivePanorama == 0 ) {
449
+ $( '#wppa-overlay-ic' ).html( html );
450
+ $( '#wppa-overlay-pc' ).html( '' );
451
+ }
452
+ else {
453
+ $( '#wppa-overlay-pc' ).html( html );
454
+ $( '#wppa-overlay-ic' ).html( '' );
455
+ }
456
  }
457
 
458
  // If panorama and single, hide panorama browse buttons
496
  var showNav = wppaOvlUrls.length > 1;
497
 
498
  // Initial sizing of image container ( contains image, borders and subtext )
499
+ if ( wppaOvlActivePanorama == 0 ) {
500
+ $( '#wppa-overlay-ic' ).css( {
501
  width:wppaSavedContainerWidth,
502
  marginLeft:wppaSavedMarginLeft,
503
  marginTop:wppaSavedMarginTop,
504
  });
505
+ }
506
 
507
  // Make the html
508
  var html = '';
689
  '</div>';
690
 
691
  // Insert the html
692
+ if ( wppaOvlActivePanorama == 0 ) {
693
+ $( '#wppa-overlay-ic' ).html( html );
694
+ // $( '#wppa-overlay-pc' ).html( '' );
695
+ }
696
+ else {
697
+ $( '#wppa-overlay-pc' ).html( html );
698
+ // $( '#wppa-overlay-ic' ).html( '' );
699
+ }
700
 
701
  // Restore opacity of fs and exit buttons
702
  wppaFsShow();
929
  $( '#wppa-ovl-full-bg' ).scrollLeft( scrollLeft );
930
  $( '#wppa-ovl-spin' ).hide();
931
  $('#wppa-ovl-full-bg').css({visibility:'hidden'});
932
+
933
  // Add navbar
934
  html = $( '#wppa-overlay-ic' ).html();
935
  html += '<div style="position:fixed;bottom:0;left:0;right:0;" >' + wppaOvlNavBar() + '</div>';
1133
  // setTimeout( function(){
1134
  // Clear image container
1135
  $( '#wppa-overlay-ic' ).html( '' );
1136
+ // $( '#wppa-overlay-ic' ).hide();
1137
+ $( '#wppa-overlay-pc' ).html( '' );
1138
+ // $( '#wppa-overlay-pc' ).hide();
1139
 
1140
  // // Remove background optionally
1141
  // if ( ! keepState ) $( '#wppa-overlay-bg' ).hide();
1292
  }
1293
  }
1294
 
1295
+ // Install orientationchange handler
1296
+ window.addEventListener( 'orientationchange', wppaOvlShowSame);
 
 
1297
 
1298
  // Install fullscreen navigation bar positioning
1299
  $(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaAdjustControlbar );
1335
  // Make the navbar html
1336
  function wppaOvlNavBar() {
1337
 
 
 
 
1338
  // Init
1339
  var html = '';
1340
 
1345
  '<span' +
1346
  ' id="wppa-ovl-prev-btn"' +
1347
  ' style="margin:0 2px 0 0;float:left;display:block;"' +
1348
+ ' onclick="wppaOvlShowPrev()"' +
1349
  ' >' +
1350
  wppaSvgHtml( 'Prev-Button', wppaOvlIconSize, true, true ) +
1351
  '</span>' +
1353
  ' id="wppa-ovl-start-btn"' +
1354
  ' style="margin:0 2px;float:left;display:' + ( wppaOvlRunning ? 'none' : 'block' ) + ';"' +
1355
  ' title="Start"' +
1356
+ ' onclick="wppaOvlStartStop()"' +
1357
  ' >' +
1358
  wppaSvgHtml( 'Play-Button', wppaOvlIconSize, true, true ) +
1359
  '</span>' +
1361
  ' id="wppa-ovl-stop-btn"' +
1362
  ' style="margin:0 2px;float:left;display:' + ( wppaOvlRunning ? 'block' : 'none' ) + ';"' +
1363
  ' title="Stop"' +
1364
+ ' onclick="wppaOvlStartStop()"' +
1365
  ' >' +
1366
  wppaSvgHtml( 'Pause-Button', wppaOvlIconSize, true, true ) +
1367
  '</span>';
1370
  '<span' +
1371
  ' id="wppa-ovl-next-btn"' +
1372
  ' style="margin:0 2px;float:right;display:block;"' +
1373
+ ' onclick="wppaOvlShowNext()"' +
1374
  ' >' +
1375
  wppaSvgHtml( 'Next-Button', wppaOvlIconSize, true, true ) +
1376
  '</span>';
1383
  ' id="wppa-exit-btn-2"' +
1384
  ' style="margin:0 2px;float:right;display:block;"' +
1385
  ' title="Exit"' +
1386
+ ' onclick="wppaOvlHide()"' +
1387
  ' >' +
1388
  wppaSvgHtml( 'Exit-2', wppaOvlIconSize, true, true ) +
1389
  '</span>';
1396
  ' class="wppa-fulls-btn"' +
1397
  ' style="margin:0 2px;float:right;display:none;"' +
1398
  ' title="Enter fullscreen"' +
1399
+ ' onclick="wppaFsOn()"' +
1400
  ' >' +
1401
  wppaSvgHtml( 'Full-Screen-2', wppaOvlIconSize, true, true ) +
1402
  '</span>' +
1405
  ' class="wppa-exit-fulls-btn"' +
1406
  ' style="margin:0 2px;float:right;display:none;"' +
1407
  ' title="Leave fullscreen"' +
1408
+ ' onclick="wppaFsOff()"' +
1409
  ' >' +
1410
  wppaSvgHtml( 'Exit-Full-Screen-2', wppaOvlIconSize, true, true ) +
1411
  '</span>';
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="7.7.03.001",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(0<wppaOvlActivePanorama||e("#wppa-overlay-ic").css({top:"50%",left:"50%"}),e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,d=0;d<n.length;d++)1<(l=!!e(o=n[d]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama?p("#wppa-overlay-ic").css({top:0,left:0}):p("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"}),wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),p("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",p("#wppa-overlay-ic").html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-ic").hide(),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaOvlShowSame),e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a=wppaIsMobile?"ontouchstart":"onclick",p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" '+a+'="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" '+a+'="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" '+a+'="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" '+a+'="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" '+a+'="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(p+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" '+a+'="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" '+a+'="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.012",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}window.addEventListener("orientationchange",wppaOvlShowSame),e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
js/wppa-slideshow.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsSlideshowVersion = '7.7.07.003';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -1474,8 +1474,8 @@ function _wppaAdjustFilmstrip( mocc, easing ) {
1474
  _wppaFilmNoMove[mocc] = false; // reset
1475
  }
1476
 
1477
- // Make lazy filmthumbs visible; use extended area
1478
- wppaMakeLazyVisible(mocc, true);
1479
 
1480
  // Fix titles
1481
  if ( ! isFilmOnly && _wppaCurIdx[mocc] != -1 ) {
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '8.0.00.006';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
1474
  _wppaFilmNoMove[mocc] = false; // reset
1475
  }
1476
 
1477
+ // Make lazy filmthumbs visible
1478
+ wppaMakeLazyVisible('filmstripmocc='+mocc);
1479
 
1480
  // Fix titles
1481
  if ( ! isFilmOnly && _wppaCurIdx[mocc] != -1 ) {
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSlideshowVersion="7.7.07.003";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),S="default",""!=c?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(R="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+R+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=y,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(_wppaStopping[p])_wppaStopping[p]=0;else{if(!e&&!wppaIsSlidshowVisible(p))return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+t+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(n=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",n,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",n,!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,e,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(a=_wppaDsc[p][_wppaCurIdx[p]])||"&nbsp;"==a?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])),_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var i=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(i=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(t=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<t.length&&"hidden"!=jQuery(t).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<e.length?setTimeout(function(){jQuery(e).trigger("click")},wppaGetSlideshowTimeout(p)):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(t=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((t=t[t.length-1])&&(wppaAudioPlaying[p]||t.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,g,x,f,e=wppaStretch;if(u)j=w-d,h=y=0,x=S=w,f=g=(c=parseInt(j*n/o))+d,jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c});else{if(s<(x=w)&&(x=s),S=x,g=f=parseInt(x*l),e||x-d<=o||f-d<=n?l<(n+d)/(o+d)?(c=f-d,j=parseInt(c*o/n)):(j=x-d,c=parseInt(j*n/o)):(j=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":h=0;break;case"center":h=parseInt((f-(c+d))/2);break;case"bottom":h=f-(c+d);break;case"fit":h=0,g=f=c+d}jQuery("#"+a).css({marginTop:h,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-x)/2);break;case"right":y=w-x}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var i=jQuery(r).height(),I=(x-j)/2;i&&0<i&&(wppaAudioHeight=i,jQuery(r).css({height:wppaAudioHeight,width:j,left:I}))}var j=parseInt(x/3),I=2*j,r=0<r.length?f-wppaAudioHeight-wppaSlideBorderWidth-h:f;jQuery("#bbb-"+p+"-l").css({height:r,width:j,left:0}),jQuery("#bbb-"+p+"-r").css({height:r,width:j,left:I})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if("void"==_wppaFullNames[p][_wppaCurIdx[p]])return jQuery("#namebox-"+p).hide(),"";if(jQuery("#namebox-"+p).show(),wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w+"px"}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible(p,!0),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var n=0;n<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}r||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?jQuery("#wppa-next-pagelink-"+p).trigger("click"):0<e.length&&jQuery(e).trigger("click")):_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e;document.getElementById("wppa-filmstrip-"+p)&&((e=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=e&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(e>i-1&&e<i&&(r+="&nbsp;( "+e+" )&nbsp;"),r+='<span class="wppa-rating-numeric" style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(r)}0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(a+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t,i="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(i).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(i).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":if(wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a){if(!wppaSlideWrap[p])return void wppaPrev(p);(t=_wppaCurIdx[p]-1)<0&&(t=_wppaSlides[p].length-1)}if("r"==a){if(!wppaSlideWrap[p])return void wppaNext(p);(t=_wppaCurIdx[p]+1)==_wppaSlides[p].length&&(t=0)}wppaGotoKeepState(p,t);break;default:alert("Unimplemented instruction: "+e+" on: "+i)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}
1
+ var wppaJsSlideshowVersion="8.0.00.006";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),S="default",""!=c?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(R="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+R+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=y,""!=h?_wppaLinkTarget[p][a]=h:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(_wppaStopping[p])_wppaStopping[p]=0;else{if(!e&&!wppaIsSlidshowVisible(p))return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if(wppaStopVideo(p),wppaStopAudio(p),"auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+t+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],n=(wppaNumbarMax-1)/2;o<n?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-n<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+n+.5-1,(i=o-n+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var l=0;l<_wppaSlides[p].length;)0!=l&&l!=r&&(l<i||w<l)?jQuery("#wppa-numbar-"+p+"-"+l).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+l).css({display:"block"}),l++}_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(n=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",n,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",n,!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,e,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(a=_wppaDsc[p][_wppaCurIdx[p]])||"&nbsp;"==a?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])),_wppaToTheSame=!1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var i=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(i=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(t=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<t.length&&"hidden"!=jQuery(t).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<e.length?setTimeout(function(){jQuery(e).trigger("click")},wppaGetSlideshowTimeout(p)):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(t=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((t=t[t.length-1])&&(wppaAudioPlaying[p]||t.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,g,x,f,e=wppaStretch;if(u)j=w-d,h=y=0,x=S=w,f=g=(c=parseInt(j*n/o))+d,jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c});else{if(s<(x=w)&&(x=s),S=x,g=f=parseInt(x*l),e||x-d<=o||f-d<=n?l<(n+d)/(o+d)?(c=f-d,j=parseInt(c*o/n)):(j=x-d,c=parseInt(j*n/o)):(j=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":h=0;break;case"center":h=parseInt((f-(c+d))/2);break;case"bottom":h=f-(c+d);break;case"fit":h=0,g=f=c+d}jQuery("#"+a).css({marginTop:h,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:j,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-x)/2);break;case"right":y=w-x}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var i=jQuery(r).height(),I=(x-j)/2;i&&0<i&&(wppaAudioHeight=i,jQuery(r).css({height:wppaAudioHeight,width:j,left:I}))}var j=parseInt(x/3),I=2*j,r=0<r.length?f-wppaAudioHeight-wppaSlideBorderWidth-h:f;jQuery("#bbb-"+p+"-l").css({height:r,width:j,left:0}),jQuery("#bbb-"+p+"-r").css({height:r,width:j,left:I})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if("void"==_wppaFullNames[p][_wppaCurIdx[p]])return jQuery("#namebox-"+p).hide(),"";if(jQuery("#namebox-"+p).show(),wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w+"px"}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible("filmstripmocc="+p),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var n=0;n<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][n]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+n+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+n+"-"+p).attr("title",jQuery("#wppa-film-"+n+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==n?(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]),jQuery("#wppa-pre-"+n+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][n]))),n++}r||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?jQuery("#wppa-next-pagelink-"+p).trigger("click"):0<e.length&&jQuery(e).trigger("click")):_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e;document.getElementById("wppa-filmstrip-"+p)&&((e=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=e&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(e>i-1&&e<i&&(r+="&nbsp;( "+e+" )&nbsp;"),r+='<span class="wppa-rating-numeric" style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" >&nbsp;'+i+"&nbsp;</span>");jQuery("#wppa-numrate-mine-"+p).html(r)}0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(a+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t,i="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(i).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(i).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":if(wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a){if(!wppaSlideWrap[p])return void wppaPrev(p);(t=_wppaCurIdx[p]-1)<0&&(t=_wppaSlides[p].length-1)}if("r"==a){if(!wppaSlideWrap[p])return void wppaNext(p);(t=_wppaCurIdx[p]+1)==_wppaSlides[p].length&&(t=0)}wppaGotoKeepState(p,t);break;default:alert("Unimplemented instruction: "+e+" on: "+i)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden"))}function wppaGetSlideshowTimeout(p){var a,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}
js/wppa-spheric.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsSphericVersion = '7.7.06.006';
6
 
7
  // The main proccedure
8
  function wppaDoSphericPan(mocc, xdata) {
@@ -41,6 +41,9 @@ function wppaDoSphericPan(mocc, xdata) {
41
  // If lightbox, show spinner
42
  if ( data.isLightbox && wppaOvlOpen ) {
43
  $("#wppa-ovl-spin").show();
 
 
 
44
  }
45
 
46
  // Find additional data
@@ -86,7 +89,6 @@ function wppaDoSphericPan(mocc, xdata) {
86
  data.wppaSphereMesh = new THREE.Mesh(data.wppaSphere, data.wppaSphereMaterial);
87
  data.wppaScene.add(data.wppaSphereMesh);
88
 
89
- if ( wppaIsMobile ) {
90
 
91
  data.right.on("touchstart", function(e){rDown(mocc,e)});
92
  data.right.on("touchend", function(e){bUp(mocc,e)});
@@ -107,8 +109,6 @@ function wppaDoSphericPan(mocc, xdata) {
107
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchmove", function(e){onMm(mocc,e)});
108
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchend", function(e){onMe(mocc,e)});
109
  }
110
- }
111
- else {
112
 
113
  data.right.on("mousedown", function(e){rDown(mocc,e)});
114
  data.right.on("mouseup", function(e){bUp(mocc,e)});
@@ -132,7 +132,7 @@ function wppaDoSphericPan(mocc, xdata) {
132
  $("#wppa-pan-div-"+mocc+" canvas").on("mouseup", function(e){onMe(mocc,e)});
133
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("wheel", function(e){onDivWheel(mocc,e)});
134
  }
135
- }
136
 
137
  if ( data.isLightbox ) {
138
  $("body").on("quitimage", function(e){quitImage(mocc,e)});
@@ -157,6 +157,10 @@ function wppaDoSphericPan(mocc, xdata) {
157
  $(document).on("tabbychange",function(e){tabbyChange(mocc,e)});
158
 
159
  resize(mocc);
 
 
 
 
160
 
161
  function render(mocc){
162
 
@@ -243,8 +247,8 @@ function wppaDoSphericPan(mocc, xdata) {
243
 
244
  if ( ! wppaOvlOpen ) return;
245
 
246
- $("#wppa-overlay-ic").css("display", "");
247
- $("#wppa-overlay-ic").css("width", "");
248
 
249
  var widthIsLim, modeIsNormal = ! wppaIsFs();
250
 
@@ -297,7 +301,7 @@ function wppaDoSphericPan(mocc, xdata) {
297
 
298
  // Set css common for all 4 situations
299
  $("#wppa-ovl-pan-container").css({top:topMarg});
300
- $("#wppa-overlay-ic").css({top:0});
301
 
302
  // Now set css for all 4 situations: Mode is normal
303
  if ( modeIsNormal ) {
@@ -307,17 +311,15 @@ function wppaDoSphericPan(mocc, xdata) {
307
  backgroundColor:data.backgroundColor,
308
  padding:data.padding+"px",
309
  borderRadius:data.borderRadius+"px",
310
- width:newWidth,
311
- marginLeft:0
312
  });
313
- // $( "#wppa-pctl-div-"+mocc ).css({marginLeft:0});
314
 
315
  // Limit specific
316
  if ( widthIsLim ) {
317
- $("#wppa-overlay-ic").css({left:4,marginLeft:0});
318
  }
319
  else {
320
- $("#wppa-overlay-ic").css({left:(contWidth-newWidth)/2,marginLeft:0});
321
  }
322
  }
323
 
@@ -325,7 +327,6 @@ function wppaDoSphericPan(mocc, xdata) {
325
  else {
326
 
327
  // Common for mode fullscreen
328
- $("#wppa-overlay-ic").css({marginLeft:0});
329
  $("#wppa-ovl-pan-container").css({
330
  backgroundColor:"transparent",
331
  padding:0,
@@ -334,12 +335,6 @@ function wppaDoSphericPan(mocc, xdata) {
334
  left:(contWidth-newWidth)/2
335
  });
336
 
337
- if ( widthIsLim ) {
338
- // $("#wppa-pctl-div-"+mocc).css({marginLeft:0});
339
- }
340
- else {
341
- // $("#wppa-pctl-div-"+mocc).css({marginLeft:0});
342
- }
343
  }
344
 
345
  data.wppaRenderer.setSize(newWidth, newHeight);
@@ -367,14 +362,14 @@ function wppaDoSphericPan(mocc, xdata) {
367
  // Previous / next on lightbox
368
  /*
369
  function panPrev(e) {
370
- $("#wppa-overlay-ic").css({display:"none"});
371
  $("#wppa-ovl-spin").show();
372
  update(mocc,{abort:true});
373
  $("body").trigger("quitimage");
374
  wppaOvlShowPrev();
375
  }
376
  function panNext(e) {
377
- $("#wppa-overlay-ic").css({display:"none"});
378
  $("#wppa-ovl-spin").show();
379
  update(mocc,{abort:true});
380
  $("body").trigger("quitimage");
@@ -409,7 +404,7 @@ function wppaDoSphericPan(mocc, xdata) {
409
  autorun :false,
410
  dX :0
411
  });
412
- if ( wppaIsMobile ) {
413
  update(mocc,{
414
  sX :e.touches[0].clientX,
415
  sY :e.touches[0].clientY
@@ -432,7 +427,7 @@ function wppaDoSphericPan(mocc, xdata) {
432
  e.stopPropagation();
433
  data = update(mocc);
434
  if ( data.manCtrl ) {
435
- if ( wppaIsMobile ) {
436
  update(mocc,{
437
  lon :(data.sX - e.touches[0].clientX) * 0.1 + data.sLon,
438
  lat :(e.touches[0].clientY - data.sY) * 0.1 + data.sLat,
@@ -551,6 +546,7 @@ function wppaDoSphericPan(mocc, xdata) {
551
  autorun:false
552
  });
553
  clearTimeout(data.timer);
 
554
  $("#wppa-pan-div-"+mocc+" canvas").hide();
555
  $("#wppa-pctl-div-"+mocc).hide();
556
  // data.wppaRenderer.state.reset();
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
+ var wppaJsSphericVersion = '8.0.00.012';
6
 
7
  // The main proccedure
8
  function wppaDoSphericPan(mocc, xdata) {
41
  // If lightbox, show spinner
42
  if ( data.isLightbox && wppaOvlOpen ) {
43
  $("#wppa-ovl-spin").show();
44
+
45
+ // Clear normal image
46
+ $("#wppa-overlay-ic").html("");
47
  }
48
 
49
  // Find additional data
89
  data.wppaSphereMesh = new THREE.Mesh(data.wppaSphere, data.wppaSphereMaterial);
90
  data.wppaScene.add(data.wppaSphereMesh);
91
 
 
92
 
93
  data.right.on("touchstart", function(e){rDown(mocc,e)});
94
  data.right.on("touchend", function(e){bUp(mocc,e)});
109
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchmove", function(e){onMm(mocc,e)});
110
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("touchend", function(e){onMe(mocc,e)});
111
  }
 
 
112
 
113
  data.right.on("mousedown", function(e){rDown(mocc,e)});
114
  data.right.on("mouseup", function(e){bUp(mocc,e)});
132
  $("#wppa-pan-div-"+mocc+" canvas").on("mouseup", function(e){onMe(mocc,e)});
133
  $("#wppa-pan-div-"+mocc+" canvas")[0].addEventListener("wheel", function(e){onDivWheel(mocc,e)});
134
  }
135
+
136
 
137
  if ( data.isLightbox ) {
138
  $("body").on("quitimage", function(e){quitImage(mocc,e)});
157
  $(document).on("tabbychange",function(e){tabbyChange(mocc,e)});
158
 
159
  resize(mocc);
160
+ data.intervalTimer = setInterval(function(){resize(mocc)},1000);
161
+ // setTimeout(function(){resize(mocc)},1000);
162
+ // setTimeout(function(){resize(mocc)},2000);
163
+ // resize(mocc);
164
 
165
  function render(mocc){
166
 
247
 
248
  if ( ! wppaOvlOpen ) return;
249
 
250
+ $("#wppa-overlay-pc").css("display", "");
251
+ $("#wppa-overlay-pc").css("width", "");
252
 
253
  var widthIsLim, modeIsNormal = ! wppaIsFs();
254
 
301
 
302
  // Set css common for all 4 situations
303
  $("#wppa-ovl-pan-container").css({top:topMarg});
304
+ $("#wppa-overlay-pc").css({top:0});
305
 
306
  // Now set css for all 4 situations: Mode is normal
307
  if ( modeIsNormal ) {
311
  backgroundColor:data.backgroundColor,
312
  padding:data.padding+"px",
313
  borderRadius:data.borderRadius+"px",
314
+ width:newWidth
 
315
  });
 
316
 
317
  // Limit specific
318
  if ( widthIsLim ) {
319
+ $("#wppa-overlay-pc").css({left:4});
320
  }
321
  else {
322
+ $("#wppa-overlay-pc").css({left:(contWidth-newWidth)/2});
323
  }
324
  }
325
 
327
  else {
328
 
329
  // Common for mode fullscreen
 
330
  $("#wppa-ovl-pan-container").css({
331
  backgroundColor:"transparent",
332
  padding:0,
335
  left:(contWidth-newWidth)/2
336
  });
337
 
 
 
 
 
 
 
338
  }
339
 
340
  data.wppaRenderer.setSize(newWidth, newHeight);
362
  // Previous / next on lightbox
363
  /*
364
  function panPrev(e) {
365
+ $("#wppa-overlay-pc").css({display:"none"});
366
  $("#wppa-ovl-spin").show();
367
  update(mocc,{abort:true});
368
  $("body").trigger("quitimage");
369
  wppaOvlShowPrev();
370
  }
371
  function panNext(e) {
372
+ $("#wppa-overlay-pc").css({display:"none"});
373
  $("#wppa-ovl-spin").show();
374
  update(mocc,{abort:true});
375
  $("body").trigger("quitimage");
404
  autorun :false,
405
  dX :0
406
  });
407
+ if ( e.touches ) {
408
  update(mocc,{
409
  sX :e.touches[0].clientX,
410
  sY :e.touches[0].clientY
427
  e.stopPropagation();
428
  data = update(mocc);
429
  if ( data.manCtrl ) {
430
+ if ( e.touches ) {
431
  update(mocc,{
432
  lon :(data.sX - e.touches[0].clientX) * 0.1 + data.sLon,
433
  lat :(e.touches[0].clientY - data.sY) * 0.1 + data.sLat,
546
  autorun:false
547
  });
548
  clearTimeout(data.timer);
549
+ clearInterval(data.intervalTimer);
550
  $("#wppa-pan-div-"+mocc+" canvas").hide();
551
  $("#wppa-pctl-div-"+mocc).hide();
552
  // data.wppaRenderer.state.reset();
js/wppa-spheric.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSphericVersion="7.7.06.006";function wppaDoSphericPan(a,n){var c=jQuery;n&&(wppaSphericData[a]=n);var s=v(a,s);if(!s.initialized&&!s.abort&&(!s.isLightbox||wppaOvlOpen)){if(!s.isLightbox&&!wppaIsElementInViewport(c("#wppa-pan-div-"+a)))return setTimeout(function(){wppaDoSphericPan(a)},1e3),void v(a,{vtime:b()});s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&c("#wppa-ovl-spin").show(),s.manCtrl=!1,s.butDown=!1,s.lon=180,s.lat=0,s.dFov=0,s.abort=!1,s.aspect=2,s.div=c("#wppa-pan-div-"+a),s.left=c("#wppa-pctl-left-"+a),s.right=c("#wppa-pctl-right-"+a),s.up=c("#wppa-pctl-up-"+a),s.down=c("#wppa-pctl-down-"+a),s.zoomin=c("#wppa-pctl-zoomin-"+a),s.zoomout=c("#wppa-pctl-zoomout-"+a),s.prev=c("#wppa-pctl-prev-"+a),s.next=c("#wppa-pctl-next-"+a),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),c(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),c(s.div).append(s.wppaRenderer.domElement),s.wppaScene=new THREE.Scene,s.wppaSphere=new THREE.SphereGeometry(100,100,40),s.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),s.texture=(new THREE.TextureLoader).load(s.url),s.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:s.texture}),s.wppaSphereMesh=new THREE.Mesh(s.wppaSphere,s.wppaSphereMaterial),s.wppaScene.add(s.wppaSphereMesh),wppaIsMobile?(s.right.on("touchstart",function(n){u(a)}),s.right.on("touchend",function(n){f(a)}),s.left.on("touchstart",function(n){l(a)}),s.left.on("touchend",function(n){f(a)}),s.up.on("touchstart",function(n){h(a)}),s.up.on("touchend",function(n){f(a)}),s.down.on("touchstart",function(n){m(a)}),s.down.on("touchend",function(n){f(a)}),s.zoomin.on("touchstart",function(n){i(a)}),s.zoomin.on("touchend",function(n){f(a)}),s.zoomout.on("touchstart",function(n){r(a)}),s.zoomout.on("touchend",function(n){f(a)}),s.enableManual&&0<c("#wppa-pan-div-"+a+" canvas").length&&(c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchstart",function(n){t(a,n)}),c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchmove",function(n){o(a,n)}),c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("touchend",function(n){p(a)}))):(s.right.on("mousedown",function(n){u(a)}),s.right.on("mouseup",function(n){f(a)}),s.left.on("mousedown",function(n){l(a)}),s.left.on("mouseup",function(n){f(a)}),s.up.on("mousedown",function(n){h(a)}),s.up.on("mouseup",function(n){f(a)}),s.down.on("mousedown",function(n){m(a)}),s.down.on("mouseup",function(n){f(a)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(n){i(a)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(n){f(a)}),s.zoomout.on("mousedown",function(n){r(a)}),s.zoomout.on("mouseup",function(n){f(a)}),s.enableManual&&0<c("#wppa-pan-div-"+a+" canvas").length&&(c("#wppa-pan-div-"+a+" canvas").on("mousedown",function(n){t(a,n)}),c("#wppa-pan-div-"+a+" canvas").on("mousemove",function(n){o(a,n)}),c("#wppa-pan-div-"+a+" canvas").on("mouseup",function(n){p(a)}),c("#wppa-pan-div-"+a+" canvas")[0].addEventListener("wheel",function(n){var e;e=a,(n=n).preventDefault(),n.stopPropagation(),s=v(e),v(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*s.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){v(e,{dFov:0})},25)}))),s.isLightbox&&(c("body").on("quitimage",function(n){var e;s=v(e=a,{abort:!0,autorun:!1}),clearTimeout(s.timer),c("#wppa-pan-div-"+e+" canvas").hide(),c("#wppa-pctl-div-"+e).hide()}),c("#wppa-pctl-div-"+a).on("click",function(n){wppaKillEvent(n)})),v(a,s),s.isLightbox?(c(window).off("wpparesizeend",wppaOvlShowSame),c(window).on("wpparesizeend",wppaOvlShowSame)):c(window).on("wpparesizeend",function(n){e(a)}),wppaProtect(),c(document).on("tabbychange",function(n){var e;e=a,s.wppaRenderer.state.reset(),s=v(e,{initialized:!1,abort:!0}),setTimeout(function(){v(e,{abort:!1}),wppaDoSphericPan(e)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+e)}),e(a)}function w(n){var e=v(n),a=wppaIsElementInViewport(c("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25)){if(!a)return!(b()<e.vtime+1e3)&&(setTimeout(function(){w(n)},1e3),void v(n,{vtime:b()}));v(n,{time:b()}),e.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0),e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),c("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),v(n,e))}}function e(n){var e=!wppaIsFs();if(s=v(n)){if(s.isLightbox){if(!wppaOvlOpen)return;c("#wppa-overlay-ic").css("display",""),c("#wppa-overlay-ic").css("width","");var a,t,o=(e=!wppaIsFs())?(t=window.innerWidth||screen.width,window.innerHeight||screen.height):(t=screen.width,screen.height),p=8,i=8+(s.controls?s.icsize+10:0)+30;e&&(p+=2*s.borderWidth,i+=2*s.borderWidth),a=(t-p)/2+i<o,i=e?a?(o-(u=(r=t-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),s.aspect=r/u,c("#wppa-ovl-pan-container").css({top:i}),c("#wppa-overlay-ic").css({top:0}),e?(c("#wppa-ovl-pan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:r,marginLeft:0}),a?c("#wppa-overlay-ic").css({left:4,marginLeft:0}):c("#wppa-overlay-ic").css({left:(t-r)/2,marginLeft:0})):(c("#wppa-overlay-ic").css({marginLeft:0}),c("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(t-r)/2})),s.wppaRenderer.setSize(r,u)}else{var r=c(s.div).parent().width(),u=parseInt(r/2);if(!s.wppaRenderer)return;s.wppaRenderer.setSize(r,u)}s.width=r,s.height=u,v(n,s),s.timer=setTimeout(function(){w(n)},250)}}function t(n,e){e.preventDefault(),e.stopPropagation(),s=v(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),wppaIsMobile?v(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):v(n,{sX:e.clientX,sY:e.clientY}),v(n,{sLon:s.lon,sLat:s.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(s=v(n)).manCtrl&&(wppaIsMobile?v(n,{lon:.1*(s.sX-e.touches[0].clientX)+s.sLon,lat:.1*(e.touches[0].clientY-s.sY)+s.sLat,pause:!1}):v(n,{lon:.1*(s.sX-e.clientX)+s.sLon,lat:.1*(e.clientY-s.sY)+s.sLat,pause:!1}),w(n))}function p(n){v(n,{manCtrl:!1})}function i(n){s=v(n),v(n,{dFov:-.4*s.mFakt,butDown:!0}),w(n)}function r(n){s=v(n),v(n,{dFov:.4*s.mFakt,butDown:!0}),w(n)}function u(n){s=v(n),v(n,{dX:.2*s.mFakt,butDown:!0}),w(n)}function l(n){s=v(n),v(n,{dX:-.2*s.mFakt,butDown:!0}),w(n)}function h(n){s=v(n),v(n,{dY:.2*s.mFakt,butDown:!0}),w(n)}function m(n){s=v(n),v(n,{dY:-.2*s.mFakt,butDown:!0}),w(n)}function f(n){s=v(n),v(n,{dX:0,dY:0,dFov:0,butDown:!1})}function v(n,e){if(!wppaSphericData[n])return!1;if(e)for(var a in e)wppaSphericData[n][a]=e[a];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}}
1
+ var wppaJsSphericVersion="8.0.00.012";function wppaDoSphericPan(t,n){var c=jQuery;n&&(wppaSphericData[t]=n);var s=f(t,s);if(!s.initialized&&!s.abort&&(!s.isLightbox||wppaOvlOpen)){if(!s.isLightbox&&!wppaIsElementInViewport(c("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&(c("#wppa-ovl-spin").show(),c("#wppa-overlay-ic").html("")),s.manCtrl=!1,s.butDown=!1,s.lon=180,s.lat=0,s.dFov=0,s.abort=!1,s.aspect=2,s.div=c("#wppa-pan-div-"+t),s.left=c("#wppa-pctl-left-"+t),s.right=c("#wppa-pctl-right-"+t),s.up=c("#wppa-pctl-up-"+t),s.down=c("#wppa-pctl-down-"+t),s.zoomin=c("#wppa-pctl-zoomin-"+t),s.zoomout=c("#wppa-pctl-zoomout-"+t),s.prev=c("#wppa-pctl-prev-"+t),s.next=c("#wppa-pctl-next-"+t),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),c(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),c(s.div).append(s.wppaRenderer.domElement),s.wppaScene=new THREE.Scene,s.wppaSphere=new THREE.SphereGeometry(100,100,40),s.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),s.texture=(new THREE.TextureLoader).load(s.url),s.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:s.texture}),s.wppaSphereMesh=new THREE.Mesh(s.wppaSphere,s.wppaSphereMaterial),s.wppaScene.add(s.wppaSphereMesh),s.right.on("touchstart",function(n){u(t)}),s.right.on("touchend",function(n){v(t)}),s.left.on("touchstart",function(n){l(t)}),s.left.on("touchend",function(n){v(t)}),s.up.on("touchstart",function(n){h(t)}),s.up.on("touchend",function(n){v(t)}),s.down.on("touchstart",function(n){m(t)}),s.down.on("touchend",function(n){v(t)}),s.zoomin.on("touchstart",function(n){i(t)}),s.zoomin.on("touchend",function(n){v(t)}),s.zoomout.on("touchstart",function(n){r(t)}),s.zoomout.on("touchend",function(n){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(n){a(t,n)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(n){o(t,n)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(n){p(t)})),s.right.on("mousedown",function(n){u(t)}),s.right.on("mouseup",function(n){v(t)}),s.left.on("mousedown",function(n){l(t)}),s.left.on("mouseup",function(n){v(t)}),s.up.on("mousedown",function(n){h(t)}),s.up.on("mouseup",function(n){v(t)}),s.down.on("mousedown",function(n){m(t)}),s.down.on("mouseup",function(n){v(t)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(n){i(t)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(n){v(t)}),s.zoomout.on("mousedown",function(n){r(t)}),s.zoomout.on("mouseup",function(n){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas").on("mousedown",function(n){a(t,n)}),c("#wppa-pan-div-"+t+" canvas").on("mousemove",function(n){o(t,n)}),c("#wppa-pan-div-"+t+" canvas").on("mouseup",function(n){p(t)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(n){var e;e=t,(n=n).preventDefault(),n.stopPropagation(),s=f(e),f(e,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-n.deltaY*s.zoomsensitivity/(wppaIsChrome?60:6)}),w(e),setTimeout(function(){f(e,{dFov:0})},25)})),s.isLightbox&&(c("body").on("quitimage",function(n){var e;s=f(e=t,{abort:!0,autorun:!1}),clearTimeout(s.timer),clearInterval(s.intervalTimer),c("#wppa-pan-div-"+e+" canvas").hide(),c("#wppa-pctl-div-"+e).hide()}),c("#wppa-pctl-div-"+t).on("click",function(n){wppaKillEvent(n)})),f(t,s),s.isLightbox?(c(window).off("wpparesizeend",wppaOvlShowSame),c(window).on("wpparesizeend",wppaOvlShowSame)):c(window).on("wpparesizeend",function(n){e(t)}),wppaProtect(),c(document).on("tabbychange",function(n){var e;e=t,s.wppaRenderer.state.reset(),s=f(e,{initialized:!1,abort:!0}),setTimeout(function(){f(e,{abort:!1}),wppaDoSphericPan(e)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+e)}),e(t),s.intervalTimer=setInterval(function(){e(t)},1e3)}function w(n){var e=f(n),t=wppaIsElementInViewport(c("#wppa-pan-div-"+n+" canvas"));if(e.manCtrl||!(b()<e.time+25)){if(!t)return!(b()<e.vtime+1e3)&&(setTimeout(function(){w(n)},1e3),void f(n,{vtime:b()}));f(n,{time:b()}),e.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=e.id||wppaGlobalOvlPanoramaId>e.uId)&&(abort=!0),e.abort||((e.butDown||e.manCtrl)&&e.autorun&&(e.autorun=!1,e.dX=0),0==e.dX&&0==e.dY&&0==e.dFov&&(e.pause=!0),e.butDown&&(e.pause=!1),e.fov+=e.dFov,e.fov=Math.max(20,Math.min(120,e.fov)),e.wppaCamera=new THREE.PerspectiveCamera(e.fov,e.aspect,1,1e3),e.wppaCamera.target=new THREE.Vector3(0,0,0),e.lon+=e.dX,e.lat+=e.dY,e.lat=Math.max(-85,Math.min(85,e.lat)),e.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.cos(THREE.Math.degToRad(e.lon)),e.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-e.lat)),e.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-e.lat))*Math.sin(THREE.Math.degToRad(e.lon)),e.wppaCamera.lookAt(e.wppaCamera.target),e.wppaRenderer&&e.wppaRenderer.render(e.wppaScene,e.wppaCamera),wppaAdjustControlbar(),c("#wppa-ovl-spin").hide(),e.manCtrl,(e.autorun||!e.pause&&(e.manCtrl||e.butDown))&&e.wppaRenderer&&(e.timer=setTimeout(function(){w(n)},25)),f(n,e))}}function e(n){var e=!wppaIsFs();if(s=f(n)){if(s.isLightbox){if(!wppaOvlOpen)return;c("#wppa-overlay-pc").css("display",""),c("#wppa-overlay-pc").css("width","");var t,a,o=(e=!wppaIsFs())?(a=window.innerWidth||screen.width,window.innerHeight||screen.height):(a=screen.width,screen.height),p=8,i=8+(s.controls?s.icsize+10:0)+30;e&&(p+=2*s.borderWidth,i+=2*s.borderWidth),t=(a-p)/2+i<o,i=e?t?(o-(u=(r=a-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),s.aspect=r/u,c("#wppa-ovl-pan-container").css({top:i}),c("#wppa-overlay-pc").css({top:0}),e?(c("#wppa-ovl-pan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:r}),t?c("#wppa-overlay-pc").css({left:4}):c("#wppa-overlay-pc").css({left:(a-r)/2})):c("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(a-r)/2}),s.wppaRenderer.setSize(r,u)}else{var r=c(s.div).parent().width(),u=parseInt(r/2);if(!s.wppaRenderer)return;s.wppaRenderer.setSize(r,u)}s.width=r,s.height=u,f(n,s),s.timer=setTimeout(function(){w(n)},250)}}function a(n,e){e.preventDefault(),e.stopPropagation(),s=f(n,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),e.touches?f(n,{sX:e.touches[0].clientX,sY:e.touches[0].clientY}):f(n,{sX:e.clientX,sY:e.clientY}),f(n,{sLon:s.lon,sLat:s.lat}),w(n)}function o(n,e){e.preventDefault(),e.stopPropagation(),(s=f(n)).manCtrl&&(e.touches?f(n,{lon:.1*(s.sX-e.touches[0].clientX)+s.sLon,lat:.1*(e.touches[0].clientY-s.sY)+s.sLat,pause:!1}):f(n,{lon:.1*(s.sX-e.clientX)+s.sLon,lat:.1*(e.clientY-s.sY)+s.sLat,pause:!1}),w(n))}function p(n){f(n,{manCtrl:!1})}function i(n){s=f(n),f(n,{dFov:-.4*s.mFakt,butDown:!0}),w(n)}function r(n){s=f(n),f(n,{dFov:.4*s.mFakt,butDown:!0}),w(n)}function u(n){s=f(n),f(n,{dX:.2*s.mFakt,butDown:!0}),w(n)}function l(n){s=f(n),f(n,{dX:-.2*s.mFakt,butDown:!0}),w(n)}function h(n){s=f(n),f(n,{dY:.2*s.mFakt,butDown:!0}),w(n)}function m(n){s=f(n),f(n,{dY:-.2*s.mFakt,butDown:!0}),w(n)}function v(n){s=f(n),f(n,{dX:0,dY:0,dFov:0,butDown:!1})}function f(n,e){if(!wppaSphericData[n])return!1;if(e)for(var t in e)wppaSphericData[n][t]=e[t];return wppaSphericData[n]}function b(){return d=new Date,d.getTime()}}
js/wppa-utils.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- wppaJsUtilsVersion = '7.7.07.003';
6
  var wppaDebug;
7
  var wppaDebugCounter = 0;
8
 
@@ -360,26 +360,24 @@ var wppaMakeLazyVisibleScrollEndTimer;
360
  function wppaMakeLazyVisibleScrollEnd() {
361
  clearTimeout(wppaMakeLazyVisibleScrollEndTimer);
362
  // wppaConsoleLog('Lazy skipped', 'force');
363
- wppaMakeLazyVisibleScrollEndTimer = setTimeout(wppaMakeLazyVisible, wppaScrollEndDelay);
364
  }
365
 
366
  var wppaLastLazy = 0;
367
  var wppaLazyTimer = 0;
368
  var wppaLazyBusy = false;
369
  // Make lazy load images visible
370
- function wppaMakeLazyVisible() {
371
 
372
- // wppaConsoleLog('Doing wppaMakeLazyVisible()', 'force');
 
 
 
373
 
 
374
  if ( wppaLazyBusy ) return;
375
  wppaLazyBusy = true;
376
 
377
- // Init masonryplus
378
- wppaInitMasonryPlus();
379
-
380
- // Feature enabled?
381
- if ( ! wppaLazyLoad ) return; // No, quit
382
-
383
  // Only do this if the previous time was more than 250 ms ago and not pending, otherwise do it in 500 ms
384
  var d = new Date();
385
  var t = d.getTime();
@@ -387,11 +385,14 @@ function wppaMakeLazyVisible() {
387
 
388
  if ( t < ( wppaLastLazy + 250 ) ) { // too soon
389
  clearTimeout( wppaLazyTimer );
390
- wppaLazyTimer = setTimeout( function(){wppaMakeLazyVisible()}, 100 );
391
  wppaLazyBusy = false;
392
  return;
393
  }
394
 
 
 
 
395
  wppaLastLazy = t;
396
  clearTimeout( wppaLazyTimer );
397
  var src;
@@ -420,12 +421,21 @@ function wppaMakeLazyVisible() {
420
  setTimeout( function(){
421
  jQuery( "div" ).getNiceScroll().resize();
422
  },500);
 
 
 
423
  }
 
 
 
 
 
 
424
  }
425
 
426
  d = new Date();
427
  t = d.getTime();
428
- // wppaConsoleLog( 'MakeLazyVisible done after '+deltaT+' ms in '+(t - wppaLastLazy)+' ms. Processed '+done+' out of '+potential.length+' elements', 'force' );
429
  wppaLastLazy = t;
430
  wppaLazyBusy = false;
431
  }
2
  //
3
  // conatins common vars and functions
4
  //
5
+ wppaJsUtilsVersion = '8.0.00.007';
6
  var wppaDebug;
7
  var wppaDebugCounter = 0;
8
 
360
  function wppaMakeLazyVisibleScrollEnd() {
361
  clearTimeout(wppaMakeLazyVisibleScrollEndTimer);
362
  // wppaConsoleLog('Lazy skipped', 'force');
363
+ wppaMakeLazyVisibleScrollEndTimer = setTimeout(function(){wppaMakeLazyVisible('scrollend')}, wppaScrollEndDelay);
364
  }
365
 
366
  var wppaLastLazy = 0;
367
  var wppaLazyTimer = 0;
368
  var wppaLazyBusy = false;
369
  // Make lazy load images visible
370
+ function wppaMakeLazyVisible(e) {
371
 
372
+ // Feature enabled?
373
+ if ( ! wppaLazyLoad ) return; // No, quit
374
+
375
+ wppaConsoleLog('Doing wppaMakeLazyVisible('+e+')','force');
376
 
377
+ // Busy?
378
  if ( wppaLazyBusy ) return;
379
  wppaLazyBusy = true;
380
 
 
 
 
 
 
 
381
  // Only do this if the previous time was more than 250 ms ago and not pending, otherwise do it in 500 ms
382
  var d = new Date();
383
  var t = d.getTime();
385
 
386
  if ( t < ( wppaLastLazy + 250 ) ) { // too soon
387
  clearTimeout( wppaLazyTimer );
388
+ wppaLazyTimer = setTimeout( function(){wppaMakeLazyVisible('selftimer')}, 100 );
389
  wppaLazyBusy = false;
390
  return;
391
  }
392
 
393
+ // Init masonryplus
394
+ wppaInitMasonryPlus();
395
+
396
  wppaLastLazy = t;
397
  clearTimeout( wppaLazyTimer );
398
  var src;
421
  setTimeout( function(){
422
  jQuery( "div" ).getNiceScroll().resize();
423
  },500);
424
+ setTimeout( function(){
425
+ jQuery( "div" ).getNiceScroll().resize();
426
+ },1500);
427
  }
428
+
429
+ // Fake a scroll
430
+ setTimeout( function(){
431
+ jQuery(".wppa-box").trigger("scroll");
432
+ jQuery("body").trigger("scroll");
433
+ }, 250);
434
  }
435
 
436
  d = new Date();
437
  t = d.getTime();
438
+ wppaConsoleLog( 'MakeLazyVisible done after '+deltaT+' ms in '+(t - wppaLastLazy)+' ms. Processed '+done+' out of '+potential.length+' elements', 'force' );
439
  wppaLastLazy = t;
440
  wppaLazyBusy = false;
441
  }
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug;wppaJsUtilsVersion="7.7.07.003";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,a,t,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),i&&setTimeout(i,10)):jQuery(e).stop().animate(a,t,p,i)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){e=wppaTrimLeft(e,a);return e=wppaTrimRight(e,a)}function wppaTrimLeft(e,a){var t,p,i,n,r,o,s;switch(typeof a){case"string":for(p=(t=e).length,i=a.length;i<=p&&t.substr(0,i)==a;)p=(t=t.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<a.length;)s=wppaTrimLeft(s,a[n]),n++;r=o==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,i,n,r,o,s;switch(typeof a){case"string":for(p=(t=e).length,i=a.length;i<=p&&t.substr(p-i)==a;)p=(t=t.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<a.length;)s=wppaTrimRight(s,a[n]),n++;r=o==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);p=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var a,t,p=document.cookie.split(";"),i=0;i<p.length;i++)if(a=p[i].substr(0,p[i].indexOf("=")),t=p[i].substr(p[i].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(t);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){var t,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=a||(t=(new Date).getTime()%864e5,t-=60*(p=Math.floor(t/36e5))*60*1e3,t-=60*(i=Math.floor(t/6e4))*1e3,a=Math.floor(t/1e3),console.log("At: "+p+":"+i+":"+a+"."+(t-=1e3*a)+" message: "+e))}function wppaSvgHtml(e,a,t,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}a=a||"32px",t="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):t?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==t&&(t="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(a?"height:"+a+";":"")+"fill:"+s+";background-color:"+t+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":l+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":l+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(){if(!wppaLazyBusy&&(wppaLazyBusy=!0,wppaInitMasonryPlus(),wppaLazyLoad)){var e,a=new Date,t=a.getTime();if(t<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible()},100),void(wppaLazyBusy=!1);wppaLastLazy=t,clearTimeout(wppaLazyTimer);var p=0;jQuery("*[data-src]").each(function(){e=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),p++)}),0<p&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize()},500)),t=(a=new Date).getTime(),wppaLastLazy=t,wppaLazyBusy=!1}}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var a=jQuery(e);a[0]&&"BODY"!=a[0].nodeName;){if("none"==jQuery(a[0]).css("display"))return!1;a=jQuery(a[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,a,t){t=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==t?a:(wppaIsMini[e]?t/2:t)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,a,t=jQuery;wppaOvlOpen&&(a=wppaIsFs()?(t(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(t(".wppa-pctl-div-lb").css({position:"initial"}),t("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(a-=20),a<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(a/12-4))&&(t(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),t(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,t(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),t(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?t(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):t(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),t(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,a,t){},error:function(e,a,t){wppaConsoleLog("wppaServerLog failed. Error = "+t+", status = "+a,"force")}})}function wppaTimNow(){return(new Date).getTime()}
1
+ var wppaDebug;wppaJsUtilsVersion="8.0.00.007";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":l+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":l+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":l+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(function(){wppaMakeLazyVisible("scrollend")},wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(e){if(wppaLazyLoad&&(wppaConsoleLog("Doing wppaMakeLazyVisible("+e+")","force"),!wppaLazyBusy)){wppaLazyBusy=!0;var t,a=new Date,p=a.getTime(),i=p-wppaLastLazy;if(p<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible("selftimer")},100),void(wppaLazyBusy=!1);wppaInitMasonryPlus(),wppaLastLazy=p,clearTimeout(wppaLazyTimer);var n=0,e=jQuery("*[data-src]");e.each(function(){t=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",t),jQuery(this).removeAttr("data-src"),n++)}),0<n&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&(setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery("div").getNiceScroll().resize()},1500)),setTimeout(function(){jQuery(".wppa-box").trigger("scroll"),jQuery("body").trigger("scroll")},250)),wppaConsoleLog("MakeLazyVisible done after "+i+" ms in "+((p=(a=new Date).getTime())-wppaLastLazy)+" ms. Processed "+n+" out of "+e.length+" elements","force"),wppaLastLazy=p,wppaLazyBusy=!1}}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.top<wppaWindowHeight()}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,t,a){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
js/wppa-zoom.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsZoomVersion = '7.7.03.001';
6
 
7
  // The main proccedure
8
  function wppaDoZoomPan(mocc, xdata) {
@@ -18,6 +18,7 @@ function wppaDoZoomPan(mocc, xdata) {
18
  // If lightbox, show spinner
19
  if ( data.isLightbox ) {
20
  $("#wppa-ovl-spin").show();
 
21
  }
22
 
23
  // Wait until the image file has been completely loaded
@@ -72,7 +73,7 @@ function wppaDoZoomPan(mocc, xdata) {
72
  data.time = 0;
73
 
74
  // Install event listeners
75
- if ( wppaIsMobile ) {
76
  data.right.on("touchstart", function(e){rightDown(mocc, e)});
77
  data.right.on("touchend", function(e){buttonUp(mocc, e)});
78
  data.left.on("touchstart", function(e){leftDown(mocc, e)});
@@ -90,8 +91,8 @@ function wppaDoZoomPan(mocc, xdata) {
90
  data.canvas.addEventListener("touchmove", function(e){canvasMove(mocc, e)});
91
  data.canvas.addEventListener("touchend", function(e){canvasUp(mocc,e)});
92
  }
93
- }
94
- else {
95
  if ( data.canvas ) {
96
  data.canvas.addEventListener("mousedown", function(e){canvasDown(mocc, e)});
97
  data.canvas.addEventListener("mousemove", function(e){canvasMove(mocc, e)});
@@ -116,7 +117,7 @@ function wppaDoZoomPan(mocc, xdata) {
116
  data.zoomin.on("mouseup", function(e){buttonUp(mocc, e)});
117
  data.zoomout.on("mousedown", function(e){minDown(mocc, e)});
118
  data.zoomout.on("mouseup", function(e){buttonUp(mocc, e)});
119
- }
120
 
121
  // Common event handlers
122
  if ( data.isLightbox ) {
@@ -296,7 +297,7 @@ function wppaDoZoomPan(mocc, xdata) {
296
  if ( data.isLightbox ) {
297
 
298
  // Show image container
299
- $("#wppa-overlay-ic").css("display", "");
300
 
301
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
302
  var widthIsLim;
@@ -366,8 +367,8 @@ function wppaDoZoomPan(mocc, xdata) {
366
  }
367
 
368
  // Set css common for all 4 situations
369
- $("#wppa-ovl-pan-container").css({marginTop:topMarg});
370
- $("#wppa-overlay-ic").css({marginTop:0,marginLeft:0});
371
 
372
  data.canvasWidth = newWidth;
373
  data.canvasHeight = newHeight;
@@ -392,10 +393,10 @@ function wppaDoZoomPan(mocc, xdata) {
392
 
393
  // Limit specific
394
  if ( widthIsLim ) {
395
- $("#wppa-overlay-ic").css({left:4});
396
  }
397
  else {
398
- $("#wppa-overlay-ic").css({left:(contWidth-newWidth)/2});
399
  }
400
  }
401
 
@@ -403,7 +404,7 @@ function wppaDoZoomPan(mocc, xdata) {
403
  else {
404
 
405
  // Common for mode fullscreen
406
- $("#wppa-overlay-ic").css({marginLeft:0});
407
  $("#wppa-ovl-pan-container").css({
408
  backgroundColor:"transparent",
409
  padding:0,
@@ -432,6 +433,7 @@ function wppaDoZoomPan(mocc, xdata) {
432
  update(mocc, data);
433
  setTimeout(function(){render(mocc)},250);
434
 
 
435
  }
436
  /*
437
  // Previous in lightbox
@@ -676,7 +678,7 @@ function wppaDoZoomPan(mocc, xdata) {
676
  // Find screen x and y
677
  function findscreenxy(e) {
678
 
679
- if ( wppaIsMobile ) {
680
  var X = e.touches[0].screenX;
681
  var Y = e.touches[0].screenY;
682
  }
@@ -690,7 +692,7 @@ function wppaDoZoomPan(mocc, xdata) {
690
  // Find offset x and y
691
  function findoffsetxy(mocc,e) {
692
 
693
- if ( wppaIsMobile ) {
694
  var data = update(mocc);
695
  var X = e.touches[0].screenX - data.fsMaskLeft;
696
  var Y = e.touches[0].screenY - data.fsMaskTop;
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
+ var wppaJsZoomVersion = '8.0.00.012';
6
 
7
  // The main proccedure
8
  function wppaDoZoomPan(mocc, xdata) {
18
  // If lightbox, show spinner
19
  if ( data.isLightbox ) {
20
  $("#wppa-ovl-spin").show();
21
+ $("#wppa-ovl-pan-container").hide();
22
  }
23
 
24
  // Wait until the image file has been completely loaded
73
  data.time = 0;
74
 
75
  // Install event listeners
76
+
77
  data.right.on("touchstart", function(e){rightDown(mocc, e)});
78
  data.right.on("touchend", function(e){buttonUp(mocc, e)});
79
  data.left.on("touchstart", function(e){leftDown(mocc, e)});
91
  data.canvas.addEventListener("touchmove", function(e){canvasMove(mocc, e)});
92
  data.canvas.addEventListener("touchend", function(e){canvasUp(mocc,e)});
93
  }
94
+
95
+
96
  if ( data.canvas ) {
97
  data.canvas.addEventListener("mousedown", function(e){canvasDown(mocc, e)});
98
  data.canvas.addEventListener("mousemove", function(e){canvasMove(mocc, e)});
117
  data.zoomin.on("mouseup", function(e){buttonUp(mocc, e)});
118
  data.zoomout.on("mousedown", function(e){minDown(mocc, e)});
119
  data.zoomout.on("mouseup", function(e){buttonUp(mocc, e)});
120
+
121
 
122
  // Common event handlers
123
  if ( data.isLightbox ) {
297
  if ( data.isLightbox ) {
298
 
299
  // Show image container
300
+ $("#wppa-overlay-pc").css("display", "");
301
 
302
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
303
  var widthIsLim;
367
  }
368
 
369
  // Set css common for all 4 situations
370
+ $("#wppa-ovl-pan-container").css({top:topMarg,width:newWidth});
371
+ $("#wppa-overlay-pc").css({top:0,left:0});
372
 
373
  data.canvasWidth = newWidth;
374
  data.canvasHeight = newHeight;
393
 
394
  // Limit specific
395
  if ( widthIsLim ) {
396
+ $("#wppa-overlay-pc").css({left:4});
397
  }
398
  else {
399
+ $("#wppa-overlay-pc").css({left:(contWidth-newWidth)/2});
400
  }
401
  }
402
 
404
  else {
405
 
406
  // Common for mode fullscreen
407
+ $("#wppa-overlay-pc").css({marginLeft:0});
408
  $("#wppa-ovl-pan-container").css({
409
  backgroundColor:"transparent",
410
  padding:0,
433
  update(mocc, data);
434
  setTimeout(function(){render(mocc)},250);
435
 
436
+ $("#wppa-ovl-pan-container").show();
437
  }
438
  /*
439
  // Previous in lightbox
678
  // Find screen x and y
679
  function findscreenxy(e) {
680
 
681
+ if ( e.touches ) {
682
  var X = e.touches[0].screenX;
683
  var Y = e.touches[0].screenY;
684
  }
692
  // Find offset x and y
693
  function findoffsetxy(mocc,e) {
694
 
695
+ if ( e.touches ) {
696
  var data = update(mocc);
697
  var X = e.touches[0].screenX - data.fsMaskLeft;
698
  var Y = e.touches[0].screenY - data.fsMaskTop;
js/wppa-zoom.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsZoomVersion="7.7.03.001";function wppaDoZoomPan(n,a){var m=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&m("#wppa-ovl-spin").show(),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=m("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=m("#wppa-pctl-left-"+o.itemId),o.right=m("#wppa-pctl-right-"+o.itemId),o.up=m("#wppa-pctl-up-"+o.itemId),o.down=m("#wppa-pctl-down-"+o.itemId),o.zoomin=m("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=m("#wppa-pctl-zoomout-"+o.itemId),o.prev=m("#wppa-pctl-prev-"+o.itemId),o.next=m("#wppa-pctl-next-"+o.itemId),o.exit=m("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,wppaIsMobile?(o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)}))):(o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&p(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),p(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)})),o.isLightbox&&(m("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),m(o.canvas).hide(),m("#wppa-pctl-div-"+o.itemId).hide()}),m("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),m("#wppa-ovl-spin").hide(),wppaProtect()}function p(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+a+" "+wppaDebugCounter),(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(m("#wppa-overlay-ic").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-pan-container").css({marginTop:r}),m("#wppa-overlay-ic").css({marginTop:0,marginLeft:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(m("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?m("#wppa-overlay-ic").css({left:4}):m("#wppa-overlay-ic").css({left:(o-i)/2})):(m("#wppa-overlay-ic").css({marginLeft:0}),m("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){p(a)},250))}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),p(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),p(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),p(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),p(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),p(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=wppaIsMobile?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=wppaIsMobile?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
1
+ var wppaJsZoomVersion="8.0.00.012";function wppaDoZoomPan(n,t){var p=jQuery;t&&(wppaZoomData[n]=t);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&(p("#wppa-ovl-spin").show(),p("#wppa-ovl-pan-container").hide()),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),p(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=p("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=p("#wppa-pctl-left-"+o.itemId),o.right=p("#wppa-pctl-right-"+o.itemId),o.up=p("#wppa-pctl-up-"+o.itemId),o.down=p("#wppa-pctl-down-"+o.itemId),o.zoomin=p("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=p("#wppa-pctl-zoomout-"+o.itemId),o.prev=p("#wppa-pctl-prev-"+o.itemId),o.next=p("#wppa-pctl-next-"+o.itemId),o.exit=p("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(t){e(n)}),o.right.on("touchend",function(t){h(n)}),o.left.on("touchstart",function(t){i(n)}),o.left.on("touchend",function(t){h(n)}),o.up.on("touchstart",function(t){s(n)}),o.up.on("touchend",function(t){h(n)}),o.down.on("touchstart",function(t){r(n)}),o.down.on("touchend",function(t){h(n)}),o.zoomin.on("touchstart",function(t){c(n)}),o.zoomin.on("touchend",function(t){h(n)}),o.zoomout.on("touchstart",function(t){u(n)}),o.zoomout.on("touchend",function(t){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(t){f(n,t)}),o.canvas.addEventListener("touchmove",function(t){w(n,t)}),o.canvas.addEventListener("touchend",function(t){g(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(t){f(n,t)}),o.canvas.addEventListener("mousemove",function(t){w(n,t)}),o.canvas.addEventListener("mouseup",function(t){g(n)}),o.canvas.addEventListener("mouseleave",function(t){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(t){var a;l(a=n,{pause:!1}).manual&&m(a)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(t){var a;a=n,(t=t).preventDefault(),t.stopPropagation(),o=l(a),l(a,{deltaFactor:1+t.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),m(a),setTimeout(function(){l(a,{deltaFactor:1})},25)})),o.right.on("mousedown",function(t){e(n)}),o.right.on("mouseup",function(t){h(n)}),o.left.on("mousedown",function(t){i(n)}),o.left.on("mouseup",function(t){h(n)}),o.up.on("mousedown",function(t){s(n)}),o.up.on("mouseup",function(t){h(n)}),o.down.on("mousedown",function(t){r(n)}),o.down.on("mouseup",function(t){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(t){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(t){h(n)}),o.zoomout.on("mousedown",function(t){u(n)}),o.zoomout.on("mouseup",function(t){h(n)}),o.isLightbox&&(p("body").on("quitimage",function(t){var a;a=n,wppaConsoleLog("Zoom Quit Image"),o=l(a,{abort:!0}),p(o.canvas).hide(),p("#wppa-pctl-div-"+o.itemId).hide()}),p("#wppa-pctl-div-"+o.itemId).on("click",function(t){wppaKillEvent(t)})),o.isLightbox?(p(window).off("resize",wppaOvlShowSame),p(window).on("resize",wppaOvlShowSame)):p(window).on("resize",function(t){a(n)}),a(n),o.initialized=!0,l(n,o),p("#wppa-ovl-spin").hide(),wppaProtect()}function m(t){var a,n,o,e,i,s=l(t);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+t):(l(t,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+t+" "+wppaDebugCounter),(s=l(t,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,a=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<a&&1!=s.deltaFactor&&(wppaIsFs()||a<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(a-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=a):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&a>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(t,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){m(t)},10),s.pause&&l(t,{pause:!1}))))}function a(t){var a,n,o,e,i,s,r,c,d,u=l(t);u&&(u.isLightbox?(p("#wppa-overlay-pc").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,a=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&a&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!a&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&a&&(i=(s=screen.height)*u.imageRatio,r=0),n||a||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),p("#wppa-ovl-pan-container").css({top:r,width:i}),p("#wppa-overlay-pc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(p("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),a?p("#wppa-overlay-pc").css({left:4}):p("#wppa-overlay-pc").css({left:(o-i)/2})):(p("#wppa-overlay-pc").css({marginLeft:0}),p("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=p(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(t,u),setTimeout(function(){m(t)},250),p("#wppa-ovl-pan-container").show())}function e(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),m(t)}function i(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),m(t)}function s(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),m(t)}function r(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),m(t)}function c(t){l(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),m(t)}function u(t){l(t,{deltaFactor:.995,buttondown:!0,manual:!1}),m(t)}function h(t){l(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(t,a){var n=l(t),o=v(a).X,e=v(a).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(t,{manual:!0,savedCanvasX:o=b(t,a).X,savedCanvasY:e=b(t,a).Y,buttondown:!1}),m(t))}function w(t,a){var n,o=l(t),e=b(t,a).X,i=b(t,a).Y;o.manual&&(n=o.canvas.width/o.fromWidth,a=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<a&&0<n&&a+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(t,{fromX:a,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function g(t){l(t,{manual:!1})}function l(t,a){if(!wppaZoomData[t])return!1;if(a)for(var n in a)wppaZoomData[t][n]=a[n];return wppaZoomData[t]}function v(t){var a;return t=t.touches?(a=t.touches[0].screenX,t.touches[0].screenY):(a=t.screenX,t.screenY),{X:a,Y:t}}function b(t,a){var n;return a=a.touches?(t=l(t),n=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(n=a.offsetX,a.offsetY),{X:n,Y:a}}function L(){return d=new Date,d.getTime()}}
js/wppa.js CHANGED
@@ -3,7 +3,7 @@
3
  // contains common vars and functions
4
  //
5
 
6
- wppaWppaVer = '7.7.07.003';
7
 
8
  var wppaIsChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
9
  var wppaIsSafari = false;
@@ -352,8 +352,8 @@ function wppaDoInit() {
352
  jQuery(window).on('DOMContentLoaded load resize scroll wheel orientationchange',wppaSizeArea);
353
 
354
  // Make Lazy load images visible
355
- jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaMakeLazyVisible);
356
- jQuery('.wppa-divnicewrap').on('DOMContentLoaded load resize wppascrollend wheelend orientationchange', wppaMakeLazyVisible);
357
 
358
  // Init masonryplus
359
  jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaInitMasonryPlus);
@@ -366,29 +366,9 @@ function wppaDoInit() {
366
 
367
  setTimeout( function() {
368
 
369
- jQuery(".wppa-thumb-area").each(function(){
370
- if (jQuery(this).getNiceScroll) {
371
- jQuery(this).getNiceScroll().resize();
372
- }
373
- });
374
-
375
- jQuery(".albumlist").each(function(){
376
- if (jQuery(this).getNiceScroll) {
377
- jQuery(this).getNiceScroll().resize();
378
- }
379
- });
380
-
381
- jQuery(".wppa-div").each(function(){
382
- if (jQuery(this).getNiceScroll) {
383
- jQuery(this).getNiceScroll().resize();
384
- }
385
- });
386
-
387
- if (jQuery("body").getNiceScroll) {
388
- jQuery("body").getNiceScroll().resize();
389
- }
390
 
391
- }, 2000);
392
  });
393
 
394
  // Fake a resize
@@ -405,7 +385,7 @@ function wppaDoInit() {
405
 
406
  jQuery(document).on("tabbychange",function(){
407
 
408
- if (jQuery("div").getNiceScroll) {
409
  setTimeout(function(){
410
  jQuery("div").getNiceScroll().resize();
411
  wppaDoAllAutocols();
@@ -415,16 +395,8 @@ function wppaDoInit() {
415
  wppaDoAllAutocols();
416
  jQuery(window).trigger("resize");
417
  jQuery("#wppa-ovl-spin").hide();
418
- wppaMakeLazyVisible();
419
  },1500);
420
- /*
421
- setTimeout(function(){
422
- wppaDoAllAutocols();
423
- },2500);
424
- setTimeout(function(){
425
- wppaDoAllAutocols();
426
- },5000);
427
- */
428
  });
429
 
430
  // Lightbox global
@@ -445,7 +417,29 @@ function wppaDoInit() {
445
  }
446
 
447
  // Lazy on mobile extra:
448
- jQuery("div").on("touchmove", wppaMakeLazyVisible);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
  }
450
 
451
  // resize end listener
@@ -490,9 +484,9 @@ var wppaLastAllAutocolsTimer = 0;
490
  function wppaDoAllAutocols(e) {
491
 
492
  // Too soon?
493
- if ( wppaTimNow() < ( wppaLastAllAutocols + wppaExtendedResizeDelay ) ) {
494
  if ( ! wppaLastAllAutocolsTimer ) {
495
- wppaLastAllAutocolsTimer = setTimeout( wppaDoAllAutocols, wppaExtendedResizeDelay );
496
  }
497
  return;
498
  }
@@ -503,7 +497,7 @@ function wppaDoAllAutocols(e) {
503
  // wppaConsoleLog('Doing wppaDoAllAutocols() from '+(e? e.target: 'unknown'), 'force');
504
 
505
  // Doit
506
- //setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
507
  _wppaDoAllAutocols(0);
508
  }
509
 
@@ -518,9 +512,6 @@ function _wppaDoAllAutocols(i) {
518
  }
519
  });
520
 
521
- // Do lazy, just to be sure, for Ale
522
- // wppaMakeLazyVisible();
523
-
524
  // Do retries if configured (-1 is infinite)
525
  if ( i < wppaExtendedResizeCount || wppaExtendedResizeCount == -1 ) {
526
  setTimeout(function(){_wppaDoAllAutocols(i+1)}, wppaExtendedResizeDelay);
3
  // contains common vars and functions
4
  //
5
 
6
+ wppaWppaVer = '8.0.00.011';
7
 
8
  var wppaIsChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
9
  var wppaIsSafari = false;
352
  jQuery(window).on('DOMContentLoaded load resize scroll wheel orientationchange',wppaSizeArea);
353
 
354
  // Make Lazy load images visible
355
+ jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', function(){wppaMakeLazyVisibleScrollEnd('doinitwindowon')});
356
+ jQuery('.wppa-divnicewrap').on('DOMContentLoaded load resize wppascrollend wheelend orientationchange', function(){wppaMakeLazyVisibleScrollEnd('doinitnicewrapon')});
357
 
358
  // Init masonryplus
359
  jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaInitMasonryPlus);
366
 
367
  setTimeout( function() {
368
 
369
+ wppaResizeNice();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
 
371
+ }, 1000);
372
  });
373
 
374
  // Fake a resize
385
 
386
  jQuery(document).on("tabbychange",function(){
387
 
388
+ if ( typeof jQuery("div").getNiceScroll != "undefined" ) {
389
  setTimeout(function(){
390
  jQuery("div").getNiceScroll().resize();
391
  wppaDoAllAutocols();
395
  wppaDoAllAutocols();
396
  jQuery(window).trigger("resize");
397
  jQuery("#wppa-ovl-spin").hide();
398
+ wppaMakeLazyVisibleScrollEnd("tabbychange");
399
  },1500);
 
 
 
 
 
 
 
 
400
  });
401
 
402
  // Lightbox global
417
  }
418
 
419
  // Lazy on mobile extra:
420
+ jQuery("div").on("touchmove", wppaMakeLazyVisibleScrollEnd);
421
+ }
422
+
423
+ // Resize all nicescrollers
424
+ var wppaResizeNiceTimer;
425
+ function wppaResizeNice() {
426
+
427
+ clearTimeout(wppaResizeNiceTimer);
428
+ // wppaConsoleLog('ResizeNice skipped', "force");
429
+ wppaResizeNiceTimer = setTimeout(function(){_wppaResizeNice()}, 200);
430
+ }
431
+ function _wppaResizeNice() {
432
+
433
+ wppaConsoleLog("Doing wppaResizeNice", "force");
434
+
435
+ if ( typeof jQuery("body").getNiceScroll == "function" ) {
436
+ jQuery("body").getNiceScroll().resize();
437
+ }
438
+ jQuery("div").each(function(){
439
+ if ( typeof jQuery(this).getNiceScroll == "function" ) {
440
+ jQuery(this).getNiceScroll().resize();
441
+ }
442
+ });
443
  }
444
 
445
  // resize end listener
484
  function wppaDoAllAutocols(e) {
485
 
486
  // Too soon?
487
+ if ( wppaTimNow() < ( wppaLastAllAutocols + 200 ) ) {
488
  if ( ! wppaLastAllAutocolsTimer ) {
489
+ wppaLastAllAutocolsTimer = setTimeout( wppaDoAllAutocols, 200 );
490
  }
491
  return;
492
  }
497
  // wppaConsoleLog('Doing wppaDoAllAutocols() from '+(e? e.target: 'unknown'), 'force');
498
 
499
  // Doit
500
+ //setTimeout(function(){_wppaDoAllAutocols(-1)}, 200);
501
  _wppaDoAllAutocols(0);
502
  }
503
 
512
  }
513
  });
514
 
 
 
 
515
  // Do retries if configured (-1 is infinite)
516
  if ( i < wppaExtendedResizeCount || wppaExtendedResizeCount == -1 ) {
517
  setTimeout(function(){_wppaDoAllAutocols(i+1)}, wppaExtendedResizeDelay);
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- wppaWppaVer="7.7.07.003";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisible()},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisible)}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+wppaExtendedResizeDelay?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,wppaExtendedResizeDelay):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
1
+ wppaWppaVer="8.0.00.011";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeNiceTimer,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitwindowon")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",function(){wppaMakeLazyVisibleScrollEnd("doinitnicewrapon")}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){wppaResizeNice()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){void 0!==jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisibleScrollEnd("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisibleScrollEnd)}function wppaResizeNice(){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice()},200)}function _wppaResizeNice(){wppaConsoleLog("Doing wppaResizeNice","force"),"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery("div").each(function(){"function"==typeof jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
theme/wppa-style.css CHANGED
@@ -8,7 +8,7 @@
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
- /* This is version 7.7.04.006
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
@@ -47,6 +47,7 @@
47
  .wppa-box {
48
  padding: 3px 6px 3px 6px;
49
  box-sizing: border-box;
 
50
  }
51
  .wppa-filmstrip-box {
52
  box-sizing: content-box;
@@ -353,7 +354,7 @@ border: 0;
353
  }
354
 
355
  .filmwindow {
356
- /* position: absolute; */
357
  }
358
 
359
  .wppa-filmthumb-active {
@@ -577,11 +578,30 @@ display:none;
577
  z-index:200000;
578
  }
579
  #wppa-overlay-ic {
 
580
  z-index:200005;
 
 
 
 
 
 
 
 
 
581
  position:fixed;
 
 
 
 
 
 
 
 
582
  }
583
  #wppa-ovl-pan-container {
584
  position:fixed;
 
585
  }
586
 
587
  /* Global fs buttons */
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
+ /* This is version 8.0.00.012
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
47
  .wppa-box {
48
  padding: 3px 6px 3px 6px;
49
  box-sizing: border-box;
50
+ position:relative;
51
  }
52
  .wppa-filmstrip-box {
53
  box-sizing: content-box;
354
  }
355
 
356
  .filmwindow {
357
+ position: absolute !important;
358
  }
359
 
360
  .wppa-filmthumb-active {
578
  z-index:200000;
579
  }
580
  #wppa-overlay-ic {
581
+ position:fixed;
582
  z-index:200005;
583
+ top:50%;
584
+ left:50%;
585
+ opacity:1;
586
+ box-shadow:none;
587
+ box-sizing:content-box;
588
+ text-align:center;
589
+ background-color:transparent;
590
+ }
591
+ #wppa-overlay-pc {
592
  position:fixed;
593
+ z-index:200005;
594
+ margin-top:0;
595
+ margin-left:0;
596
+ opacity:1;
597
+ box-shadow:none;
598
+ box-sizing:content-box;
599
+ text-align:center;
600
+ background-color:transparent;
601
  }
602
  #wppa-ovl-pan-container {
603
  position:fixed;
604
+ top:0;
605
  }
606
 
607
  /* Global fs buttons */
theme/wppa-theme.php CHANGED
@@ -3,11 +3,11 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the albums/photos/slideshow in a page or post
6
- * Version 7.3.11.002
7
  */
8
  function wppa_theme() {
9
 
10
- global $wppa_version; $wppa_version = '7.3.11.002'; // The version number of this file
11
  global $wppa;
12
  global $wppa_show_statistics; // Can be set to true by a custom page template
13
 
@@ -120,7 +120,7 @@ global $wppa_show_statistics; // Can be set to true by a custom page templa
120
  }
121
 
122
  if ( $didsome && wppa_is_pagination() ) $thumbs = false; // Pag on and didsome: force a pagebreak by faking no thumbs
123
- if ( is_array( $thumbs ) && count( $thumbs ) <= wppa_get_mincount() && ! $wanted_empty ) $thumbs = false; // Less than treshold value
124
  if ( wppa_switch( 'thumbs_first' ) && $curpage > $n_thumb_pages ) $thumbs = false; // If thumbs done, do not display an empty thumbarea
125
 
126
  // Process the thumbs
@@ -472,7 +472,7 @@ global $wppa_show_statistics; // Can be set to true by a custom page templa
472
  function wppa_is_wanted_empty( $thumbs ) {
473
 
474
  if ( ! wppa_switch( 'show_empty_thumblist' ) ) return false; // Feature not enabled
475
- if ( is_array( $thumbs ) && count( $thumbs ) > wppa_get_mincount() ) return false; // Album is not empty
476
  if ( wppa_is_virtual() ) return false; // wanted empty only on real albums
477
  if ( ! wppa_is_int( wppa( 'start_album' ) ) ) return false; // Only seingle albums, no enumerations
478
  if ( wppa( 'albums_only' ) ) return false; // Explicitly no thumbs
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the albums/photos/slideshow in a page or post
6
+ * Version 8.0.00.003
7
  */
8
  function wppa_theme() {
9
 
10
+ global $wppa_version; $wppa_version = '8.0.00.003'; // The version number of this file
11
  global $wppa;
12
  global $wppa_show_statistics; // Can be set to true by a custom page template
13
 
120
  }
121
 
122
  if ( $didsome && wppa_is_pagination() ) $thumbs = false; // Pag on and didsome: force a pagebreak by faking no thumbs
123
+ if ( is_array( $thumbs ) && ! count( $thumbs ) && ! $wanted_empty ) $thumbs = false; // Less than treshold value
124
  if ( wppa_switch( 'thumbs_first' ) && $curpage > $n_thumb_pages ) $thumbs = false; // If thumbs done, do not display an empty thumbarea
125
 
126
  // Process the thumbs
472
  function wppa_is_wanted_empty( $thumbs ) {
473
 
474
  if ( ! wppa_switch( 'show_empty_thumblist' ) ) return false; // Feature not enabled
475
+ if ( is_array( $thumbs ) && count( $thumbs ) ) return false; // Album is not empty
476
  if ( wppa_is_virtual() ) return false; // wanted empty only on real albums
477
  if ( ! wppa_is_int( wppa( 'start_album' ) ) ) return false; // Only seingle albums, no enumerations
478
  if ( wppa( 'albums_only' ) ) return false; // Explicitly no thumbs
vendor/nicescroll/jquery.nicescroll.js CHANGED
@@ -2552,7 +2552,8 @@
2552
  q: false
2553
  });
2554
 
2555
- (passiveSupported && active) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);
 
2556
  };
2557
 
2558
  this._unbind = function (el, name, fn, bub) { // primitive unbind
2552
  q: false
2553
  });
2554
 
2555
+ // (passiveSupported && active) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);
2556
+ (passiveSupported && (active || el == window.document || el == window.document.body || el == window)) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);
2557
  };
2558
 
2559
  this._unbind = function (el, name, fn, bub) { // primitive unbind
vendor/nicescroll/jquery.nicescroll.min.js CHANGED
@@ -1,2 +1,2 @@
1
  /* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
2
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=window,c=n(a),d=[],u=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||!1,h=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||!1;if(u)a.cancelAnimationFrame||(h=function(e){});else{var p=0;u=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-p)),i=a.setTimeout(function(){e(t+r)},r);return p=t+r,i},h=function(e){a.clearTimeout(e)}}var m=a.MutationObserver||a.WebKitMutationObserver||!1,f=Date.now||function(){return(new Date).getTime()},g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},v=!1,w=function(){if(v)return v;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in a,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(a.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in a&&9===l.documentMode,i.isie10=i.isie&&"performance"in a&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in a,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in a,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in a,i.hasw3ctouch=(a.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(a.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&a.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==m,e=null,v=i,i},b=function(e,p){function v(){var e=T.doc.css(P.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function b(){var e=T.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}function x(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=I[r]||0)?t?T.win.outerHeight()-T.win.innerHeight():T.win.outerWidth()-T.win.innerWidth():1;return T.isie8&&i&&(i+=1),s?i:0}return i}function S(e,o,t,r){T._bind(e,o,function(r){var i={original:r=r||a.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function z(e,o,t,r){T.scrollrunning||(T.newscrolly=T.getScrollTop(),T.newscrollx=T.getScrollLeft(),D=f());var i=f()-D;if(D=f(),i>350?A=1:A+=(2-A)/10,e=e*A|0,o=o*A|0,e){if(r)if(e<0){if(T.getScrollLeft()>=T.page.maxw)return!0}else if(T.getScrollLeft()<=0)return!0;var s=e>0?1:-1;X!==s&&(T.scrollmom&&T.scrollmom.stop(),T.newscrollx=T.getScrollLeft(),X=s),T.lastdeltax-=e}if(o){if(function(){var e=T.getScrollTop();if(o<0){if(e>=T.page.maxh)return!0}else if(e<=0)return!0}()){if(M.nativeparentscrolling&&t&&!T.ispage&&!T.zoomactive)return!0;var n=T.view.h>>1;T.newscrolly<-n?(T.newscrolly=-n,o=-1):T.newscrolly>T.page.maxh+n?(T.newscrolly=T.page.maxh+n,o=1):o=0}var l=o>0?1:-1;B!==l&&(T.scrollmom&&T.scrollmom.stop(),T.newscrolly=T.getScrollTop(),B=l),T.lastdeltay-=o}(o||e)&&T.synched("relativexy",function(){var e=T.lastdeltay+T.newscrolly;T.lastdeltay=0;var o=T.lastdeltax+T.newscrollx;T.lastdeltax=0,T.rail.drag||T.doScrollPos(o,e)})}function k(e,o,t){var r,i;return!(t||!q)||(0===e.deltaMode?(r=-e.deltaX*(M.mousescrollstep/54)|0,i=-e.deltaY*(M.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*M.mousescrollstep*50/80|0,i=-e.deltaY*M.mousescrollstep*50/80|0),o&&M.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?T.getScrollLeft()>=T.page.maxw:T.getScrollLeft()<=0)&&(i=r,r=0)),T.isrtlmode&&(r=-r),z(r,i,t,!0)?void(t&&(q=!0)):(q=!1,e.stopImmediatePropagation(),e.preventDefault()))}var T=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var E=n("body"),M=this.opt={doc:E,win:!1};if(n.extend(M,g),M.snapbackspeed=80,e)for(var L in M)void 0!==e[L]&&(M[L]=e[L]);if(M.disablemutationobserver&&(m=!1),this.doc=M.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(M.win?M.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==M.win,this.win=M.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=E,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=M.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==M.rtlmode){var C=this.win[0]==a?this.body:this.win,N=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==N||"lr-tb"==N||""===N?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==N||"tb"==N||"tb-rl"==N||"rl-tb"==N,this.isvertical="vertical-rl"==N||"tb"==N||"tb-rl"==N)}else this.isrtlmode=!0===M.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==M.scrollbarid)this.id=M.scrollbarid;else do{this.id="ascrail"+i++}while(l.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=M.overflowx,this.overflowy=M.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=w();var P=n.extend({},this.detected);this.canhwscroll=P.hastransform&&M.hwacceleration,this.ishwscroll=this.canhwscroll&&T.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(P.iswebkit||P.isie||P.isie11):this.hasreversehr=!(P.iswebkit||P.isie&&!P.isie10&&!P.isie11):this.hasreversehr=!1,this.istouchcapable=!1,P.cantouch||!P.hasw3ctouch&&!P.hasmstouch?!P.cantouch||P.isios||P.isandroid||!P.iswebkit&&!P.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,M.enablemouselockapi||(P.hasmousecapture=!1,P.haspointerlock=!1),this.debounced=function(e,o,t){T&&(T.delaylist[e]||!1||(T.delaylist[e]={h:u(function(){T.delaylist[e].fn.call(T),T.delaylist[e]=!1},t)},o.call(T)),T.delaylist[e].fn=o)},this.synched=function(e,o){T.synclist[e]?T.synclist[e]=o:(T.synclist[e]=o,u(function(){T&&(T.synclist[e]&&T.synclist[e].call(T),T.synclist[e]=null)}))},this.unsynched=function(e){T.synclist[e]&&(T.synclist[e]=!1)},this.css=function(e,o){for(var t in o)T.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?T.getScrollTop():T.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?T.getScrollLeft():T.setScrollLeft(e)};var R=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=f(),this.df=o-e};if(R.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(f()-this.ts)/this.spd},getNow:function(){var e=(f()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e>=1?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=f(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},P.hastranslate3d&&P.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[13]:-o[5];if(T.timerscroll&&T.timerscroll.bz)return T.timerscroll.bz.getNow()}return T.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[12]:-o[4];if(T.timerscroll&&T.timerscroll.bh)return T.timerscroll.bh.getNow()}return T.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,a,1),o.niceevent=!0,e.dispatchEvent(o)};var _=this.isrtlmode?1:-1;P.hastranslate3d&&M.enabletranslate3d?(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])}):(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])})}else this.getScrollTop=function(){return T.docscroll.scrollTop()},this.setScrollTop=function(e){T.docscroll.scrollTop(e)},this.getScrollLeft=function(){return T.hasreversehr?T.detected.ismozilla?T.page.maxw-Math.abs(T.docscroll.scrollLeft()):T.page.maxw-T.docscroll.scrollLeft():T.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(T)return T.hasreversehr&&(e=T.detected.ismozilla?-(T.page.maxw-e):T.page.maxw-e),T.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:a.pageYOffset||l.documentElement.scrollTop,left:a.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(T.isfixed){var e=T.win.offset(),o=T.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=T.win.offset();if(!T.viewport)return t;var r=T.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(T.ishwscroll)T.rail.css({height:T.win.innerHeight()-(M.railpadding.top+M.railpadding.bottom)}),T.railh&&T.railh.css({width:T.win.innerWidth()-(M.railpadding.left+M.railpadding.right)});else{var r=T.getOffset();if(o={top:r.top,left:r.left-(M.railpadding.left+M.railpadding.right)},o.top+=x(T.win,"border-top-width",!0),o.left+=T.rail.align?T.win.outerWidth()-x(T.win,"border-right-width")-T.rail.width:x(T.win,"border-left-width"),(t=M.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),T.railslocked||T.rail.css({top:o.top,left:o.left,height:(e?e.h:T.win.innerHeight())-(M.railpadding.top+M.railpadding.bottom)}),T.zoom&&T.zoom.css({top:o.top+1,left:1==T.rail.align?o.left-20:o.left+T.rail.width+4}),T.railh&&!T.railslocked){o={top:r.top,left:r.left},(t=M.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=T.railh.align?o.top+x(T.win,"border-top-width",!0)+T.win.innerHeight()-T.railh.height:o.top+x(T.win,"border-top-width",!0),s=o.left+x(T.win,"border-left-width");T.railh.css({top:i-(M.railpadding.top+M.railpadding.bottom),left:s,width:T.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;T.railslocked||(T.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?T.doScrollLeft:T.doScrollTop,s=t?(e.pageX-T.railh.offset().left-T.cursorwidth/2)*T.scrollratio.x:(e.pageY-T.rail.offset().top-T.cursorheight/2)*T.scrollratio.y,T.unsynched("relativexy"),r(0|s)):(r=t?T.doScrollLeftBy:T.doScrollBy,s=t?T.scroll.x:T.scroll.y,n=t?e.pageX-T.railh.offset().left:e.pageY-T.rail.offset().top,i=t?T.view.w:T.view.h,r(s>=n?i:-i)))},T.newscrolly=T.newscrollx=0,T.hasanimationframe="requestAnimationFrame"in a,T.hascancelanimationframe="cancelAnimationFrame"in a,T.hasborderbox=!1,this.init=function(){if(T.saved.css=[],P.isoperamini)return!0;if(P.isandroid&&!("hidden"in l))return!0;M.emulatetouch=M.emulatetouch||M.touchbehavior,T.hasborderbox=a.getComputedStyle&&"border-box"===a.getComputedStyle(l.body)["box-sizing"];var e={"overflow-y":"hidden"};if((P.isie11||P.isie10)&&(e["-ms-overflow-style"]="none"),T.ishwscroll&&(this.doc.css(P.transitionstyle,P.prefixstyle+"transform 0ms ease-out"),P.transitionend&&T.bind(T.doc,P.transitionend,T.onScrollTransitionEnd,!1)),T.zindex="auto",T.ispage||"auto"!=M.zindex?T.zindex=M.zindex:T.zindex=b()||"auto",!T.ispage&&"auto"!=T.zindex&&T.zindex>s&&(s=T.zindex),T.isie&&0===T.zindex&&"auto"==M.zindex&&(T.zindex="auto"),!T.ispage||!P.isieold){var i=T.docscroll;T.ispage&&(i=T.haswrapper?T.win:T.doc),T.css(i,e),T.ispage&&(P.isie11||P.isie)&&T.css(n("html"),e),!P.isios||T.ispage||T.haswrapper||T.css(E,{"-webkit-overflow-scrolling":"touch"});var d=n(l.createElement("div"));d.css({position:"relative",top:0,float:"right",width:M.cursorwidth,height:0,"background-color":M.cursorcolor,border:M.cursorborder,"background-clip":"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),d.addClass("nicescroll-cursors"),T.cursor=d;var u=n(l.createElement("div"));u.attr("id",T.id),u.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,f=["left","right","top","bottom"];for(var g in f)p=f[g],(h=M.railpadding[p]||0)&&u.css("padding-"+p,h+"px");u.append(d),u.width=Math.max(parseFloat(M.cursorwidth),d.outerWidth()),u.css({width:u.width+"px",zIndex:T.zindex,background:M.background,cursor:"default"}),u.visibility=!0,u.scrollable=!0,u.align="left"==M.railalign?0:1,T.rail=u,T.rail.drag=!1;var v=!1;!M.boxzoom||T.ispage||P.isieold||(v=l.createElement("div"),T.bind(v,"click",T.doZoom),T.bind(v,"mouseenter",function(){T.zoom.css("opacity",M.cursoropacitymax)}),T.bind(v,"mouseleave",function(){T.zoom.css("opacity",M.cursoropacitymin)}),T.zoom=n(v),T.zoom.css({cursor:"pointer",zIndex:T.zindex,backgroundImage:"url("+M.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),M.dblclickzoom&&T.bind(T.win,"dblclick",T.doZoom),P.cantouch&&M.gesturezoom&&(T.ongesturezoom=function(e){return e.scale>1.5&&T.doZoomIn(e),e.scale<.8&&T.doZoomOut(e),T.cancelEvent(e)},T.bind(T.win,"gestureend",T.ongesturezoom))),T.railh=!1;var w;if(M.horizrailenabled&&(T.css(i,{overflowX:"hidden"}),(d=n(l.createElement("div"))).css({position:"absolute",top:0,height:M.cursorwidth,width:0,backgroundColor:M.cursorcolor,border:M.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),P.isieold&&d.css("overflow","hidden"),d.addClass("nicescroll-cursors"),T.cursorh=d,(w=n(l.createElement("div"))).attr("id",T.id+"-hr"),w.addClass("nicescroll-rails nicescroll-rails-hr"),w.height=Math.max(parseFloat(M.cursorwidth),d.outerHeight()),w.css({height:w.height+"px",zIndex:T.zindex,background:M.background}),w.append(d),w.visibility=!0,w.scrollable=!0,w.align="top"==M.railvalign?0:1,T.railh=w,T.railh.drag=!1),T.ispage)u.css({position:"fixed",top:0,height:"100%"}),u.css(u.align?{right:0}:{left:0}),T.body.append(u),T.railh&&(w.css({position:"fixed",left:0,width:"100%"}),w.css(w.align?{bottom:0}:{top:0}),T.body.append(w));else{if(T.ishwscroll){"static"==T.win.css("position")&&T.css(T.win,{position:"relative"});var x="HTML"==T.win[0].nodeName?T.body:T.win;n(x).scrollTop(0).scrollLeft(0),T.zoom&&(T.zoom.css({position:"absolute",top:1,right:0,"margin-right":u.width+4}),x.append(T.zoom)),u.css({position:"absolute",top:0}),u.css(u.align?{right:0}:{left:0}),x.append(u),w&&(w.css({position:"absolute",left:0,bottom:0}),w.css(w.align?{bottom:0}:{top:0}),x.append(w))}else{T.isfixed="fixed"==T.win.css("position");var S=T.isfixed?"fixed":"absolute";T.isfixed||(T.viewport=T.getViewport(T.win[0])),T.viewport&&(T.body=T.viewport,/fixed|absolute/.test(T.viewport.css("position"))||T.css(T.viewport,{position:"relative"})),u.css({position:S}),T.zoom&&T.zoom.css({position:S}),T.updateScrollBar(),T.body.append(u),T.zoom&&T.body.append(T.zoom),T.railh&&(w.css({position:S}),T.body.append(w))}P.isios&&T.css(T.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),M.disableoutline&&(P.isie&&T.win.attr("hideFocus","true"),P.iswebkit&&T.win.css("outline","none"))}if(!1===M.autohidemode?(T.autohidedom=!1,T.rail.css({opacity:M.cursoropacitymax}),T.railh&&T.railh.css({opacity:M.cursoropacitymax})):!0===M.autohidemode||"leave"===M.autohidemode?(T.autohidedom=n().add(T.rail),P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursor)),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh)),T.railh&&P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"scroll"==M.autohidemode?(T.autohidedom=n().add(T.rail),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh))):"cursor"==M.autohidemode?(T.autohidedom=n().add(T.cursor),T.railh&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"hidden"==M.autohidemode&&(T.autohidedom=!1,T.hide(),T.railslocked=!1),P.cantouch||T.istouchcapable||M.emulatetouch||P.hasmstouch){T.scrollmom=new y(T);T.ontouchstart=function(e){if(T.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(T.hasmoving=!1,T.scrollmom.timer&&(T.triggerScrollEnd(),T.scrollmom.stop()),!T.railslocked){var o=T.getTarget(e);if(o&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return T.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),T.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,st:T.getScrollTop(),sl:T.getScrollLeft(),pt:2,dl:!1,tg:o},T.ispage||!M.directionlockdeadzone)T.rail.drag.dl="f";else{var i={w:c.width(),h:c.height()},s=T.getContentSize(),l=s.h-i.h,a=s.w-i.w;T.rail.scrollable&&!T.railh.scrollable?T.rail.drag.ck=l>0&&"v":!T.rail.scrollable&&T.railh.scrollable?T.rail.drag.ck=a>0&&"h":T.rail.drag.ck=!1}if(M.emulatetouch&&T.isiframe&&P.isie){var d=T.win.position();T.rail.drag.x+=d.left,T.rail.drag.y+=d.top}if(T.hasmoving=!1,T.lastmouseup=!1,T.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return P.hasmousecapture&&o.setCapture(),M.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(T.hasmoving)return!1;o._onclick.call(this,e)}),T.cancelEvent(e)):T.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(T.preventclick={tg:o,click:!1})}}},T.ontouchend=function(e){if(!T.rail.drag)return!0;if(2==T.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;T.rail.drag=!1;var o="mouseup"===e.type;if(T.hasmoving&&(T.scrollmom.doMomentum(),T.lastmouseup=!0,T.hideCursor(),P.hasmousecapture&&l.releaseCapture(),o))return T.cancelEvent(e)}else if(1==T.rail.drag.pt)return T.onmouseup(e)};var z=M.emulatetouch&&T.isiframe&&!P.hasmousecapture,k=.3*M.directionlockdeadzone|0;T.ontouchmove=function(e,o){if(!T.rail.drag)return!0;if(e.targetTouches&&M.preventmultitouchscrolling&&e.targetTouches.length>1)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2==T.rail.drag.pt){"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY);var t,r;if(r=t=0,z&&!o){var i=T.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-T.rail.drag.y,a=e.clientX+r,c=a-T.rail.drag.x,d=T.rail.drag.st-n;if(T.ishwscroll&&M.bouncescroll)d<0?d=Math.round(d/2):d>T.page.maxh&&(d=T.page.maxh+Math.round((d-T.page.maxh)/2));else if(d<0?(d=0,s=0):d>T.page.maxh&&(d=T.page.maxh,s=0),0===s&&!T.hasmoving)return T.ispage||(T.rail.drag=!1),!0;var u=T.getScrollLeft();if(T.railh&&T.railh.scrollable&&(u=T.isrtlmode?c-T.rail.drag.sl:T.rail.drag.sl-c,T.ishwscroll&&M.bouncescroll?u<0?u=Math.round(u/2):u>T.page.maxw&&(u=T.page.maxw+Math.round((u-T.page.maxw)/2)):(u<0&&(u=0,a=0),u>T.page.maxw&&(u=T.page.maxw,a=0))),!T.hasmoving){if(T.rail.drag.y===e.clientY&&T.rail.drag.x===e.clientX)return T.cancelEvent(e);var h=Math.abs(n),p=Math.abs(c),m=M.directionlockdeadzone;if(T.rail.drag.ck?"v"==T.rail.drag.ck?p>m&&h<=k?T.rail.drag=!1:h>m&&(T.rail.drag.dl="v"):"h"==T.rail.drag.ck&&(h>m&&p<=k?T.rail.drag=!1:p>m&&(T.rail.drag.dl="h")):h>m&&p>m?T.rail.drag.dl="f":h>m?T.rail.drag.dl=p>k?"f":"v":p>m&&(T.rail.drag.dl=h>k?"f":"h"),!T.rail.drag.dl)return T.cancelEvent(e);T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0}return T.preventclick&&!T.preventclick.click&&(T.preventclick.click=T.preventclick.tg.onclick||!1,T.preventclick.tg.onclick=T.onpreventclick),T.rail.drag.dl&&("v"==T.rail.drag.dl?u=T.rail.drag.sl:"h"==T.rail.drag.dl&&(d=T.rail.drag.st)),T.synched("touchmove",function(){T.rail.drag&&2==T.rail.drag.pt&&(T.prepareTransition&&T.resetTransition(),T.rail.scrollable&&T.setScrollTop(d),T.scrollmom.update(a,s),T.railh&&T.railh.scrollable?(T.setScrollLeft(u),T.showCursor(d,u)):T.showCursor(d),P.isie10&&l.selection.clear())}),T.cancelEvent(e)}return 1==T.rail.drag.pt?T.onmousemove(e):void 0},T.ontouchstartCursor=function(e,o){if(!T.rail.drag||3==T.rail.drag.pt){if(T.locked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:T.scroll.x,sy:T.scroll.y,pt:3,hr:!!o};var t=T.getTarget(e);return!T.ispage&&P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.cancelEvent(e)}},T.ontouchendCursor=function(e){if(T.rail.drag){if(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),3!=T.rail.drag.pt)return;return T.rail.drag=!1,T.cancelEvent(e)}},T.ontouchmoveCursor=function(e){if(T.rail.drag){if(3!=T.rail.drag.pt)return;if(T.cursorfreezed=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.touches[0].clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.touches[0].clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("touchmove",function(){T.rail.drag&&3==T.rail.drag.pt&&(T.showCursor(),T.rail.drag.hr?T.doScrollLeft(Math.round(T.scroll.x*T.scrollratio.x),M.cursordragspeed):T.doScrollTop(Math.round(T.scroll.y*T.scrollratio.y),M.cursordragspeed))}),T.cancelEvent(e)}}}if(T.onmousedown=function(e,o){if(!T.rail.drag||1==T.rail.drag.pt){if(T.railslocked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,pt:1,hr:o||!1};var t=T.getTarget(e);return P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.hasmoving=!1,T.cancelEvent(e)}},T.onmouseup=function(e){if(T.rail.drag)return 1!=T.rail.drag.pt||(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),T.rail.drag=!1,T.cursorfreezed=!1,T.hasmoving&&T.triggerScrollEnd(),T.cancelEvent(e))},T.onmousemove=function(e){if(T.rail.drag){if(1!==T.rail.drag.pt)return;if(P.ischrome&&0===e.which)return T.onmouseup(e);if(T.cursorfreezed=!0,T.hasmoving||T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("mousemove",function(){T.cursorfreezed&&(T.showCursor(),T.rail.drag.hr?T.scrollLeft(Math.round(T.scroll.x*T.scrollratio.x)):T.scrollTop(Math.round(T.scroll.y*T.scrollratio.y)))}),T.cancelEvent(e)}T.checkarea=0},P.cantouch||M.emulatetouch)T.onpreventclick=function(e){if(T.preventclick)return T.preventclick.tg.onclick=T.preventclick.click,T.preventclick=!1,T.cancelEvent(e)},T.onclick=!P.isios&&function(e){return!T.lastmouseup||(T.lastmouseup=!1,T.cancelEvent(e))},M.grabcursorenabled&&P.cursorgrabvalue&&(T.css(T.ispage?T.doc:T.win,{cursor:P.cursorgrabvalue}),T.css(T.rail,{cursor:P.cursorgrabvalue}));else{var L=function(e){if(T.selectiondrag){if(e){var o=T.win.outerHeight(),t=e.pageY-T.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),T.selectiondrag.df=t}if(0!==T.selectiondrag.df){var r=-2*T.selectiondrag.df/6|0;T.doScrollBy(r),T.debounced("doselectionscroll",function(){L()},50)}}};T.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},T.onselectionstart=function(e){T.ispage||(T.selectiondrag=T.win.offset())},T.onselectionend=function(e){T.selectiondrag=!1},T.onselectiondrag=function(e){T.selectiondrag&&T.hasTextSelected()&&T.debounced("selectionscroll",function(){L(e)},250)}}if(P.hasw3ctouch?(T.css(T.ispage?n("html"):T.win,{"touch-action":"none"}),T.css(T.rail,{"touch-action":"none"}),T.css(T.cursor,{"touch-action":"none"}),T.bind(T.win,"pointerdown",T.ontouchstart),T.bind(l,"pointerup",T.ontouchend),T.delegate(l,"pointermove",T.ontouchmove)):P.hasmstouch?(T.css(T.ispage?n("html"):T.win,{"-ms-touch-action":"none"}),T.css(T.rail,{"-ms-touch-action":"none"}),T.css(T.cursor,{"-ms-touch-action":"none"}),T.bind(T.win,"MSPointerDown",T.ontouchstart),T.bind(l,"MSPointerUp",T.ontouchend),T.delegate(l,"MSPointerMove",T.ontouchmove),T.bind(T.cursor,"MSGestureHold",function(e){e.preventDefault()}),T.bind(T.cursor,"contextmenu",function(e){e.preventDefault()})):P.cantouch&&(T.bind(T.win,"touchstart",T.ontouchstart,!1,!0),T.bind(l,"touchend",T.ontouchend,!1,!0),T.bind(l,"touchcancel",T.ontouchend,!1,!0),T.delegate(l,"touchmove",T.ontouchmove,!1,!0)),M.emulatetouch&&(T.bind(T.win,"mousedown",T.ontouchstart,!1,!0),T.bind(l,"mouseup",T.ontouchend,!1,!0),T.bind(l,"mousemove",T.ontouchmove,!1,!0)),(M.cursordragontouch||!P.cantouch&&!M.emulatetouch)&&(T.rail.css({cursor:"default"}),T.railh&&T.railh.css({cursor:"default"}),T.jqbind(T.rail,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.rail,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.rail,"click",function(e){T.doRailClick(e,!1,!1)}),T.bind(T.rail,"dblclick",function(e){T.doRailClick(e,!0,!1)}),T.bind(T.cursor,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursor,"dblclick",function(e){T.cancelEvent(e)})),T.railh&&(T.jqbind(T.railh,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.railh,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.railh,"click",function(e){T.doRailClick(e,!1,!0)}),T.bind(T.railh,"dblclick",function(e){T.doRailClick(e,!0,!0)}),T.bind(T.cursorh,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursorh,"dblclick",function(e){T.cancelEvent(e)})))),M.cursordragontouch&&(this.istouchcapable||P.cantouch)&&(T.bind(T.cursor,"touchstart",T.ontouchstartCursor),T.bind(T.cursor,"touchmove",T.ontouchmoveCursor),T.bind(T.cursor,"touchend",T.ontouchendCursor),T.cursorh&&T.bind(T.cursorh,"touchstart",function(e){T.ontouchstartCursor(e,!0)}),T.cursorh&&T.bind(T.cursorh,"touchmove",T.ontouchmoveCursor),T.cursorh&&T.bind(T.cursorh,"touchend",T.ontouchendCursor)),M.emulatetouch||P.isandroid||P.isios?(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.ontouchend),T.onclick&&T.bind(l,"click",T.onclick),M.cursordragontouch?(T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.cursorh&&T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onmouseup)):(T.bind(T.rail,"mousedown",function(e){e.preventDefault()}),T.railh&&T.bind(T.railh,"mousedown",function(e){e.preventDefault()}))):(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.onmouseup),T.bind(l,"mousemove",T.onmousemove),T.onclick&&T.bind(l,"click",T.onclick),T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.railh&&(T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.bind(T.cursorh,"mouseup",T.onmouseup)),!T.ispage&&M.enablescrollonselection&&(T.bind(T.win[0],"mousedown",T.onselectionstart),T.bind(l,"mouseup",T.onselectionend),T.bind(T.cursor,"mouseup",T.onselectionend),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onselectionend),T.bind(l,"mousemove",T.onselectiondrag)),T.zoom&&(T.jqbind(T.zoom,"mouseenter",function(){T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.zoom,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}))),M.enablemousewheel&&(T.isiframe||T.mousewheel(P.isie&&T.ispage?l:T.win,T.onmousewheel),T.mousewheel(T.rail,T.onmousewheel),T.railh&&T.mousewheel(T.railh,T.onmousewheelhr)),T.ispage||P.cantouch||/HTML|^BODY/.test(T.win[0].nodeName)||(T.win.attr("tabindex")||T.win.attr({tabindex:++r}),T.bind(T.win,"focus",function(e){o=T.getTarget(e).id||T.getTarget(e)||!1,T.hasfocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"blur",function(e){o=!1,T.hasfocus=!1}),T.bind(T.win,"mouseenter",function(e){t=T.getTarget(e).id||T.getTarget(e)||!1,T.hasmousefocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"mouseleave",function(e){t=!1,T.hasmousefocus=!1,T.rail.drag||T.hideCursor()})),T.onkeypress=function(e){if(T.railslocked&&0===T.page.maxh)return!0;e=e||a.event;var r=T.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(T.hasfocus||T.hasmousefocus&&!o||T.ispage&&!o&&!t){var i=e.keyCode;if(T.railslocked&&27!=i)return T.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,c=!1;switch(i){case 38:case 63233:T.doScrollBy(72),c=!0;break;case 40:case 63235:T.doScrollBy(-72),c=!0;break;case 37:case 63232:T.railh&&(s?T.doScrollLeft(0):T.doScrollLeftBy(72),c=!0);break;case 39:case 63234:T.railh&&(s?T.doScrollLeft(T.page.maxw):T.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:T.doScrollBy(T.view.h),c=!0;break;case 34:case 63277:T.doScrollBy(-T.view.h),c=!0;break;case 36:case 63273:T.railh&&s?T.doScrollPos(0,0):T.doScrollTo(0),c=!0;break;case 35:case 63275:T.railh&&s?T.doScrollPos(T.page.maxw,T.page.maxh):T.doScrollTo(T.page.maxh),c=!0;break;case 32:M.spacebarenabled&&(l?T.doScrollBy(T.view.h):T.doScrollBy(-T.view.h),c=!0);break;case 27:T.zoomactive&&(T.doZoom(),c=!0)}if(c)return T.cancelEvent(e)}},M.enablekeyboard&&T.bind(l,P.isopera&&!P.isopera12?"keypress":"keydown",T.onkeypress),T.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(T.wheelprevented=!0)}),T.bind(l,"keyup",function(e){e.ctrlKey||!1||(T.wheelprevented=!1)}),T.bind(a,"blur",function(e){T.wheelprevented=!1}),T.bind(a,"resize",T.onscreenresize),T.bind(a,"orientationchange",T.onscreenresize),T.bind(a,"load",T.lazyResize),P.ischrome&&!T.ispage&&!T.haswrapper){var C=T.win.attr("style"),N=parseFloat(T.win.css("width"))+1;T.win.css("width",N),T.synched("chromefix",function(){T.win.attr("style",C)})}if(T.onAttributeChange=function(e){T.lazyResize(T.isieold?250:30)},M.enableobserver&&(T.isie11||!1===m||(T.observerbody=new m(function(e){if(e.forEach(function(e){if("attributes"==e.type)return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],T.doc[0])?T.hide():T.show()}),T.me.clientWidth!=T.page.width||T.me.clientHeight!=T.page.height)return T.lazyResize(30)}),T.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!T.ispage&&!T.haswrapper)){var R=T.win[0];!1!==m?(T.observer=new m(function(e){e.forEach(T.onAttributeChange)}),T.observer.observe(R,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),T.observerremover=new m(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(T&&e.removedNodes[o]===R)return T.remove()})}),T.observerremover.observe(R.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(T.bind(R,P.isie&&!P.isie9?"propertychange":"DOMAttrModified",T.onAttributeChange),P.isie9&&R.attachEvent("onpropertychange",T.onAttributeChange),T.bind(R,"DOMNodeRemoved",function(e){e.target===R&&T.remove()}))}!T.ispage&&M.boxzoom&&T.bind(a,"resize",T.resizeZoom),T.istextarea&&(T.bind(T.win,"keydown",T.lazyResize),T.bind(T.win,"mouseup",T.lazyResize)),T.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){T.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){T.iframexd=!0,o=!1}if(T.iframexd)return"console"in a&&console.log("NiceScroll error: policy restriced iframe"),!0;if(T.forcescreen=!0,T.isiframe&&(T.iframe={doc:n(o),html:T.doc.contents().find("html")[0],body:T.doc.contents().find("body")[0]},T.getContentSize=function(){return{w:Math.max(T.iframe.html.scrollWidth,T.iframe.body.scrollWidth),h:Math.max(T.iframe.html.scrollHeight,T.iframe.body.scrollHeight)}},T.docscroll=n(T.iframe.body)),!P.isios&&M.iframeautoresize&&!T.isiframe){T.win.scrollTop(0),T.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);T.doc.height(t)}T.lazyResize(30),T.css(n(T.iframe.body),e),P.isios&&T.haswrapper&&T.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?T.bind(this.contentWindow,"scroll",T.onscroll):T.bind(o,"scroll",T.onscroll),M.enablemousewheel&&T.mousewheel(o,T.onmousewheel),M.enablekeyboard&&T.bind(o,P.isopera?"keypress":"keydown",T.onkeypress),P.cantouch?(T.bind(o,"touchstart",T.ontouchstart),T.bind(o,"touchmove",T.ontouchmove)):M.emulatetouch&&(T.bind(o,"mousedown",T.ontouchstart),T.bind(o,"mousemove",function(e){return T.ontouchmove(e,!0)}),M.grabcursorenabled&&P.cursorgrabvalue&&T.css(n(o.body),{cursor:P.cursorgrabvalue})),T.bind(o,"mouseup",T.ontouchend),T.zoom&&(M.dblclickzoom&&T.bind(o,"dblclick",T.doZoom),T.ongesturezoom&&T.bind(o,"gestureend",T.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){_.call(T.doc[0],!1)},500),T.bind(this.doc,"load",_)}},this.showCursor=function(e,o){if(T.cursortimeout&&(clearTimeout(T.cursortimeout),T.cursortimeout=0),T.rail){if(T.autohidedom&&(T.autohidedom.stop().css({opacity:M.cursoropacitymax}),T.cursoractive=!0),T.rail.drag&&1==T.rail.drag.pt||(void 0!==e&&!1!==e&&(T.scroll.y=e/T.scrollratio.y|0),void 0!==o&&(T.scroll.x=o/T.scrollratio.x|0)),T.cursor.css({height:T.cursorheight,top:T.scroll.y}),T.cursorh){var t=T.hasreversehr?T.scrollvaluemaxw-T.scroll.x:T.scroll.x;T.cursorh.css({width:T.cursorwidth,left:!T.rail.align&&T.rail.visibility?t+T.rail.width:t}),T.cursoractive=!0}T.zoom&&T.zoom.stop().css({opacity:M.cursoropacitymax})}},this.hideCursor=function(e){T.cursortimeout||T.rail&&T.autohidedom&&(T.hasmousefocus&&"leave"===M.autohidemode||(T.cursortimeout=setTimeout(function(){T.rail.active&&T.showonmouseevent||(T.autohidedom.stop().animate({opacity:M.cursoropacitymin}),T.zoom&&T.zoom.stop().animate({opacity:M.cursoropacitymin}),T.cursoractive=!1),T.cursortimeout=0},e||M.hidecursordelay)))},this.noticeCursor=function(e,o,t){T.showCursor(o,t),T.rail.active||T.hideCursor(e)},this.getContentSize=T.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:T.haswrapper?function(){return{w:T.doc[0].offsetWidth,h:T.doc[0].offsetHeight}}:function(){return{w:T.docscroll[0].scrollWidth,h:T.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!T||!T.win)return!1;var t=T.page.maxh,r=T.page.maxw,i=T.view.h,s=T.view.w;if(T.view={w:T.ispage?T.win.width():T.win[0].clientWidth,h:T.ispage?T.win.height():T.win[0].clientHeight},T.page=o||T.getContentSize(),T.page.maxh=Math.max(0,T.page.h-T.view.h),T.page.maxw=Math.max(0,T.page.w-T.view.w),T.page.maxh==t&&T.page.maxw==r&&T.view.w==s&&T.view.h==i){if(T.ispage)return T;var n=T.win.offset();if(T.lastposition){var l=T.lastposition;if(l.top==n.top&&l.left==n.left)return T}T.lastposition=n}return 0===T.page.maxh?(T.hideRail(),T.scrollvaluemax=0,T.scroll.y=0,T.scrollratio.y=0,T.cursorheight=0,T.setScrollTop(0),T.rail&&(T.rail.scrollable=!1)):(T.page.maxh-=M.railpadding.top+M.railpadding.bottom,T.rail.scrollable=!0),0===T.page.maxw?(T.hideRailHr(),T.scrollvaluemaxw=0,T.scroll.x=0,T.scrollratio.x=0,T.cursorwidth=0,T.setScrollLeft(0),T.railh&&(T.railh.scrollable=!1)):(T.page.maxw-=M.railpadding.left+M.railpadding.right,T.railh&&(T.railh.scrollable=M.horizrailenabled)),T.railslocked=T.locked||0===T.page.maxh&&0===T.page.maxw,T.railslocked?(T.ispage||T.updateScrollBar(T.view),!1):(T.hidden||(T.rail.visibility||T.showRail(),T.railh&&!T.railh.visibility&&T.showRailHr()),T.istextarea&&T.win.css("resize")&&"none"!=T.win.css("resize")&&(T.view.h-=20),T.cursorheight=Math.min(T.view.h,Math.round(T.view.h*(T.view.h/T.page.h))),T.cursorheight=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorheight),T.cursorwidth=Math.min(T.view.w,Math.round(T.view.w*(T.view.w/T.page.w))),T.cursorwidth=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorwidth),T.scrollvaluemax=T.view.h-T.cursorheight-(M.railpadding.top+M.railpadding.bottom),T.hasborderbox||(T.scrollvaluemax-=T.cursor[0].offsetHeight-T.cursor[0].clientHeight),T.railh&&(T.railh.width=T.page.maxh>0?T.view.w-T.rail.width:T.view.w,T.scrollvaluemaxw=T.railh.width-T.cursorwidth-(M.railpadding.left+M.railpadding.right)),T.ispage||T.updateScrollBar(T.view),T.scrollratio={x:T.page.maxw/T.scrollvaluemaxw,y:T.page.maxh/T.scrollvaluemax},T.getScrollTop()>T.page.maxh?T.doScrollTop(T.page.maxh):(T.scroll.y=T.getScrollTop()/T.scrollratio.y|0,T.scroll.x=T.getScrollLeft()/T.scrollratio.x|0,T.cursoractive&&T.noticeCursor()),T.scroll.y&&0===T.getScrollTop()&&T.doScrollTo(T.scroll.y*T.scrollratio.y|0),T)},this.resize=T.onResize;var O=0;this.onscreenresize=function(e){clearTimeout(O);var o=!T.ispage&&!T.haswrapper;o&&T.hideRails(),O=setTimeout(function(){T&&(o&&T.showRails(),T.resize()),O=0},120)},this.lazyResize=function(e){return clearTimeout(O),e=isNaN(e)?240:e,O=setTimeout(function(){T&&T.resize(),O=0},e),T},this.jqbind=function(e,o,t){T.events.push({e:e,n:o,f:t,q:!0}),n(e).on(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))T._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";S(r,i,o,t||!1),"DOMMouseScroll"==i&&S(r,"MozMousePixelScroll",o,t||!1)}};var Y=!1;if(P.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){Y=!0}});a.addEventListener("test",null,H)}catch(e){}this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},a.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},a.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||a.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||a.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=d[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;r>=0;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},T.bind(e,o,s.f,r,i),d[o]=s),T.ispage?(s.a=[T.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(T.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=d[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===T.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(T._unbind(e,o,s.l.f),d[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;T._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){T.events.push({e:e,n:o,f:t,b:r,q:!1}),Y&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){d[o]?T.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<T.events.length;e++){var o=T.events[e];o.q?o.e.unbind(o.n,o.f):T._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return T.showRail().showRailHr()},this.showRail=function(){return 0===T.page.maxh||!T.ispage&&"none"==T.win.css("display")||(T.rail.visibility=!0,T.rail.css("display","block")),T},this.showRailHr=function(){return T.railh&&(0===T.page.maxw||!T.ispage&&"none"==T.win.css("display")||(T.railh.visibility=!0,T.railh.css("display","block"))),T},this.hideRails=function(){return T.hideRail().hideRailHr()},this.hideRail=function(){return T.rail.visibility=!1,T.rail.css("display","none"),T},this.hideRailHr=function(){return T.railh&&(T.railh.visibility=!1,T.railh.css("display","none")),T},this.show=function(){return T.hidden=!1,T.railslocked=!1,T.showRails()},this.hide=function(){return T.hidden=!0,T.railslocked=!0,T.hideRails()},this.toggle=function(){return T.hidden?T.show():T.hide()},this.remove=function(){T.stop(),T.cursortimeout&&clearTimeout(T.cursortimeout);for(var e in T.delaylist)T.delaylist[e]&&h(T.delaylist[e].h);T.doZoomOut(),T.unbindAll(),P.isie9&&T.win[0].detachEvent("onpropertychange",T.onAttributeChange),!1!==T.observer&&T.observer.disconnect(),!1!==T.observerremover&&T.observerremover.disconnect(),!1!==T.observerbody&&T.observerbody.disconnect(),T.events=null,T.cursor&&T.cursor.remove(),T.cursorh&&T.cursorh.remove(),T.rail&&T.rail.remove(),T.railh&&T.railh.remove(),T.zoom&&T.zoom.remove();for(var o=0;o<T.saved.css.length;o++){var t=T.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}T.saved=!1,T.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===T.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in T)T[i]=null,delete T[i];T=null},this.scrollstart=function(e){return this.onscrollstart=e,T},this.scrollend=function(e){return this.onscrollend=e,T},this.scrollcancel=function(e){return this.onscrollcancel=e,T},this.zoomin=function(e){return this.onzoomin=e,T},this.zoomout=function(e){return this.onzoomout=e,T},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(T.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:T.newscrollx,y:T.newscrolly},speed:i};T.onscrollstart.call(T,s)}},this.triggerScrollEnd=function(){if(T.onscrollend){var e=T.getScrollLeft(),o=T.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};T.onscrollend.call(T,t)}};var B=0,X=0,D=0,A=1,q=!1;if(this.onmousewheel=function(e){if(T.wheelprevented||T.locked)return!1;if(T.railslocked)return T.debounced("checkunlock",T.resize,250),!1;if(T.rail.drag)return T.cancelEvent(e);if("auto"===M.oneaxismousemode&&0!==e.deltaX&&(M.oneaxismousemode=!1),M.oneaxismousemode&&0===e.deltaX&&!T.rail.scrollable)return!T.railh||!T.railh.scrollable||T.onmousewheelhr(e);var o=f(),t=!1;if(M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,T.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(T.checkarea=0),r},this.onmousewheelhr=function(e){if(!T.wheelprevented){if(T.railslocked||!T.railh.scrollable)return!0;if(T.rail.drag)return T.cancelEvent(e);var o=f(),t=!1;return M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,!!T.nativescrollingarea||(T.railslocked?T.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return T.cancelScroll(),T.scrollmon&&T.scrollmon.stop(),T.cursorfreezed=!1,T.scroll.y=Math.round(T.getScrollTop()*(1/T.scrollratio.y)),T.noticeCursor(),T},this.getTransitionSpeed=function(e){return 80+e/72*M.scrollspeed|0},M.smoothscroll)if(T.ishwscroll&&P.hastransition&&M.usetransition&&M.smoothscroll){var j="";this.resetTransition=function(){j="",T.doc.css(P.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:T.getTransitionSpeed(e),r=t+"ms";return j!==r&&(j=r,T.doc.css(P.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&u(o),T.showCursor(T.getScrollTop(),T.getScrollLeft()),T.notifyScrollEvent(T.win[0])};u(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();if(((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll(),M.bouncescroll?(o<0?o=o/2|0:o>T.page.maxh&&(o=T.page.maxh+(o-T.page.maxh)/2|0),e<0?e=e/2|0:e>T.page.maxw&&(e=T.page.maxw+(e-T.page.maxw)/2|0)):(o<0?o=0:o>T.page.maxh&&(o=T.page.maxh),e<0?e=0:e>T.page.maxw&&(e=T.page.maxw)),T.scrollrunning&&e==T.newscrollx&&o==T.newscrolly)return!1;T.newscrolly=o,T.newscrollx=e;var s=T.getScrollTop(),n=T.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=T.prepareTransition(a);T.scrollrunning||(T.scrollrunning=!0,T.triggerScrollStart(n,s,e,o,c),T.cursorupdate.start()),T.scrollendtrapped=!0,P.transitionend||(T.scrollendtrapped&&clearTimeout(T.scrollendtrapped),T.scrollendtrapped=setTimeout(T.onScrollTransitionEnd,c)),T.setScrollTop(T.newscrolly),T.setScrollLeft(T.newscrollx)},this.cancelScroll=function(){if(!T.scrollendtrapped)return!0;var e=T.getScrollTop(),o=T.getScrollLeft();return T.scrollrunning=!1,P.transitionend||clearTimeout(P.transitionend),T.scrollendtrapped=!1,T.resetTransition(),T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.timerscroll&&T.timerscroll.tm&&clearInterval(T.timerscroll.tm),T.timerscroll=!1,T.cursorfreezed=!1,T.cursorupdate.stop(),T.showCursor(e,o),T},this.onScrollTransitionEnd=function(){if(T.scrollendtrapped){var e=T.getScrollTop(),o=T.getScrollLeft();if(e<0?e=0:e>T.page.maxh&&(e=T.page.maxh),o<0?o=0:o>T.page.maxw&&(o=T.page.maxw),e!=T.newscrolly||o!=T.newscrollx)return T.doScrollPos(o,e,M.snapbackspeed);T.scrollrunning&&T.triggerScrollEnd(),T.scrollrunning=!1,T.scrollendtrapped=!1,T.resetTransition(),T.timerscroll=!1,T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.cursorupdate.stop(),T.noticeCursor(!1,e,o),T.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll();var s=!1;if(T.bouncescroll&&T.rail.visibility||(o<0?(o=0,s=!0):o>T.page.maxh&&(o=T.page.maxh,s=!0)),T.bouncescroll&&T.railh.visibility||(e<0?(e=0,s=!0):e>T.page.maxw&&(e=T.page.maxw,s=!0)),T.scrollrunning&&T.newscrolly===o&&T.newscrollx===e)return!0;T.newscrolly=o,T.newscrollx=e,T.dst={},T.dst.x=e-i,T.dst.y=o-r,T.dst.px=i,T.dst.py=r;var n=0|Math.sqrt(T.dst.x*T.dst.x+T.dst.y*T.dst.y),l=T.getTransitionSpeed(n);T.bzscroll={};var a=s?1:.58;T.bzscroll.x=new R(i,T.newscrollx,l,0,0,a,1),T.bzscroll.y=new R(r,T.newscrolly,l,0,0,a,1);f();var c=function(){if(T.scrollrunning){var e=T.bzscroll.y.getPos();T.setScrollLeft(T.bzscroll.x.getNow()),T.setScrollTop(T.bzscroll.y.getNow()),e<=1?T.timer=u(c):(T.scrollrunning=!1,T.timer=0,T.triggerScrollEnd())}};T.scrollrunning||(T.triggerScrollStart(i,r,e,o,l),T.scrollrunning=!0,T.timer=u(c))},this.cancelScroll=function(){return T.timer&&h(T.timer),T.timer=0,T.bzscroll=!1,T.scrollrunning=!1,T};else this.doScrollLeft=function(e,o){var t=T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>T.page.maxw?T.page.maxw:e;r<0&&(r=0);var i=o>T.page.maxh?T.page.maxh:o;i<0&&(i=0),T.synched("scroll",function(){T.setScrollTop(i),T.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){z(0,e)},this.doScrollLeftBy=function(e,o){z(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*T.scrollratio.y):e;t<0?t=0:t>T.page.maxh&&(t=T.page.maxh),T.cursorfreezed=!1,T.doScrollTop(e)},this.checkContentSize=function(){var e=T.getContentSize();e.h==T.page.h&&e.w==T.page.w||T.resize(!1,e)},T.onscroll=function(e){T.rail.drag||T.cursorfreezed||T.synched("scroll",function(){T.scroll.y=Math.round(T.getScrollTop()/T.scrollratio.y),T.railh&&(T.scroll.x=Math.round(T.getScrollLeft()/T.scrollratio.x)),T.noticeCursor()})},T.bind(T.docscroll,"scroll",T.onscroll),this.doZoomIn=function(e){if(!T.zoomactive){T.zoomactive=!0,T.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=T.win[0].style;for(var r in o){var i=o[r];T.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}T.zoomrestore.style.width=T.win.css("width"),T.zoomrestore.style.height=T.win.css("height"),T.zoomrestore.padding={w:T.win.outerWidth()-T.win.width(),h:T.win.outerHeight()-T.win.height()},P.isios4&&(T.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),T.win.css({position:P.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=T.win.css("backgroundColor");return(""===n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&T.win.css("backgroundColor","#fff"),T.rail.css({zIndex:s+101}),T.zoom.css({zIndex:s+102}),T.zoom.css("backgroundPosition","0 -18px"),T.resizeZoom(),T.onzoomin&&T.onzoomin.call(T),T.cancelEvent(e)}},this.doZoomOut=function(e){if(T.zoomactive)return T.zoomactive=!1,T.win.css("margin",""),T.win.css(T.zoomrestore.style),P.isios4&&c.scrollTop(T.zoomrestore.scrollTop),T.rail.css({"z-index":T.zindex}),T.zoom.css({"z-index":T.zindex}),T.zoomrestore=!1,T.zoom.css("backgroundPosition","0 0"),T.onResize(),T.onzoomout&&T.onzoomout.call(T),T.cancelEvent(e)},this.doZoom=function(e){return T.zoomactive?T.doZoomOut(e):T.doZoomIn(e)},this.resizeZoom=function(){if(T.zoomactive){var e=T.getScrollTop();T.win.css({width:c.width()-T.zoomrestore.padding.w+"px",height:c.height()-T.zoomrestore.padding.h+"px"}),T.onResize(),T.setScrollTop(Math.min(T.page.maxh,e))}},this.init(),n.nicescroll.push(this)},y=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=f(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=f();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=f(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var p=o.lastscrollx,m=o.lastscrolly,g=function(){var e=f()-t>600?.04:.02;o.speedx&&(p=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=p,(p<0||p>l)&&(e=.1)),o.speedy&&(m=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=m,(m<0||m>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=p,o.nc.setScrollLeft(p)}if(o.speedy){o.nc.getScrollTop();o.chky=m,o.nc.setScrollTop(m)}o.timer||(o.nc.hideCursor(),o.doSnapy(p,m))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(p,m))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},x=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():x.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):x.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():x.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):x.call(n(this),e)})};var S=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():S.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):S.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():S.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):S.call(n(this),e)})};var z=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(z.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new z(this):this[e]&&n.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new z;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new b(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},a.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new z,n.nicescroll.options=g)});
1
  /* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
2
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var T=!1,E=!1,L=0,M=2e3,C=0,P=e,N=document,R=window,_=P(R),I=[];var s,O=R.requestAnimationFrame||R.webkitRequestAnimationFrame||R.mozRequestAnimationFrame||!1,Y=R.cancelAnimationFrame||R.webkitCancelAnimationFrame||R.mozCancelAnimationFrame||!1;O?R.cancelAnimationFrame||(Y=function(e){}):(s=0,O=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-s)),i=R.setTimeout(function(){e(t+r)},r);return s=t+r,i},Y=function(e){R.clearTimeout(e)});function H(){if(r)return r;var e=N.createElement("DIV"),s=e.style,o=navigator.userAgent,t=navigator.platform,n={};return n.haspointerlock="pointerLockElement"in N||"webkitPointerLockElement"in N||"mozPointerLockElement"in N,n.isopera="opera"in R,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini="[object OperaMini]"===Object.prototype.toString.call(R.operamini),n.isie="all"in N&&"attachEvent"in e&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in s),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in N)||7===N.documentMode),n.isie8=n.isie&&"documentMode"in N&&8===N.documentMode,n.isie9=n.isie&&"performance"in R&&9===N.documentMode,n.isie10=n.isie&&"performance"in R&&10===N.documentMode,n.isie11="msRequestFullscreen"in e&&11<=N.documentMode,n.ismsedge="msCredentials"in R,n.ismozilla="MozAppearance"in s,n.iswebkit=!n.ismsedge&&"WebkitAppearance"in s,n.ischrome=n.iswebkit&&"chrome"in R,n.ischrome38=n.ischrome&&"touchAction"in s,n.ischrome22=!n.ischrome38&&n.ischrome&&n.haspointerlock,n.ischrome26=!n.ischrome38&&n.ischrome&&"transition"in s,n.cantouch="ontouchstart"in N.documentElement||"ontouchstart"in R,n.hasw3ctouch=!!R.PointerEvent&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),n.hasmstouch=!n.hasw3ctouch&&(R.MSPointerEvent||!1),n.ismac=/^mac$/i.test(t),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(t),n.isios4=n.isios&&!("seal"in Object),n.isios7=n.isios&&"webkitHidden"in N,n.isios8=n.isios&&"hidden"in N,n.isios10=n.isios&&R.Proxy,n.isandroid=/android/i.test(o),n.haseventlistener="addEventListener"in e,n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,n.trstyle="transform",n.hastransform="transform"in s||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],o=0,t=e.length;o<t;o++)if(void 0!==s[e[o]]){n.trstyle=e[o];break}n.hastransform=!!n.trstyle}(),n.hastransform&&(s[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(s[n.trstyle])),n.transitionstyle="transition",n.prefixstyle="",n.transitionend="transitionend",n.hastransition="transition"in s||function(){n.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],o=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],t=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],r=0,i=e.length;r<i;r++)if(e[r]in s){n.transitionstyle=e[r],n.prefixstyle=o[r],n.transitionend=t[r];break}n.ischrome26&&(n.prefixstyle=o[1]),n.hastransition=n.transitionstyle}(),n.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(n.ischrome&&!n.ischrome38||n.isie)&&(e=[]);for(var o=0,t=e.length;o<t;o++){var r=e[o];if(s.cursor=r,s.cursor==r)return r}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),n.hasmousecapture="setCapture"in e,n.hasMutationObserver=!1!==B,e=null,r=n}function n(e,o){var v=this;this.version="3.7.6",this.name="nicescroll",this.me=o;var t,w=P("body"),b=this.opt={doc:w,win:!1};if(P.extend(b,D),b.snapbackspeed=80,e)for(var r in b)void 0!==e[r]&&(b[r]=e[r]);if(b.disablemutationobserver&&(B=!1),this.doc=b.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test((b.win||this.doc)[0].nodeName),this.haswrapper=!1!==b.win,this.win=b.win||(this.ispage?_:this.doc),this.docscroll=this.ispage&&!this.haswrapper?_:this.win,this.body=w,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=b.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==b.rtlmode?"horizontal-tb"==(o=(t=this.win[0]==R?this.body:this.win).css("writing-mode")||t.css("-webkit-writing-mode")||t.css("-ms-writing-mode")||t.css("-moz-writing-mode"))||"lr-tb"==o||""===o?(this.isrtlmode="rtl"==t.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==o||"tb"==o||"tb-rl"==o||"rl-tb"==o,this.isvertical="vertical-rl"==o||"tb"==o||"tb-rl"==o):(this.isrtlmode=!0===b.rtlmode,this.isvertical=!1),this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,(this.observerbody=!1)!==b.scrollbarid)this.id=b.scrollbarid;else for(;this.id="ascrail"+M++,N.getElementById(this.id););this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=b.overflowx,this.overflowy=b.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=H();var i,y=P.extend({},this.detected);function a(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=X(),this.df=o-e}function s(){var e=v.doc.css(y.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}this.canhwscroll=y.hastransform&&b.hwacceleration,this.ishwscroll=this.canhwscroll&&v.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(y.iswebkit||y.isie||y.isie11):this.hasreversehr=!(y.iswebkit||y.isie&&!y.isie10&&!y.isie11):this.hasreversehr=!1,this.istouchcapable=!1,(y.cantouch||!y.hasw3ctouch&&!y.hasmstouch)&&(!y.cantouch||y.isios||y.isandroid||!y.iswebkit&&!y.ismozilla)||(this.istouchcapable=!0),b.enablemouselockapi||(y.hasmousecapture=!1,y.haspointerlock=!1),this.debounced=function(e,o,t){v&&(v.delaylist[e]||!1||(v.delaylist[e]={h:O(function(){v.delaylist[e].fn.call(v),v.delaylist[e]=!1},t)},o.call(v)),v.delaylist[e].fn=o)},this.synched=function(e,o){v.synclist[e]?v.synclist[e]=o:(v.synclist[e]=o,O(function(){v&&(v.synclist[e]&&v.synclist[e].call(v),v.synclist[e]=null)}))},this.unsynched=function(e){v.synclist[e]&&(v.synclist[e]=!1)},this.css=function(e,o){for(var t in o)v.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?v.getScrollTop():v.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?v.getScrollLeft():v.setScrollLeft(e)},a.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(X()-this.ts)/this.spd},getNow:function(){var e=(X()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return 1<=e?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=X(),this.df=this.ed-this.st,this}},this.ishwscroll?(this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},y.hastranslate3d&&y.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){e=s();if(e)return 16==e.length?-e[13]:-e[5];if(v.timerscroll&&v.timerscroll.bz)return v.timerscroll.bz.getNow()}return v.doc.translate.y},this.getScrollLeft=function(e){if(!e){e=s();if(e)return 16==e.length?-e[12]:-e[4];if(v.timerscroll&&v.timerscroll.bh)return v.timerscroll.bh.getNow()}return v.doc.translate.x},this.notifyScrollEvent=function(e){var o=N.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,R,1),o.niceevent=!0,e.dispatchEvent(o)},i=this.isrtlmode?1:-1,y.hastranslate3d&&b.enabletranslate3d?(this.setScrollTop=function(e,o){v.doc.translate.y=e,v.doc.translate.ty=-1*e+"px",v.doc.css(y.trstyle,"translate3d("+v.doc.translate.tx+","+v.doc.translate.ty+",0)"),o||v.notifyScrollEvent(v.win[0])},this.setScrollLeft=function(e,o){v.doc.translate.x=e,v.doc.translate.tx=e*i+"px",v.doc.css(y.trstyle,"translate3d("+v.doc.translate.tx+","+v.doc.translate.ty+",0)"),o||v.notifyScrollEvent(v.win[0])}):(this.setScrollTop=function(e,o){v.doc.translate.y=e,v.doc.translate.ty=-1*e+"px",v.doc.css(y.trstyle,"translate("+v.doc.translate.tx+","+v.doc.translate.ty+")"),o||v.notifyScrollEvent(v.win[0])},this.setScrollLeft=function(e,o){v.doc.translate.x=e,v.doc.translate.tx=e*i+"px",v.doc.css(y.trstyle,"translate("+v.doc.translate.tx+","+v.doc.translate.ty+")"),o||v.notifyScrollEvent(v.win[0])})):(this.getScrollTop=function(){return v.docscroll.scrollTop()},this.setScrollTop=function(e){v.docscroll.scrollTop(e)},this.getScrollLeft=function(){var e=v.hasreversehr?v.detected.ismozilla?v.page.maxw-Math.abs(v.docscroll.scrollLeft()):v.page.maxw-v.docscroll.scrollLeft():v.docscroll.scrollLeft();return e},this.setScrollLeft=function(e){return setTimeout(function(){if(v)return v.hasreversehr&&(e=v.detected.ismozilla?-(v.page.maxw-e):v.page.maxw-e),v.docscroll.scrollLeft(e)},1)}),this.getTarget=function(e){return e&&(e.target||e.srcElement)||!1},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var n={thin:1,medium:3,thick:5};function l(e,o,t){e=e.css(o),o=parseFloat(e);if(isNaN(o)){t=3==(o=n[e]||0)?t?v.win.outerHeight()-v.win.innerHeight():v.win.outerWidth()-v.win.innerWidth():1;return v.isie8&&o&&(o+=1),t?o:0}return o}this.getDocumentScrollOffset=function(){return{top:R.pageYOffset||N.documentElement.scrollTop,left:R.pageXOffset||N.documentElement.scrollLeft}},this.getOffset=function(){if(v.isfixed){var e=v.win.offset(),o=v.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}o=v.win.offset();if(!v.viewport)return o;e=v.viewport.offset();return{top:o.top-e.top,left:o.left-e.left}},this.updateScrollBar=function(e){var o,t,r;v.ishwscroll?(v.rail.css({height:v.win.innerHeight()-(b.railpadding.top+b.railpadding.bottom)}),v.railh&&v.railh.css({width:v.win.innerWidth()-(b.railpadding.left+b.railpadding.right)})):((r={top:(o=v.getOffset()).top,left:o.left-(b.railpadding.left+b.railpadding.right)}).top+=l(v.win,"border-top-width",!0),r.left+=v.rail.align?v.win.outerWidth()-l(v.win,"border-right-width")-v.rail.width:l(v.win,"border-left-width"),(t=b.railoffset)&&(t.top&&(r.top+=t.top),t.left&&(r.left+=t.left)),v.railslocked||v.rail.css({top:r.top,left:r.left,height:(e?e.h:v.win.innerHeight())-(b.railpadding.top+b.railpadding.bottom)}),v.zoom&&v.zoom.css({top:r.top+1,left:1==v.rail.align?r.left-20:r.left+v.rail.width+4}),v.railh&&!v.railslocked&&(r={top:o.top,left:o.left},(t=b.railhoffset)&&(t.top&&(r.top+=t.top),t.left&&(r.left+=t.left)),t=v.railh.align?r.top+l(v.win,"border-top-width",!0)+v.win.innerHeight()-v.railh.height:r.top+l(v.win,"border-top-width",!0),r=r.left+l(v.win,"border-left-width"),v.railh.css({top:t-(b.railpadding.top+b.railpadding.bottom),left:r,width:v.railh.width})))},this.doRailClick=function(e,o,t){var r,i;v.railslocked||(v.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+N.documentElement.scrollLeft,e.pageY=e.clientY+N.documentElement.scrollTop),o?(r=t?v.doScrollLeft:v.doScrollTop,i=t?(e.pageX-v.railh.offset().left-v.cursorwidth/2)*v.scrollratio.x:(e.pageY-v.rail.offset().top-v.cursorheight/2)*v.scrollratio.y,v.unsynched("relativexy"),r(0|i)):(r=t?v.doScrollLeftBy:v.doScrollBy,i=t?v.scroll.x:v.scroll.y,e=t?e.pageX-v.railh.offset().left:e.pageY-v.rail.offset().top,t=t?v.view.w:v.view.h,r(e<=i?t:-t)))},v.newscrolly=v.newscrollx=0,v.hasanimationframe="requestAnimationFrame"in R,v.hascancelanimationframe="cancelAnimationFrame"in R,v.hasborderbox=!1,this.init=function(){if(v.saved.css=[],y.isoperamini)return!0;if(y.isandroid&&!("hidden"in N))return!0;b.emulatetouch=b.emulatetouch||b.touchbehavior,v.hasborderbox=R.getComputedStyle&&"border-box"===R.getComputedStyle(N.body)["box-sizing"];var e,t={"overflow-y":"hidden"};if((y.isie11||y.isie10)&&(t["-ms-overflow-style"]="none"),v.ishwscroll&&(this.doc.css(y.transitionstyle,y.prefixstyle+"transform 0ms ease-out"),y.transitionend&&v.bind(v.doc,y.transitionend,v.onScrollTransitionEnd,!1)),v.zindex="auto",v.ispage||"auto"!=b.zindex?v.zindex=b.zindex:v.zindex=function(){var e=v.win;if("zIndex"in e)return e.zIndex();for(;0<e.length;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}()||"auto",!v.ispage&&"auto"!=v.zindex&&v.zindex>C&&(C=v.zindex),v.isie&&0===v.zindex&&"auto"==b.zindex&&(v.zindex="auto"),!v.ispage||!y.isieold){var o=v.docscroll;v.ispage&&(o=v.haswrapper?v.win:v.doc),v.css(o,t),v.ispage&&(y.isie11||y.isie)&&v.css(P("html"),t),!y.isios||v.ispage||v.haswrapper||v.css(w,{"-webkit-overflow-scrolling":"touch"});var r=P(N.createElement("div"));r.css({position:"relative",top:0,float:"right",width:b.cursorwidth,height:0,"background-color":b.cursorcolor,border:b.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.cursorborderradius,"-moz-border-radius":b.cursorborderradius,"border-radius":b.cursorborderradius}),r.addClass("nicescroll-cursors"),v.cursor=r;var i=P(N.createElement("div"));i.attr("id",v.id),i.addClass("nicescroll-rails nicescroll-rails-vr"),b.scrollCLass&&i.addClass(b.scrollCLass);var s,n,l,a=["left","right","top","bottom"];for(l in a)n=a[l],(s=b.railpadding[n]||0)&&i.css("padding-"+n,s+"px");i.append(r),i.width=Math.max(parseFloat(b.cursorwidth),r.outerWidth()),i.css({width:i.width+"px",zIndex:v.zindex,background:b.background,cursor:"default"}),i.visibility=!0,i.scrollable=!0,i.align="left"==b.railalign?0:1,v.rail=i;var c,d,u,h,p,m,f,g=v.rail.drag=!1;!b.boxzoom||v.ispage||y.isieold||(g=N.createElement("div"),v.bind(g,"click",v.doZoom),v.bind(g,"mouseenter",function(){v.zoom.css("opacity",b.cursoropacitymax)}),v.bind(g,"mouseleave",function(){v.zoom.css("opacity",b.cursoropacitymin)}),v.zoom=P(g),v.zoom.css({cursor:"pointer",zIndex:v.zindex,backgroundImage:"url("+b.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),b.dblclickzoom&&v.bind(v.win,"dblclick",v.doZoom),y.cantouch&&b.gesturezoom&&(v.ongesturezoom=function(e){return 1.5<e.scale&&v.doZoomIn(e),e.scale<.8&&v.doZoomOut(e),v.cancelEvent(e)},v.bind(v.win,"gestureend",v.ongesturezoom))),v.railh=!1,b.horizrailenabled&&(v.css(o,{overflowX:"hidden"}),(r=P(N.createElement("div"))).css({position:"absolute",top:0,height:b.cursorwidth,width:0,backgroundColor:b.cursorcolor,border:b.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":b.cursorborderradius,"-moz-border-radius":b.cursorborderradius,"border-radius":b.cursorborderradius}),y.isieold&&r.css("overflow","hidden"),r.addClass("nicescroll-cursors"),v.cursorh=r,(m=P(N.createElement("div"))).attr("id",v.id+"-hr"),m.addClass("nicescroll-rails nicescroll-rails-hr"),b.scrollCLass&&m.addClass(b.scrollCLass),m.height=Math.max(parseFloat(b.cursorwidth),r.outerHeight()),m.css({height:m.height+"px",zIndex:v.zindex,background:b.background}),m.append(r),m.visibility=!0,m.scrollable=!0,m.align="top"==b.railvalign?0:1,v.railh=m,v.railh.drag=!1),v.ispage?(i.css({position:"fixed",top:0,height:"100%"}),i.css(i.align?{right:0}:{left:0}),v.body.append(i),v.railh&&(m.css({position:"fixed",left:0,width:"100%"}),m.css(m.align?{bottom:0}:{top:0}),v.body.append(m))):(v.ishwscroll?("static"==v.win.css("position")&&v.css(v.win,{position:"relative"}),c="HTML"==v.win[0].nodeName?v.body:v.win,P(c).scrollTop(0).scrollLeft(0),v.zoom&&(v.zoom.css({position:"absolute",top:1,right:0,"margin-right":i.width+4}),c.append(v.zoom)),i.css({position:"absolute",top:0}),i.css(i.align?{right:0}:{left:0}),c.append(i),m&&(m.css({position:"absolute",left:0,bottom:0}),m.css(m.align?{bottom:0}:{top:0}),c.append(m))):(v.isfixed="fixed"==v.win.css("position"),c=v.isfixed?"fixed":"absolute",v.isfixed||(v.viewport=v.getViewport(v.win[0])),v.viewport&&(v.body=v.viewport,/fixed|absolute/.test(v.viewport.css("position"))||v.css(v.viewport,{position:"relative"})),i.css({position:c}),v.zoom&&v.zoom.css({position:c}),v.updateScrollBar(),v.body.append(i),v.zoom&&v.body.append(v.zoom),v.railh&&(m.css({position:c}),v.body.append(m))),y.isios&&v.css(v.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),b.disableoutline&&(y.isie&&v.win.attr("hideFocus","true"),y.iswebkit&&v.win.css("outline","none"))),!1===b.autohidemode?(v.autohidedom=!1,v.rail.css({opacity:b.cursoropacitymax}),v.railh&&v.railh.css({opacity:b.cursoropacitymax})):!0===b.autohidemode||"leave"===b.autohidemode?(v.autohidedom=P().add(v.rail),y.isie8&&(v.autohidedom=v.autohidedom.add(v.cursor)),v.railh&&(v.autohidedom=v.autohidedom.add(v.railh)),v.railh&&y.isie8&&(v.autohidedom=v.autohidedom.add(v.cursorh))):"scroll"==b.autohidemode?(v.autohidedom=P().add(v.rail),v.railh&&(v.autohidedom=v.autohidedom.add(v.railh))):"cursor"==b.autohidemode?(v.autohidedom=P().add(v.cursor),v.railh&&(v.autohidedom=v.autohidedom.add(v.cursorh))):"hidden"==b.autohidemode&&(v.autohidedom=!1,v.hide(),v.railslocked=!1),(y.cantouch||v.istouchcapable||b.emulatetouch||y.hasmstouch)&&(v.scrollmom=new A(v),v.ontouchstart=function(e){if(v.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(v.hasmoving=!1,v.scrollmom.timer&&(v.triggerScrollEnd(),v.scrollmom.stop()),!v.railslocked){var o=v.getTarget(e);if(o)if(/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return v.stopPropagation(e);var t,r,i,s="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),v.forcescreen&&((e={original:(t=e).original||e}).clientX=t.screenX,e.clientY=t.screenY),v.rail.drag={x:e.clientX,y:e.clientY,sx:v.scroll.x,sy:v.scroll.y,st:v.getScrollTop(),sl:v.getScrollLeft(),pt:2,dl:!1,tg:o},v.ispage||!b.directionlockdeadzone?v.rail.drag.dl="f":(i=_.width(),r=_.height(),r=(t=v.getContentSize()).h-r,i=t.w-i,v.rail.scrollable&&!v.railh.scrollable?v.rail.drag.ck=0<r&&"v":!v.rail.scrollable&&v.railh.scrollable?v.rail.drag.ck=0<i&&"h":v.rail.drag.ck=!1),b.emulatetouch&&v.isiframe&&y.isie&&(i=v.win.position(),v.rail.drag.x+=i.left,v.rail.drag.y+=i.top),v.hasmoving=!1,v.lastmouseup=!1,v.scrollmom.reset(e.clientX,e.clientY),o&&s){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return y.hasmousecapture&&o.setCapture(),b.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(v.hasmoving)return!1;o._onclick.call(this,e)}),v.cancelEvent(e)):v.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(P(o).attr("type"))&&(v.preventclick={tg:o,click:!1})}}},v.ontouchend=function(e){if(!v.rail.drag)return!0;if(2!=v.rail.drag.pt)return 1==v.rail.drag.pt?v.onmouseup(e):void 0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;v.rail.drag=!1;var o="mouseup"===e.type;return v.hasmoving&&(v.scrollmom.doMomentum(),v.lastmouseup=!0,v.hideCursor(),y.hasmousecapture&&N.releaseCapture(),o)?v.cancelEvent(e):void 0},d=b.emulatetouch&&v.isiframe&&!y.hasmousecapture,u=.3*b.directionlockdeadzone|0,v.ontouchmove=function(e,o){if(!v.rail.drag)return!0;if(e.targetTouches&&b.preventmultitouchscrolling&&1<e.targetTouches.length)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2!=v.rail.drag.pt)return 1==v.rail.drag.pt?v.onmousemove(e):void 0;"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),a=s=0,d&&!o&&(a=-(r=v.win.position()).left,s=-r.top);var t=e.clientY+s,r=t-v.rail.drag.y,i=e.clientX+a,s=i-v.rail.drag.x,n=v.rail.drag.st-r;if(v.ishwscroll&&b.bouncescroll)n<0?n=Math.round(n/2):n>v.page.maxh&&(n=v.page.maxh+Math.round((n-v.page.maxh)/2));else if(n<0?t=n=0:n>v.page.maxh&&(n=v.page.maxh,t=0),0===t&&!v.hasmoving)return v.ispage||(v.rail.drag=!1),!0;var l=v.getScrollLeft();if(v.railh&&v.railh.scrollable&&(l=v.isrtlmode?s-v.rail.drag.sl:v.rail.drag.sl-s,v.ishwscroll&&b.bouncescroll?l<0?l=Math.round(l/2):l>v.page.maxw&&(l=v.page.maxw+Math.round((l-v.page.maxw)/2)):(l<0&&(i=l=0),l>v.page.maxw&&(l=v.page.maxw,i=0))),!v.hasmoving){if(v.rail.drag.y===e.clientY&&v.rail.drag.x===e.clientX)return v.cancelEvent(e);var a=Math.abs(r),r=Math.abs(s),s=b.directionlockdeadzone;if(v.rail.drag.ck?"v"==v.rail.drag.ck?s<r&&a<=u?v.rail.drag=!1:s<a&&(v.rail.drag.dl="v"):"h"==v.rail.drag.ck&&(s<a&&r<=u?v.rail.drag=!1:s<r&&(v.rail.drag.dl="h")):s<a&&s<r?v.rail.drag.dl="f":s<a?v.rail.drag.dl=u<r?"f":"v":s<r&&(v.rail.drag.dl=u<a?"f":"h"),!v.rail.drag.dl)return v.cancelEvent(e);v.triggerScrollStart(e.clientX,e.clientY,0,0,0),v.hasmoving=!0}return v.preventclick&&!v.preventclick.click&&(v.preventclick.click=v.preventclick.tg.onclick||!1,v.preventclick.tg.onclick=v.onpreventclick),v.rail.drag.dl&&("v"==v.rail.drag.dl?l=v.rail.drag.sl:"h"==v.rail.drag.dl&&(n=v.rail.drag.st)),v.synched("touchmove",function(){v.rail.drag&&2==v.rail.drag.pt&&(v.prepareTransition&&v.resetTransition(),v.rail.scrollable&&v.setScrollTop(n),v.scrollmom.update(i,t),v.railh&&v.railh.scrollable?(v.setScrollLeft(l),v.showCursor(n,l)):v.showCursor(n),y.isie10&&N.selection.clear())}),v.cancelEvent(e)},v.ontouchstartCursor=function(e,o){if(!v.rail.drag||3==v.rail.drag.pt){if(v.locked)return v.cancelEvent(e);v.cancelScroll(),v.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:v.scroll.x,sy:v.scroll.y,pt:3,hr:!!o};o=v.getTarget(e);return!v.ispage&&y.hasmousecapture&&o.setCapture(),v.isiframe&&!y.hasmousecapture&&(v.saved.csspointerevents=v.doc.css("pointer-events"),v.css(v.doc,{"pointer-events":"none"})),v.cancelEvent(e)}},v.ontouchendCursor=function(e){if(v.rail.drag&&(y.hasmousecapture&&N.releaseCapture(),v.isiframe&&!y.hasmousecapture&&v.doc.css("pointer-events",v.saved.csspointerevents),3==v.rail.drag.pt))return v.rail.drag=!1,v.cancelEvent(e)},v.ontouchmoveCursor=function(e){var o;if(v.rail.drag&&3==v.rail.drag.pt)return v.cursorfreezed=!0,v.rail.drag.hr?(v.scroll.x=v.rail.drag.sx+(e.touches[0].clientX-v.rail.drag.x),v.scroll.x<0&&(v.scroll.x=0),o=v.scrollvaluemaxw,v.scroll.x>o&&(v.scroll.x=o)):(v.scroll.y=v.rail.drag.sy+(e.touches[0].clientY-v.rail.drag.y),v.scroll.y<0&&(v.scroll.y=0),o=v.scrollvaluemax,v.scroll.y>o&&(v.scroll.y=o)),v.synched("touchmove",function(){v.rail.drag&&3==v.rail.drag.pt&&(v.showCursor(),v.rail.drag.hr?v.doScrollLeft(Math.round(v.scroll.x*v.scrollratio.x),b.cursordragspeed):v.doScrollTop(Math.round(v.scroll.y*v.scrollratio.y),b.cursordragspeed))}),v.cancelEvent(e)}),v.onmousedown=function(e,o){if(!v.rail.drag||1==v.rail.drag.pt){if(v.railslocked)return v.cancelEvent(e);v.cancelScroll(),v.rail.drag={x:e.clientX,y:e.clientY,sx:v.scroll.x,sy:v.scroll.y,pt:1,hr:o||!1};o=v.getTarget(e);return y.hasmousecapture&&o.setCapture(),v.isiframe&&!y.hasmousecapture&&(v.saved.csspointerevents=v.doc.css("pointer-events"),v.css(v.doc,{"pointer-events":"none"})),v.hasmoving=!1,v.cancelEvent(e)}},v.onmouseup=function(e){if(v.rail.drag)return 1!=v.rail.drag.pt||(y.hasmousecapture&&N.releaseCapture(),v.isiframe&&!y.hasmousecapture&&v.doc.css("pointer-events",v.saved.csspointerevents),v.rail.drag=!1,v.cursorfreezed=!1,v.hasmoving&&v.triggerScrollEnd(),v.cancelEvent(e))},v.onmousemove=function(e){var o;if(v.rail.drag){if(1===v.rail.drag.pt)return y.ischrome&&0===e.which?v.onmouseup(e):(v.cursorfreezed=!0,v.hasmoving||v.triggerScrollStart(e.clientX,e.clientY,0,0,0),v.hasmoving=!0,v.rail.drag.hr?(v.scroll.x=v.rail.drag.sx+(e.clientX-v.rail.drag.x),v.scroll.x<0&&(v.scroll.x=0),o=v.scrollvaluemaxw,v.scroll.x>o&&(v.scroll.x=o)):(v.scroll.y=v.rail.drag.sy+(e.clientY-v.rail.drag.y),v.scroll.y<0&&(v.scroll.y=0),o=v.scrollvaluemax,v.scroll.y>o&&(v.scroll.y=o)),v.synched("mousemove",function(){v.cursorfreezed&&(v.showCursor(),v.rail.drag.hr?v.scrollLeft(Math.round(v.scroll.x*v.scrollratio.x)):v.scrollTop(Math.round(v.scroll.y*v.scrollratio.y)))}),v.cancelEvent(e))}else v.checkarea=0},y.cantouch||b.emulatetouch?(v.onpreventclick=function(e){if(v.preventclick)return v.preventclick.tg.onclick=v.preventclick.click,v.preventclick=!1,v.cancelEvent(e)},v.onclick=!y.isios&&function(e){return!v.lastmouseup||(v.lastmouseup=!1,v.cancelEvent(e))},b.grabcursorenabled&&y.cursorgrabvalue&&(v.css(v.ispage?v.doc:v.win,{cursor:y.cursorgrabvalue}),v.css(v.rail,{cursor:y.cursorgrabvalue}))):(h=function(e){var o,t;v.selectiondrag&&(e&&(o=v.win.outerHeight(),0<(t=e.pageY-v.selectiondrag.top)&&t<o&&(t=0),o<=t&&(t-=o),v.selectiondrag.df=t),0!==v.selectiondrag.df&&(t=-2*v.selectiondrag.df/6|0,v.doScrollBy(t),v.debounced("doselectionscroll",function(){h()},50)))},"getSelection"in N?v.hasTextSelected=function(){return 0<N.getSelection().rangeCount}:"selection"in N?v.hasTextSelected=function(){return"None"!=N.selection.type}:v.hasTextSelected=function(){return!1},v.onselectionstart=function(e){v.ispage||(v.selectiondrag=v.win.offset())},v.onselectionend=function(e){v.selectiondrag=!1},v.onselectiondrag=function(e){v.selectiondrag&&v.hasTextSelected()&&v.debounced("selectionscroll",function(){h(e)},250)}),y.hasw3ctouch?(v.css(v.ispage?P("html"):v.win,{"touch-action":"none"}),v.css(v.rail,{"touch-action":"none"}),v.css(v.cursor,{"touch-action":"none"}),v.bind(v.win,"pointerdown",v.ontouchstart),v.bind(N,"pointerup",v.ontouchend),v.delegate(N,"pointermove",v.ontouchmove)):y.hasmstouch?(v.css(v.ispage?P("html"):v.win,{"-ms-touch-action":"none"}),v.css(v.rail,{"-ms-touch-action":"none"}),v.css(v.cursor,{"-ms-touch-action":"none"}),v.bind(v.win,"MSPointerDown",v.ontouchstart),v.bind(N,"MSPointerUp",v.ontouchend),v.delegate(N,"MSPointerMove",v.ontouchmove),v.bind(v.cursor,"MSGestureHold",function(e){e.preventDefault()}),v.bind(v.cursor,"contextmenu",function(e){e.preventDefault()})):y.cantouch&&(v.bind(v.win,"touchstart",v.ontouchstart,!1,!0),v.bind(N,"touchend",v.ontouchend,!1,!0),v.bind(N,"touchcancel",v.ontouchend,!1,!0),v.delegate(N,"touchmove",v.ontouchmove,!1,!0)),b.emulatetouch&&(v.bind(v.win,"mousedown",v.ontouchstart,!1,!0),v.bind(N,"mouseup",v.ontouchend,!1,!0),v.bind(N,"mousemove",v.ontouchmove,!1,!0)),!b.cursordragontouch&&(y.cantouch||b.emulatetouch)||(v.rail.css({cursor:"default"}),v.railh&&v.railh.css({cursor:"default"}),v.jqbind(v.rail,"mouseenter",function(){return!(!v.ispage&&!v.win.is(":visible"))&&(v.canshowonmouseevent&&v.showCursor(),void(v.rail.active=!0))}),v.jqbind(v.rail,"mouseleave",function(){v.rail.active=!1,v.rail.drag||v.hideCursor()}),b.sensitiverail&&(v.bind(v.rail,"click",function(e){v.doRailClick(e,!1,!1)}),v.bind(v.rail,"dblclick",function(e){v.doRailClick(e,!0,!1)}),v.bind(v.cursor,"click",function(e){v.cancelEvent(e)}),v.bind(v.cursor,"dblclick",function(e){v.cancelEvent(e)})),v.railh&&(v.jqbind(v.railh,"mouseenter",function(){return!(!v.ispage&&!v.win.is(":visible"))&&(v.canshowonmouseevent&&v.showCursor(),void(v.rail.active=!0))}),v.jqbind(v.railh,"mouseleave",function(){v.rail.active=!1,v.rail.drag||v.hideCursor()}),b.sensitiverail&&(v.bind(v.railh,"click",function(e){v.doRailClick(e,!1,!0)}),v.bind(v.railh,"dblclick",function(e){v.doRailClick(e,!0,!0)}),v.bind(v.cursorh,"click",function(e){v.cancelEvent(e)}),v.bind(v.cursorh,"dblclick",function(e){v.cancelEvent(e)})))),b.cursordragontouch&&(this.istouchcapable||y.cantouch)&&(v.bind(v.cursor,"touchstart",v.ontouchstartCursor),v.bind(v.cursor,"touchmove",v.ontouchmoveCursor),v.bind(v.cursor,"touchend",v.ontouchendCursor),v.cursorh&&v.bind(v.cursorh,"touchstart",function(e){v.ontouchstartCursor(e,!0)}),v.cursorh&&v.bind(v.cursorh,"touchmove",v.ontouchmoveCursor),v.cursorh&&v.bind(v.cursorh,"touchend",v.ontouchendCursor)),b.emulatetouch||y.isandroid||y.isios?(v.bind(y.hasmousecapture?v.win:N,"mouseup",v.ontouchend),v.onclick&&v.bind(N,"click",v.onclick),b.cursordragontouch?(v.bind(v.cursor,"mousedown",v.onmousedown),v.bind(v.cursor,"mouseup",v.onmouseup),v.cursorh&&v.bind(v.cursorh,"mousedown",function(e){v.onmousedown(e,!0)}),v.cursorh&&v.bind(v.cursorh,"mouseup",v.onmouseup)):(v.bind(v.rail,"mousedown",function(e){e.preventDefault()}),v.railh&&v.bind(v.railh,"mousedown",function(e){e.preventDefault()}))):(v.bind(y.hasmousecapture?v.win:N,"mouseup",v.onmouseup),v.bind(N,"mousemove",v.onmousemove),v.onclick&&v.bind(N,"click",v.onclick),v.bind(v.cursor,"mousedown",v.onmousedown),v.bind(v.cursor,"mouseup",v.onmouseup),v.railh&&(v.bind(v.cursorh,"mousedown",function(e){v.onmousedown(e,!0)}),v.bind(v.cursorh,"mouseup",v.onmouseup)),!v.ispage&&b.enablescrollonselection&&(v.bind(v.win[0],"mousedown",v.onselectionstart),v.bind(N,"mouseup",v.onselectionend),v.bind(v.cursor,"mouseup",v.onselectionend),v.cursorh&&v.bind(v.cursorh,"mouseup",v.onselectionend),v.bind(N,"mousemove",v.onselectiondrag)),v.zoom&&(v.jqbind(v.zoom,"mouseenter",function(){v.canshowonmouseevent&&v.showCursor(),v.rail.active=!0}),v.jqbind(v.zoom,"mouseleave",function(){v.rail.active=!1,v.rail.drag||v.hideCursor()}))),b.enablemousewheel&&(v.isiframe||v.mousewheel(y.isie&&v.ispage?N:v.win,v.onmousewheel),v.mousewheel(v.rail,v.onmousewheel),v.railh&&v.mousewheel(v.railh,v.onmousewheelhr)),v.ispage||y.cantouch||/HTML|^BODY/.test(v.win[0].nodeName)||(v.win.attr("tabindex")||v.win.attr({tabindex:++L}),v.bind(v.win,"focus",function(e){T=v.getTarget(e).id||v.getTarget(e)||!1,v.hasfocus=!0,v.canshowonmouseevent&&v.noticeCursor()}),v.bind(v.win,"blur",function(e){T=!1,v.hasfocus=!1}),v.bind(v.win,"mouseenter",function(e){E=v.getTarget(e).id||v.getTarget(e)||!1,v.hasmousefocus=!0,v.canshowonmouseevent&&v.noticeCursor()}),v.bind(v.win,"mouseleave",function(e){E=!1,v.hasmousefocus=!1,v.rail.drag||v.hideCursor()})),v.onkeypress=function(e){if(v.railslocked&&0===v.page.maxh)return!0;e=e||R.event;var o=v.getTarget(e);if(o&&/INPUT|TEXTAREA|SELECT|OPTION/.test(o.nodeName)&&(!(o.getAttribute("type")||o.type||!1)||!/submit|button|cancel/i.tp))return!0;if(P(o).attr("contenteditable"))return!0;if(v.hasfocus||v.hasmousefocus&&!T||v.ispage&&!T&&!E){o=e.keyCode;if(v.railslocked&&27!=o)return v.cancelEvent(e);var t=e.ctrlKey||!1,r=e.shiftKey||!1,i=!1;switch(o){case 38:case 63233:v.doScrollBy(72),i=!0;break;case 40:case 63235:v.doScrollBy(-72),i=!0;break;case 37:case 63232:v.railh&&(t?v.doScrollLeft(0):v.doScrollLeftBy(72),i=!0);break;case 39:case 63234:v.railh&&(t?v.doScrollLeft(v.page.maxw):v.doScrollLeftBy(-72),i=!0);break;case 33:case 63276:v.doScrollBy(v.view.h),i=!0;break;case 34:case 63277:v.doScrollBy(-v.view.h),i=!0;break;case 36:case 63273:v.railh&&t?v.doScrollPos(0,0):v.doScrollTo(0),i=!0;break;case 35:case 63275:v.railh&&t?v.doScrollPos(v.page.maxw,v.page.maxh):v.doScrollTo(v.page.maxh),i=!0;break;case 32:b.spacebarenabled&&(r?v.doScrollBy(v.view.h):v.doScrollBy(-v.view.h),i=!0);break;case 27:v.zoomactive&&(v.doZoom(),i=!0)}return i?v.cancelEvent(e):void 0}},b.enablekeyboard&&v.bind(N,y.isopera&&!y.isopera12?"keypress":"keydown",v.onkeypress),v.bind(N,"keydown",function(e){!e.ctrlKey&&1||(v.wheelprevented=!0)}),v.bind(N,"keyup",function(e){e.ctrlKey||!1||(v.wheelprevented=!1)}),v.bind(R,"blur",function(e){v.wheelprevented=!1}),v.bind(R,"resize",v.onscreenresize),v.bind(R,"orientationchange",v.onscreenresize),v.bind(R,"load",v.lazyResize),!y.ischrome||v.ispage||v.haswrapper||(p=v.win.attr("style"),m=parseFloat(v.win.css("width"))+1,v.win.css("width",m),v.synched("chromefix",function(){v.win.attr("style",p)})),v.onAttributeChange=function(e){v.lazyResize(v.isieold?250:30)},b.enableobserver&&(v.isie11||!1===B||(v.observerbody=new B(function(e){if(e.forEach(function(e){if("attributes"==e.type)return w.hasClass("modal-open")&&w.hasClass("modal-dialog")&&!P.contains(P(".modal-dialog")[0],v.doc[0])?v.hide():v.show()}),v.me.clientWidth!=v.page.width||v.me.clientHeight!=v.page.height)return v.lazyResize(30)}),v.observerbody.observe(N.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),v.ispage||v.haswrapper||(f=v.win[0],!1!==B?(v.observer=new B(function(e){e.forEach(v.onAttributeChange)}),v.observer.observe(f,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),v.observerremover=new B(function(e){e.forEach(function(e){if(0<e.removedNodes.length)for(var o in e.removedNodes)if(v&&e.removedNodes[o]===f)return v.remove()})}),v.observerremover.observe(f.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(v.bind(f,y.isie&&!y.isie9?"propertychange":"DOMAttrModified",v.onAttributeChange),y.isie9&&f.attachEvent("onpropertychange",v.onAttributeChange),v.bind(f,"DOMNodeRemoved",function(e){e.target===f&&v.remove()})))),!v.ispage&&b.boxzoom&&v.bind(R,"resize",v.resizeZoom),v.istextarea&&(v.bind(v.win,"keydown",v.lazyResize),v.bind(v.win,"mouseup",v.lazyResize)),v.lazyResize(30)}"IFRAME"==this.doc[0].nodeName&&(e=function(){var o,e;v.iframexd=!1;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){o=!(v.iframexd=!0)}if(v.iframexd)return"console"in R&&console.log("NiceScroll error: policy restriced iframe"),!0;v.forcescreen=!0,v.isiframe&&(v.iframe={doc:P(o),html:v.doc.contents().find("html")[0],body:v.doc.contents().find("body")[0]},v.getContentSize=function(){return{w:Math.max(v.iframe.html.scrollWidth,v.iframe.body.scrollWidth),h:Math.max(v.iframe.html.scrollHeight,v.iframe.body.scrollHeight)}},v.docscroll=P(v.iframe.body)),y.isios||!b.iframeautoresize||v.isiframe||(v.win.scrollTop(0),v.doc.height(""),e=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight),v.doc.height(e)),v.lazyResize(30),v.css(P(v.iframe.body),t),y.isios&&v.haswrapper&&v.css(P(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?v.bind(this.contentWindow,"scroll",v.onscroll):v.bind(o,"scroll",v.onscroll),b.enablemousewheel&&v.mousewheel(o,v.onmousewheel),b.enablekeyboard&&v.bind(o,y.isopera?"keypress":"keydown",v.onkeypress),y.cantouch?(v.bind(o,"touchstart",v.ontouchstart),v.bind(o,"touchmove",v.ontouchmove)):b.emulatetouch&&(v.bind(o,"mousedown",v.ontouchstart),v.bind(o,"mousemove",function(e){return v.ontouchmove(e,!0)}),b.grabcursorenabled&&y.cursorgrabvalue&&v.css(P(o.body),{cursor:y.cursorgrabvalue})),v.bind(o,"mouseup",v.ontouchend),v.zoom&&(b.dblclickzoom&&v.bind(o,"dblclick",v.doZoom),v.ongesturezoom&&v.bind(o,"gestureend",v.ongesturezoom))},this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){e.call(v.doc[0],!1)},500),v.bind(this.doc,"load",e))},this.showCursor=function(e,o){v.cursortimeout&&(clearTimeout(v.cursortimeout),v.cursortimeout=0),v.rail&&(v.autohidedom&&(v.autohidedom.stop().css({opacity:b.cursoropacitymax}),v.cursoractive=!0),v.rail.drag&&1==v.rail.drag.pt||(void 0!==e&&!1!==e&&(v.scroll.y=e/v.scrollratio.y|0),void 0!==o&&(v.scroll.x=o/v.scrollratio.x|0)),v.cursor.css({height:v.cursorheight,top:v.scroll.y}),v.cursorh&&(o=v.hasreversehr?v.scrollvaluemaxw-v.scroll.x:v.scroll.x,v.cursorh.css({width:v.cursorwidth,left:!v.rail.align&&v.rail.visibility?o+v.rail.width:o}),v.cursoractive=!0),v.zoom&&v.zoom.stop().css({opacity:b.cursoropacitymax}))},this.hideCursor=function(e){v.cursortimeout||v.rail&&v.autohidedom&&(v.hasmousefocus&&"leave"===b.autohidemode||(v.cursortimeout=setTimeout(function(){v.rail.active&&v.showonmouseevent||(v.autohidedom.stop().animate({opacity:b.cursoropacitymin}),v.zoom&&v.zoom.stop().animate({opacity:b.cursoropacitymin}),v.cursoractive=!1),v.cursortimeout=0},e||b.hidecursordelay)))},this.noticeCursor=function(e,o,t){v.showCursor(o,t),v.rail.active||v.hideCursor(e)},this.getContentSize=v.ispage?function(){return{w:Math.max(N.body.scrollWidth,N.documentElement.scrollWidth),h:Math.max(N.body.scrollHeight,N.documentElement.scrollHeight)}}:v.haswrapper?function(){return{w:v.doc[0].offsetWidth,h:v.doc[0].offsetHeight}}:function(){return{w:v.docscroll[0].scrollWidth,h:v.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!v||!v.win)return!1;var t=v.page.maxh,r=v.page.maxw,i=v.view.h,s=v.view.w;if(v.view={w:v.ispage?v.win.width():v.win[0].clientWidth,h:v.ispage?v.win.height():v.win[0].clientHeight},v.page=o||v.getContentSize(),v.page.maxh=Math.max(0,v.page.h-v.view.h),v.page.maxw=Math.max(0,v.page.w-v.view.w),v.page.maxh==t&&v.page.maxw==r&&v.view.w==s&&v.view.h==i){if(v.ispage)return v;s=v.win.offset();if(v.lastposition){i=v.lastposition;if(i.top==s.top&&i.left==s.left)return v}v.lastposition=s}return 0===v.page.maxh?(v.hideRail(),v.scrollvaluemax=0,v.scroll.y=0,v.scrollratio.y=0,v.cursorheight=0,v.setScrollTop(0),v.rail&&(v.rail.scrollable=!1)):(v.page.maxh-=b.railpadding.top+b.railpadding.bottom,v.rail.scrollable=!0),0===v.page.maxw?(v.hideRailHr(),v.scrollvaluemaxw=0,v.scroll.x=0,v.scrollratio.x=0,v.cursorwidth=0,v.setScrollLeft(0),v.railh&&(v.railh.scrollable=!1)):(v.page.maxw-=b.railpadding.left+b.railpadding.right,v.railh&&(v.railh.scrollable=b.horizrailenabled)),v.railslocked=v.locked||0===v.page.maxh&&0===v.page.maxw,v.railslocked?(v.ispage||v.updateScrollBar(v.view),!1):(v.hidden||(v.rail.visibility||v.showRail(),v.railh&&!v.railh.visibility&&v.showRailHr()),v.istextarea&&v.win.css("resize")&&"none"!=v.win.css("resize")&&(v.view.h-=20),v.cursorheight=Math.min(v.view.h,Math.round(v.view.h*(v.view.h/v.page.h))),v.cursorheight=b.cursorfixedheight||Math.max(b.cursorminheight,v.cursorheight),v.cursorwidth=Math.min(v.view.w,Math.round(v.view.w*(v.view.w/v.page.w))),v.cursorwidth=b.cursorfixedheight||Math.max(b.cursorminheight,v.cursorwidth),v.scrollvaluemax=v.view.h-v.cursorheight-(b.railpadding.top+b.railpadding.bottom),v.hasborderbox||(v.scrollvaluemax-=v.cursor[0].offsetHeight-v.cursor[0].clientHeight),v.railh&&(v.railh.width=0<v.page.maxh?v.view.w-v.rail.width:v.view.w,v.scrollvaluemaxw=v.railh.width-v.cursorwidth-(b.railpadding.left+b.railpadding.right)),v.ispage||v.updateScrollBar(v.view),v.scrollratio={x:v.page.maxw/v.scrollvaluemaxw,y:v.page.maxh/v.scrollvaluemax},v.getScrollTop()>v.page.maxh?v.doScrollTop(v.page.maxh):(v.scroll.y=v.getScrollTop()/v.scrollratio.y|0,v.scroll.x=v.getScrollLeft()/v.scrollratio.x|0,v.cursoractive&&v.noticeCursor()),v.scroll.y&&0===v.getScrollTop()&&v.doScrollTo(v.scroll.y*v.scrollratio.y|0),v)},this.resize=v.onResize;var c=0;function d(t,r,i,e){v._bind(t,r,function(e){var o={original:e=e||R.event,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return e.preventDefault?e.preventDefault():e.returnValue=!1,!1},stopImmediatePropagation:function(){e.stopImmediatePropagation?e.stopImmediatePropagation():e.cancelBubble=!0}};return"mousewheel"==r?(e.wheelDeltaX&&(o.deltaX=-.025*e.wheelDeltaX),e.wheelDeltaY&&(o.deltaY=-.025*e.wheelDeltaY),o.deltaY||o.deltaX||(o.deltaY=-.025*e.wheelDelta)):o.deltaY=e.detail,i.call(t,o)},e)}this.onscreenresize=function(e){clearTimeout(c);var o=!v.ispage&&!v.haswrapper;o&&v.hideRails(),c=setTimeout(function(){v&&(o&&v.showRails(),v.resize()),c=0},120)},this.lazyResize=function(e){return clearTimeout(c),e=isNaN(e)?240:e,c=setTimeout(function(){v&&v.resize(),c=0},e),v},this.jqbind=function(e,o,t){v.events.push({e:e,n:o,f:t,q:!0}),P(e).on(o,t)};var u=!(this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;"onwheel"in N.createElement("div")?v._bind(r,"wheel",o,t||!1):(d(r,e=void 0!==N.onmousewheel?"mousewheel":"DOMMouseScroll",o,t||!1),"DOMMouseScroll"==e&&d(r,"MozMousePixelScroll",o,t||!1))});if(y.haseventlistener){try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});R.addEventListener("test",null,h)}catch(e){}this.stopPropagation=function(e){return e&&(e=e.original||e).stopPropagation(),!1},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},R.constructor.prototype.addEventListener=N.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},R.constructor.prototype.removeEventListener=N.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||R.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||R.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=I[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;0<=r;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},v.bind(e,o,s.f,r,i),I[o]=s),v.ispage?(s.a=[v.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(v.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=I[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===v.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(v._unbind(e,o,s.l.f),I[o]=null))},this.bind=function(e,o,t,r,i){e="jquery"in e?e[0]:e;v._bind(e,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){v.events.push({e:e,n:o,f:t,b:r,q:!1}),u&&(i||e==window.document||e==window.document.body||e==window)?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){I[o]?v.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<v.events.length;e++){var o=v.events[e];o.q?o.e.unbind(o.n,o.f):v._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return v.showRail().showRailHr()},this.showRail=function(){return 0===v.page.maxh||!v.ispage&&"none"==v.win.css("display")||(v.rail.visibility=!0,v.rail.css("display","block")),v},this.showRailHr=function(){return v.railh&&(0===v.page.maxw||!v.ispage&&"none"==v.win.css("display")||(v.railh.visibility=!0,v.railh.css("display","block"))),v},this.hideRails=function(){return v.hideRail().hideRailHr()},this.hideRail=function(){return v.rail.visibility=!1,v.rail.css("display","none"),v},this.hideRailHr=function(){return v.railh&&(v.railh.visibility=!1,v.railh.css("display","none")),v},this.show=function(){return v.hidden=!1,v.railslocked=!1,v.showRails()},this.hide=function(){return v.hidden=!0,v.railslocked=!0,v.hideRails()},this.toggle=function(){return v.hidden?v.show():v.hide()},this.remove=function(){for(var e in v.stop(),v.cursortimeout&&clearTimeout(v.cursortimeout),v.delaylist)v.delaylist[e]&&Y(v.delaylist[e].h);v.doZoomOut(),v.unbindAll(),y.isie9&&v.win[0].detachEvent("onpropertychange",v.onAttributeChange),!1!==v.observer&&v.observer.disconnect(),!1!==v.observerremover&&v.observerremover.disconnect(),!1!==v.observerbody&&v.observerbody.disconnect(),v.events=null,v.cursor&&v.cursor.remove(),v.cursorh&&v.cursorh.remove(),v.rail&&v.rail.remove(),v.railh&&v.railh.remove(),v.zoom&&v.zoom.remove();for(var o=0;o<v.saved.css.length;o++){var t=v.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}v.saved=!1,v.me.data("__nicescroll","");var r,i=P.nicescroll;for(r in i.each(function(e){if(this&&this.id===v.id){delete i[e];for(var o=++e;o<i.length;o++,e++)i[e]=i[o];i.length--,i.length&&delete i[i.length]}}),v)v[r]=null,delete v[r];v=null},this.scrollstart=function(e){return this.onscrollstart=e,v},this.scrollend=function(e){return this.onscrollend=e,v},this.scrollcancel=function(e){return this.onscrollcancel=e,v},this.zoomin=function(e){return this.onzoomin=e,v},this.zoomout=function(e){return this.onzoomout=e,v},this.isScrollable=function(e){var o=e.target||e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o),t=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(t))return o.clientHeight!=o.scrollHeight;o=o.parentNode||!1}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(0<t.getNiceScroll().length)return t;o=o.parentNode||!1}return!1},this.triggerScrollStart=function(e,o,t,r,i){v.onscrollstart&&(i={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:v.newscrollx,y:v.newscrolly},speed:i},v.onscrollstart.call(v,i))},this.triggerScrollEnd=function(){var e,o;v.onscrollend&&(o={type:"scrollend",current:{x:e=v.getScrollLeft(),y:o=v.getScrollTop()},end:{x:e,y:o}},v.onscrollend.call(v,o))};var p=0,m=0,f=0,g=1;function x(e,o,t,r){v.scrollrunning||(v.newscrolly=v.getScrollTop(),v.newscrollx=v.getScrollLeft(),f=X());var i=X()-f;if(f=X(),350<i?g=1:g+=(2-g)/10,o=o*g|0,e=e*g|0){if(r)if(e<0){if(v.getScrollLeft()>=v.page.maxw)return!0}else if(v.getScrollLeft()<=0)return!0;r=0<e?1:-1;m!==r&&(v.scrollmom&&v.scrollmom.stop(),v.newscrollx=v.getScrollLeft(),m=r),v.lastdeltax-=e}if(o){if(function(){var e=v.getScrollTop();if(o<0){if(e>=v.page.maxh)return!0}else if(e<=0)return!0}()){if(b.nativeparentscrolling&&t&&!v.ispage&&!v.zoomactive)return!0;var s=v.view.h>>1;o=v.newscrolly<-s?(v.newscrolly=-s,-1):v.newscrolly>v.page.maxh+s?(v.newscrolly=v.page.maxh+s,1):0}s=0<o?1:-1;p!==s&&(v.scrollmom&&v.scrollmom.stop(),v.newscrolly=v.getScrollTop(),p=s),v.lastdeltay-=o}(o||e)&&v.synched("relativexy",function(){var e=v.lastdeltay+v.newscrolly;v.lastdeltay=0;var o=v.lastdeltax+v.newscrollx;v.lastdeltax=0,v.rail.drag||v.doScrollPos(o,e)})}var S,z=!1;function k(e,o,t){var r,i;return!(t||!z)||(0===e.deltaMode?(r=0|-(e.deltaX*(b.mousescrollstep/54)),i=0|-(e.deltaY*(b.mousescrollstep/54))):1===e.deltaMode&&(r=-(e.deltaX*b.mousescrollstep)*50/80|0,i=-(e.deltaY*b.mousescrollstep)*50/80|0),o&&b.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?v.getScrollLeft()>=v.page.maxw:v.getScrollLeft()<=0)&&(i=r,r=0)),v.isrtlmode&&(r=-r),x(r,i,t,!0)?void(t&&(z=!0)):(z=!1,e.stopImmediatePropagation(),e.preventDefault()))}this.onmousewheel=function(e){if(v.wheelprevented||v.locked)return!1;if(v.railslocked)return v.debounced("checkunlock",v.resize,250),!1;if(v.rail.drag)return v.cancelEvent(e);if("auto"===b.oneaxismousemode&&0!==e.deltaX&&(b.oneaxismousemode=!1),b.oneaxismousemode&&0===e.deltaX&&!v.rail.scrollable)return!v.railh||!v.railh.scrollable||v.onmousewheelhr(e);var o=X(),t=!1;if(b.preservenativescrolling&&v.checkarea+600<o&&(v.nativescrollingarea=v.isScrollable(e),t=!0),v.checkarea=o,v.nativescrollingarea)return!0;t=k(e,!1,t);return t&&(v.checkarea=0),t},this.onmousewheelhr=function(e){if(!v.wheelprevented){if(v.railslocked||!v.railh.scrollable)return!0;if(v.rail.drag)return v.cancelEvent(e);var o=X(),t=!1;return b.preservenativescrolling&&v.checkarea+600<o&&(v.nativescrollingarea=v.isScrollable(e),t=!0),v.checkarea=o,!!v.nativescrollingarea||(v.railslocked?v.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return v.cancelScroll(),v.scrollmon&&v.scrollmon.stop(),v.cursorfreezed=!1,v.scroll.y=Math.round(v.getScrollTop()*(1/v.scrollratio.y)),v.noticeCursor(),v},this.getTransitionSpeed=function(e){return 80+e/72*b.scrollspeed|0},b.smoothscroll?v.ishwscroll&&y.hastransition&&b.usetransition&&b.smoothscroll?(S="",this.resetTransition=function(){S="",v.doc.css(y.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){o=o?e:v.getTransitionSpeed(e),e=o+"ms";return S!==e&&(S=e,v.doc.css(y.prefixstyle+"transition-duration",e)),o},this.doScrollLeft=function(e,o){var t=v.scrollrunning?v.newscrolly:v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.scrollrunning?v.newscrollx:v.getScrollLeft();v.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e,o=this;o.running||(o.running=!0,e=function(){o.running&&O(e),v.showCursor(v.getScrollTop(),v.getScrollLeft()),v.notifyScrollEvent(v.win[0])},O(e))},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=v.getScrollTop(),i=v.getScrollLeft();if(((v.newscrolly-r)*(o-r)<0||(v.newscrollx-i)*(e-i)<0)&&v.cancelScroll(),b.bouncescroll?(o<0?o=o/2|0:o>v.page.maxh&&(o=v.page.maxh+(o-v.page.maxh)/2|0),e<0?e=e/2|0:e>v.page.maxw&&(e=v.page.maxw+(e-v.page.maxw)/2|0)):(o<0?o=0:o>v.page.maxh&&(o=v.page.maxh),e<0?e=0:e>v.page.maxw&&(e=v.page.maxw)),v.scrollrunning&&e==v.newscrollx&&o==v.newscrolly)return!1;v.newscrolly=o,v.newscrollx=e;var s=v.getScrollTop(),r=v.getScrollLeft(),i={};i.x=e-r,i.y=o-s;i=0|Math.sqrt(i.x*i.x+i.y*i.y),i=v.prepareTransition(i);v.scrollrunning||(v.scrollrunning=!0,v.triggerScrollStart(r,s,e,o,i),v.cursorupdate.start()),v.scrollendtrapped=!0,y.transitionend||(v.scrollendtrapped&&clearTimeout(v.scrollendtrapped),v.scrollendtrapped=setTimeout(v.onScrollTransitionEnd,i)),v.setScrollTop(v.newscrolly),v.setScrollLeft(v.newscrollx)},this.cancelScroll=function(){if(!v.scrollendtrapped)return!0;var e=v.getScrollTop(),o=v.getScrollLeft();return v.scrollrunning=!1,y.transitionend||clearTimeout(y.transitionend),v.scrollendtrapped=!1,v.resetTransition(),v.setScrollTop(e),v.railh&&v.setScrollLeft(o),v.timerscroll&&v.timerscroll.tm&&clearInterval(v.timerscroll.tm),v.timerscroll=!1,v.cursorfreezed=!1,v.cursorupdate.stop(),v.showCursor(e,o),v},this.onScrollTransitionEnd=function(){if(v.scrollendtrapped){var e=v.getScrollTop(),o=v.getScrollLeft();if(e<0?e=0:e>v.page.maxh&&(e=v.page.maxh),o<0?o=0:o>v.page.maxw&&(o=v.page.maxw),e!=v.newscrolly||o!=v.newscrollx)return v.doScrollPos(o,e,b.snapbackspeed);v.scrollrunning&&v.triggerScrollEnd(),v.scrollrunning=!1,v.scrollendtrapped=!1,v.resetTransition(),v.timerscroll=!1,v.setScrollTop(e),v.railh&&v.setScrollLeft(o),v.cursorupdate.stop(),v.noticeCursor(!1,e,o),v.cursorfreezed=!1}}):(this.doScrollLeft=function(e,o){var t=v.scrollrunning?v.newscrolly:v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.scrollrunning?v.newscrollx:v.getScrollLeft();v.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=v.getScrollTop(),i=v.getScrollLeft();((v.newscrolly-r)*(o-r)<0||(v.newscrollx-i)*(e-i)<0)&&v.cancelScroll();var s=!1;if(v.bouncescroll&&v.rail.visibility||(o<0?s=!(o=0):o>v.page.maxh&&(o=v.page.maxh,s=!0)),v.bouncescroll&&v.railh.visibility||(e<0?s=!(e=0):e>v.page.maxw&&(e=v.page.maxw,s=!0)),v.scrollrunning&&v.newscrolly===o&&v.newscrollx===e)return!0;v.newscrolly=o,v.newscrollx=e,v.dst={},v.dst.x=e-i,v.dst.y=o-r,v.dst.px=i,v.dst.py=r;var n=0|Math.sqrt(v.dst.x*v.dst.x+v.dst.y*v.dst.y),n=v.getTransitionSpeed(n);v.bzscroll={};s=s?1:.58;v.bzscroll.x=new a(i,v.newscrollx,n,0,0,s,1),v.bzscroll.y=new a(r,v.newscrolly,n,0,0,s,1);X();var l=function(){var e;v.scrollrunning&&(e=v.bzscroll.y.getPos(),v.setScrollLeft(v.bzscroll.x.getNow()),v.setScrollTop(v.bzscroll.y.getNow()),e<=1?v.timer=O(l):(v.scrollrunning=!1,v.timer=0,v.triggerScrollEnd()))};v.scrollrunning||(v.triggerScrollStart(i,r,e,o,n),v.scrollrunning=!0,v.timer=O(l))},this.cancelScroll=function(){return v.timer&&Y(v.timer),v.timer=0,v.bzscroll=!1,v.scrollrunning=!1,v}):(this.doScrollLeft=function(e,o){var t=v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.getScrollLeft();v.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>v.page.maxw?v.page.maxw:e;r<0&&(r=0);var i=o>v.page.maxh?v.page.maxh:o;i<0&&(i=0),v.synched("scroll",function(){v.setScrollTop(i),v.setScrollLeft(r)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,o){x(0,e)},this.doScrollLeftBy=function(e,o){x(e,0)},this.doScrollTo=function(e,o){o=o?Math.round(e*v.scrollratio.y):e;o<0?o=0:o>v.page.maxh&&(o=v.page.maxh),v.cursorfreezed=!1,v.doScrollTop(e)},this.checkContentSize=function(){var e=v.getContentSize();e.h==v.page.h&&e.w==v.page.w||v.resize(!1,e)},v.onscroll=function(e){v.rail.drag||v.cursorfreezed||v.synched("scroll",function(){v.scroll.y=Math.round(v.getScrollTop()/v.scrollratio.y),v.railh&&(v.scroll.x=Math.round(v.getScrollLeft()/v.scrollratio.x)),v.noticeCursor()})},v.bind(v.docscroll,"scroll",v.onscroll),this.doZoomIn=function(e){if(!v.zoomactive){v.zoomactive=!0,v.zoomrestore={style:{}};var o,t=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],r=v.win[0].style;for(o in t){var i=t[o];v.zoomrestore.style[i]=void 0!==r[i]?r[i]:""}v.zoomrestore.style.width=v.win.css("width"),v.zoomrestore.style.height=v.win.css("height"),v.zoomrestore.padding={w:v.win.outerWidth()-v.win.width(),h:v.win.outerHeight()-v.win.height()},y.isios4&&(v.zoomrestore.scrollTop=_.scrollTop(),_.scrollTop(0)),v.win.css({position:y.isios4?"absolute":"fixed",top:0,left:0,zIndex:C+100,margin:0});var s=v.win.css("backgroundColor");return""!==s&&!/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(s)||v.win.css("backgroundColor","#fff"),v.rail.css({zIndex:C+101}),v.zoom.css({zIndex:C+102}),v.zoom.css("backgroundPosition","0 -18px"),v.resizeZoom(),v.onzoomin&&v.onzoomin.call(v),v.cancelEvent(e)}},this.doZoomOut=function(e){if(v.zoomactive)return v.zoomactive=!1,v.win.css("margin",""),v.win.css(v.zoomrestore.style),y.isios4&&_.scrollTop(v.zoomrestore.scrollTop),v.rail.css({"z-index":v.zindex}),v.zoom.css({"z-index":v.zindex}),v.zoomrestore=!1,v.zoom.css("backgroundPosition","0 0"),v.onResize(),v.onzoomout&&v.onzoomout.call(v),v.cancelEvent(e)},this.doZoom=function(e){return v.zoomactive?v.doZoomOut(e):v.doZoomIn(e)},this.resizeZoom=function(){var e;v.zoomactive&&(e=v.getScrollTop(),v.win.css({width:_.width()-v.zoomrestore.padding.w+"px",height:_.height()-v.zoomrestore.padding.h+"px"}),v.onResize(),v.setScrollTop(Math.min(v.page.maxh,e)))},this.init(),P.nicescroll.push(this)}var o,B=R.MutationObserver||R.WebKitMutationObserver||!1,X=Date.now||function(){return(new Date).getTime()},D={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:0<(o=(o=N.currentScript||!!(o=N.getElementsByTagName("script")).length&&o[o.length-1])?o.src.split("?")[0]:"").split("/").length?o.split("/").slice(0,-1).join("/")+"/":"",preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},r=!1,A=function(e){var d=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,o){d.stop(),d.steptime=0,d.lasttime=X(),d.speedx=0,d.speedy=0,d.lastx=e,d.lasty=o,d.lastscrollx=-1,d.lastscrolly=-1},this.update=function(e,o){var t=X();d.steptime=t-d.lasttime,d.lasttime=t;var r=o-d.lasty,i=e-d.lastx,s=d.nc.getScrollTop()+r,t=d.nc.getScrollLeft()+i;d.snapx=t<0||t>d.nc.page.maxw,d.snapy=s<0||s>d.nc.page.maxh,d.speedx=i,d.speedy=r,d.lastx=e,d.lasty=o},this.stop=function(){d.nc.unsynched("domomentum2d"),d.timer&&clearTimeout(d.timer),d.timer=0,d.lastscrollx=-1,d.lastscrolly=-1},this.doSnapy=function(e,o){var t=!1;o<0?t=!(o=0):o>d.nc.page.maxh&&(o=d.nc.page.maxh,t=!0),e<0?t=!(e=0):e>d.nc.page.maxw&&(e=d.nc.page.maxw,t=!0),t?d.nc.doScrollPos(e,o,d.nc.opt.snapbackspeed):d.nc.triggerScrollEnd()},this.doMomentum=function(e){var o=X(),t=e?o+e:d.lasttime,r=d.nc.getScrollLeft(),e=d.nc.getScrollTop(),i=d.nc.page.maxh,s=d.nc.page.maxw;d.speedx=0<s?Math.min(60,d.speedx):0,d.speedy=0<i?Math.min(60,d.speedy):0;t=t&&o-t<=60;(e<0||i<e||r<0||s<r)&&(t=!1);var n,l,a,c,r=!(!d.speedy||!t)&&d.speedy,t=!(!d.speedx||!t)&&d.speedx;r||t?(50<(n=Math.max(16,d.steptime))&&(t=n/50,d.speedx*=t,d.speedy*=t,n=50),d.demulxy=0,d.lastscrollx=d.nc.getScrollLeft(),d.chkx=d.lastscrollx,d.lastscrolly=d.nc.getScrollTop(),d.chky=d.lastscrolly,l=d.lastscrollx,a=d.lastscrolly,(c=function(){var e=600<X()-o?.04:.02;d.speedx&&(l=Math.floor(d.lastscrollx-d.speedx*(1-d.demulxy)),((d.lastscrollx=l)<0||s<l)&&(e=.1)),d.speedy&&(a=Math.floor(d.lastscrolly-d.speedy*(1-d.demulxy)),((d.lastscrolly=a)<0||i<a)&&(e=.1)),d.demulxy=Math.min(1,d.demulxy+e),d.nc.synched("domomentum2d",function(){d.speedx&&(d.nc.getScrollLeft(),d.chkx=l,d.nc.setScrollLeft(l)),d.speedy&&(d.nc.getScrollTop(),d.chky=a,d.nc.setScrollTop(a)),d.timer||(d.nc.hideCursor(),d.doSnapy(l,a))}),d.demulxy<1?d.timer=setTimeout(c,n):(d.stop(),d.nc.hideCursor(),d.doSnapy(l,a))})()):d.doSnapy(d.nc.getScrollLeft(),d.nc.getScrollTop())}},i=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():i.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):i.call(e,o),this}},e.fn.scrollTop=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(o)):i.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():i.call(this)};var l=e.fn.scrollLeft;P.cssHooks.pageXOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():l.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):l.call(e,o),this}},e.fn.scrollLeft=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(o)):l.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():l.call(this)};function t(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return P.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=P.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this}!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(t.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new t(this):this[e]&&P.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==P.data(e,"__nicescroll")},P.fn.niceScroll=function(r,i){void 0!==i||"object"!=typeof r||"jquery"in r||(i=r,r=!1);var s=new t;return this.each(function(){var e=P(this),o=P.extend({},i);r&&(t=P(r),o.doc=1<t.length?P(r,e):t,o.win=e),!("doc"in o)||"win"in o||(o.win=e);var t=e.data("__nicescroll")||!1;t||(o.doc=o.doc||e,t=new n(o,e),e.data("__nicescroll",t)),s.push(t)}),1===s.length?s[0]:s},R.NiceScroll={getjQuery:function(){return e}},P.nicescroll||(P.nicescroll=new t,P.nicescroll.options=D)});
wppa-admin-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
- * Version 7.7.07.007
7
  *
8
  */
9
 
@@ -55,7 +55,6 @@ function wppa_restore_settings( $fname, $type = '' ) {
55
  if ( $type == 'skin' ) {
56
  $void_these = array(
57
  'wppa_revision',
58
- 'wppa_resize_on_upload',
59
  'wppa_allow_debug',
60
  'wppa_thumb_linkpage',
61
  'wppa_potd_linkpage',
@@ -68,7 +67,6 @@ function wppa_restore_settings( $fname, $type = '' ) {
68
  'wppa_thumbnail_widget_linkpage',
69
  'wppa_comment_widget_linkpage',
70
  'wppa_featen_widget_linkpage',
71
- 'wppa_coverimg_linkpage',
72
  'wppa_sphoto_linkpage',
73
  'wppa_mphoto_linkpage',
74
  'wppa_xphoto_linkpage',
@@ -500,9 +498,6 @@ global $wpdb;
500
  // Destroy the result
501
  @ imagedestroy( $rotate );
502
 
503
- // Optimized
504
- wppa_optimize_image_file( $file );
505
-
506
  // Clear stored dimensions
507
  wppa_update_photo( array( 'id' => $id,
508
  'thumbx' => '0',
3
  * Package: wp-photo-album-plus
4
  *
5
  * gp admin functions
6
+ * Version 8.0.00.009
7
  *
8
  */
9
 
55
  if ( $type == 'skin' ) {
56
  $void_these = array(
57
  'wppa_revision',
 
58
  'wppa_allow_debug',
59
  'wppa_thumb_linkpage',
60
  'wppa_potd_linkpage',
67
  'wppa_thumbnail_widget_linkpage',
68
  'wppa_comment_widget_linkpage',
69
  'wppa_featen_widget_linkpage',
 
70
  'wppa_sphoto_linkpage',
71
  'wppa_mphoto_linkpage',
72
  'wppa_xphoto_linkpage',
498
  // Destroy the result
499
  @ imagedestroy( $rotate );
500
 
 
 
 
501
  // Clear stored dimensions
502
  wppa_update_photo( array( 'id' => $id,
503
  'thumbx' => '0',
wppa-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
- * Version 7.5.10
7
  *
8
  */
9
 
@@ -28,7 +28,6 @@ function wppa_add_admin() {
28
  $wp_roles->add_cap( 'administrator', 'wppa_moderate' );
29
  $wp_roles->add_cap( 'administrator', 'wppa_export' );
30
  $wp_roles->add_cap( 'administrator', 'wppa_settings' );
31
- $wp_roles->add_cap( 'administrator', 'wppa_potd' );
32
  $wp_roles->add_cap( 'administrator', 'wppa_comments' );
33
  $wp_roles->add_cap( 'administrator', 'wppa_help' );
34
  }
@@ -66,7 +65,6 @@ function wppa_add_admin() {
66
  add_submenu_page( 'wppa_admin_menu', __('Moderate Photos', 'wp-photo-album-plus'), __('Moderate Photos', 'wp-photo-album-plus').(wppa_switch('moderate_bulk')?$upl_pending:$tot_pending), 'wppa_moderate', 'wppa_moderate_photos', 'wppa_page_moderate' );
67
  add_submenu_page( 'wppa_admin_menu', __('Export Photos', 'wp-photo-album-plus'), __('Export Photos', 'wp-photo-album-plus'), 'wppa_export', 'wppa_export_photos', 'wppa_page_export' );
68
  add_submenu_page( 'wppa_admin_menu', __('Settings', 'wp-photo-album-plus'), __('Settings', 'wp-photo-album-plus'), 'wppa_settings', 'wppa_options', 'wppa_page_options' );
69
- add_submenu_page( 'wppa_admin_menu', __('Photo of the day Widget', 'wp-photo-album-plus'), __('Photo of the day', 'wp-photo-album-plus'), 'wppa_potd', 'wppa_photo_of_the_day', 'wppa_sidebar_page_options' );
70
  add_submenu_page( 'wppa_admin_menu', __('Manage comments', 'wp-photo-album-plus'), __('Comments', 'wp-photo-album-plus').$com_pending, 'wppa_comments', 'wppa_manage_comments', 'wppa_comment_admin' );
71
  add_submenu_page( 'wppa_admin_menu', __('Help &amp; Info', 'wp-photo-album-plus'), __('Documentation', 'wp-photo-album-plus'), 'wppa_help', 'wppa_help', 'wppa_page_help' );
72
  if ( wppa_get_option( 'wppa_logfile_on_menu' ) == 'yes' ) {
@@ -125,6 +123,33 @@ global $wppa_api_version;
125
  }
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  /* ADMIN PAGE PHP's */
129
 
130
  // Album admin page
@@ -181,6 +206,7 @@ function wppa_page_export() {
181
  // Settings admin page
182
  function wppa_page_options() {
183
  require_once 'wppa-settings-autosave.php';
 
184
 
185
  // jQuery Easing for Nicescroller
186
  $easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
@@ -192,12 +218,6 @@ function wppa_page_options() {
192
 
193
  _wppa_page_options();
194
  }
195
- // Photo of the day admin page
196
- function wppa_sidebar_page_options() {
197
- require_once 'wppa-potd-admin.php';
198
- wppa_publish_scheduled();
199
- _wppa_sidebar_page_options();
200
- }
201
  // Comments admin page
202
  function wppa_comment_admin() {
203
  require_once 'wppa-comment-admin.php';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains the admin menu and startups the admin pages
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
28
  $wp_roles->add_cap( 'administrator', 'wppa_moderate' );
29
  $wp_roles->add_cap( 'administrator', 'wppa_export' );
30
  $wp_roles->add_cap( 'administrator', 'wppa_settings' );
 
31
  $wp_roles->add_cap( 'administrator', 'wppa_comments' );
32
  $wp_roles->add_cap( 'administrator', 'wppa_help' );
33
  }
65
  add_submenu_page( 'wppa_admin_menu', __('Moderate Photos', 'wp-photo-album-plus'), __('Moderate Photos', 'wp-photo-album-plus').(wppa_switch('moderate_bulk')?$upl_pending:$tot_pending), 'wppa_moderate', 'wppa_moderate_photos', 'wppa_page_moderate' );
66
  add_submenu_page( 'wppa_admin_menu', __('Export Photos', 'wp-photo-album-plus'), __('Export Photos', 'wp-photo-album-plus'), 'wppa_export', 'wppa_export_photos', 'wppa_page_export' );
67
  add_submenu_page( 'wppa_admin_menu', __('Settings', 'wp-photo-album-plus'), __('Settings', 'wp-photo-album-plus'), 'wppa_settings', 'wppa_options', 'wppa_page_options' );
 
68
  add_submenu_page( 'wppa_admin_menu', __('Manage comments', 'wp-photo-album-plus'), __('Comments', 'wp-photo-album-plus').$com_pending, 'wppa_comments', 'wppa_manage_comments', 'wppa_comment_admin' );
69
  add_submenu_page( 'wppa_admin_menu', __('Help &amp; Info', 'wp-photo-album-plus'), __('Documentation', 'wp-photo-album-plus'), 'wppa_help', 'wppa_help', 'wppa_page_help' );
70
  if ( wppa_get_option( 'wppa_logfile_on_menu' ) == 'yes' ) {
123
  }
124
  }
125
 
126
+ add_action( 'admin_head', 'wppa_inject_js' );
127
+
128
+ function wppa_inject_js() {
129
+ global $wppa_api_version;
130
+
131
+ echo '
132
+ <script type="text/javascript" >
133
+ wppaImageDirectory = "'.wppa_get_imgdir().'";
134
+ wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";
135
+ wppaPhotoDirectory = "'.WPPA_UPLOAD_URL.'/";
136
+ wppaThumbDirectory = "'.WPPA_UPLOAD_URL.'/thumbs/";
137
+ wppaTempDirectory = "'.WPPA_UPLOAD_URL.'/temp/";
138
+ wppaFontDirectory = "'.WPPA_UPLOAD_URL.'/fonts/";
139
+ wppaNoPreview = "'.__('No Preview available', 'wp-photo-album-plus').'";
140
+ wppaVersion = "'.$wppa_api_version.'";
141
+ wppaSiteUrl = "'.site_url().'";
142
+ wppaWppaUrl = "'.WPPA_URL.'";
143
+ wppaIncludeUrl = "'.trim(includes_url(), '/').'";
144
+ wppaUIERR = "'.__('Unimplemented virtual album', 'wp-photo-album-plus').'";
145
+ wppaLazyLoad = '.(wppa_switch( 'lazy' ) ? 'true' : 'false' ).';
146
+ wppaTxtProcessing = "'.__('Processing...', 'wp-photo-album-plus').'";
147
+ wppaTxtDone = "'.__('Done!', 'wp-photo-album-plus').'";
148
+ wppaTxtErrUnable = "'.__( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ).'";
149
+ wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";
150
+ </script>';
151
+ }
152
+
153
  /* ADMIN PAGE PHP's */
154
 
155
  // Album admin page
206
  // Settings admin page
207
  function wppa_page_options() {
208
  require_once 'wppa-settings-autosave.php';
209
+ require_once 'wppa-setting-functions.php';
210
 
211
  // jQuery Easing for Nicescroller
212
  $easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
218
 
219
  _wppa_page_options();
220
  }
 
 
 
 
 
 
221
  // Comments admin page
222
  function wppa_comment_admin() {
223
  require_once 'wppa-comment-admin.php';
wppa-adminbar.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * enhances the admin bar with wppa+ menu
6
- * Version 7.3.02
7
  *
8
  */
9
 
@@ -83,13 +83,6 @@ function wppa_admin_bar_menu() {
83
  'href' => admin_url( 'admin.php?page=wppa_options' )
84
  );
85
  }
86
- if ( current_user_can( 'wppa_potd' ) ) {
87
- $menu_items['sidebar'] = array(
88
- 'parent' => $wppaplus,
89
- 'title' => __( 'Photo of the day', 'wp-photo-album-plus' ),
90
- 'href' => admin_url( 'admin.php?page=wppa_photo_of_the_day' )
91
- );
92
- }
93
  if ( current_user_can( 'wppa_comments' ) ) {
94
  $menu_items['comments'] = array(
95
  'parent' => $wppaplus,
3
  * Package: wp-photo-album-plus
4
  *
5
  * enhances the admin bar with wppa+ menu
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
83
  'href' => admin_url( 'admin.php?page=wppa_options' )
84
  );
85
  }
 
 
 
 
 
 
 
86
  if ( current_user_can( 'wppa_comments' ) ) {
87
  $menu_items['comments'] = array(
88
  'parent' => $wppaplus,
wppa-ajax-front.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /* wppa-ajax-front.php
3
- *
4
- * Supplies the functionality like wp-admin/admin-ajax.php for wppa frontend ajax requests without using wp-admin files
5
- * version 7.3.00
6
- *
7
- */
8
- define( 'DOING_AJAX', true );
9
-
10
- /** Load WordPress Bootstrap */
11
- require_once ( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );
12
-
13
- /** Allow for cross-domain requests (from the frontend). */
14
- send_origin_headers();
15
-
16
- // Require an action parameter
17
- if ( empty( $_REQUEST['action'] ) )
18
- die( '0' );
19
-
20
- // Load the wppa admin functions
21
- require_once 'wppa-admin.php';
22
-
23
- @header( 'Content-Type: text/html; charset=' . wppa_get_option( 'blog_charset' ) );
24
- @header( 'X-Robots-Tag: noindex' );
25
-
26
- send_nosniff_header();
27
- nocache_headers();
28
-
29
- wppa_ajax_callback();
30
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wppa-ajax.php CHANGED
@@ -2,12 +2,43 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.7.07.007
6
  *
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  add_action( 'wp_ajax_wppa', 'wppa_ajax_callback' );
12
  add_action( 'wp_ajax_nopriv_wppa', 'wppa_ajax_callback' );
13
 
@@ -61,10 +92,16 @@ global $wppa;
61
 
62
  if ( wppa_switch( 'log_ajax' ) ) {
63
  $args = '';
 
64
  foreach( array_keys( $_REQUEST ) as $key ) {
 
 
 
65
  $args .= $key . '=' . $_REQUEST[$key] . ', ';
66
  }
67
- wppa_log( 'Ajx', 'Args = ' . $args );
 
 
68
  }
69
 
70
  // Any runtime modifyable settings?
@@ -414,7 +451,7 @@ global $wppa;
414
  // Description
415
  if ( isset( $_POST['upn-description'] ) ) {
416
  $desc = str_replace( array( '<br/>','<br>' ), '<br />', $_POST['upn-description'] );
417
- $desc = stripslashes( balanceTags( $desc, true ) );
418
  wppa_update_photo( array( 'id' => $photo, 'description' => $desc ) );
419
  }
420
 
@@ -1589,6 +1626,13 @@ global $wppa;
1589
  $value = $_REQUEST['value'];
1590
  $value = wppa_decode( $value );
1591
 
 
 
 
 
 
 
 
1592
  // Check validity
1593
  if ( ! wp_verify_nonce( $nonce, 'wppa_nonce_'.$album ) ) {
1594
  echo '||0||'.__( 'You do not have the rights to update album information' , 'wp-photo-album-plus').$nonce;
@@ -1705,13 +1749,7 @@ global $wppa;
1705
  break;
1706
  case 'description':
1707
  $itemname = __( 'Description' , 'wp-photo-album-plus');
1708
- if ( wppa_switch( 'check_balance' ) ) {
1709
- $value = str_replace( array( '<br/>','<br>' ), '<br />', $value );
1710
- if ( balanceTags( $value, true ) != $value ) {
1711
- echo '||3||'.__( 'Unbalanced tags in album description!' , 'wp-photo-album-plus');
1712
- wppa_exit();
1713
- }
1714
- }
1715
  $value = trim( $value );
1716
  wppa_update_album( array( 'id' => $album, 'description' => $value, 'modified' => time() ) );
1717
  break;
@@ -2003,6 +2041,13 @@ global $wppa;
2003
  $value = isset( $_REQUEST['value'] ) ? $_REQUEST['value'] : '';
2004
  $value = wppa_decode( $value );
2005
 
 
 
 
 
 
 
 
2006
  // Check validity
2007
  if ( ! wp_verify_nonce( $nonce, 'wppa_nonce_'.$photo ) ) {
2008
  $txt = __( 'You do not have the rights to update photo information' , 'wp-photo-album-plus');
@@ -2479,13 +2524,6 @@ global $wppa;
2479
  break;
2480
  case 'description':
2481
  $itemname = __( 'Description', 'wp-photo-album-plus');
2482
- if ( wppa_switch( 'check_balance' ) ) {
2483
- $value = str_replace( array( '<br/>','<br>' ), '<br />', $value );
2484
- if ( balanceTags( $value, true ) != $value ) {
2485
- echo '||3||'.__( 'Unbalanced tags in photo description!' , 'wp-photo-album-plus');
2486
- wppa_exit();
2487
- }
2488
- }
2489
  break;
2490
  case 'p_order':
2491
  $itemname = __( 'Photo order #' , 'wp-photo-album-plus');
@@ -3197,10 +3235,7 @@ global $wppa;
3197
  }
3198
  break;
3199
 
3200
- case 'wppa_colwidth': // ?? fixed low high title
3201
- wppa_ajax_check_range( $value, 'auto', '100', false, __( 'Column width.' , 'wp-photo-album-plus') );
3202
- break;
3203
- case 'wppa_initial_colwidth':
3204
  wppa_ajax_check_range( $value, false, '100', false, __( 'Initial width.' , 'wp-photo-album-plus') );
3205
  break;
3206
  case 'wppa_fullsize':
@@ -3225,9 +3260,6 @@ global $wppa;
3225
  case 'wppa_tn_margin':
3226
  wppa_ajax_check_range( $value, false, '0', false, __( 'Thumbnail Spacing' , 'wp-photo-album-plus') );
3227
  break;
3228
- case 'wppa_min_thumbs':
3229
- wppa_ajax_check_range( $value, false, '0', false, __( 'Photocount treshold.' , 'wp-photo-album-plus') );
3230
- break;
3231
  case 'wppa_thumb_page_size':
3232
  wppa_ajax_check_range( $value, false, '0', false, __( 'Thumb page size.' , 'wp-photo-album-plus') );
3233
  break;
@@ -3300,12 +3332,6 @@ global $wppa;
3300
  case 'wppa_star_opacity':
3301
  wppa_ajax_check_range( $value, false, '0', '50', __( 'Opacity.' , 'wp-photo-album-plus') );
3302
  break;
3303
- // case 'wppa_filter_priority':
3304
- // wppa_ajax_check_range( $value, false, wppa_opt( 'shortcode_priority' ), false, __( 'Filter priority' ,'wp-photo-album-plus' ) );
3305
- // break;
3306
- // case 'wppa_shortcode_priority':
3307
- // wppa_ajax_check_range( $value, false, '0', wppa_opt( 'filter_priority' ) - '1', __( 'Shortcode_priority', 'wp-photo-album-plus' ) );
3308
- // break;
3309
  case 'wppa_gravatar_size':
3310
  wppa_ajax_check_range( $value, false, '10', '256', __( 'Avatar size' , 'wp-photo-album-plus') );
3311
  break;
@@ -3333,10 +3359,6 @@ global $wppa;
3333
  case 'wppa_dislike_delete':
3334
  wppa_ajax_check_range( $value, false, '0', false, __( 'Dislike delete' , 'wp-photo-album-plus') );
3335
  break;
3336
- case 'wppa_max_execution_time':
3337
- $ini = ini_get( 'max_execution_time' );
3338
- wppa_ajax_check_range( $value, false, '5', $ini - 5, __( 'Max execution time' , 'wp-photo-album-plus') );
3339
- break;
3340
  case 'wppa_cp_points_comment':
3341
  case 'wppa_cp_points_comment_appr':
3342
  case 'wppa_cp_points_rating':
@@ -3424,7 +3446,6 @@ global $wppa;
3424
  if ( $iret !== false ) {
3425
  delete_option( 'wppa_'.WPPA_IPTC.'_lastkey' );
3426
  $title = __( 'IPTC data cleared' , 'wp-photo-album-plus');
3427
- $alert = __( 'Refresh this page to clear table X' , 'wp-photo-album-plus');
3428
  update_option( 'wppa_index_need_remake', 'yes' );
3429
  }
3430
  else {
@@ -3439,7 +3460,6 @@ global $wppa;
3439
  if ( $iret !== false ) {
3440
  delete_option( 'wppa_'.WPPA_EXIF.'_lastkey' );
3441
  $title = __( 'EXIF data cleared' , 'wp-photo-album-plus');
3442
- $alert = __( 'Refresh this page to clear table XI' , 'wp-photo-album-plus');
3443
  update_option( 'wppa_index_need_remake', 'yes' );
3444
  }
3445
  else {
@@ -3493,26 +3513,20 @@ global $wppa;
3493
 
3494
  update_option ( 'wppa_rerate_status', 'Required' );
3495
  $alert .= __( 'You just changed a setting that requires the recalculation of ratings.' , 'wp-photo-album-plus');
3496
- $alert .= ' '.__( 'Please run the appropriate action in Table VIII.' , 'wp-photo-album-plus');
3497
 
3498
  wppa_update_option( $option, $value );
3499
  wppa( 'error', '0' );
3500
  break;
3501
 
3502
  case 'wppa_newphoto_description':
3503
- if ( wppa_switch( 'check_balance' ) && balanceTags( $value, true ) != $value ) {
3504
- $alert = __( 'Unbalanced tags in photo description!' , 'wp-photo-album-plus');
3505
- wppa( 'error', '1' );
3506
- }
3507
- else {
3508
- if ( wppa_switch( 'wppa_compress_newdesc' ) ) {
3509
- $value = wppa_compress_html( $value );
3510
- }
3511
- wppa_update_option( $option, $value );
3512
- wppa( 'error', '0' );
3513
- $alert = '';
3514
- wppa_index_compute_skips();
3515
  }
 
 
 
 
3516
  break;
3517
 
3518
  case 'wppa_keep_source':
@@ -3555,193 +3569,6 @@ global $wppa;
3555
  }
3556
  break;
3557
 
3558
- case 'wppa_i_responsive':
3559
- if ( $value == 'yes' ) {
3560
- wppa_update_option( 'wppa_colwidth', 'auto' );
3561
- wppa_update_option( 'wppa_cover_type', 'default-mcr' );
3562
- }
3563
- if ( $value == 'no' ) {
3564
- wppa_update_option( 'wppa_colwidth', '640' );
3565
- wppa_update_option( 'wppa_cover_type', 'default' );
3566
- }
3567
- break;
3568
-
3569
- case 'wppa_i_downsize':
3570
- if ( $value == 'yes' ) {
3571
- wppa_update_option( 'wppa_resize_on_upload', 'yes' );
3572
- if ( wppa_opt( 'resize_to' ) == '0' ) wppa_update_option( 'wppa_resize_to', '1024x768' );
3573
- }
3574
- if ( $value == 'no' ) {
3575
- wppa_update_option( 'wppa_resize_on_upload', 'no' );
3576
- }
3577
- break;
3578
-
3579
- case 'wppa_i_source':
3580
- if ( $value == 'yes' ) {
3581
- wppa_update_option( 'wppa_keep_source_admin', 'yes' );
3582
- wppa_update_option( 'wppa_keep_source_frontend', 'yes' );
3583
- }
3584
- if ( $value == 'no' ) {
3585
- wppa_update_option( 'wppa_keep_source_admin', 'no' );
3586
- wppa_update_option( 'wppa_keep_source_frontend', 'no' );
3587
- }
3588
- break;
3589
-
3590
- case 'wppa_i_userupload':
3591
- if ( $value == 'yes' ) {
3592
- wppa_update_option( 'wppa_user_upload_on', 'yes' );
3593
- wppa_update_option( 'wppa_user_upload_login', 'yes' );
3594
- wppa_update_option( 'wppa_owner_only', 'yes' );
3595
- wppa_update_option( 'wppa_upload_moderate', 'yes' );
3596
- wppa_update_option( 'wppa_upload_edit', 'new' );
3597
- wppa_update_option( 'wppa_feuploadnotify', 'yes' );
3598
- wppa_update_option( 'wppa_grant_an_album', 'yes' );
3599
- $grantparent = wppa_opt( 'grant_parent' );
3600
- if ( ! wppa_album_exists( $grantparent ) ) {
3601
- $id = wppa_create_album_entry( array( 'name' => __( 'Members' , 'wp-photo-album-plus'), 'description' => __( 'Parent of the member albums' , 'wp-photo-album-plus'), 'upload_limit' => '0/0' ) );
3602
- if ( $id ) {
3603
- wppa_index_add( 'album', $id );
3604
- wppa_update_option( 'wppa_grant_parent', $id );
3605
- }
3606
- $my_post = array(
3607
- 'post_title' => __( 'Members' , 'wp-photo-album-plus'),
3608
- 'post_content' => '[wppa type="content" album="'.$id.'"]',
3609
- 'post_status' => 'publish',
3610
- 'post_type' => 'page'
3611
- );
3612
- $pagid = wp_insert_post( $my_post );
3613
- }
3614
- wppa_update_option( 'wppa_alt_is_restricted', 'yes' );
3615
- wppa_update_option( 'wppa_link_is_restricted', 'yes' );
3616
- wppa_update_option( 'wppa_covertype_is_restricted', 'yes' );
3617
- wppa_update_option( 'wppa_porder_restricted', 'yes' );
3618
- }
3619
- if ( $value == 'no' ) {
3620
- wppa_update_option( 'wppa_user_upload_on', 'no' );
3621
- }
3622
- break;
3623
-
3624
- case 'wppa_i_rating':
3625
- if ( $value == 'yes' ) {
3626
- wppa_update_option( 'wppa_rating_on', 'yes' );
3627
- }
3628
- if ( $value == 'no' ) {
3629
- wppa_update_option( 'wppa_rating_on', 'no' );
3630
- }
3631
- break;
3632
-
3633
- case 'wppa_i_comment':
3634
- if ( $value == 'yes' ) {
3635
- wppa_update_option( 'wppa_show_comments', 'yes' );
3636
- wppa_update_option( 'wppa_moderate_comment', 'all' );
3637
- wppa_update_option( 'wppa_commentnotify', 'yes' );
3638
- }
3639
- if ( $value == 'no' ) {
3640
- wppa_update_option( 'wppa_show_comments', 'no' );
3641
- }
3642
- break;
3643
-
3644
- case 'wppa_i_share':
3645
- if ( $value == 'yes' ) {
3646
- wppa_update_option( 'wppa_share_on', 'yes' );
3647
- }
3648
- if ( $value == 'no' ) {
3649
- wppa_update_option( 'wppa_share_on', 'no' );
3650
- }
3651
- break;
3652
-
3653
- case 'wppa_i_iptc':
3654
- if ( $value == 'yes' ) {
3655
- wppa_update_option( 'wppa_show_iptc', 'yes' );
3656
- wppa_update_option( 'wppa_save_iptc', 'yes' );
3657
- }
3658
- if ( $value == 'no' ) {
3659
- wppa_update_option( 'wppa_show_iptc', 'no' );
3660
- wppa_update_option( 'wppa_save_iptc', 'no' );
3661
- }
3662
- break;
3663
-
3664
- case 'wppa_i_exif':
3665
- if ( $value == 'yes' ) {
3666
- wppa_update_option( 'wppa_show_exif', 'yes' );
3667
- wppa_update_option( 'wppa_save_exif', 'yes' );
3668
- }
3669
- if ( $value == 'no' ) {
3670
- wppa_update_option( 'wppa_show_exif', 'no' );
3671
- wppa_update_option( 'wppa_save_exif', 'no' );
3672
- }
3673
- break;
3674
-
3675
- case 'wppa_i_gpx':
3676
- if ( $value == 'yes' ) {
3677
- $custom_content = wppa_opt( 'custom_content' );
3678
- if ( strpos( $custom_content, 'w#location' ) === false ) {
3679
- $custom_content = $custom_content.' w#location';
3680
- wppa_update_option( 'wppa_custom_content', $custom_content );
3681
- }
3682
- if ( ! wppa_switch( 'custom_on' ) ) {
3683
- wppa_update_option( 'wppa_custom_on', 'yes' );
3684
- }
3685
- if ( wppa_opt( 'gpx_implementation' ) == 'none' ) {
3686
- wppa_update_option( 'wppa_gpx_implementation', 'wppa-plus-embedded' );
3687
- wppa_update_option( 'wppa_load_map_api', 'yes' );
3688
- }
3689
- }
3690
- if ( $value == 'no' ) {
3691
- wppa_update_option( 'gpx_implementation', 'none' );
3692
- wppa_update_option( 'wppa_load_map_api', 'no' );
3693
- }
3694
- break;
3695
-
3696
- case 'wppa_i_fotomoto':
3697
- if ( $value == 'yes' ) {
3698
- $custom_content = wppa_opt( 'custom_content' );
3699
- if ( strpos( $custom_content, 'w#fotomoto' ) === false ) {
3700
- $custom_content = 'w#fotomoto '.$custom_content;
3701
- wppa_update_option( 'wppa_custom_content', $custom_content );
3702
- }
3703
- if ( ! wppa_switch( 'custom_on' ) ) {
3704
- wppa_update_option( 'wppa_custom_on', 'yes' );
3705
- }
3706
- wppa_update_option( 'wppa_fotomoto_on', 'yes' );
3707
- wppa_update_option( 'wppa_custom_on', 'yes' );
3708
- }
3709
- else {
3710
- wppa_update_option( 'wppa_fotomoto_on', 'no' );
3711
- }
3712
- break;
3713
-
3714
- case 'wppa_i_video':
3715
- if ( $value == 'yes' ) {
3716
- wppa_update_option( 'wppa_enable_video', 'yes' );
3717
- }
3718
- else {
3719
- wppa_update_option( 'wppa_enable_video', 'no' );
3720
- }
3721
- break;
3722
-
3723
- case 'wppa_i_audio':
3724
- if ( $value == 'yes' ) {
3725
- wppa_update_option( 'wppa_enable_audio', 'yes' );
3726
- }
3727
- else {
3728
- wppa_update_option( 'wppa_enable_audio', 'no' );
3729
- }
3730
- break;
3731
-
3732
- case 'wppa_i_pdf':
3733
- if ( $value == 'yes' ) {
3734
- wppa_update_option( 'wppa_enable_pdf', 'yes' );
3735
- }
3736
- else {
3737
- wppa_update_option( 'wppa_enable_pdf', 'no' );
3738
- }
3739
- break;
3740
-
3741
- case 'wppa_i_done':
3742
- $value = 'done';
3743
- break;
3744
-
3745
  case 'wppa_excl_sep':
3746
  case 'wppa_search_tags':
3747
  case 'wppa_search_cats':
@@ -3838,23 +3665,34 @@ global $wppa;
3838
  }
3839
  break;
3840
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3841
  case 'wppa_gpx_implementation':
3842
  if ( $value != 'none' ) {
3843
  $custom_content = wppa_opt( 'custom_content' );
3844
  if ( strpos( $custom_content, 'w#location' ) === false ) {
3845
  $custom_content = $custom_content.' w#location';
3846
  wppa_update_option( 'wppa_custom_content', $custom_content );
3847
- $alert = __( 'The content of the Custom box has been changed to display maps.' , 'wp-photo-album-plus').' ';
3848
  }
3849
  if ( ! wppa_switch( 'custom_on' ) ) {
3850
  wppa_update_option( 'wppa_custom_on', 'yes' );
3851
  $alert .= __( 'The display of the custom box has been enabled.' , 'wp-photo-album-plus');
3852
  }
3853
  }
3854
- if ( $value == 'wppa-plus-embedded' ) {
3855
- wppa_update_option( 'wppa_load_map_api', 'yes' );
3856
- $alert .= __( 'The Google maps API will be loaded on all pages to enable the use of Ajax page content changes that use maps.', 'wp-photo-album-plus');
3857
- }
3858
  break;
3859
 
3860
  case 'wppa_regen_thumbs_skip_one':
@@ -3915,10 +3753,6 @@ global $wppa;
3915
  $value = trim( wppa_sanitize_tags( $value ), ',' );
3916
  break;
3917
 
3918
- case 'wppa_wppa_set_shortcodes':
3919
- $value = str_replace( ' ', '', $value );
3920
- break;
3921
-
3922
  case 'wppa_use_encrypted_links':
3923
  if ( $value == 'yes' ) {
3924
  $ca = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE crypt = ''" );
@@ -3927,14 +3761,14 @@ global $wppa;
3927
  if ( $ca ) update_option ( 'wppa_crypt_albums_status', 'Required' );
3928
  if ( $cp ) update_option ( 'wppa_crypt_photos_status', 'Required' );
3929
  wppa( 'error', '4711' );
3930
- $alert .= __( 'You must run Table VIII-A13 and VIII-A14 first before you can switch to encrypted urls.', 'wp-photo-album-plus' );
3931
  }
3932
  if ( wppa_switch( 'use_photo_names_in_urls' ) ) {
3933
- $alert .= ' ' . __( 'Table IV-A3 will be switched off.', 'wp-photo-album-plus' );
3934
  wppa_update_option( 'wppa_use_photo_names_in_urls', 'no' );
3935
  }
3936
  if ( wppa_switch( 'use_album_names_in_urls' ) ) {
3937
- $alert .= ' ' . __( 'Table IV-A4 will be switched off.', 'wp-photo-album-plus' );
3938
  wppa_update_option( 'wppa_use_album_names_in_urls', 'no' );
3939
  }
3940
  }
@@ -4068,7 +3902,7 @@ global $wppa;
4068
  if ( $old_minisize != $new_minisize ) {
4069
  update_option ( 'wppa_regen_thumbs_status', 'Required' );
4070
  $alert .= __( 'You just changed a setting that requires the regeneration of thumbnails.' , 'wp-photo-album-plus');
4071
- $alert .= ' '.__( 'Please run the appropriate action in Table VIII.' , 'wp-photo-album-plus');
4072
  }
4073
 
4074
  // Compose the cron job status and togo fields
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.0.00.011
6
  *
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
10
 
11
+ // Load admin-ajax.php if wppa_ajax is in query args
12
+ function wppa_ajax_include() {
13
+ global $wp_query;
14
+
15
+ if ( $wp_query->get( 'wppa_ajax' ) === '1' ) {
16
+ include_once ABSPATH . '/wp-admin/admin-ajax.php';
17
+ exit;
18
+ }
19
+ }
20
+ add_action( 'template_redirect', 'wppa_ajax_include' );
21
+
22
+ // Add rewrite rule
23
+ function wppa_ajax_rewrite_rule() {
24
+
25
+ add_rewrite_rule( 'wppaajax/?$', 'index.php?wppa_ajax=1', 'top' );
26
+ $rewrite_rules = get_option( 'rewrite_rules', array() );
27
+ if ( ! in_array( 'index.php?wppa_ajax=1', $rewrite_rules ) ) {
28
+ flush_rewrite_rules();
29
+ }
30
+ }
31
+ add_action( 'init', 'wppa_ajax_rewrite_rule' );
32
+
33
+ // Add wppa_ajax to query vars
34
+ function wppa_ajax_query_vars( $query_vars ) {
35
+
36
+ $query_vars[] = 'wppa_ajax';
37
+ return $query_vars;
38
+ }
39
+ add_filter( 'query_vars', 'wppa_ajax_query_vars' );
40
+
41
+ // Link ajax callback function
42
  add_action( 'wp_ajax_wppa', 'wppa_ajax_callback' );
43
  add_action( 'wp_ajax_nopriv_wppa', 'wppa_ajax_callback' );
44
 
92
 
93
  if ( wppa_switch( 'log_ajax' ) ) {
94
  $args = '';
95
+ $is_heartbeat = false;
96
  foreach( array_keys( $_REQUEST ) as $key ) {
97
+ if ( $key == 'wppa-option' && $_REQUEST[$key] == 'heartbeat' ) {
98
+ $is_heartbeat = true;
99
+ }
100
  $args .= $key . '=' . $_REQUEST[$key] . ', ';
101
  }
102
+ if ( ! $is_heartbeat ) {
103
+ wppa_log( 'Ajx', 'Args = ' . $args );
104
+ }
105
  }
106
 
107
  // Any runtime modifyable settings?
451
  // Description
452
  if ( isset( $_POST['upn-description'] ) ) {
453
  $desc = str_replace( array( '<br/>','<br>' ), '<br />', $_POST['upn-description'] );
454
+ $desc = stripslashes( $desc );
455
  wppa_update_photo( array( 'id' => $photo, 'description' => $desc ) );
456
  }
457
 
1626
  $value = $_REQUEST['value'];
1627
  $value = wppa_decode( $value );
1628
 
1629
+ if ( ! current_user_can( 'unfiltered_html' ) ) {
1630
+ $value = strip_tags( $value );
1631
+ }
1632
+ else {
1633
+ $value = balanceTags( $value, true );
1634
+ }
1635
+
1636
  // Check validity
1637
  if ( ! wp_verify_nonce( $nonce, 'wppa_nonce_'.$album ) ) {
1638
  echo '||0||'.__( 'You do not have the rights to update album information' , 'wp-photo-album-plus').$nonce;
1749
  break;
1750
  case 'description':
1751
  $itemname = __( 'Description' , 'wp-photo-album-plus');
1752
+ $value = str_replace( array( '<br/>','<br>' ), '<br />', $value );
 
 
 
 
 
 
1753
  $value = trim( $value );
1754
  wppa_update_album( array( 'id' => $album, 'description' => $value, 'modified' => time() ) );
1755
  break;
2041
  $value = isset( $_REQUEST['value'] ) ? $_REQUEST['value'] : '';
2042
  $value = wppa_decode( $value );
2043
 
2044
+ if ( ! current_user_can( 'unfiltered_html' ) ) {
2045
+ $value = strip_tags( $value );
2046
+ }
2047
+ else {
2048
+ $value = balanceTags( $value );
2049
+ }
2050
+
2051
  // Check validity
2052
  if ( ! wp_verify_nonce( $nonce, 'wppa_nonce_'.$photo ) ) {
2053
  $txt = __( 'You do not have the rights to update photo information' , 'wp-photo-album-plus');
2524
  break;
2525
  case 'description':
2526
  $itemname = __( 'Description', 'wp-photo-album-plus');
 
 
 
 
 
 
 
2527
  break;
2528
  case 'p_order':
2529
  $itemname = __( 'Photo order #' , 'wp-photo-album-plus');
3235
  }
3236
  break;
3237
 
3238
+ case 'wppa_initial_colwidth'://?? fixed low high title
 
 
 
3239
  wppa_ajax_check_range( $value, false, '100', false, __( 'Initial width.' , 'wp-photo-album-plus') );
3240
  break;
3241
  case 'wppa_fullsize':
3260
  case 'wppa_tn_margin':
3261
  wppa_ajax_check_range( $value, false, '0', false, __( 'Thumbnail Spacing' , 'wp-photo-album-plus') );
3262
  break;
 
 
 
3263
  case 'wppa_thumb_page_size':
3264
  wppa_ajax_check_range( $value, false, '0', false, __( 'Thumb page size.' , 'wp-photo-album-plus') );
3265
  break;
3332
  case 'wppa_star_opacity':
3333
  wppa_ajax_check_range( $value, false, '0', '50', __( 'Opacity.' , 'wp-photo-album-plus') );
3334
  break;
 
 
 
 
 
 
3335
  case 'wppa_gravatar_size':
3336
  wppa_ajax_check_range( $value, false, '10', '256', __( 'Avatar size' , 'wp-photo-album-plus') );
3337
  break;
3359
  case 'wppa_dislike_delete':
3360
  wppa_ajax_check_range( $value, false, '0', false, __( 'Dislike delete' , 'wp-photo-album-plus') );
3361
  break;
 
 
 
 
3362
  case 'wppa_cp_points_comment':
3363
  case 'wppa_cp_points_comment_appr':
3364
  case 'wppa_cp_points_rating':
3446
  if ( $iret !== false ) {
3447
  delete_option( 'wppa_'.WPPA_IPTC.'_lastkey' );
3448
  $title = __( 'IPTC data cleared' , 'wp-photo-album-plus');
 
3449
  update_option( 'wppa_index_need_remake', 'yes' );
3450
  }
3451
  else {
3460
  if ( $iret !== false ) {
3461
  delete_option( 'wppa_'.WPPA_EXIF.'_lastkey' );
3462
  $title = __( 'EXIF data cleared' , 'wp-photo-album-plus');
 
3463
  update_option( 'wppa_index_need_remake', 'yes' );
3464
  }
3465
  else {
3513
 
3514
  update_option ( 'wppa_rerate_status', 'Required' );
3515
  $alert .= __( 'You just changed a setting that requires the recalculation of ratings.' , 'wp-photo-album-plus');
3516
+ $alert .= ' '.__( 'Please run the appropriate maintenance procedure.' , 'wp-photo-album-plus');
3517
 
3518
  wppa_update_option( $option, $value );
3519
  wppa( 'error', '0' );
3520
  break;
3521
 
3522
  case 'wppa_newphoto_description':
3523
+ if ( wppa_switch( 'wppa_compress_newdesc' ) ) {
3524
+ $value = wppa_compress_html( $value );
 
 
 
 
 
 
 
 
 
 
3525
  }
3526
+ wppa_update_option( $option, $value );
3527
+ wppa( 'error', '0' );
3528
+ $alert = '';
3529
+ wppa_index_compute_skips();
3530
  break;
3531
 
3532
  case 'wppa_keep_source':
3569
  }
3570
  break;
3571
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3572
  case 'wppa_excl_sep':
3573
  case 'wppa_search_tags':
3574
  case 'wppa_search_cats':
3665
  }
3666
  break;
3667
 
3668
+ case 'wppa_save_gpx':
3669
+ if ( $value == 'yes' ) {
3670
+ $custom_content = wppa_opt( 'custom_content' );
3671
+ if ( strpos( $custom_content, 'w#location' ) === false ) {
3672
+ $custom_content = 'w#location '.$custom_content;
3673
+ wppa_update_option( 'wppa_custom_content', $custom_content );
3674
+ $alert = __( 'The content of the Slideshow component Custom box has been changed to display the location map.' , 'wp-photo-album-plus').' ';
3675
+ }
3676
+ if ( ! wppa_switch( 'custom_on' ) ) {
3677
+ wppa_update_option( 'wppa_custom_on', 'yes' );
3678
+ $alert .= __( 'The display of the custom box has been enabled' , 'wp-photo-album-plus');
3679
+ }
3680
+ }
3681
+ break;
3682
+
3683
  case 'wppa_gpx_implementation':
3684
  if ( $value != 'none' ) {
3685
  $custom_content = wppa_opt( 'custom_content' );
3686
  if ( strpos( $custom_content, 'w#location' ) === false ) {
3687
  $custom_content = $custom_content.' w#location';
3688
  wppa_update_option( 'wppa_custom_content', $custom_content );
3689
+ $alert = __( 'The content of the Slideshow component Custom box has been changed to display maps.' , 'wp-photo-album-plus').' ';
3690
  }
3691
  if ( ! wppa_switch( 'custom_on' ) ) {
3692
  wppa_update_option( 'wppa_custom_on', 'yes' );
3693
  $alert .= __( 'The display of the custom box has been enabled.' , 'wp-photo-album-plus');
3694
  }
3695
  }
 
 
 
 
3696
  break;
3697
 
3698
  case 'wppa_regen_thumbs_skip_one':
3753
  $value = trim( wppa_sanitize_tags( $value ), ',' );
3754
  break;
3755
 
 
 
 
 
3756
  case 'wppa_use_encrypted_links':
3757
  if ( $value == 'yes' ) {
3758
  $ca = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_albums WHERE crypt = ''" );
3761
  if ( $ca ) update_option ( 'wppa_crypt_albums_status', 'Required' );
3762
  if ( $cp ) update_option ( 'wppa_crypt_photos_status', 'Required' );
3763
  wppa( 'error', '4711' );
3764
+ $alert .= __( 'You renuw Album and Photo crypt codes first before you can switch to encrypted urls. See Maintenance I, items 18 and 20.', 'wp-photo-album-plus' );
3765
  }
3766
  if ( wppa_switch( 'use_photo_names_in_urls' ) ) {
3767
+ $alert .= ' ' . __( 'Photo names in urls will be switched off.', 'wp-photo-album-plus' );
3768
  wppa_update_option( 'wppa_use_photo_names_in_urls', 'no' );
3769
  }
3770
  if ( wppa_switch( 'use_album_names_in_urls' ) ) {
3771
+ $alert .= ' ' . __( 'Album names in urls will be switched off.', 'wp-photo-album-plus' );
3772
  wppa_update_option( 'wppa_use_album_names_in_urls', 'no' );
3773
  }
3774
  }
3902
  if ( $old_minisize != $new_minisize ) {
3903
  update_option ( 'wppa_regen_thumbs_status', 'Required' );
3904
  $alert .= __( 'You just changed a setting that requires the regeneration of thumbnails.' , 'wp-photo-album-plus');
3905
+ $alert .= ' '.__( 'Please run the appropriate maintenance procedure.' , 'wp-photo-album-plus');
3906
  }
3907
 
3908
  // Compose the cron job status and togo fields
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 7.7.07.007
7
  *
8
  */
9
 
@@ -394,7 +394,7 @@ global $wppa_revno;
394
  $timeup = wppa_is_time_up() && ( $done != $tot );
395
  if ( $timeup ) break;
396
  }
397
-
398
  if ( $timeup ) {
399
  $status .= ' ' . __( 'No time left, the page will be reloaded to continue. Stay tuned...', 'wp-photo-album-plus' );
400
  }
@@ -659,7 +659,7 @@ global $wppa_revno;
659
  'addnone' => true,
660
  'addseparate' => true,
661
  'disableancestors' => true,
662
- 'path' => wppa_switch( 'hier_albsel' ),
663
  'sort' => true,
664
  'tagopen' => '<select' .
665
  ' id="wppa-parsel"' .
@@ -680,14 +680,14 @@ global $wppa_revno;
680
  style="max-width:300px;"
681
  onchange="wppaAjaxUpdateAlbum( '. $id . ', \'a_parent\', this )"
682
  >' .
683
- wppa_album_select_a( array( 'checkaccess' => true,
684
- 'exclude' => $id,
685
- 'selected' => $a_parent,
686
- 'addnone' => wppa_can_create_top_album(),
687
- 'addselected' => true,
688
- 'disableancestors' => true,
689
- 'path' => wppa_switch( 'hier_albsel' ),
690
- 'sort' => true,
691
  )
692
  ) .
693
  '</select>';
@@ -1382,12 +1382,8 @@ global $wppa_revno;
1382
  // Create subalbum
1383
  if ( wppa_can_create_album() ) {
1384
  $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['id'] . '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1385
- if ( wppa_switch( 'confirm_create' ) ) {
1386
- $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1387
- }
1388
- else {
1389
- $onc = 'document.location=\''.$url.'\';';
1390
- }
1391
  echo
1392
  '<input' .
1393
  ' type="button"' .
@@ -1407,12 +1403,8 @@ global $wppa_revno;
1407
  '&amp;parent_id=' . $albuminfo['a_parent'] .
1408
  '&amp;is_sibling_of=' . $albuminfo['id'] .
1409
  '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1410
- if ( wppa_switch( 'confirm_create' ) ) {
1411
- $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1412
- }
1413
- else {
1414
- $onc = 'document.location=\''.$url.'\';';
1415
- }
1416
  echo
1417
  '<input' .
1418
  ' type="button"' .
@@ -1608,12 +1600,12 @@ global $wppa_revno;
1608
  <input type="radio" name="wppa-del-photos" value="delete" checked="checked" /> <?php _e('Delete', 'wp-photo-album-plus'); ?><br />
1609
  <input type="radio" name="wppa-del-photos" value="move" /> <?php _e('Move to:', 'wp-photo-album-plus'); ?>
1610
  <select name="wppa-move-album">
1611
- <?php echo wppa_album_select_a( array( 'checkaccess' => true,
1612
- 'path' => wppa_switch( 'hier_albsel'),
1613
- 'selected' => '0',
1614
- 'exclude' => strval( intval( $_REQUEST['edit_id'] ) ),
1615
- 'addpleaseselect' => true,
1616
- 'sort' => true,
1617
  ) )
1618
  ?>
1619
  </select>
@@ -1686,7 +1678,7 @@ global $wppa_revno;
1686
  echo '<form method="post" action="'.get_admin_url().'admin.php?page=wppa_admin_menu&wppa_nonce='.wp_create_nonce('wppa_nonce').'" style="float:left; margin-right:12px;" >';
1687
  echo '<input type="hidden" name="tab" value="edit" />';
1688
  echo '<input type="hidden" name="edit_id" value="new" />';
1689
- $onc = wppa_switch( 'confirm_create' ) ? 'onclick="return confirm(\''.$vfy.'\');"' : '';
1690
  echo '<input type="submit" class="button-primary" '.$onc.' value="'.__('Create New Empty Album', 'wp-photo-album-plus').'" style="height:28px;" />';
1691
  echo '</form>';
1692
  }
@@ -2109,13 +2101,8 @@ global $wpdb;
2109
  <td><a href="<?php echo($url) ?>" class="wppadelete"><?php _e('Delete', 'wp-photo-album-plus'); ?></a></td>
2110
  <?php if ( wppa_can_create_album() ) {
2111
  $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$album['id'].'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
2112
- if ( wppa_switch( 'confirm_create' ) ) {
2113
- $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
2114
- echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
2115
- }
2116
- else {
2117
- echo '<td><a href="'.$url.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
2118
- }
2119
  }
2120
 
2121
  ?>
@@ -2994,13 +2981,8 @@ global $wpdb;
2994
  </td>
2995
  <?php if ( wppa_can_create_album() ) {
2996
  $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$id.'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
2997
- if ( wppa_switch( 'confirm_create' ) ) {
2998
- $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
2999
- echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
3000
- }
3001
- else {
3002
- echo '<td><a href="'.$url.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
3003
- }
3004
  }
3005
  }
3006
  else {
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.0.00.007
7
  *
8
  */
9
 
394
  $timeup = wppa_is_time_up() && ( $done != $tot );
395
  if ( $timeup ) break;
396
  }
397
+
398
  if ( $timeup ) {
399
  $status .= ' ' . __( 'No time left, the page will be reloaded to continue. Stay tuned...', 'wp-photo-album-plus' );
400
  }
659
  'addnone' => true,
660
  'addseparate' => true,
661
  'disableancestors' => true,
662
+ 'path' => true,
663
  'sort' => true,
664
  'tagopen' => '<select' .
665
  ' id="wppa-parsel"' .
680
  style="max-width:300px;"
681
  onchange="wppaAjaxUpdateAlbum( '. $id . ', \'a_parent\', this )"
682
  >' .
683
+ wppa_album_select_a( array( 'checkaccess' => true,
684
+ 'exclude' => $id,
685
+ 'selected' => $a_parent,
686
+ 'addnone' => wppa_can_create_top_album(),
687
+ 'addselected' => true,
688
+ 'disableancestors' => true,
689
+ 'path' => true,
690
+ 'sort' => true,
691
  )
692
  ) .
693
  '</select>';
1382
  // Create subalbum
1383
  if ( wppa_can_create_album() ) {
1384
  $url = wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id=' . $albuminfo['id'] . '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1385
+ $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1386
+
 
 
 
 
1387
  echo
1388
  '<input' .
1389
  ' type="button"' .
1403
  '&amp;parent_id=' . $albuminfo['a_parent'] .
1404
  '&amp;is_sibling_of=' . $albuminfo['id'] .
1405
  '&amp;wppa_nonce=' . wp_create_nonce( 'wppa_nonce' ) );
1406
+ $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
1407
+
 
 
 
 
1408
  echo
1409
  '<input' .
1410
  ' type="button"' .
1600
  <input type="radio" name="wppa-del-photos" value="delete" checked="checked" /> <?php _e('Delete', 'wp-photo-album-plus'); ?><br />
1601
  <input type="radio" name="wppa-del-photos" value="move" /> <?php _e('Move to:', 'wp-photo-album-plus'); ?>
1602
  <select name="wppa-move-album">
1603
+ <?php echo wppa_album_select_a( array( 'checkaccess' => true,
1604
+ 'path' => true,
1605
+ 'selected' => '0',
1606
+ 'exclude' => strval( intval( $_REQUEST['edit_id'] ) ),
1607
+ 'addpleaseselect' => true,
1608
+ 'sort' => true,
1609
  ) )
1610
  ?>
1611
  </select>
1678
  echo '<form method="post" action="'.get_admin_url().'admin.php?page=wppa_admin_menu&wppa_nonce='.wp_create_nonce('wppa_nonce').'" style="float:left; margin-right:12px;" >';
1679
  echo '<input type="hidden" name="tab" value="edit" />';
1680
  echo '<input type="hidden" name="edit_id" value="new" />';
1681
+ $onc = 'onclick="return confirm(\''.$vfy.'\');"';
1682
  echo '<input type="submit" class="button-primary" '.$onc.' value="'.__('Create New Empty Album', 'wp-photo-album-plus').'" style="height:28px;" />';
1683
  echo '</form>';
1684
  }
2101
  <td><a href="<?php echo($url) ?>" class="wppadelete"><?php _e('Delete', 'wp-photo-album-plus'); ?></a></td>
2102
  <?php if ( wppa_can_create_album() ) {
2103
  $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$album['id'].'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
2104
+ $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
2105
+ echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
 
 
 
 
 
2106
  }
2107
 
2108
  ?>
2981
  </td>
2982
  <?php if ( wppa_can_create_album() ) {
2983
  $url = wppa_dbg_url(get_admin_url().'admin.php?page=wppa_admin_menu&amp;tab=edit&amp;edit_id=new&amp;parent_id='.$id.'&amp;wppa_nonce='.wp_create_nonce('wppa_nonce'));
2984
+ $onc = 'if (confirm(\''.__('Are you sure you want to create a subalbum?', 'wp-photo-album-plus').'\')) document.location=\''.$url.'\';';
2985
+ echo '<td><a onclick="'.$onc.'" class="wppacreate">'.__('Create', 'wp-photo-album-plus').'</a></td>';
 
 
 
 
 
2986
  }
2987
  }
2988
  else {
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 7.7.04.004
7
  *
8
  */
9
 
@@ -95,7 +95,6 @@ global $wpdb;
95
  $image = wppa_cache_thumb( $coverphoto );
96
  $photocount = wppa_get_photo_count( $albumid );
97
  $albumcount = wppa_get_album_count( $albumid, 'use_treecounts' );
98
- $mincount = wppa_get_mincount();
99
 
100
  // Init links
101
  $title = '';
@@ -108,7 +107,7 @@ global $wpdb;
108
  $onclick_content = '';
109
 
110
  // See if there is substantial content to the album
111
- $has_content = ( $albumcount > '0' ) || ( $photocount > $mincount );
112
 
113
  // What is the albums title linktype
114
  $linktype = $album['cover_linktype'];
@@ -140,7 +139,7 @@ global $wpdb;
140
 
141
  // Find the slideshow link and onclick
142
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
143
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
144
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
145
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
146
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
@@ -149,7 +148,7 @@ global $wpdb;
149
 
150
  // Find the content 'View' link
151
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
152
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
153
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
154
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
155
  wppa_convert_to_pretty( $href_content ) . "' )";
@@ -277,7 +276,7 @@ global $wpdb;
277
 
278
  // The Album title
279
  if ( $photolink ) {
280
- $target = wppa_switch( 'allow_ajax' ) ? '_self' : $photolink['target'];
281
  }
282
  else {
283
  $target = '';
@@ -329,7 +328,7 @@ global $wpdb;
329
  $has_content,
330
  $photocount,
331
  $albumcount,
332
- $mincount,
333
  $href_content,
334
  $target,
335
  $onclick_content
@@ -406,7 +405,6 @@ global $wpdb;
406
 
407
  $photocount = wppa_get_photo_count( $albumid );
408
  $albumcount = wppa_get_album_count( $albumid, 'use_treecounts' );
409
- $mincount = wppa_get_mincount();
410
  $title = '';
411
  $linkpage = '';
412
 
@@ -418,7 +416,7 @@ global $wpdb;
418
  $onclick_content = '';
419
 
420
  // See if there is substantial content to the album
421
- $has_content = ( $albumcount > '0' ) || ( $photocount > $mincount );
422
 
423
  // If not specified, use default
424
  $linktype = $album['cover_linktype'];
@@ -479,7 +477,7 @@ global $wpdb;
479
 
480
  // Find the slideshow link and onclick
481
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
482
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
483
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
484
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
485
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
@@ -488,7 +486,7 @@ global $wpdb;
488
 
489
  // Find the content 'View' link
490
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
491
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
492
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
493
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
494
  wppa_convert_to_pretty( $href_content ) . "' )";
@@ -511,7 +509,7 @@ global $wpdb;
511
  wppa_step_covercount( 'cover' );
512
 
513
  $pl = isset( $photolinks['0']['target'] ) ? $photolinks['0']['target'] : '_self';
514
- $target = wppa_switch( 'allow_ajax' ) ? '_self' : $pl;
515
 
516
  // Open the album box
517
  wppa_out( '<div' .
@@ -580,7 +578,7 @@ global $wpdb;
580
  $has_content,
581
  $photocount,
582
  $albumcount,
583
- $mincount,
584
  $href_content,
585
  $target,
586
  $onclick_content
@@ -631,7 +629,6 @@ global $wpdb;
631
  $image = wppa_cache_thumb( $coverphoto );
632
  $photocount = wppa_get_photo_count( $albumid );
633
  $albumcount = wppa_get_album_count( $albumid, true );
634
- $mincount = wppa_get_mincount();
635
  $title = '';
636
  $linkpage = '';
637
 
@@ -643,7 +640,7 @@ global $wpdb;
643
  $onclick_content = '';
644
 
645
  // See if there is substantial content to the album
646
- $has_content = ( $albumcount > '0' ) || ( $photocount > $mincount );
647
 
648
  // What is the albums title linktype
649
  $linktype = $album['cover_linktype'];
@@ -662,7 +659,7 @@ global $wpdb;
662
 
663
  // Find the slideshow link and onclick
664
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
665
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
666
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
667
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
668
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
@@ -671,7 +668,7 @@ global $wpdb;
671
 
672
  // Find the content 'View' link
673
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
674
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
675
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
676
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
677
  wppa_convert_to_pretty( $href_content ) . "' )";
@@ -729,7 +726,7 @@ global $wpdb;
729
  }
730
  wppa_step_covercount( 'cover' );
731
 
732
- $target = wppa_switch( 'allow_ajax' ) ? '_self' : $photolink['target'];
733
 
734
  // Open the album box
735
  wppa_out( '<div' .
@@ -773,8 +770,15 @@ global $wpdb;
773
  wppa_the_slideshow_browse_link( $photocount, $href_slideshow, $onclick_slideshow, $target );
774
 
775
  // The 'View' link
776
- wppa_album_cover_view_link( $albumid, $has_content, $photocount, $albumcount,
777
- $mincount, $href_content, $target, $onclick_content );
 
 
 
 
 
 
 
778
 
779
  // Close the Cover text frame
780
  wppa_out( '</div>' );
@@ -836,7 +840,6 @@ global $wpdb;
836
  $image = wppa_cache_thumb( $coverphoto );
837
  $photocount = wppa_get_photo_count( $id );
838
  $albumcount = wppa_get_album_count( $id, 'use_treecounts' );
839
- $mincount = wppa_get_mincount();
840
 
841
  // Init links
842
  $title = '';
@@ -845,7 +848,7 @@ global $wpdb;
845
  $onclick_title = '';
846
 
847
  // See if there is substantial content to the album
848
- $has_content = ( $albumcount > '0' ) || ( $photocount > $mincount );
849
 
850
  // What is the albums title linktype
851
  $linktype = $album['cover_linktype'];
@@ -1090,8 +1093,8 @@ global $wpdb;
1090
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
1091
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
1092
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1093
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $albumid . ']"' .
1094
- ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' .
1095
  wppa_get_lb_panorama_full_html( $id ) .
1096
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
1097
  ' style="cursor:' . wppa_wait() . ';"' .
@@ -1309,8 +1312,8 @@ global $wpdb;
1309
  ' data-videonatheight="' . wppa_get_videoy( $thumb['id'] ) . '"' : '' ) .
1310
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $thumb['id'] ) ) . '"' : '' ) .
1311
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $thumb['id'] ) ) .'"' : '' ) .
1312
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $albumid . ']"' .
1313
- ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1314
  wppa_get_lb_panorama_full_html( $thumb['id'] ) .
1315
  ' data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"' .
1316
  ' >'
@@ -1631,19 +1634,19 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
1631
  case 'thumbs':
1632
  case 'albums':
1633
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage, $linktype ) ) );
1634
- if ( wppa_switch( 'allow_ajax' ) ) {
1635
- $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1636
- wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1637
- $href_title = "#";
1638
- }
1639
  break;
1640
  case 'slide':
1641
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
1642
- if ( wppa_switch( 'allow_ajax' ) ) {
1643
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1644
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1645
  $href_title = "#";
1646
- }
1647
  break;
1648
  case 'none':
1649
  break;
@@ -1660,7 +1663,7 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
1660
  else {
1661
  $href_title = '#';
1662
  }
1663
- if ( wppa_switch( 'allow_ajax' ) ) {
1664
  if ( $coverphoto ) {
1665
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1666
  wppa_encrypt_url( wppa_get_image_url_ajax_by_id( $coverphoto ) ) . "', '" . $href_title . "' )";
@@ -1669,7 +1672,7 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
1669
  $onclick_title = '';
1670
  }
1671
  $href_title = "#";
1672
- }
1673
  $title_title = _n( 'View the cover photo', 'View the cover photos' , $photocount, 'wp-photo-album-plus');
1674
  }
1675
  }
@@ -1714,7 +1717,7 @@ function wppa_album_cover_view_link(
1714
  if ( wppa_opt( 'thumbtype' ) == 'none' ) $photocount = '0';
1715
 
1716
  // Still has content
1717
- if ( $photocount > $mincount || $albumcount ) {
1718
 
1719
  // Get treecount data
1720
  // if ( wppa_opt( 'show_treecount' ) != '-none-' ) {
@@ -1743,7 +1746,7 @@ function wppa_album_cover_view_link(
1743
  $na = $albumcount;
1744
  $nta = $treecount['treealbums'] > $albumcount ? $treecount['treealbums'] : '';
1745
  $ntax = $treecount['treealbums'] > $albumcount ? $treecount['treealbums'] : $albumcount;
1746
- $np = $photocount > $mincount ? $photocount : '';
1747
  $ntp = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : '';
1748
  $ntpx = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : $photocount;
1749
 
@@ -2055,7 +2058,7 @@ global $wpdb;
2055
  // Thumbnails and covers, show sub-album covers
2056
  // in case slideshow is requested on an empty album
2057
  if ( wppa_opt( 'cover_sublinks' ) == 'content' || ! $photocount ) {
2058
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
2059
  $href_content = '';
2060
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2061
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
@@ -2070,7 +2073,7 @@ global $wpdb;
2070
 
2071
  // Slideshow
2072
  elseif ( wppa_opt( 'cover_sublinks' ) == 'slide' ) {
2073
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
2074
  $href_content = '';
2075
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2076
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
@@ -2227,7 +2230,7 @@ function wppa_the_slideshow_browse_link( $photocount, $href_slideshow, $onclick_
2227
  wppa_out(
2228
  '<div class="wppa-box-text wppa-black wppa-info wppa-slideshow-browse-link wppa-album-cover-link">'
2229
  );
2230
- if ( $photocount > wppa_get_mincount() ) {
2231
  $label = wppa_switch( 'enable_slideshow' ) ?
2232
  __( 'Slideshow', 'wp-photo-album-plus' ) :
2233
  __( 'Browse photos', 'wp-photo-album-plus' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 8.0.00.008
7
  *
8
  */
9
 
95
  $image = wppa_cache_thumb( $coverphoto );
96
  $photocount = wppa_get_photo_count( $albumid );
97
  $albumcount = wppa_get_album_count( $albumid, 'use_treecounts' );
 
98
 
99
  // Init links
100
  $title = '';
107
  $onclick_content = '';
108
 
109
  // See if there is substantial content to the album
110
+ $has_content = $albumcount || $photocount;
111
 
112
  // What is the albums title linktype
113
  $linktype = $album['cover_linktype'];
139
 
140
  // Find the slideshow link and onclick
141
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
142
+ if ( ! $linkpage ) {
143
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
144
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
145
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
148
 
149
  // Find the content 'View' link
150
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
151
+ if ( ! $linkpage ) {
152
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
153
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
154
  wppa_convert_to_pretty( $href_content ) . "' )";
276
 
277
  // The Album title
278
  if ( $photolink ) {
279
+ $target = '_self';
280
  }
281
  else {
282
  $target = '';
328
  $has_content,
329
  $photocount,
330
  $albumcount,
331
+ '0',
332
  $href_content,
333
  $target,
334
  $onclick_content
405
 
406
  $photocount = wppa_get_photo_count( $albumid );
407
  $albumcount = wppa_get_album_count( $albumid, 'use_treecounts' );
 
408
  $title = '';
409
  $linkpage = '';
410
 
416
  $onclick_content = '';
417
 
418
  // See if there is substantial content to the album
419
+ $has_content = $albumcount || $photocount;
420
 
421
  // If not specified, use default
422
  $linktype = $album['cover_linktype'];
477
 
478
  // Find the slideshow link and onclick
479
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
480
+ if ( ! $linkpage ) {
481
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
482
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
483
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
486
 
487
  // Find the content 'View' link
488
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
489
+ if ( ! $linkpage ) {
490
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
491
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
492
  wppa_convert_to_pretty( $href_content ) . "' )";
509
  wppa_step_covercount( 'cover' );
510
 
511
  $pl = isset( $photolinks['0']['target'] ) ? $photolinks['0']['target'] : '_self';
512
+ $target = '_self';
513
 
514
  // Open the album box
515
  wppa_out( '<div' .
578
  $has_content,
579
  $photocount,
580
  $albumcount,
581
+ '0',
582
  $href_content,
583
  $target,
584
  $onclick_content
629
  $image = wppa_cache_thumb( $coverphoto );
630
  $photocount = wppa_get_photo_count( $albumid );
631
  $albumcount = wppa_get_album_count( $albumid, true );
 
632
  $title = '';
633
  $linkpage = '';
634
 
640
  $onclick_content = '';
641
 
642
  // See if there is substantial content to the album
643
+ $has_content = $albumcount || $photocount;
644
 
645
  // What is the albums title linktype
646
  $linktype = $album['cover_linktype'];
659
 
660
  // Find the slideshow link and onclick
661
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
662
+ if ( ! $linkpage ) {
663
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
664
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
665
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
668
 
669
  // Find the content 'View' link
670
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
671
+ if ( ! $linkpage ) {
672
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
673
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
674
  wppa_convert_to_pretty( $href_content ) . "' )";
726
  }
727
  wppa_step_covercount( 'cover' );
728
 
729
+ $target = '_self';
730
 
731
  // Open the album box
732
  wppa_out( '<div' .
770
  wppa_the_slideshow_browse_link( $photocount, $href_slideshow, $onclick_slideshow, $target );
771
 
772
  // The 'View' link
773
+ wppa_album_cover_view_link( $albumid,
774
+ $has_content,
775
+ $photocount,
776
+ $albumcount,
777
+ '0',
778
+ $href_content,
779
+ $target,
780
+ $onclick_content
781
+ );
782
 
783
  // Close the Cover text frame
784
  wppa_out( '</div>' );
840
  $image = wppa_cache_thumb( $coverphoto );
841
  $photocount = wppa_get_photo_count( $id );
842
  $albumcount = wppa_get_album_count( $id, 'use_treecounts' );
 
843
 
844
  // Init links
845
  $title = '';
848
  $onclick_title = '';
849
 
850
  // See if there is substantial content to the album
851
+ $has_content = $albumcount || $photocount;
852
 
853
  // What is the albums title linktype
854
  $linktype = $album['cover_linktype'];
1093
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
1094
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
1095
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1096
+ ' data-rel="wppa[alw-' . wppa( 'mocc' ) . '-' . $albumid . ']"' .
1097
+ ' ' . 'data-lbtitle' . '="' . $title . '"' .
1098
  wppa_get_lb_panorama_full_html( $id ) .
1099
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
1100
  ' style="cursor:' . wppa_wait() . ';"' .
1312
  ' data-videonatheight="' . wppa_get_videoy( $thumb['id'] ) . '"' : '' ) .
1313
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $thumb['id'] ) ) . '"' : '' ) .
1314
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $thumb['id'] ) ) .'"' : '' ) .
1315
+ ' data-rel="wppa[alw-' . wppa( 'mocc' ) . '-' . $albumid . ']"' .
1316
+ ( $title ? ' ' . 'data-lbtitle' . '="' . $title . '"' : '' ) .
1317
  wppa_get_lb_panorama_full_html( $thumb['id'] ) .
1318
  ' data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"' .
1319
  ' >'
1634
  case 'thumbs':
1635
  case 'albums':
1636
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage, $linktype ) ) );
1637
+
1638
+ $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1639
+ wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1640
+ $href_title = "#";
1641
+
1642
  break;
1643
  case 'slide':
1644
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
1645
+
1646
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1647
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1648
  $href_title = "#";
1649
+
1650
  break;
1651
  case 'none':
1652
  break;
1663
  else {
1664
  $href_title = '#';
1665
  }
1666
+
1667
  if ( $coverphoto ) {
1668
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1669
  wppa_encrypt_url( wppa_get_image_url_ajax_by_id( $coverphoto ) ) . "', '" . $href_title . "' )";
1672
  $onclick_title = '';
1673
  }
1674
  $href_title = "#";
1675
+
1676
  $title_title = _n( 'View the cover photo', 'View the cover photos' , $photocount, 'wp-photo-album-plus');
1677
  }
1678
  }
1717
  if ( wppa_opt( 'thumbtype' ) == 'none' ) $photocount = '0';
1718
 
1719
  // Still has content
1720
+ if ( $photocount || $albumcount ) {
1721
 
1722
  // Get treecount data
1723
  // if ( wppa_opt( 'show_treecount' ) != '-none-' ) {
1746
  $na = $albumcount;
1747
  $nta = $treecount['treealbums'] > $albumcount ? $treecount['treealbums'] : '';
1748
  $ntax = $treecount['treealbums'] > $albumcount ? $treecount['treealbums'] : $albumcount;
1749
+ $np = $photocount;
1750
  $ntp = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : '';
1751
  $ntpx = $treecount['treephotos'] > $photocount ? $treecount['treephotos'] : $photocount;
1752
 
2058
  // Thumbnails and covers, show sub-album covers
2059
  // in case slideshow is requested on an empty album
2060
  if ( wppa_opt( 'cover_sublinks' ) == 'content' || ! $photocount ) {
2061
+ if ( ! $linkpage ) {
2062
  $href_content = '';
2063
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2064
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
2073
 
2074
  // Slideshow
2075
  elseif ( wppa_opt( 'cover_sublinks' ) == 'slide' ) {
2076
+ if ( ! $linkpage ) {
2077
  $href_content = '';
2078
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2079
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
2230
  wppa_out(
2231
  '<div class="wppa-box-text wppa-black wppa-info wppa-slideshow-browse-link wppa-album-cover-link">'
2232
  );
2233
+ if ( $photocount ) {
2234
  $label = wppa_switch( 'enable_slideshow' ) ?
2235
  __( 'Slideshow', 'wp-photo-album-plus' ) :
2236
  __( 'Browse photos', 'wp-photo-album-plus' );
wppa-album-navigator-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 7.3.10
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
@@ -221,7 +221,7 @@ class AlbumNavigatorWidget extends WP_Widget {
221
  foreach ( $albums as $album ) {
222
  $a = $album['id'];
223
  $treecount = wppa_get_treecounts_a( $a );
224
- if ( $treecount['treealbums'] || $treecount['selfphotos'] > wppa_opt( 'min_thumbs' ) || ! $skip ) {
225
  $has_children = wppa_has_children($a);
226
  $result .= '
227
  <li
@@ -312,8 +312,8 @@ class AlbumNavigatorWidget extends WP_Widget {
312
  ) .
313
  ( $has_audio ? 'data-audiohtml="' . esc_attr( wppa_get_audio_body( $thumb['id'] ) ) . '" ' : ' ' ) .
314
  ( $is_pdf ? 'data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $thumb['id'] ) ) .'" ' : ' ' ) .
315
- wppa( 'rel' ) . '="' . esc_attr( wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $album['id'] . ']' ) . '" ' .
316
- wppa( 'lbtitle' ) . '="' . esc_attr( $title ) . '" ' .
317
  wppa_get_lb_panorama_full_html( $thumb['id'] ) . '
318
  data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"
319
  style="cursor:' . wppa_wait() . ';"
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 8.0.00.008
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
221
  foreach ( $albums as $album ) {
222
  $a = $album['id'];
223
  $treecount = wppa_get_treecounts_a( $a );
224
+ if ( $treecount['treealbums'] || $treecount['selfphotos'] || ! $skip ) {
225
  $has_children = wppa_has_children($a);
226
  $result .= '
227
  <li
312
  ) .
313
  ( $has_audio ? 'data-audiohtml="' . esc_attr( wppa_get_audio_body( $thumb['id'] ) ) . '" ' : ' ' ) .
314
  ( $is_pdf ? 'data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $thumb['id'] ) ) .'" ' : ' ' ) .
315
+ 'data-rel="wppa[alw-' . wppa( 'mocc' ) . '-' . $album['id'] . ']" ' .
316
+ 'data-lbtitle' . '="' . esc_attr( $title ) . '" ' .
317
  wppa_get_lb_panorama_full_html( $thumb['id'] ) . '
318
  data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"
319
  style="cursor:' . wppa_wait() . ';"
wppa-album-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
- * Version 7.3.08
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -139,7 +139,7 @@ class AlbumWidget extends WP_Widget {
139
  $thumb = $image;
140
 
141
  // Make the HTML for current picture
142
- if ( $image && ( $imgcount > wppa_opt( 'min_thumbs' ) || $subalbumcount ) ) {
143
  $link = wppa_get_imglnk_a('albwidget', $image['id']);
144
  $file = wppa_get_thumb_path($image['id']);
145
  $imgevents = wppa_get_imgevents('thumb', $image['id'], true);
@@ -160,7 +160,7 @@ class AlbumWidget extends WP_Widget {
160
  $width = $maxw;
161
  $height = $maxw; // !!
162
  $cursor = 'default';
163
- $title = sprintf(__('Upload at least %d photos to this album!', 'wp-photo-album-plus'), wppa_opt( 'min_thumbs' ) - $imgcount + 1);
164
  if ( $imageid ) { // The 'empty album has a cover image
165
  $file = wppa_get_thumb_path( $image['id'] );
166
  $imgstyle_a = wppa_get_imgstyle_a( $image['id'], $file, $maxw, 'center', 'albthumb' );
@@ -178,7 +178,7 @@ class AlbumWidget extends WP_Widget {
178
  $imgurl = wppa_fix_poster_ext( $imgurl, $image['id'] );
179
  }
180
 
181
- if ( $imgcount > wppa_opt( 'min_thumbs' ) || ! wppa_checked( $instance['skip'] ) ) {
182
 
183
  $widget_content .=
184
  '<div' .
@@ -260,8 +260,8 @@ class AlbumWidget extends WP_Widget {
260
  ' data-videonatheight="' . esc_attr( wppa_get_videoy( $thumb['id'] ) ) . '"' : '' ) .
261
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $thumb['id'] ) ) . '"' : '' ) .
262
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $thumb['id'] ) ) .'"' : '' ) .
263
- ' ' . wppa( 'rel' ) . '="' . esc_attr( wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $album['id'] . '] ' ) . '"' .
264
- ' ' . wppa( 'lbtitle' ) . '="' . esc_attr( $title ) . '"' .
265
  wppa_get_lb_panorama_full_html( $id ) .
266
  ' data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"' .
267
  ' style="cursor:' . wppa_wait() . ';"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
+ * Version 8.0.00.008
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
139
  $thumb = $image;
140
 
141
  // Make the HTML for current picture
142
+ if ( $image && ( $imgcount || $subalbumcount ) ) {
143
  $link = wppa_get_imglnk_a('albwidget', $image['id']);
144
  $file = wppa_get_thumb_path($image['id']);
145
  $imgevents = wppa_get_imgevents('thumb', $image['id'], true);
160
  $width = $maxw;
161
  $height = $maxw; // !!
162
  $cursor = 'default';
163
+ $title = __( 'Upload at least 1 photos to this album!', 'wp-photo-album-plus' );
164
  if ( $imageid ) { // The 'empty album has a cover image
165
  $file = wppa_get_thumb_path( $image['id'] );
166
  $imgstyle_a = wppa_get_imgstyle_a( $image['id'], $file, $maxw, 'center', 'albthumb' );
178
  $imgurl = wppa_fix_poster_ext( $imgurl, $image['id'] );
179
  }
180
 
181
+ if ( $imgcount || ! wppa_checked( $instance['skip'] ) ) {
182
 
183
  $widget_content .=
184
  '<div' .
260
  ' data-videonatheight="' . esc_attr( wppa_get_videoy( $thumb['id'] ) ) . '"' : '' ) .
261
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $thumb['id'] ) ) . '"' : '' ) .
262
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $thumb['id'] ) ) .'"' : '' ) .
263
+ ' data-rel="wppa[alw-' . wppa( 'mocc' ) . '-' . $album['id'] . ']"' .
264
+ ' ' . 'data-lbtitle' . '="' . esc_attr( $title ) . '"' .
265
  wppa_get_lb_panorama_full_html( $id ) .
266
  ' data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"' .
267
  ' style="cursor:' . wppa_wait() . ';"' .
wppa-audio.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all audio routines
6
- * Version 7.7.04.002
7
  *
8
  */
9
 
@@ -80,7 +80,21 @@ function wppa_get_audio_html( $args ) {
80
  ) ) );
81
 
82
  // Prepare attributes
83
- $w = $width ? ' width:'.$width.'px;' : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  $h = $height ? ' height:'.$height.'px;' : '';
85
  $t = $margin_top ? ' margin-top:'.$margin_top.'px;' : '';
86
  $b = $margin_bottom ? ' margin-bottom:'.$margin_bottom.'px;' : '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all audio routines
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
80
  ) ) );
81
 
82
  // Prepare attributes
83
+ if ( $width ) {
84
+ $w = ' width:'.$width.'px;';
85
+ }
86
+ else {
87
+ if ( wppa_is_chrome() ) {
88
+ $w = ' width: -webkit-fill-available;';
89
+ }
90
+ elseif ( wppa_is_firefox() ) {
91
+ $w = ' width: -moz-available;';
92
+ }
93
+ else {
94
+ $w = ' width: auto';
95
+ }
96
+ }
97
+ // $w = $width ? ' width:'.$width.'px;' : '';
98
  $h = $height ? ' height:'.$height.'px;' : '';
99
  $t = $margin_top ? ' margin-top:'.$margin_top.'px;' : '';
100
  $b = $margin_bottom ? ' margin-bottom:'.$margin_bottom.'px;' : '';
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.7.07.002
7
  *
8
  */
9
 
@@ -17,7 +17,7 @@ function wppa_thumb_area( $action ) {
17
  $mocc = wppa( 'mocc' );
18
  $alt = wppa( 'alt' );
19
  $maxh = wppa_opt( 'area_size' );
20
- $nice = wppa_switch( 'nicescroll' );
21
  $overflow = 'visible';
22
  if ( $maxh ) {
23
  if ( $nice ) $overflow = 'hidden';
@@ -125,7 +125,7 @@ function wppa_contest_box() {
125
  $mocc = wppa( 'mocc' );
126
  $alt = wppa( 'alt' );
127
  $maxh = wppa_opt( 'area_size' );
128
- $nice = wppa_switch( 'nicescroll' );
129
  $overflow = 'visible';
130
  if ( $maxh ) {
131
  if ( $nice ) $overflow = 'hidden';
@@ -2669,7 +2669,7 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2669
  'checkupload' => false,
2670
  'addmultiple' => false,
2671
  'addnumbers' => false,
2672
- 'path' => wppa_switch( 'hier_albsel' ),
2673
  'root' => false,
2674
  'content' => false,
2675
  'sort' => true,
@@ -2876,9 +2876,7 @@ static $albums_granted;
2876
  // Case 1. A single album. I should have access to this album ( $alb > 0 ).
2877
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
2878
  if ( ! wppa_have_access( $alb ) ) {
2879
- if ( wppa_switch( 'upload_owner_only' ) ) {
2880
- return '';
2881
- }
2882
  }
2883
  $albarr = array( $alb );
2884
  }
@@ -2898,9 +2896,7 @@ static $albums_granted;
2898
  // In this event, if a single album remains, there will not be a selectionbox, but its treated as if a single album was supplied.
2899
  foreach( array_keys( $albarr ) as $key ) {
2900
  if ( ! wppa_have_access( $albarr[$key] ) ) {
2901
- if ( wppa_switch( 'upload_owner_only' ) ) {
2902
- unset( $albarr[$key] );
2903
- }
2904
  }
2905
  }
2906
  if ( empty( $albarr ) ) {
@@ -2928,15 +2924,12 @@ static $albums_granted;
2928
  $a = '';
2929
  }
2930
  $allow_me = wppa_allow_user_uploads( $a );
2931
-
2932
  if ( ! $allow_me ) {
2933
- if ( wppa_switch( 'show_album_full' ) ) {
2934
- $result .=
2935
- '<h6 style="color:red">' .
2936
- __( 'Max uploads reached', 'wp-photo-album-plus' ) .
2937
- wppa_time_to_wait_html( '0', true ) .
2938
- '</h6>';
2939
- }
2940
  return $result;
2941
  }
2942
 
@@ -2944,13 +2937,11 @@ static $albums_granted;
2944
  if ( wppa_is_int( $alb ) ) {
2945
  $allow_alb = wppa_allow_uploads( $alb );
2946
  if ( ! $allow_alb ) {
2947
- if ( wppa_switch( 'show_album_full' ) ) {
2948
- $result .=
2949
- '<h6 style="color:red">' .
2950
- __( 'Max uploads reached', 'wp-photo-album-plus' ) .
2951
- wppa_time_to_wait_html( $alb ) .
2952
- '</h6>';
2953
- }
2954
  return $result;
2955
  }
2956
  }
@@ -2976,8 +2967,7 @@ static $albums_granted;
2976
 
2977
  // Create the return url
2978
  if ( $ajax_upload ) {
2979
- $returnurl = wppa_switch( 'ajax_non_admin' ) ? WPPA_URL.'/wppa-ajax-front.php' : admin_url('admin-ajax.php');
2980
- $returnurl .= '?action=wppa&amp;wppa-action=do-fe-upload';
2981
  }
2982
  else {
2983
  $returnurl = wppa_get_permalink();
@@ -3084,7 +3074,7 @@ static $albums_granted;
3084
  wppa_album_select_a( array ( 'addpleaseselect' => true,
3085
  'checkowner' => true,
3086
  'checkupload' => true,
3087
- 'path' => wppa_switch( 'hier_albsel' ),
3088
  'checkarray' => count( $alb ) > 1,
3089
  'array' => $alb,
3090
  'sort' => true,
@@ -3386,7 +3376,7 @@ static $albums_granted;
3386
  ' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
3387
  ' type="text"' .
3388
  ' class="wppa-box-text"' .
3389
- ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3390
  ' name="wppa-user-name"' .
3391
  ' />' .
3392
  '<div style="clear:left;font-size:10px;" >' .
@@ -3413,7 +3403,7 @@ static $albums_granted;
3413
  '<textarea' .
3414
  ' id="wppa-desc-user-' . $mocc . '-' . $seqno . '"' .
3415
  ' class="wppa-user-textarea wppa-box-text"' .
3416
- ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3417
  ' name="wppa-user-desc"' .
3418
  ' >' .
3419
  $desc .
@@ -3445,7 +3435,7 @@ static $albums_granted;
3445
  '<input' .
3446
  ' type="text"' .
3447
  ' class="wppa-box-text"' .
3448
- ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3449
  ' name="wppa-user-custom-'.$i.'"' .
3450
  ' />';
3451
 
@@ -3602,7 +3592,7 @@ static $albums_granted;
3602
  ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
3603
  ' name="wppa-blogit-pretext"' .
3604
  ' class=wppa-user-textarea wppa-box-text"' .
3605
- ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3606
  ' >' .
3607
  '</textarea>' .
3608
  '<h6>' .
@@ -3612,7 +3602,7 @@ static $albums_granted;
3612
  ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
3613
  ' name="wppa-blogit-posttext"' .
3614
  ' class=wppa-user-textarea wppa-box-text"' .
3615
- ' style="border:1px solid '.wppa_opt( 'bcolor_upload' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3616
  '>' .
3617
  '</textarea>' .
3618
  '</div>';// .
@@ -3664,7 +3654,7 @@ static $albums_granted;
3664
  '<div' .
3665
  ' id="progress-'.$yalb.'-'.$mocc.'"' .
3666
  ' class="wppa-progress "' .
3667
- ' style="width:100%;border-color:'.wppa_opt( 'bcolor_upload' ).'"' .
3668
  ' >' .
3669
  '<div id="bar-'.$yalb.'-'.$mocc.'" class="wppa-bar" ></div>' .
3670
  '<div id="percent-'.$yalb.'-'.$mocc.'" class="wppa-percent" >0%</div >' .
@@ -5165,13 +5155,13 @@ function wppa_bestof_html( $args, $widget = true ) {
5165
  '<a' .
5166
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
5167
  ' href="' . wppa_get_photo_url( $id ) . '"' .
5168
- ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.$lbtitle.'"' : '' ) .
5169
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
5170
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
5171
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
5172
  ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
5173
  ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
5174
- ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).'"' .
5175
  // ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
5176
  ' class="thumb-img"' .
5177
  ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
@@ -6199,8 +6189,8 @@ global $wpdb;
6199
  data-videonatheight="' . wppa_get_videoy( $id ) . '"' : '' ) .
6200
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
6201
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
6202
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $year . '-' . $month . '-'. $cell_number . ']"' .
6203
- ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' .
6204
  wppa_get_lb_panorama_full_html( $id ) . '
6205
  data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"
6206
  style="cursor:' . wppa_wait() . ';"
@@ -6614,12 +6604,7 @@ global $wppa_lang;
6614
  $result = '';
6615
 
6616
  // The standard Ajax link
6617
- if ( wppa_switch( 'ajax_non_admin' ) ) {
6618
- $al = WPPA_URL.'/wppa-ajax-front.php?action=wppa&wppa-action=render';
6619
- }
6620
- else {
6621
- $al = admin_url( 'admin-ajax.php' ).'?action=wppa&wppa-action=render';
6622
- }
6623
  $al .= '&wppa-size=' . wppa_get_container_width();
6624
  $al .= '&wppa-moccur=' . $mocc;
6625
  $al .= '&wppa-occur=' . wppa( 'occur' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.0.00.009
7
  *
8
  */
9
 
17
  $mocc = wppa( 'mocc' );
18
  $alt = wppa( 'alt' );
19
  $maxh = wppa_opt( 'area_size' );
20
+ $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
21
  $overflow = 'visible';
22
  if ( $maxh ) {
23
  if ( $nice ) $overflow = 'hidden';
125
  $mocc = wppa( 'mocc' );
126
  $alt = wppa( 'alt' );
127
  $maxh = wppa_opt( 'area_size' );
128
+ $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
129
  $overflow = 'visible';
130
  if ( $maxh ) {
131
  if ( $nice ) $overflow = 'hidden';
2669
  'checkupload' => false,
2670
  'addmultiple' => false,
2671
  'addnumbers' => false,
2672
+ 'path' => true,
2673
  'root' => false,
2674
  'content' => false,
2675
  'sort' => true,
2876
  // Case 1. A single album. I should have access to this album ( $alb > 0 ).
2877
  if ( wppa_is_int( $alb ) && $alb > '0' ) {
2878
  if ( ! wppa_have_access( $alb ) ) {
2879
+ return '';
 
 
2880
  }
2881
  $albarr = array( $alb );
2882
  }
2896
  // In this event, if a single album remains, there will not be a selectionbox, but its treated as if a single album was supplied.
2897
  foreach( array_keys( $albarr ) as $key ) {
2898
  if ( ! wppa_have_access( $albarr[$key] ) ) {
2899
+ unset( $albarr[$key] );
 
 
2900
  }
2901
  }
2902
  if ( empty( $albarr ) ) {
2924
  $a = '';
2925
  }
2926
  $allow_me = wppa_allow_user_uploads( $a );
 
2927
  if ( ! $allow_me ) {
2928
+ $result .=
2929
+ '<h6 style="color:red">' .
2930
+ __( 'Max uploads reached', 'wp-photo-album-plus' ) .
2931
+ wppa_time_to_wait_html( '0', true ) .
2932
+ '</h6>';
 
 
2933
  return $result;
2934
  }
2935
 
2937
  if ( wppa_is_int( $alb ) ) {
2938
  $allow_alb = wppa_allow_uploads( $alb );
2939
  if ( ! $allow_alb ) {
2940
+ $result .=
2941
+ '<h6 style="color:red">' .
2942
+ __( 'Max uploads reached', 'wp-photo-album-plus' ) .
2943
+ wppa_time_to_wait_html( $alb ) .
2944
+ '</h6>';
 
 
2945
  return $result;
2946
  }
2947
  }
2967
 
2968
  // Create the return url
2969
  if ( $ajax_upload ) {
2970
+ $returnurl = site_url() . '/wppaajax/?action=wppa&amp;wppa-action=do-fe-upload';
 
2971
  }
2972
  else {
2973
  $returnurl = wppa_get_permalink();
3074
  wppa_album_select_a( array ( 'addpleaseselect' => true,
3075
  'checkowner' => true,
3076
  'checkupload' => true,
3077
+ 'path' => true,
3078
  'checkarray' => count( $alb ) > 1,
3079
  'array' => $alb,
3080
  'sort' => true,
3376
  ' id="wppa-name-user-' . $mocc . '-' . $seqno . '"' .
3377
  ' type="text"' .
3378
  ' class="wppa-box-text"' .
3379
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3380
  ' name="wppa-user-name"' .
3381
  ' />' .
3382
  '<div style="clear:left;font-size:10px;" >' .
3403
  '<textarea' .
3404
  ' id="wppa-desc-user-' . $mocc . '-' . $seqno . '"' .
3405
  ' class="wppa-user-textarea wppa-box-text"' .
3406
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3407
  ' name="wppa-user-desc"' .
3408
  ' >' .
3409
  $desc .
3435
  '<input' .
3436
  ' type="text"' .
3437
  ' class="wppa-box-text"' .
3438
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3439
  ' name="wppa-user-custom-'.$i.'"' .
3440
  ' />';
3441
 
3592
  ' id="wppa-blogit-pretext-'.$yalb.'-'.$mocc.'"' .
3593
  ' name="wppa-blogit-pretext"' .
3594
  ' class=wppa-user-textarea wppa-box-text"' .
3595
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3596
  ' >' .
3597
  '</textarea>' .
3598
  '<h6>' .
3602
  ' id="wppa-blogit-posttext-'.$yalb.'-'.$mocc.'"' .
3603
  ' name="wppa-blogit-posttext"' .
3604
  ' class=wppa-user-textarea wppa-box-text"' .
3605
+ ' style="border:1px solid '.wppa_opt( 'bcolor' ).';clear:left; padding:0; height:120px; width:100%; '.wppa_wcs( 'wppa-box-text' ).'"' .
3606
  '>' .
3607
  '</textarea>' .
3608
  '</div>';// .
3654
  '<div' .
3655
  ' id="progress-'.$yalb.'-'.$mocc.'"' .
3656
  ' class="wppa-progress "' .
3657
+ ' style="width:100%;border-color:'.wppa_opt( 'bcolor' ).'"' .
3658
  ' >' .
3659
  '<div id="bar-'.$yalb.'-'.$mocc.'" class="wppa-bar" ></div>' .
3660
  '<div id="percent-'.$yalb.'-'.$mocc.'" class="wppa-percent" >0%</div >' .
5155
  '<a' .
5156
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
5157
  ' href="' . wppa_get_photo_url( $id ) . '"' .
5158
+ ( $lbtitle ? ' ' . 'data-lbtitle' . '="'.$lbtitle.'"' : '' ) .
5159
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
5160
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
5161
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
5162
  ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
5163
  ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
5164
+ ' data-rel="wppa"' .
5165
  // ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
5166
  ' class="thumb-img"' .
5167
  ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
6189
  data-videonatheight="' . wppa_get_videoy( $id ) . '"' : '' ) .
6190
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
6191
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
6192
+ ' data-rel="wppa[alw-' . wppa( 'mocc' ) . '-' . $year . '-' . $month . '-'. $cell_number . ']"' .
6193
+ ' ' . 'data-lbtitle' . '="' . $title . '"' .
6194
  wppa_get_lb_panorama_full_html( $id ) . '
6195
  data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"
6196
  style="cursor:' . wppa_wait() . ';"
6604
  $result = '';
6605
 
6606
  // The standard Ajax link
6607
+ $al = site_url() . '/wppaajax/?action=wppa&wppa-action=render';
 
 
 
 
 
6608
  $al .= '&wppa-size=' . wppa_get_container_width();
6609
  $al .= '&wppa-moccur=' . $mocc;
6610
  $al .= '&wppa-occur=' . wppa( 'occur' );
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 7.5.05
7
  *
8
  */
9
 
@@ -650,7 +650,7 @@ global $wppa_lang;
650
 
651
  if ( $href ) {
652
  wppa_out( '<a' .
653
- ( $ajax && wppa_switch( 'allow_ajax' ) ?
654
  ' onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax . '\', \'' . $href . '\' );"' :
655
  ' href="' . $href . '"' ) .
656
  ' class="wppa-nav-text ' . $class . '"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
650
 
651
  if ( $href ) {
652
  wppa_out( '<a' .
653
+ ( $ajax ?
654
  ' onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax . '\', \'' . $href . '\' );"' :
655
  ' href="' . $href . '"' ) .
656
  ' class="wppa-nav-text ' . $class . '"' .
wppa-comment-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
- * Version 7.3.08
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -198,5 +198,8 @@ class wppaCommentWidget extends WP_Widget {
198
  add_action('widgets_init', 'wppa_register_wppaCommentWidget' );
199
 
200
  function wppa_register_wppaCommentWidget() {
201
- register_widget("wppaCommentWidget");
 
 
 
202
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the recent commets on photos
6
+ * Version 8.0.00.008
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
198
  add_action('widgets_init', 'wppa_register_wppaCommentWidget' );
199
 
200
  function wppa_register_wppaCommentWidget() {
201
+
202
+ if ( get_option( 'wppa_show_comments', 'yes' ) == 'yes' ) {
203
+ register_widget("wppaCommentWidget");
204
+ }
205
  }
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 7.7.07.004
6
  *
7
  */
8
 
@@ -233,8 +233,6 @@ global $wppa_current_shortcode_atts;
233
  'is_supersearch' => false,
234
  'supersearch' => '',
235
  'is_mobile' => wppa_is_mobile(),
236
- 'rel' => wppa_get_option( 'wppa_lightbox_name' ) == 'wppa' ? 'data-rel' : 'rel',
237
- 'lbtitle' => wppa_get_option( 'wppa_lightbox_name' ) == 'wppa' ? 'data-lbtitle' : 'title',
238
  'alt' => 'even',
239
  'is_wppa_tree' => false,
240
  'is_calendar' => false,
@@ -855,7 +853,7 @@ global $current_user;
855
  if ( ! $alb ) { // == 'any' ) {
856
 
857
  // Administrator has always access OR If all albums are public
858
- if ( wppa_user_is( 'administrator' ) || ! wppa_switch( 'owner_only' ) ) {
859
  $albs = $wpdb->get_results( "SELECT id FROM $wpdb->wppa_albums" );
860
  if ( $albs ) return true;
861
  else return false; // No albums in system
@@ -903,9 +901,6 @@ global $current_user;
903
  }
904
  }
905
 
906
- // If all albums are public
907
- if ( ! wppa_switch( 'owner_only' ) ) return true;
908
-
909
  // Find the owner
910
  $owner = '';
911
  if ( is_array( $alb ) ) {
@@ -1527,7 +1522,7 @@ function wppa_check_memory_limit( $verbose = true, $x = '0', $y = '0' ) {
1527
 
1528
  // Calculate number of pixels largest target resized image
1529
  if ( wppa_switch( 'resize_on_upload' ) ) {
1530
- $t = wppa_opt( 'resize_to' );
1531
  if ( $t == '0' ) {
1532
  $to['0'] = wppa_opt( 'fullsize' );
1533
  $to['1'] = wppa_opt( 'maxheight' );
@@ -1867,7 +1862,7 @@ global $wpdb;
1867
  $temp = $wpdb->get_results( "SELECT id, name " .
1868
  "FROM $wpdb->wppa_albums " .
1869
  "WHERE id IN (" . implode( ',', $args['array'] ) . ") " .
1870
- ( $args['checkowner'] && wppa_switch( 'upload_owner_only' ) && ! wppa_user_is( 'administrator' ) ? "AND owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1871
  wppa_get_album_order( $args['root'] ),
1872
  ARRAY_A
1873
  );
@@ -1884,7 +1879,7 @@ global $wpdb;
1884
  else {
1885
  $albums = $wpdb->get_results( "SELECT id, name " .
1886
  "FROM $wpdb->wppa_albums " .
1887
- ( $args['checkowner'] && wppa_switch( 'upload_owner_only' ) && ! wppa_user_is( 'administrator' ) ? "WHERE owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1888
  wppa_get_album_order( $args['root'] ),
1889
  ARRAY_A
1890
  );
@@ -1925,7 +1920,7 @@ global $wpdb;
1925
  // Filter for must have content
1926
  if ( $args['content'] ) {
1927
  foreach ( array_keys( $albums ) as $albidx ) {
1928
- if ( wppa_get_photo_count( $albums[$albidx]['id'] ) <= wppa_get_mincount() ) unset ( $albums[$albidx] );
1929
  }
1930
  }
1931
  // Add paths
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 8.0.00.009
6
  *
7
  */
8
 
233
  'is_supersearch' => false,
234
  'supersearch' => '',
235
  'is_mobile' => wppa_is_mobile(),
 
 
236
  'alt' => 'even',
237
  'is_wppa_tree' => false,
238
  'is_calendar' => false,
853
  if ( ! $alb ) { // == 'any' ) {
854
 
855
  // Administrator has always access OR If all albums are public
856
+ if ( wppa_user_is( 'administrator' ) ) {
857
  $albs = $wpdb->get_results( "SELECT id FROM $wpdb->wppa_albums" );
858
  if ( $albs ) return true;
859
  else return false; // No albums in system
901
  }
902
  }
903
 
 
 
 
904
  // Find the owner
905
  $owner = '';
906
  if ( is_array( $alb ) ) {
1522
 
1523
  // Calculate number of pixels largest target resized image
1524
  if ( wppa_switch( 'resize_on_upload' ) ) {
1525
+
1526
  if ( $t == '0' ) {
1527
  $to['0'] = wppa_opt( 'fullsize' );
1528
  $to['1'] = wppa_opt( 'maxheight' );
1862
  $temp = $wpdb->get_results( "SELECT id, name " .
1863
  "FROM $wpdb->wppa_albums " .
1864
  "WHERE id IN (" . implode( ',', $args['array'] ) . ") " .
1865
+ ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "AND owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1866
  wppa_get_album_order( $args['root'] ),
1867
  ARRAY_A
1868
  );
1879
  else {
1880
  $albums = $wpdb->get_results( "SELECT id, name " .
1881
  "FROM $wpdb->wppa_albums " .
1882
+ ( $args['checkowner'] && ! wppa_user_is( 'administrator' ) ? "WHERE owner IN ( '--- public ---', '" . wppa_get_user() . "' ) " : "" ) .
1883
  wppa_get_album_order( $args['root'] ),
1884
  ARRAY_A
1885
  );
1920
  // Filter for must have content
1921
  if ( $args['content'] ) {
1922
  foreach ( array_keys( $albums ) as $albidx ) {
1923
+ if ( ! wppa_get_photo_count( $albums[$albidx]['id'] ) ) unset ( $albums[$albidx] );
1924
  }
1925
  }
1926
  // Add paths
wppa-cron.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
- * Version 7.7.04.001
7
  *
8
  *
9
  */
@@ -164,6 +164,20 @@ global $wppa_endtime;
164
 
165
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} started.' );
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  // Start renew crypt processes if configured
168
  if ( wppa_opt( 'crypt_albums_every' ) ) {
169
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} renew albumcrypt.' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all cron functions
6
+ * Version 8.0.00.009
7
  *
8
  *
9
  */
164
 
165
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} started.' );
166
 
167
+ // Fix invalid ratings
168
+ $iret = $wpdb->query( "DELETE FROM $wpdb->wppa_rating WHERE value = 0" );
169
+ if ( $iret ) {
170
+ wppa_schedule_maintenance_proc('wppa_rerate');
171
+ }
172
+
173
+ // Cleanup obsolete settings
174
+ if ( $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->options
175
+ WHERE option_name LIKE 'wppa_last_album_used-%'" ) > 100 ) {
176
+ $iret = $wpdb->query( "DELETE FROM $wpdb->options
177
+ WHERE option_name LIKE 'wppa_last_album_used-%'" );
178
+ wppa_log( 'Cron', sprintf( '%s last album used settings removed.', $iret ) );
179
+ }
180
+
181
  // Start renew crypt processes if configured
182
  if ( wppa_opt( 'crypt_albums_every' ) ) {
183
  wppa_log( 'Cron', '{b}wppa_cleanup{/b} renew albumcrypt.' );
wppa-dashboard-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains dashboard widgets code
6
  *
7
- * Version 7.7.04.009
8
  *
9
  */
10
 
@@ -13,6 +13,10 @@ add_action( 'do_meta_boxes', 'wppa_email_subscription' );
13
 
14
  function wppa_email_subscription() {
15
 
 
 
 
 
16
  $doit =
17
  wppa_switch( 'newalbumnotify' ) ||
18
  wppa_switch( 'feuploadnotify' ) ||
4
  *
5
  * Contains dashboard widgets code
6
  *
7
+ * Version 8.0.00.008
8
  *
9
  */
10
 
13
 
14
  function wppa_email_subscription() {
15
 
16
+ if ( ! wppa_switch( 'email_on' ) ) {
17
+ return;
18
+ }
19
+
20
  $doit =
21
  wppa_switch( 'newalbumnotify' ) ||
22
  wppa_switch( 'feuploadnotify' ) ||
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 7.7.07.006
7
  *
8
  */
9
 
@@ -73,31 +73,12 @@ horizrailenabled:false,";
73
  'wppa_prevrev' => '100',
74
  'wppa_max_users' => '1000',
75
 
76
- // Table 0: Initial setup
77
- 'wppa_i_responsive' => '',
78
- 'wppa_i_downsize' => '',
79
- 'wppa_i_source' => '',
80
- 'wppa_i_userupload' => '',
81
- 'wppa_i_rating' => '',
82
- 'wppa_i_comment' => '',
83
- 'wppa_i_share' => '',
84
- 'wppa_i_iptc' => '',
85
- 'wppa_i_exif' => '',
86
- 'wppa_i_gpx' => '',
87
- 'wppa_i_fotomoto' => '',
88
- 'wppa_i_video' => '',
89
- 'wppa_i_audio' => '',
90
- 'wppa_i_stereo' => '',
91
- 'wppa_i_pdf' => '',
92
- 'wppa_i_done' => '',
93
 
94
  // Table I: Sizes
95
  // A System
96
  'wppa_colwidth' => 'auto', // 1
97
  'wppa_initial_colwidth' => '640',
98
- 'wppa_resize_on_upload' => 'yes', // 2
99
- 'wppa_resize_to' => '0', // 3
100
- 'wppa_min_thumbs' => '0', // 4
101
  'wppa_bwidth' => '1', // 5
102
  'wppa_bradius' => '6', // 6
103
  'wppa_box_spacing' => '8', // 7
@@ -314,20 +295,8 @@ horizrailenabled:false,";
314
  // F Overlay
315
  'wppa_ovl_theme' => 'black',
316
  'wppa_ovl_bgcolor' => 'black',
317
- 'wppa_ovl_slide_name' => 'no',
318
- 'wppa_ovl_slide_desc' => 'yes',
319
- 'wppa_ovl_thumb_name' => 'yes',
320
- 'wppa_ovl_thumb_desc' => 'no',
321
- 'wppa_ovl_potd_name' => 'yes',
322
- 'wppa_ovl_potd_desc' => 'no',
323
- 'wppa_ovl_sphoto_name' => 'yes',
324
- 'wppa_ovl_sphoto_desc' => 'no',
325
- 'wppa_ovl_mphoto_name' => 'yes',
326
- 'wppa_ovl_mphoto_desc' => 'no',
327
- 'wppa_ovl_alw_name' => 'yes',
328
- 'wppa_ovl_alw_desc' => 'no',
329
- 'wppa_ovl_cover_name' => 'yes',
330
- 'wppa_ovl_cover_desc' => 'no',
331
  'wppa_ovl_show_counter' => 'yes',
332
  'wppa_ovl_add_owner' => 'no',
333
  'wppa_ovl_show_startstop' => 'yes',
@@ -337,6 +306,7 @@ horizrailenabled:false,";
337
 
338
  // H Frontend upload
339
  'wppa_user_upload_on' => 'no',
 
340
  'wppa_user_upload_video_on' => 'no',
341
  'wppa_user_upload_audio_on' => 'no',
342
  'wppa_user_upload_login' => 'yes',
@@ -461,17 +431,9 @@ horizrailenabled:false,";
461
  'wppa_multimedia_icon_upload' => '',
462
 
463
  // Table III: Backgrounds
464
- 'wppa_bgcolor_even' => '#eeeeee',
465
- 'wppa_bcolor_even' => '#cccccc',
466
- 'wppa_bgcolor_alt' => '#dddddd',
467
- 'wppa_bcolor_alt' => '#bbbbbb',
468
- 'wppa_bgcolor_thumbnail' => '#000000',
469
- 'wppa_bgcolor_nav' => '#dddddd',
470
- 'wppa_bcolor_nav' => '#bbbbbb',
471
- 'wppa_bgcolor_namedesc' => '#dddddd',
472
- 'wppa_bcolor_namedesc' => '#bbbbbb',
473
- 'wppa_bgcolor_com' => '#dddddd',
474
- 'wppa_bcolor_com' => '#bbbbbb',
475
  'wppa_bgcolor_img' => '#eeeeee',
476
  'wppa_bcolor_img' => '',
477
  'wppa_bgcolor_fullimg' => '#cccccc',
@@ -482,30 +444,9 @@ horizrailenabled:false,";
482
  'wppa_bcolor_numbar' => '#cccccc',
483
  'wppa_bgcolor_numbar_active' => '#333333',
484
  'wppa_bcolor_numbar_active' => '#333333',
485
- 'wppa_bgcolor_iptc' => '#dddddd',
486
- 'wppa_bcolor_iptc' => '#bbbbbb',
487
- 'wppa_bgcolor_exif' => '#dddddd',
488
- 'wppa_bcolor_exif' => '#bbbbbb',
489
- 'wppa_bgcolor_share' => '#dddddd',
490
- 'wppa_bcolor_share' => '#bbbbbb',
491
- 'wppa_bgcolor_upload' => '#dddddd',
492
- 'wppa_bcolor_upload' => '#bbbbbb',
493
- 'wppa_bgcolor_multitag' => '#dddddd',
494
- 'wppa_bcolor_multitag' => '#bbbbbb',
495
- 'wppa_bgcolor_tagcloud' => '#dddddd',
496
- 'wppa_bcolor_tagcloud' => '#bbbbbb',
497
- 'wppa_bgcolor_superview' => '#dddddd',
498
- 'wppa_bcolor_superview' => '#bbbbbb',
499
- 'wppa_bgcolor_search' => '#dddddd',
500
- 'wppa_bcolor_search' => '#bbbbbb',
501
- 'wppa_bgcolor_calendar' => '#dddddd',
502
- 'wppa_bcolor_calendar' => '#bbbbbb',
503
- 'wppa_bgcolor_bestof' => '#dddddd',
504
- 'wppa_bcolor_bestof' => '#bbbbbb',
505
- 'wppa_bgcolor_stereo' => '#dddddd',
506
- 'wppa_bcolor_stereo' => '#bbbbbb',
507
- 'wppa_bgcolor_adminschoice' => '#dddddd',
508
- 'wppa_bcolor_adminschoice' => '#bbbbbb',
509
  'wppa_bgcolor_modal' => '#ffffff',
510
  'wppa_bcolor_modal' => '#ffffff',
511
  'wppa_svg_color' => '#666666',
@@ -517,8 +458,6 @@ horizrailenabled:false,";
517
 
518
  // Table IV: Behaviour
519
  // A System
520
- 'wppa_allow_ajax' => 'yes',
521
- 'wppa_ajax_non_admin' => 'yes',
522
  'wppa_ajax_scroll' => 'yes',
523
  'wppa_non_ajax_scroll' => 'no',
524
  'wppa_ajax_render_modal' => 'no',
@@ -545,7 +484,7 @@ horizrailenabled:false,";
545
  'wppa_custom_style_ie' => '',
546
  'wppa_custom_style_opera' => '',
547
  'wppa_use_custom_style_file' => 'no',
548
- 'wppa_enable_pdf' => 'no', // IV-A30
549
  'wppa_use_custom_theme_file' => 'no',
550
  'wppa_cre_uploads_htaccess' => 'remove',
551
  'wppa_debug_trace_on' => 'no',
@@ -595,7 +534,6 @@ horizrailenabled:false,";
595
  'wppa_auto_open_comments' => 'yes',
596
  'wppa_film_hover_goto' => 'no',
597
  'wppa_slide_swipe' => 'no',
598
- 'wppa_slideshow_page_allow_ajax' => 'yes',
599
  'wppa_filmonly_continuous' => 'no',
600
  'wppa_filmonly_random' => 'no',
601
  'wppa_no_animate_on_mobile' => 'no',
@@ -657,8 +595,6 @@ horizrailenabled:false,";
657
  'wppa_commentapproved' => 'no',
658
  'wppa_email_from_site' => str_replace('&#039;', '', get_bloginfo('name') ),
659
  'wppa_email_from_email' => 'noreply@' . $site,
660
- 'wppa_commentapproved_text' => '',
661
- 'wppa_commentapproved_subj' => '',
662
  'wppa_commentnotify_added' => 'yes',
663
  'wppa_comten_alt_display' => 'no',
664
  'wppa_comten_alt_thumbsize' => '75',
@@ -846,13 +782,10 @@ horizrailenabled:false,";
846
  'wppa_cover_sublinks' => 'none',
847
  'wppa_cover_sublinks_display' => 'none',
848
  'wppa_real_calendar_linktype' => 'lightbox',
849
- 'wppa_fe_links_owner_only' => 'no',
850
  'wppa_fe_albid_edit' => 'no',
851
 
852
  // Table VII: Security
853
  // B
854
- 'wppa_owner_only' => 'yes',
855
- 'wppa_upload_owner_only' => 'yes',
856
  'wppa_user_album_edit_on' => 'no',
857
  'wppa_upload_moderate' => 'no',
858
  'wppa_fe_upload_private' => 'no',
@@ -869,7 +802,6 @@ horizrailenabled:false,";
869
  'wppa_upload_delete' => 'no',
870
  'wppa_upload_delete_period' => '0',
871
  'wppa_owner_moderate_comment' => 'no',
872
- 'wppa_upload_backend_notify' => 'no',
873
  'wppa_upload_one_only' => 'no',
874
  'wppa_memcheck' => 'yes',
875
  'wppa_memcheck_copy' => 'yes',
@@ -883,7 +815,6 @@ horizrailenabled:false,";
883
  'wppa_upload_frontend_minsize' => '0',
884
  'wppa_upload_frontend_maxsize' => '0',
885
  'wppa_void_dups' => 'no',
886
- 'wppa_home_after_upload' => 'no',
887
  'wppa_fe_alert' => 'all',
888
  'wppa_fe_upload_max_albums' => '500', // VII-B13
889
 
@@ -914,7 +845,7 @@ horizrailenabled:false,";
914
  'wppa_backup_filename' => '',
915
  'wppa_backup' => '',
916
  'wppa_load_skin' => '',
917
- 'wppa_skinfile' => 'default',
918
  'wppa_regen_thumbs' => '',
919
  'wppa_regen_thumbs_skip_one' => '',
920
  'wppa_rerate' => '',
@@ -992,24 +923,14 @@ horizrailenabled:false,";
992
 
993
  // Table IX: Miscellaneous
994
  // A System
995
- 'wppa_html' => 'yes', // 1
996
- 'wppa_allow_html_custom' => 'no',
997
- 'wppa_check_balance' => 'no', // 2
998
  'wppa_allow_debug' => 'no', // 3
999
 
1000
- 'wppa_filter_priority' => '1001', // 5
1001
- 'wppa_shortcode_priority' => '11',
1002
- 'wppa_shortcode_at_priority' => 'no',
1003
- 'wppa_shortcode_at_priority_widget' => 'no',
1004
- 'wppa_lightbox_name' => 'wppa', // 6
1005
  'wppa_allow_foreign_shortcodes_general' => 'no',
1006
  'wppa_allow_foreign_shortcodes' => 'no', // 7
1007
  'wppa_allow_foreign_shortcodes_thumbs' => 'no',
1008
  'wppa_meta_page' => 'yes', // 9
1009
  'wppa_meta_all' => 'yes', // 10
1010
  'wppa_use_wp_editor' => 'no',
1011
- 'wppa_hier_albsel' => 'yes',
1012
- 'wppa_hier_pagesel' => 'no',
1013
  'wppa_alt_type' => 'fullname',
1014
  'wppa_album_admin_pagesize' => '100',
1015
  'wppa_photo_admin_pagesize' => '20',
@@ -1017,13 +938,9 @@ horizrailenabled:false,";
1017
  'wppa_comment_admin_pagesize' => '10',
1018
  'wppa_jpeg_quality' => '95',
1019
  'wppa_geo_edit' => 'no',
1020
- 'wppa_auto_continue' => 'yes',
1021
- 'wppa_max_execution_time' => '25',
1022
  'wppa_adminbarmenu_admin' => 'yes',
1023
  'wppa_adminbarmenu_frontend' => 'yes',
1024
- 'wppa_feed_use_thumb' => 'no',
1025
  'wppa_enable_shortcode_wppa_set' => 'no',
1026
- 'wppa_set_shortcodes' => 'wppa_thumbtype,wppa_tn_margin,wppa_thumbsize',
1027
 
1028
  'wppa_og_tags_on' => 'yes',
1029
  'wppa_add_shortcode_to_post' => 'no',
@@ -1033,7 +950,6 @@ horizrailenabled:false,";
1033
  'wppa_audiostub_upload' => '',
1034
  'wppa_documentstub_upload' => '',
1035
  'wppa_audiostub' => '',
1036
- 'wppa_confirm_create' => 'yes',
1037
  'wppa_import_root' => ABSPATH . 'wp-content',
1038
  'wppa_allow_import_source' => 'no',
1039
  'wppa_enable_generator' => 'yes',
@@ -1053,11 +969,9 @@ horizrailenabled:false,";
1053
  'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
1054
  'wppa_cache_root' => 'cache',
1055
  'wppa_direct_comment' => 'no',
1056
- 'wppa_extended_resize_count' => '1',
1057
- 'wppa_extended_resize_delay' => '200',
1058
  'wppa_load_nicescroller' => 'no',
1059
- 'wppa_translate' => 'no',
1060
- 'wppa_add_locale' => 'no',
1061
  'wppa_csv_sep' => ',',
1062
 
1063
  // IX D New
@@ -1080,7 +994,6 @@ horizrailenabled:false,";
1080
  'wppa_newphoto_owner' => '', // IX-D5.1
1081
  'wppa_upload_limit_count' => '0', // IX-D6a
1082
  'wppa_upload_limit_time' => '0', // IX-D6b
1083
- 'wppa_show_album_full' => 'yes',
1084
  'wppa_grant_an_album' => 'no',
1085
  'wppa_grant_name' => 'display',
1086
  'wppa_grant_parent_sel_method' => 'selectionbox',
@@ -1109,7 +1022,6 @@ horizrailenabled:false,";
1109
  'wppa_copy_owner' => 'no',
1110
  'wppa_copy_custom' => 'no',
1111
  'wppa_frontend_album_public' => 'no',
1112
- 'wppa_optimize_new' => 'no',
1113
  'wppa_default_album_linktype' => 'content',
1114
  'wppa_sanitize_import' => 'no',
1115
  'wppa_remove_accents' => 'yes',
@@ -1176,13 +1088,13 @@ horizrailenabled:false,";
1176
  'wppa_split_namedesc' => 'no',
1177
 
1178
  // H Source file management and import/upload
1179
- 'wppa_keep_source_admin' => 'yes',
1180
- 'wppa_keep_source_frontend' => 'yes',
1181
  'wppa_source_dir' => WPPA_ABSPATH.WPPA_UPLOAD.'/wppa-source',
1182
  'wppa_keep_sync' => 'yes',
1183
  'wppa_remake_add' => 'yes',
1184
  'wppa_save_iptc' => 'yes',
1185
  'wppa_save_exif' => 'yes',
 
1186
  'wppa_chgsrc_is_restricted' => 'no',
1187
  'wppa_ext_status_restricted' => 'no',
1188
  'wppa_desc_is_restricted' => 'no',
@@ -1214,10 +1126,9 @@ horizrailenabled:false,";
1214
  'wppa_delete_all_from_cloudinary' => '',
1215
  'wppa_delete_derived_from_cloudinary' => '',
1216
  'wppa_max_cloud_life' => '0',
1217
- 'wppa_gpx_implementation' => 'none',
1218
  'wppa_map_height' => '300',
1219
  'wppa_map_apikey' => '',
1220
- 'wppa_load_map_api' => 'no',
1221
  'wppa_gpx_shortcode' => '[map style="width: auto; height:300px; margin:0; " marker="yes" lat="w#lat" lon="w#lon"]',
1222
  'wppa_geo_zoom' => '10',
1223
  'wppa_fotomoto_on' => 'no',
@@ -1251,8 +1162,6 @@ horizrailenabled:false,";
1251
 
1252
 
1253
  // Photo of the day widget
1254
- 'wppa_potd_title' => __('Photo of the day', 'wp-photo-album-plus'),
1255
- 'wppa_potd_widget_width' => '200',
1256
  'wppa_potd_align' => 'center',
1257
  'wppa_potd_linkurl' => '',
1258
  'wppa_potd_linktitle' => '',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
73
  'wppa_prevrev' => '100',
74
  'wppa_max_users' => '1000',
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  // Table I: Sizes
78
  // A System
79
  'wppa_colwidth' => 'auto', // 1
80
  'wppa_initial_colwidth' => '640',
81
+ 'wppa_resize_to' => '-1', // 3
 
 
82
  'wppa_bwidth' => '1', // 5
83
  'wppa_bradius' => '6', // 6
84
  'wppa_box_spacing' => '8', // 7
295
  // F Overlay
296
  'wppa_ovl_theme' => 'black',
297
  'wppa_ovl_bgcolor' => 'black',
298
+ 'wppa_ovl_name' => 'yes',
299
+ 'wppa_ovl_desc' => 'yes',
 
 
 
 
 
 
 
 
 
 
 
 
300
  'wppa_ovl_show_counter' => 'yes',
301
  'wppa_ovl_add_owner' => 'no',
302
  'wppa_ovl_show_startstop' => 'yes',
306
 
307
  // H Frontend upload
308
  'wppa_user_upload_on' => 'no',
309
+ 'wppa_email_on' => 'yes',
310
  'wppa_user_upload_video_on' => 'no',
311
  'wppa_user_upload_audio_on' => 'no',
312
  'wppa_user_upload_login' => 'yes',
431
  'wppa_multimedia_icon_upload' => '',
432
 
433
  // Table III: Backgrounds
434
+ 'wppa_bgcolor' => '#eeeeee',
435
+ 'wppa_bcolor' => '#cccccc',
436
+
 
 
 
 
 
 
 
 
437
  'wppa_bgcolor_img' => '#eeeeee',
438
  'wppa_bcolor_img' => '',
439
  'wppa_bgcolor_fullimg' => '#cccccc',
444
  'wppa_bcolor_numbar' => '#cccccc',
445
  'wppa_bgcolor_numbar_active' => '#333333',
446
  'wppa_bcolor_numbar_active' => '#333333',
447
+
448
+ 'wppa_bgcolor_thumbnail' => '#000000',
449
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  'wppa_bgcolor_modal' => '#ffffff',
451
  'wppa_bcolor_modal' => '#ffffff',
452
  'wppa_svg_color' => '#666666',
458
 
459
  // Table IV: Behaviour
460
  // A System
 
 
461
  'wppa_ajax_scroll' => 'yes',
462
  'wppa_non_ajax_scroll' => 'no',
463
  'wppa_ajax_render_modal' => 'no',
484
  'wppa_custom_style_ie' => '',
485
  'wppa_custom_style_opera' => '',
486
  'wppa_use_custom_style_file' => 'no',
487
+ 'wppa_enable_pdf' => 'yes', // IV-A30
488
  'wppa_use_custom_theme_file' => 'no',
489
  'wppa_cre_uploads_htaccess' => 'remove',
490
  'wppa_debug_trace_on' => 'no',
534
  'wppa_auto_open_comments' => 'yes',
535
  'wppa_film_hover_goto' => 'no',
536
  'wppa_slide_swipe' => 'no',
 
537
  'wppa_filmonly_continuous' => 'no',
538
  'wppa_filmonly_random' => 'no',
539
  'wppa_no_animate_on_mobile' => 'no',
595
  'wppa_commentapproved' => 'no',
596
  'wppa_email_from_site' => str_replace('&#039;', '', get_bloginfo('name') ),
597
  'wppa_email_from_email' => 'noreply@' . $site,
 
 
598
  'wppa_commentnotify_added' => 'yes',
599
  'wppa_comten_alt_display' => 'no',
600
  'wppa_comten_alt_thumbsize' => '75',
782
  'wppa_cover_sublinks' => 'none',
783
  'wppa_cover_sublinks_display' => 'none',
784
  'wppa_real_calendar_linktype' => 'lightbox',
 
785
  'wppa_fe_albid_edit' => 'no',
786
 
787
  // Table VII: Security
788
  // B
 
 
789
  'wppa_user_album_edit_on' => 'no',
790
  'wppa_upload_moderate' => 'no',
791
  'wppa_fe_upload_private' => 'no',
802
  'wppa_upload_delete' => 'no',
803
  'wppa_upload_delete_period' => '0',
804
  'wppa_owner_moderate_comment' => 'no',
 
805
  'wppa_upload_one_only' => 'no',
806
  'wppa_memcheck' => 'yes',
807
  'wppa_memcheck_copy' => 'yes',
815
  'wppa_upload_frontend_minsize' => '0',
816
  'wppa_upload_frontend_maxsize' => '0',
817
  'wppa_void_dups' => 'no',
 
818
  'wppa_fe_alert' => 'all',
819
  'wppa_fe_upload_max_albums' => '500', // VII-B13
820
 
845
  'wppa_backup_filename' => '',
846
  'wppa_backup' => '',
847
  'wppa_load_skin' => '',
848
+ 'wppa_skinfile' => '',
849
  'wppa_regen_thumbs' => '',
850
  'wppa_regen_thumbs_skip_one' => '',
851
  'wppa_rerate' => '',
923
 
924
  // Table IX: Miscellaneous
925
  // A System
 
 
 
926
  'wppa_allow_debug' => 'no', // 3
927
 
 
 
 
 
 
928
  'wppa_allow_foreign_shortcodes_general' => 'no',
929
  'wppa_allow_foreign_shortcodes' => 'no', // 7
930
  'wppa_allow_foreign_shortcodes_thumbs' => 'no',
931
  'wppa_meta_page' => 'yes', // 9
932
  'wppa_meta_all' => 'yes', // 10
933
  'wppa_use_wp_editor' => 'no',
 
 
934
  'wppa_alt_type' => 'fullname',
935
  'wppa_album_admin_pagesize' => '100',
936
  'wppa_photo_admin_pagesize' => '20',
938
  'wppa_comment_admin_pagesize' => '10',
939
  'wppa_jpeg_quality' => '95',
940
  'wppa_geo_edit' => 'no',
 
 
941
  'wppa_adminbarmenu_admin' => 'yes',
942
  'wppa_adminbarmenu_frontend' => 'yes',
 
943
  'wppa_enable_shortcode_wppa_set' => 'no',
 
944
 
945
  'wppa_og_tags_on' => 'yes',
946
  'wppa_add_shortcode_to_post' => 'no',
950
  'wppa_audiostub_upload' => '',
951
  'wppa_documentstub_upload' => '',
952
  'wppa_audiostub' => '',
 
953
  'wppa_import_root' => ABSPATH . 'wp-content',
954
  'wppa_allow_import_source' => 'no',
955
  'wppa_enable_generator' => 'yes',
969
  'wppa_login_url' => site_url( 'wp-login.php', 'login' ), // A
970
  'wppa_cache_root' => 'cache',
971
  'wppa_direct_comment' => 'no',
972
+ 'wppa_extended_resize_count' => '0',
973
+ 'wppa_extended_resize_delay' => '1000',
974
  'wppa_load_nicescroller' => 'no',
 
 
975
  'wppa_csv_sep' => ',',
976
 
977
  // IX D New
994
  'wppa_newphoto_owner' => '', // IX-D5.1
995
  'wppa_upload_limit_count' => '0', // IX-D6a
996
  'wppa_upload_limit_time' => '0', // IX-D6b
 
997
  'wppa_grant_an_album' => 'no',
998
  'wppa_grant_name' => 'display',
999
  'wppa_grant_parent_sel_method' => 'selectionbox',
1022
  'wppa_copy_owner' => 'no',
1023
  'wppa_copy_custom' => 'no',
1024
  'wppa_frontend_album_public' => 'no',
 
1025
  'wppa_default_album_linktype' => 'content',
1026
  'wppa_sanitize_import' => 'no',
1027
  'wppa_remove_accents' => 'yes',
1088
  'wppa_split_namedesc' => 'no',
1089
 
1090
  // H Source file management and import/upload
1091
+ 'wppa_keep_source' => 'yes',
 
1092
  'wppa_source_dir' => WPPA_ABSPATH.WPPA_UPLOAD.'/wppa-source',
1093
  'wppa_keep_sync' => 'yes',
1094
  'wppa_remake_add' => 'yes',
1095
  'wppa_save_iptc' => 'yes',
1096
  'wppa_save_exif' => 'yes',
1097
+ 'wppa_save_gpx' => 'yes',
1098
  'wppa_chgsrc_is_restricted' => 'no',
1099
  'wppa_ext_status_restricted' => 'no',
1100
  'wppa_desc_is_restricted' => 'no',
1126
  'wppa_delete_all_from_cloudinary' => '',
1127
  'wppa_delete_derived_from_cloudinary' => '',
1128
  'wppa_max_cloud_life' => '0',
1129
+ 'wppa_gpx_implementation' => 'wppa-plus-embedded',
1130
  'wppa_map_height' => '300',
1131
  'wppa_map_apikey' => '',
 
1132
  'wppa_gpx_shortcode' => '[map style="width: auto; height:300px; margin:0; " marker="yes" lat="w#lat" lon="w#lon"]',
1133
  'wppa_geo_zoom' => '10',
1134
  'wppa_fotomoto_on' => 'no',
1162
 
1163
 
1164
  // Photo of the day widget
 
 
1165
  'wppa_potd_align' => 'center',
1166
  'wppa_potd_linkurl' => '',
1167
  'wppa_potd_linktitle' => '',
wppa-exif-iptc-common.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
- * Version 7.6.07.006
7
  *
8
  *
9
  */
@@ -3292,6 +3292,7 @@ global $wppa;
3292
  $status = 'display';
3293
  }
3294
  }
 
3295
  $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
3296
  if ( ! $bret ) wppa_log( 'War', 'Could not add EXIF tag label '.$tag.' for photo '.$photo );
3297
  }
@@ -3300,49 +3301,20 @@ global $wppa;
3300
  // If its an array...
3301
  if ( is_array( $exif[$s] ) ) {
3302
 
3303
-
3304
- /*
3305
-
3306
- $c = count ( $exif[$s] );
3307
- $max = wppa_opt( 'exif_max_array_size' );
3308
- if ( $max != '0' && $c > $max ) {
3309
- wppa_dbg_msg( 'Exif tag '.$tag. ': array truncated form '.$c.' to '.$max.' elements for photo nr '.$id.'.', 'red' );
3310
- $c = $max;
3311
- }
3312
- for ( $i=0; $i <$c; $i++ ) {
3313
- $photo = $id;
3314
- $desc = $exif[$s][$i];
3315
- $status = 'default';
3316
- $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
3317
- if ( ! $bret ) wppa_log( 'War', 'Could not add EXIF tag '.$tag.' for photo '.$photo );
3318
-
3319
- }
3320
- */
3321
- /*
3322
- $max = wppa_opt( 'exif_max_array_size' );
3323
- if ( $max != 0 && count( $exif[$s] ) > $max ) {
3324
- $temp = array_slice( $exif[$s], 0, $max, true );
3325
- }
3326
- else {
3327
- $temp = $exif[$s];
3328
- }
3329
- */
3330
  $desc = serialize( $exif[$s] );
3331
- // wppa_dump( $id . ':' . $tag );
3332
- // wppa_dump( var_export( $temp, true ) );
3333
  }
 
3334
  // Its not an array
3335
  else {
3336
 
3337
  $desc = $exif[$s];
3338
-
3339
  }
3340
 
3341
  $photo = $id;
3342
  $status = 'default';
3343
- $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
3344
- // if ( ! $bret ) {} /* wppa_log( 'Warning 3', 'Could not add EXIF tag '.$tag.' for photo '.$photo.', desc = '.$desc ); */ // Is junk, dont care
3345
-
3346
  }
3347
 
3348
  wppa_fix_exif_format( $id );
3
  * Package: wp-photo-album-plus
4
  *
5
  * exif and iptc common functions
6
+ * Version 8.0.00.008
7
  *
8
  *
9
  */
3292
  $status = 'display';
3293
  }
3294
  }
3295
+
3296
  $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
3297
  if ( ! $bret ) wppa_log( 'War', 'Could not add EXIF tag label '.$tag.' for photo '.$photo );
3298
  }
3301
  // If its an array...
3302
  if ( is_array( $exif[$s] ) ) {
3303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3304
  $desc = serialize( $exif[$s] );
 
 
3305
  }
3306
+
3307
  // Its not an array
3308
  else {
3309
 
3310
  $desc = $exif[$s];
 
3311
  }
3312
 
3313
  $photo = $id;
3314
  $status = 'default';
3315
+ if ( wppa_switch( 'save_gps' ) || substr( $tag, 0, 2 ) != 'G#' ) {
3316
+ $bret = wppa_create_exif_entry( array( 'photo' => $photo, 'tag' => $tag, 'description' => $desc, 'status' => $status ) );
3317
+ }
3318
  }
3319
 
3320
  wppa_fix_exif_format( $id );
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 7.7.07.004
7
  *
8
  */
9
 
@@ -53,7 +53,7 @@ global $wppa_current_shortcode_atts;
53
  'overflow' => '',
54
  ), $xatts );
55
 
56
- if ( $atts['nicescroll'] ) {
57
  $nices = true;
58
  $style = 'clear:both;position:relative;overflow:hidden;';
59
  $class = $atts['class'] . ' wppa-div';
@@ -308,19 +308,23 @@ global $wppa_current_shortcode_atts;
308
  case 'photo':
309
  case 'sphoto':
310
  $wppa['single_photo'] = $atts['photo'];
 
311
  break;
312
  case 'mphoto':
313
  $wppa['single_photo'] = $atts['photo'];
 
314
  $wppa['is_mphoto'] = '1';
315
  break;
316
  case 'xphoto':
317
  $wppa['single_photo'] = $atts['photo'];
 
318
  $wppa['is_xphoto'] = '1';
319
  break;
320
  case 'slphoto':
321
  $wppa['is_slide'] = '1';
322
  $wppa['single_photo'] = $atts['photo'];
323
  $wppa['start_photo'] = $atts['photo'];
 
324
  $wppa['is_single'] = '1';
325
  break;
326
  case 'autopage':
@@ -380,10 +384,6 @@ global $wppa_current_shortcode_atts;
380
  $wppa['is_supersearch'] = true;
381
  break;
382
  case 'calendar':
383
- if ( ! wppa_switch( 'allow_ajax' ) ) {
384
- wppa_dbg_msg ( 'Shortcode [wppa type="(real)calendar" ... requires Ajax acive. See Photo Albums -> Settings Table IV-A1.0', 'red', 'force' );
385
- return '';
386
- }
387
  $wppa['is_calendar'] = true;
388
  $wppa['calendar'] = 'timestamp';
389
  if ( in_array( $atts['calendar'], array( 'exifdtm', 'timestamp', 'modified', 'realexifdtm', 'realtimestamp', 'realmodified' ) ) ) {
@@ -583,86 +583,14 @@ global $wppa_current_shortcode_atts;
583
  // Relative urls?
584
  $result = wppa_make_relative( $result );
585
 
586
- // In widget
587
- if ( wppa_in_widget() ) {
588
- if ( ! wppa_switch( 'shortcode_at_priority_widget' ) ) {
589
- return $result;
590
- }
591
- }
592
-
593
- // In Post / Page
594
- else {
595
- if ( ! wppa_switch( 'shortcode_at_priority' ) ) {
596
- return $result;
597
- }
598
- }
599
-
600
- // Url always immediately
601
- if ( $wppa['is_url'] ) {
602
- return $result;
603
- }
604
-
605
- // On admin page (especially for preview in Gutenberg)
606
- if ( is_admin() ) {
607
- return $result;
608
- }
609
-
610
- // New method to prevent damage of the result by content filters that run on higher priorities than do_shortcode.
611
- // Previous methods, e.g. increasing the do_shortcode priority sometimes fail due to requirements of other plugins/shortcodes.
612
- // To prevent this, i first asked an enhancement to add a priority argument to add_shortcode(), but the wp boys simply say
613
- // 'this is not possible'. Everything is possible, they should say that they are not smart enough to implement it.
614
- // Since there are plans to set the do_shortcode() priority ( currently 11 ) lower than wpautop() ( 10 ), and there are many serious
615
- // bugs in wpautop() it is now urgent to create a monkey-proof solution to the problem that others destructify the so preciously created
616
- // shortcode process output.
617
- //
618
- // What we do is:
619
- // 1. Save the result in memory and return a placeholder for the result.
620
- // 2. Run a contentfilter on the highest possible priority that replaced the placeholder by the original result.
621
- //
622
- // It sounds simple, but it took me a few sleepless nights to figure out.
623
- // Here it goes:
624
-
625
- // Define storage for the results
626
- global $wppa_shortcode_results;
627
-
628
- // Create a key to identify the result.
629
- // Any unique key will do, as long as it is not tampered by any content filter.
630
- // Hopefully everything keeps an unadded shortcode untouched,
631
- // therefor we wrap the random key in square brackets
632
- $key = '[' . wppa_get_unique_crypt() . ']';
633
-
634
- // Store
635
- $wppa_shortcode_results[$key] = $result;
636
-
637
- // Return the placeholder ( = the key ) instead of $result
638
- return $key;
639
 
640
  }
641
 
642
  // Declare the shortcode handler
643
  add_shortcode( 'wppa', 'wppa_shortcodes' );
644
 
645
- // The filter proc to insert the shortcodeoutput into the page content.
646
- function wppa_insert_shortcode_output( $content ) {
647
- global $wppa_shortcode_results;
648
-
649
- if ( is_array( $wppa_shortcode_results ) ) foreach( array_keys( $wppa_shortcode_results ) as $key ) {
650
- $content = str_replace( $key, $wppa_shortcode_results[$key], $content );
651
- }
652
-
653
- return $content;
654
- }
655
-
656
- // Declare the filter to replace the placeholders by the shortcode process output
657
- // These filters must run after shortcode processing, so normally at a priority > 11
658
- add_action( 'init', 'wppa_add_filters' );
659
-
660
- function wppa_add_filters() {
661
- add_filter( 'the_content', 'wppa_insert_shortcode_output', wppa_opt( 'filter_priority' ) );
662
- add_filter( 'widget_content', 'wppa_insert_shortcode_output', wppa_opt( 'filter_priority' ) );
663
- add_filter( 'widget_text', 'wppa_insert_shortcode_output', wppa_opt( 'filter_priority' ) );
664
- }
665
-
666
  // The runtime modifiable settings are processed by the wppa_set shortcode
667
  function wppa_set_shortcodes( $xatts, $content = '' ) {
668
  global $wppa;
@@ -678,15 +606,8 @@ global $wppa_runtime_settings;
678
  'value' => ''
679
  ), $xatts );
680
 
681
- $allowed = explode( ',', wppa_opt( 'set_shortcodes' ) );
682
-
683
- // Valid item?
684
- if ( $atts['name'] && ! in_array( $atts['name'], $allowed ) && wppa_opt( 'set_shortcodes' ) != 'all' ) {
685
- wppa_dbg_msg( $atts['name'] . ' is not a runtime settable configuration entity.', 'red', 'force' );
686
- }
687
-
688
  // Reset?
689
- elseif ( ! $atts['name'] ) {
690
  $wppa_opt = false;
691
  wppa_initialize_runtime();
692
  wppa_reset_occurrance();
@@ -864,7 +785,7 @@ global $wppa_current_shortcode_atts;
864
  return wppa_albums();
865
  }
866
 
867
- // Yu can not cache/delay a type xxx shortocde
868
  function wppa_you_can_not( $xaction, $xtype, $useless = true ) {
869
  $action = __( $xaction, 'wp-photo-album-plus' );
870
  $type = __( $xtype, 'wp-photo-album-plus' );
@@ -872,4 +793,10 @@ function wppa_you_can_not( $xaction, $xtype, $useless = true ) {
872
  ( $useless ? ' ' . __( 'It is useless anyway.', 'wp-photo-album-plus' ) : '' );
873
  wppa_log( 'dbg', $result );
874
  return $result;
875
- }
 
 
 
 
 
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 8.0.00.010
7
  *
8
  */
9
 
53
  'overflow' => '',
54
  ), $xatts );
55
 
56
+ if ( $atts['nicescroll'] && ! wppa_is_mobile() ) {
57
  $nices = true;
58
  $style = 'clear:both;position:relative;overflow:hidden;';
59
  $class = $atts['class'] . ' wppa-div';
308
  case 'photo':
309
  case 'sphoto':
310
  $wppa['single_photo'] = $atts['photo'];
311
+ $wppa['start_album'] = $atts['album'];
312
  break;
313
  case 'mphoto':
314
  $wppa['single_photo'] = $atts['photo'];
315
+ $wppa['start_album'] = $atts['album'];
316
  $wppa['is_mphoto'] = '1';
317
  break;
318
  case 'xphoto':
319
  $wppa['single_photo'] = $atts['photo'];
320
+ $wppa['start_album'] = $atts['album'];
321
  $wppa['is_xphoto'] = '1';
322
  break;
323
  case 'slphoto':
324
  $wppa['is_slide'] = '1';
325
  $wppa['single_photo'] = $atts['photo'];
326
  $wppa['start_photo'] = $atts['photo'];
327
+ $wppa['start_album'] = $atts['album'];
328
  $wppa['is_single'] = '1';
329
  break;
330
  case 'autopage':
384
  $wppa['is_supersearch'] = true;
385
  break;
386
  case 'calendar':
 
 
 
 
387
  $wppa['is_calendar'] = true;
388
  $wppa['calendar'] = 'timestamp';
389
  if ( in_array( $atts['calendar'], array( 'exifdtm', 'timestamp', 'modified', 'realexifdtm', 'realtimestamp', 'realmodified' ) ) ) {
583
  // Relative urls?
584
  $result = wppa_make_relative( $result );
585
 
586
+ // Done
587
+ return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
588
 
589
  }
590
 
591
  // Declare the shortcode handler
592
  add_shortcode( 'wppa', 'wppa_shortcodes' );
593
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  // The runtime modifiable settings are processed by the wppa_set shortcode
595
  function wppa_set_shortcodes( $xatts, $content = '' ) {
596
  global $wppa;
606
  'value' => ''
607
  ), $xatts );
608
 
 
 
 
 
 
 
 
609
  // Reset?
610
+ if ( ! $atts['name'] ) {
611
  $wppa_opt = false;
612
  wppa_initialize_runtime();
613
  wppa_reset_occurrance();
785
  return wppa_albums();
786
  }
787
 
788
+ // Yuo can not cache/delay a type xxx shortocde
789
  function wppa_you_can_not( $xaction, $xtype, $useless = true ) {
790
  $action = __( $xaction, 'wp-photo-album-plus' );
791
  $type = __( $xtype, 'wp-photo-album-plus' );
793
  ( $useless ? ' ' . __( 'It is useless anyway.', 'wp-photo-album-plus' ) : '' );
794
  wppa_log( 'dbg', $result );
795
  return $result;
796
+ }
797
+
798
+ // This function is no longer needed in 8.0
799
+ function wppa_insert_shortcode_output( $result ) {
800
+ wppa_log( 'err', 'wppa_insert_shortcode_output() is deprecated and no longer needed' );
801
+ return $result;
802
+ }
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.7.07.005
7
  *
8
  */
9
 
@@ -31,28 +31,6 @@ global $wppa_current_shortcode_atts;
31
  wppa_dbg_msg( 'Get=' . serialize($_GET) );
32
  wppa_dbg_msg( 'Post=' . serialize($_POST) );
33
 
34
- // List content filters
35
- // Data struct: $wp_filter[$tag]->callbacks[$priority][$idx] = array( 'function' => $function_to_add, 'accepted_args' => $accepted_args );
36
- if ( wppa( 'debug' ) && wppa( 'mocc' ) == '0' ) {
37
- global $wp_filter;
38
-
39
- wppa_dbg_msg( 'Start content filters', 'green' );
40
- foreach( array_keys( $wp_filter ) as $tag ) {
41
- if ( $tag == 'the_content' ) {
42
- $filters = $wp_filter[$tag] -> callbacks;
43
- foreach( array_keys($filters) as $pri ) {
44
- foreach( array_keys( $filters[$pri] ) as $item ) {
45
- if ( ! is_array( $filters[$pri][$item]['function'] ) ) {
46
- wppa_dbg_msg($tag.', Pri:'.$pri.', Func:'.$filters[$pri][$item]['function'].', args='.$filters[$pri][$item]['accepted_args'] );
47
- }
48
- }
49
- }
50
- }
51
- }
52
- wppa_dbg_msg( 'End content filters', 'green' );
53
-
54
- }
55
-
56
  // Process a user upload request, if any. Do it here: it may affect this occurences display
57
  wppa_user_upload();
58
 
@@ -774,7 +752,7 @@ global $wppa_current_shortcode_atts;
774
  // See if the photo id is a keyword and convert it if possible
775
  if ( wppa( 'single_photo' ) && ! is_numeric( wppa( 'single_photo' ) ) ) {
776
  if ( substr( wppa( 'single_photo' ), 0, 1 ) == '#' ) { // Keyword
777
- switch ( wppa( 'single_photo' ) ) {
778
  case '#potd': // Photo of the day
779
  $t = wppa_get_potd();
780
  if ( is_array( $t ) ) {
@@ -788,7 +766,20 @@ global $wppa_current_shortcode_atts;
788
  }
789
  break;
790
  case '#last': // Last upload
791
- $id = wppa_get_youngest_photo_id();
 
 
 
 
 
 
 
 
 
 
 
 
 
792
  wppa( 'start_photo', $id );
793
  break;
794
  default:
@@ -981,7 +972,7 @@ global $wppa_current_shortcode_atts;
981
  }
982
  else wppa_out( '<span style="color:red">ERROR: Missing function wppa_theme(), check the installation of WPPA+. Remove customized wppa_theme.php</span>' );
983
  global $wppa_version;
984
- $expected_version = '7.3.11.002';
985
  if ( $wppa_version != $expected_version ) {
986
  wppa_dbg_msg( 'WARNING: customized wppa-theme.php is out of rev. Expected version: ' . $expected_version . ' found: ' . $wppa_version, 'red' );
987
  }
@@ -2980,7 +2971,12 @@ global $wppa_done;
2980
  $comment = isset( $_REQUEST['comment'] ) ? $_REQUEST['comment'] : '';
2981
  $comment = trim( $comment );
2982
  $comment = wppa_decode( $comment );
2983
- $comment = strip_tags( $comment );
 
 
 
 
 
2984
  $save_comment = str_replace( "\n", '<br />', $comment ); // Resque newline chars
2985
  $save_comment = stripslashes( $save_comment );
2986
 
@@ -3432,11 +3428,8 @@ function wppa_and_stristr( $string, $branch ) {
3432
  function wppa_get_slide_frame_style() {
3433
 
3434
  $fs = wppa_opt( 'fullsize' );
3435
- $cs = wppa_opt( 'colwidth' );
3436
- if ( $cs == 'auto' ) {
3437
- $cs = $fs;
3438
- wppa( 'auto_colwidth', true );
3439
- }
3440
  $result = '';
3441
  $gfs = ( is_numeric( wppa( 'fullsize' ) ) && wppa( 'fullsize' ) > '1' ) ? wppa( 'fullsize' ) : $fs;
3442
 
@@ -3580,20 +3573,17 @@ function wppa_get_container_width( $netto = false ) {
3580
  $result = wppa( 'fullsize' );
3581
  }
3582
  else {
3583
- $result = wppa_opt( 'colwidth' );
3584
- if ( $result == 'auto' ) {
3585
- if ( wppa( 'max_width' ) ) {
3586
- $result = wppa( 'max_width' );
3587
- }
3588
- else {
3589
- $result = wppa_opt( 'initial_colwidth' ); //'640';
3590
- }
3591
- wppa( 'auto_colwidth', true );
3592
  }
 
3593
  }
3594
  if ( $netto ) {
3595
- $result -= 12; // 2*padding
3596
- $result -= 2 * ( wppa_opt( 'bwidth' ) ? wppa_opt( 'bwidth' ) : '0' );
3597
  }
3598
  return $result;
3599
  }
@@ -3618,7 +3608,7 @@ function wppa_get_container_style() {
3618
  // Margin
3619
  $marg = false;
3620
  if ( is_numeric( wppa( 'fullsize' ) ) ) {
3621
- $cw = wppa_opt( 'colwidth' );
3622
  if ( is_numeric( $cw ) ) {
3623
  if ( $cw > ( wppa( 'fullsize' ) + 10 ) ) {
3624
  $marg = '10px;';
@@ -3741,7 +3731,7 @@ global $blog_id;
3741
  }
3742
 
3743
  // Spinner for Ajax
3744
- if ( wppa_switch( 'allow_ajax' ) && ! wppa_in_widget() ) {
3745
 
3746
  wppa_out( wppa_get_spinner_svg_html( array( 'id' => 'wppa-ajax-spin-' . wppa( 'mocc' ),
3747
  'class' => 'wppa-ajax-spin',
@@ -3809,13 +3799,11 @@ global $blog_id;
3809
  wppa_out( wppa_js( "\n" . '<script type="text/javascript" >' ) );
3810
  wppa_out( wppa_js( "\n /* START OCCURRANCE " . wppa( 'mocc' ) . " */" ) );
3811
  // wppa( 'auto_colwidth' ) is set by the filter or by wppa_albums in case called directly
3812
- // wppa_opt( 'colwidth' ) is the option setting
3813
  // script or call has precedence over option setting
3814
  // so: if set by script or call: auto, else if set by option: auto
3815
  $auto = false;
3816
  $contw = wppa_get_container_width();
3817
  if ( wppa( 'auto_colwidth' ) ) $auto = true;
3818
- elseif ( wppa_opt( 'colwidth' ) == 'auto' ) $auto = true;
3819
  elseif ( $contw > 0 && $contw <= 1.0 ) $auto = true;
3820
 
3821
  // If size explitely given and not a fraction, it is static size
@@ -3927,7 +3915,7 @@ global $blog_id;
3927
  break;
3928
  case 'lightbox':
3929
  case 'lightboxsingle':
3930
- $lbkey = wppa_opt( 'lightbox_name' ); // gives anchor tag with rel="lightbox" or the like
3931
  break;
3932
  default:
3933
  $lbkey = ''; // results in omitting the anchor tag
@@ -4005,13 +3993,13 @@ global $blog_id;
4005
  function wppa_container_wrapper( $key ) {
4006
  switch( $key ) {
4007
  case 'open':
4008
- if ( wppa( 'max_width' ) ) {
4009
  wppa_out( '<div' .
4010
  ' id="wppa-container-wrapper-' . wppa( 'mocc' ) . '"' .
4011
  ( wppa( 'align' ) == 'left' ? ' class="alignleft"' : '' ) .
4012
  ( wppa( 'align' ) == 'right' ? ' class="alignright"' : '' ) .
4013
- ' style="' .
4014
- 'max-width:' . wppa( 'max_width' ) . 'px;'
4015
  );
4016
  switch( wppa( 'align' ) ) {
4017
  case 'left':
@@ -4028,12 +4016,12 @@ function wppa_container_wrapper( $key ) {
4028
  wppa_out( '"' .
4029
  ' >'
4030
  );
4031
- }
4032
  break;
4033
  case 'close':
4034
- if ( wppa( 'max_width' ) ) {
4035
  wppa_out( '</div>' );
4036
- }
4037
  break;
4038
  default:
4039
  wppa_dbg_msg( 'Missing or wrong arg in wppa_container_wrapper()', 'red', 'force' );
@@ -4044,7 +4032,7 @@ function wppa_album_list( $action ) {
4044
  global $cover_count;
4045
  global $cover_count_key;
4046
 
4047
- $nice = wppa_switch( 'nicescroll' );
4048
  $maxh = wppa_opt( 'area_size' );
4049
  $overflow = 'visible';
4050
  $mocc = wppa( 'mocc' );
@@ -4065,7 +4053,7 @@ global $cover_count_key;
4065
  'overflow:' . $overflow . ';' .
4066
  '"' . '
4067
  class="albumlist"
4068
- onscroll="wppaMakeLazyVisible(' . $mocc . ');"
4069
  >' );
4070
 
4071
  if ( $nice ) {
@@ -4133,7 +4121,7 @@ function wppa_get_npages( $type, $array ) {
4133
  if ( wppa( 'is_cover' ) == '1' ) { // Cover has no thumbs: 0 pages
4134
  $result = '0';
4135
  }
4136
- elseif ( $arraycount <= wppa_get_mincount() ) {
4137
  $result = '0';
4138
  }
4139
  elseif ( $tps != '0' ) {
@@ -4306,7 +4294,7 @@ function wppa_get_preambule() {
4306
  if ( ! wppa_switch( 'slide_wrap' ) && wppa( 'in_widget' ) != 'ss' ) {
4307
  return '0';
4308
  }
4309
- $result = is_numeric( wppa_opt( 'colwidth' ) ) ? wppa_opt( 'colwidth' ) : wppa_opt( 'fullsize' );
4310
  $result = ceil( ceil( $result / wppa_opt( 'thumbsize' ) ) / 2 ) + 2;
4311
  return $result;
4312
  }
@@ -5035,7 +5023,7 @@ global $wppa_upload_succes_id;
5035
  }
5036
  }
5037
  $points = '0';
5038
- $reload = wppa_switch( 'home_after_upload' ) && $done ? 'home' : false;
5039
 
5040
  // Init alert text with possible results from wppa_do_frontend_file_upload()
5041
  $alert = $wppa_alert;
@@ -5241,7 +5229,7 @@ global $wppa_alert;
5241
  $is_av = false;
5242
  }
5243
 
5244
- $status = wppa_opt( 'wppa_status_new' );
5245
  if ( wppa_switch( 'upload_moderate' ) && ! current_user_can( 'wppa_admin' ) ) {
5246
  $status = 'pending';
5247
  }
@@ -5706,14 +5694,14 @@ function wppa_get_lbtitle( $type, $id ) {
5706
  $do_download = wppa_is_video( $id ) ? false : wppa_switch( 'art_monkey_on_lightbox' );
5707
  if ( $type == 'xphoto' ) $type = 'mphoto';
5708
 
5709
- $do_name = wppa_is_item_displayable( $alb, 'name', 'ovl_'.$type.'_name' );
5710
- $do_desc = wppa_is_item_displayable( $alb, 'description', 'ovl_'.$type.'_desc' );
5711
  $do_rating = wppa_is_item_displayable( $alb, 'rating', 'ovl_rating' );
5712
 
5713
  $do_sm = wppa_switch( 'share_on_lightbox' );
5714
 
5715
  $dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ),
5716
- 'showname' => wppa_switch( 'ovl_'.$type.'_name' ),
5717
  'nobpdomain' => wppa_opt( 'art_monkey_display' ) == 'button' && $do_download,
5718
  ) );
5719
 
@@ -5741,7 +5729,7 @@ function wppa_get_lbtitle( $type, $id ) {
5741
  }
5742
  }
5743
  else {
5744
- if ( $do_name ) $result .= wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_'.$type.'_name' ) ) );
5745
  }
5746
  if ( $do_name && $do_desc ) $result .= '<br />';
5747
  if ( $do_desc ) $result .= wppa_get_photo_desc( $thumb['id'] );
@@ -6073,7 +6061,7 @@ global $wppa_lang;
6073
  if ( ! wppa_is_dir ( $root ) ) {
6074
  wppa_mktree( $root );
6075
  }
6076
- $cache_file = $root . '/' . $wppa_lang . '-' . ( is_user_logged_in() ? 'login-' : '' ) . $cache_id;
6077
 
6078
  // Cachefile present?
6079
  if ( wppa_is_file( $cache_file ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.0.00.011
7
  *
8
  */
9
 
31
  wppa_dbg_msg( 'Get=' . serialize($_GET) );
32
  wppa_dbg_msg( 'Post=' . serialize($_POST) );
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  // Process a user upload request, if any. Do it here: it may affect this occurences display
35
  wppa_user_upload();
36
 
752
  // See if the photo id is a keyword and convert it if possible
753
  if ( wppa( 'single_photo' ) && ! is_numeric( wppa( 'single_photo' ) ) ) {
754
  if ( substr( wppa( 'single_photo' ), 0, 1 ) == '#' ) { // Keyword
755
+ switch ( substr( wppa( 'single_photo' ), 0, 5 ) ) {
756
  case '#potd': // Photo of the day
757
  $t = wppa_get_potd();
758
  if ( is_array( $t ) ) {
766
  }
767
  break;
768
  case '#last': // Last upload
769
+ $t = explode( ',', wppa( 'single_photo' ) );
770
+
771
+ // Last from album??
772
+ if ( isset( $t[1] ) && is_numeric( $t[1] ) ) {
773
+ $id = wppa_get_youngest_photo_id( $t[1] );
774
+ }
775
+ // Last from album by album="" shortcode arg?
776
+ elseif ( wppa( 'start_album' ) ) {
777
+ $id = wppa_get_youngest_photo_id( wppa( 'start_album' ) );
778
+ }
779
+ // No, last from system
780
+ else {
781
+ $id = wppa_get_youngest_photo_id();
782
+ }
783
  wppa( 'start_photo', $id );
784
  break;
785
  default:
972
  }
973
  else wppa_out( '<span style="color:red">ERROR: Missing function wppa_theme(), check the installation of WPPA+. Remove customized wppa_theme.php</span>' );
974
  global $wppa_version;
975
+ $expected_version = '8.0.00.003';
976
  if ( $wppa_version != $expected_version ) {
977
  wppa_dbg_msg( 'WARNING: customized wppa-theme.php is out of rev. Expected version: ' . $expected_version . ' found: ' . $wppa_version, 'red' );
978
  }
2971
  $comment = isset( $_REQUEST['comment'] ) ? $_REQUEST['comment'] : '';
2972
  $comment = trim( $comment );
2973
  $comment = wppa_decode( $comment );
2974
+ if ( ! current_user_can( 'unfiltered_html' ) ) {
2975
+ $comment = strip_tags( $comment );
2976
+ }
2977
+ else {
2978
+ $comment = balanceTags( $comment );
2979
+ }
2980
  $save_comment = str_replace( "\n", '<br />', $comment ); // Resque newline chars
2981
  $save_comment = stripslashes( $save_comment );
2982
 
3428
  function wppa_get_slide_frame_style() {
3429
 
3430
  $fs = wppa_opt( 'fullsize' );
3431
+ $cs = $fs;
3432
+ wppa( 'auto_colwidth', true );
 
 
 
3433
  $result = '';
3434
  $gfs = ( is_numeric( wppa( 'fullsize' ) ) && wppa( 'fullsize' ) > '1' ) ? wppa( 'fullsize' ) : $fs;
3435
 
3573
  $result = wppa( 'fullsize' );
3574
  }
3575
  else {
3576
+ if ( wppa( 'max_width' ) ) {
3577
+ $result = wppa( 'max_width' );
3578
+ }
3579
+ else {
3580
+ $result = wppa_opt( 'initial_colwidth' ); //'640';
 
 
 
 
3581
  }
3582
+ wppa( 'auto_colwidth', true );
3583
  }
3584
  if ( $netto ) {
3585
+ $result -= 12; // 2*padding
3586
+ $result -= 2 * ( wppa_opt( 'bwidth' ) ? wppa_opt( 'bwidth' ) : '0' );
3587
  }
3588
  return $result;
3589
  }
3608
  // Margin
3609
  $marg = false;
3610
  if ( is_numeric( wppa( 'fullsize' ) ) ) {
3611
+ $cw = wppa_opt( 'initial_colwidth' );
3612
  if ( is_numeric( $cw ) ) {
3613
  if ( $cw > ( wppa( 'fullsize' ) + 10 ) ) {
3614
  $marg = '10px;';
3731
  }
3732
 
3733
  // Spinner for Ajax
3734
+ if ( ! wppa_in_widget() ) {
3735
 
3736
  wppa_out( wppa_get_spinner_svg_html( array( 'id' => 'wppa-ajax-spin-' . wppa( 'mocc' ),
3737
  'class' => 'wppa-ajax-spin',
3799
  wppa_out( wppa_js( "\n" . '<script type="text/javascript" >' ) );
3800
  wppa_out( wppa_js( "\n /* START OCCURRANCE " . wppa( 'mocc' ) . " */" ) );
3801
  // wppa( 'auto_colwidth' ) is set by the filter or by wppa_albums in case called directly
 
3802
  // script or call has precedence over option setting
3803
  // so: if set by script or call: auto, else if set by option: auto
3804
  $auto = false;
3805
  $contw = wppa_get_container_width();
3806
  if ( wppa( 'auto_colwidth' ) ) $auto = true;
 
3807
  elseif ( $contw > 0 && $contw <= 1.0 ) $auto = true;
3808
 
3809
  // If size explitely given and not a fraction, it is static size
3915
  break;
3916
  case 'lightbox':
3917
  case 'lightboxsingle':
3918
+ $lbkey = 'wppa'; // gives anchor tag with rel="lightbox" or the like
3919
  break;
3920
  default:
3921
  $lbkey = ''; // results in omitting the anchor tag
3993
  function wppa_container_wrapper( $key ) {
3994
  switch( $key ) {
3995
  case 'open':
3996
+ // if ( wppa( 'max_width' ) ) {
3997
  wppa_out( '<div' .
3998
  ' id="wppa-container-wrapper-' . wppa( 'mocc' ) . '"' .
3999
  ( wppa( 'align' ) == 'left' ? ' class="alignleft"' : '' ) .
4000
  ( wppa( 'align' ) == 'right' ? ' class="alignright"' : '' ) .
4001
+ ' style="position:relative;' .
4002
+ ( wppa( 'max_width' ) ? 'max-width:' . wppa( 'max_width' ) . 'px;' : '' )
4003
  );
4004
  switch( wppa( 'align' ) ) {
4005
  case 'left':
4016
  wppa_out( '"' .
4017
  ' >'
4018
  );
4019
+ // }
4020
  break;
4021
  case 'close':
4022
+ // if ( wppa( 'max_width' ) ) {
4023
  wppa_out( '</div>' );
4024
+ // }
4025
  break;
4026
  default:
4027
  wppa_dbg_msg( 'Missing or wrong arg in wppa_container_wrapper()', 'red', 'force' );
4032
  global $cover_count;
4033
  global $cover_count_key;
4034
 
4035
+ $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
4036
  $maxh = wppa_opt( 'area_size' );
4037
  $overflow = 'visible';
4038
  $mocc = wppa( 'mocc' );
4053
  'overflow:' . $overflow . ';' .
4054
  '"' . '
4055
  class="albumlist"
4056
+ onscroll="wppaMakeLazyVisibleScrollEnd(\'albumlistmocc=' . $mocc . '\');"
4057
  >' );
4058
 
4059
  if ( $nice ) {
4121
  if ( wppa( 'is_cover' ) == '1' ) { // Cover has no thumbs: 0 pages
4122
  $result = '0';
4123
  }
4124
+ elseif ( ! $arraycount ) {
4125
  $result = '0';
4126
  }
4127
  elseif ( $tps != '0' ) {
4294
  if ( ! wppa_switch( 'slide_wrap' ) && wppa( 'in_widget' ) != 'ss' ) {
4295
  return '0';
4296
  }
4297
+ $result = wppa_opt( 'initial_colwidth' );
4298
  $result = ceil( ceil( $result / wppa_opt( 'thumbsize' ) ) / 2 ) + 2;
4299
  return $result;
4300
  }
5023
  }
5024
  }
5025
  $points = '0';
5026
+ $reload = false;
5027
 
5028
  // Init alert text with possible results from wppa_do_frontend_file_upload()
5029
  $alert = $wppa_alert;
5229
  $is_av = false;
5230
  }
5231
 
5232
+ $status = wppa_opt( 'status_new' );
5233
  if ( wppa_switch( 'upload_moderate' ) && ! current_user_can( 'wppa_admin' ) ) {
5234
  $status = 'pending';
5235
  }
5694
  $do_download = wppa_is_video( $id ) ? false : wppa_switch( 'art_monkey_on_lightbox' );
5695
  if ( $type == 'xphoto' ) $type = 'mphoto';
5696
 
5697
+ $do_name = wppa_is_item_displayable( $alb, 'name', 'ovl_name' );
5698
+ $do_desc = wppa_is_item_displayable( $alb, 'description', 'ovl_desc' );
5699
  $do_rating = wppa_is_item_displayable( $alb, 'rating', 'ovl_rating' );
5700
 
5701
  $do_sm = wppa_switch( 'share_on_lightbox' );
5702
 
5703
  $dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ),
5704
+ 'showname' => wppa_switch( 'ovl_name' ),
5705
  'nobpdomain' => wppa_opt( 'art_monkey_display' ) == 'button' && $do_download,
5706
  ) );
5707
 
5729
  }
5730
  }
5731
  else {
5732
+ if ( $do_name ) $result .= wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ), 'showname' => wppa_switch( 'ovl_name' ) ) );
5733
  }
5734
  if ( $do_name && $do_desc ) $result .= '<br />';
5735
  if ( $do_desc ) $result .= wppa_get_photo_desc( $thumb['id'] );
6061
  if ( ! wppa_is_dir ( $root ) ) {
6062
  wppa_mktree( $root );
6063
  }
6064
+ $cache_file = $root . '/' . $wppa_lang . '-' . ( is_user_logged_in() ? 'login-' : '' ) . ( wppa_is_mobile() ? 'mobile-' : '' ) . $cache_id;
6065
 
6066
  // Cachefile present?
6067
  if ( wppa_is_file( $cache_file ) ) {
wppa-gp-widget.php DELETED
@@ -1,161 +0,0 @@
1
- <?php
2
- /* wppa-gp-widget.php
3
- * Package: wp-photo-album-plus
4
- *
5
- * A text widget that interpretes wppa shortcodes
6
- *
7
- * Version 7.3.08
8
- */
9
-
10
- class WppaGpWidget extends WP_Widget {
11
-
12
- function __construct() {
13
- $widget_ops = array( 'classname' => 'wppa_gp_widget', 'description' => __( 'General purpose widget that may contain [wppa] shortcodes', 'wp-photo-album-plus' ) );
14
- parent::__construct( 'wppa_gp_widget', __( 'WPPA+ Text', 'wp-photo-album-plus' ), $widget_ops );
15
- }
16
-
17
- function widget( $args, $instance ) {
18
-
19
- // Initialize
20
- wppa_widget_timer( 'init' );
21
- wppa_reset_occurrance();
22
- wppa( 'in_widget', 'gp' );
23
- wppa_bump_mocc();
24
- extract( $args );
25
- $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
26
- $widget_title = apply_filters( 'widget_title', $instance['title'] );
27
- $cache = $instance['cache'];
28
- $cachefile = wppa_get_widget_cache_path( $this->id );
29
-
30
- // Logged in only and logged out?
31
- if ( wppa_checked( $instance['logonly'] ) && ! is_user_logged_in() ) {
32
- return;
33
- }
34
-
35
- // Cache?
36
- if ( $cache ) {
37
-
38
- if ( wppa_is_file( $cachefile ) ) {
39
-
40
- // Cache expired?
41
- if ( $cache != 'inf' && wppa_filetime( $cachefile ) < time() - 60 * $cache ) {
42
- wppa_remove_widget_cache_path( $this->id );
43
- }
44
-
45
- // No, use it
46
- else {
47
- echo wppa_get_contents( $cachefile );
48
- echo wppa_widget_timer( 'show', $widget_title, true );
49
- wppa( 'in_widget', false );
50
- return;
51
- }
52
- }
53
- }
54
-
55
- // Other inits
56
-
57
- // Body
58
- $text = $instance['text'];
59
- $text = __( $text );
60
- if ( wppa_checked( $instance['filter'] ) ) { // Do wpautop BEFORE do_shortcode
61
- $text = wpautop( $text );
62
- }
63
- $text = do_shortcode( $text );
64
- $text = apply_filters( 'widget_text', $text ); // If shortcode at wppa filter priority, insert result. See wppa-filter.php
65
-
66
- $widget_content = '
67
- <div' .
68
- ' class="wppa-gp-widget"' .
69
- ' style="margin-top:2px; margin-left:2px;"' .
70
- ' data-wppa="yes"' .
71
- ' >' .
72
- $text .
73
- '</div>' .
74
- '<div style="clear:both"></div>';
75
-
76
- // Output
77
- $result = "\n" . $before_widget;
78
- if ( ! empty( $widget_title ) ) {
79
- $result .= $before_title . $widget_title . $after_title;
80
- }
81
- $result .= $widget_content . $after_widget;
82
-
83
- echo $result;
84
- echo wppa_widget_timer( 'show', $widget_title );
85
-
86
- // Cache?
87
- if ( $cache ) {
88
- wppa_put_contents( $cachefile, $result );
89
- }
90
-
91
- wppa( 'in_widget', false );
92
- wppa( 'fullsize', '' ); // Reset to prevent inheritage of wrong size in case widget is rendered before main column
93
-
94
- }
95
-
96
- function update( $new_instance, $old_instance ) {
97
-
98
- // Completize all parms
99
- $instance = wppa_parse_args( $new_instance, $this->get_defaults() );
100
-
101
- // Sanitize certain args
102
- $instance['title'] = strip_tags( $instance['title'] );
103
- if ( current_user_can('unfiltered_html') ) {
104
- $instance['text'] = $new_instance['text'];
105
- }
106
- else {
107
- $instance['text'] = stripslashes( wp_filter_post_kses( addslashes( $new_instance['text'] ) ) ); // wp_filter_post_kses() expects slashed
108
- }
109
-
110
- wppa_remove_widget_cache_path( $this->id );
111
-
112
- return $instance;
113
-
114
- }
115
-
116
- function form( $instance ) {
117
-
118
- // Defaults
119
- $instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
120
-
121
- // Widget title
122
- echo
123
- wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
124
-
125
- // Text area
126
- echo
127
- wppa_widget_textarea( $this, 'text', $instance['text'], __( 'Enter the content just like a normal text widget. This widget will interpret [wppa] shortcodes', 'wp-photo-album-plus' ) );
128
-
129
- // Run wpautop?
130
- echo
131
- wppa_widget_checkbox( $this, 'filter', $instance['filter'], __( 'Automatically add paragraphs', 'wp-photo-album-plus' ) );
132
-
133
- // Logged in only?
134
- echo
135
- wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
136
-
137
- // Cache
138
- echo
139
- wppa_widget_cache( $this, $instance['cache'] );
140
-
141
- }
142
-
143
- // Set defaults
144
- function get_defaults() {
145
-
146
- $defaults = array( 'title' => __( 'Text', 'wp-photo-album-plus' ),
147
- 'text' => '',
148
- 'filter' => 'no',
149
- 'logonly' => 'no',
150
- 'cache' => '0',
151
- );
152
- return $defaults;
153
- }
154
-
155
- }
156
- // register WppaGpWidget widget
157
- add_action( 'widgets_init', 'wppa_register_WppaGpWidget' );
158
-
159
- function wppa_register_WppaGpWidget() {
160
- register_widget( "WppaGpWidget" );
161
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wppa-gutenberg-wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-gutenberg-wppa.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 7.5.10
6
  */
7
 
8
  function wppa_gutenberg_wppa_block() {
@@ -46,10 +46,8 @@ global $wpdb;
46
  }
47
  else {
48
  $albums = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY timestamp DESC", ARRAY_A );
49
- if ( wppa_switch( 'hier_albsel' ) ) {
50
- $albums = wppa_add_paths( $albums );
51
- $albums = wppa_array_sort( $albums, 'name' );
52
- }
53
  }
54
 
55
  // Prepare photoinfo
@@ -69,14 +67,9 @@ global $wpdb;
69
 
70
  if ( $pages ) {
71
 
72
- // Add parents optionally OR translate only
73
- if ( wppa_switch( 'hier_pagesel' ) ) $pages = wppa_add_parents( $pages );
74
-
75
- // Just translate
76
- else {
77
- foreach ( array_keys( $pages ) as $index ) {
78
- $pages[$index]['post_title'] = __( stripslashes($pages[$index]['post_title'] ) );
79
- }
80
  }
81
 
82
  // Sort alpahbetically
2
  /* wppa-gutenberg-wppa.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 8.0.00.007
6
  */
7
 
8
  function wppa_gutenberg_wppa_block() {
46
  }
47
  else {
48
  $albums = $wpdb->get_results( "SELECT id, name FROM $wpdb->wppa_albums ORDER BY timestamp DESC", ARRAY_A );
49
+ $albums = wppa_add_paths( $albums );
50
+ $albums = wppa_array_sort( $albums, 'name' );
 
 
51
  }
52
 
53
  // Prepare photoinfo
67
 
68
  if ( $pages ) {
69
 
70
+ // Translate page titles
71
+ foreach ( array_keys( $pages ) as $index ) {
72
+ $pages[$index]['post_title'] = __( stripslashes($pages[$index]['post_title'] ) );
 
 
 
 
 
73
  }
74
 
75
  // Sort alpahbetically
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 7.7.07.006
7
  *
8
  */
9
 
@@ -613,11 +613,6 @@ global $wppa_session;
613
  printf( _n( 'There is %d possible photo found remote', 'There are %d possible photos found remote', $photocount, 'wp-photo-album-plus' ), $photocount );
614
  }
615
 
616
- // Tell if downsize on
617
- if ( wppa_switch( 'resize_on_upload' ) ) {
618
- echo ' ' . __( 'Photos will be downsized during import.', 'wp-photo-album-plus' );
619
- }
620
-
621
  echo
622
  '</b></p>';
623
 
@@ -625,7 +620,7 @@ global $wppa_session;
625
  echo
626
  '<p class="hideifupdate" >' .
627
  __( 'Default album for import:', 'wp-photo-album-plus') .
628
- wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
629
  'selected' => wppa_get_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' ),
630
  'addpleaseselect' => true,
631
  'checkowner' => true,
@@ -923,7 +918,7 @@ global $wppa_session;
923
  echo
924
  '<p class="hideifupdate" >' .
925
  __( 'Album to import to:', 'wp-photo-album-plus') .
926
- wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
927
  'selected' => wppa_get_option( 'wppa-video-album-import-'.wppa_get_user(), '0' ),
928
  'addpleaseselect' => true,
929
  'checkowner' => true,
@@ -1038,7 +1033,7 @@ global $wppa_session;
1038
  echo
1039
  '<p class="hideifupdate" >' .
1040
  __( 'Album to import to:', 'wp-photo-album-plus') .
1041
- wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
1042
  'selected' => wppa_get_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' ),
1043
  'addpleaseselect' => true,
1044
  'checkowner' => true,
@@ -1229,7 +1224,7 @@ global $wppa_session;
1229
  echo
1230
  '<p class="hideifupdate" >' .
1231
  __( 'Album to import to:', 'wp-photo-album-plus') .
1232
- wppa_album_select_a( array( 'path' => wppa_switch( 'hier_albsel' ),
1233
  'selected' => wppa_get_option( 'wppa-document-album-import-'.wppa_get_user(), '0' ),
1234
  'addpleaseselect' => true,
1235
  'checkowner' => true,
@@ -1808,28 +1803,7 @@ global $wppa_session;
1808
  // Send emails after backend upload
1809
  function wppa_backend_upload_mail( $id, $alb, $name ) {
1810
  return;
1811
- $owner = wppa_get_user();
1812
- if ( $owner == 'admin' ) return; // Admin does not send mails to himself
1813
-
1814
- if ( wppa_switch( 'upload_backend_notify' ) ) {
1815
- $to = get_bloginfo( 'admin_email' );
1816
- $subj = sprintf( __( 'New photo uploaded: %s', 'wp-photo-album-plus'), wppa_sanitize_file_name( $name ) );
1817
- $cont['0'] = sprintf( __( 'User %1$s uploaded photo %2$s into album %3$s', 'wp-photo-album-plus'), $owner, $id, wppa_get_album_name( $alb ) );
1818
- if ( wppa_switch( 'upload_moderate' ) && !current_user_can( 'wppa_admin' ) ) {
1819
- $cont['1'] = __( 'This upload requires moderation', 'wp-photo-album-plus' );
1820
- $cont['2'] = '<a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Moderate manage photo', 'wp-photo-album-plus').'</a>';
1821
- }
1822
- else {
1823
- $cont['1'] = __( 'Details:', 'wp-photo-album-plus' );
1824
- $cont['1'] .= ' <a href="'.get_admin_url().'admin.php?page=wppa_admin_menu&tab=pmod&photo='.$id.'" >'.__( 'Manage photo', 'wp-photo-album-plus').'</a>';
1825
- }
1826
- wppa_send_mail( array( 'to' => $to,
1827
- 'subj' => $subj,
1828
- 'cont' => $cont,
1829
- 'photo' => $id,
1830
- 'listtype' => 'importbackend',
1831
- ));
1832
- }
1833
  }
1834
 
1835
  // Do the import photos
@@ -2230,7 +2204,7 @@ global $wppa_session;
2230
  if ( basename( $file ) != '.' && basename( $file ) != '..' && ( isset( $_POST['file-'.$idx] ) || isset( $_GET['continue'] ) ) ) {
2231
  if ( wppa_is_dir( $file ) ) {
2232
  $iret = wppa_import_dir_to_album( $file, '0' );
2233
- if ( wppa_is_time_up() && wppa_switch( 'auto_continue' ) ) {
2234
  wppa( 'continue', 'continue' );
2235
  }
2236
  $dircount++;
@@ -2563,7 +2537,7 @@ global $wppa_session;
2563
  }
2564
 
2565
  // Time up?
2566
- if ( wppa_is_time_up() && wppa_switch( 'auto_continue' ) ) {
2567
  wppa( 'continue', 'continue' );
2568
 
2569
  // Copy rest of file back to original
@@ -2810,7 +2784,7 @@ global $wppa_session;
2810
 
2811
 
2812
  // Time up?
2813
- if ( wppa_is_time_up() && wppa_switch( 'auto_continue' ) ) {
2814
  wppa( 'continue', 'continue' );
2815
 
2816
  // Copy rest of file back to original
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 8.0.00.007
7
  *
8
  */
9
 
613
  printf( _n( 'There is %d possible photo found remote', 'There are %d possible photos found remote', $photocount, 'wp-photo-album-plus' ), $photocount );
614
  }
615
 
 
 
 
 
 
616
  echo
617
  '</b></p>';
618
 
620
  echo
621
  '<p class="hideifupdate" >' .
622
  __( 'Default album for import:', 'wp-photo-album-plus') .
623
+ wppa_album_select_a( array( 'path' => true,
624
  'selected' => wppa_get_option( 'wppa-photo-album-import-'.wppa_get_user(), '0' ),
625
  'addpleaseselect' => true,
626
  'checkowner' => true,
918
  echo
919
  '<p class="hideifupdate" >' .
920
  __( 'Album to import to:', 'wp-photo-album-plus') .
921
+ wppa_album_select_a( array( 'path' => true,
922
  'selected' => wppa_get_option( 'wppa-video-album-import-'.wppa_get_user(), '0' ),
923
  'addpleaseselect' => true,
924
  'checkowner' => true,
1033
  echo
1034
  '<p class="hideifupdate" >' .
1035
  __( 'Album to import to:', 'wp-photo-album-plus') .
1036
+ wppa_album_select_a( array( 'path' => true,
1037
  'selected' => wppa_get_option( 'wppa-audio-album-import-'.wppa_get_user(), '0' ),
1038
  'addpleaseselect' => true,
1039
  'checkowner' => true,
1224
  echo
1225
  '<p class="hideifupdate" >' .
1226
  __( 'Album to import to:', 'wp-photo-album-plus') .
1227
+ wppa_album_select_a( array( 'path' => true,
1228
  'selected' => wppa_get_option( 'wppa-document-album-import-'.wppa_get_user(), '0' ),
1229
  'addpleaseselect' => true,
1230
  'checkowner' => true,
1803
  // Send emails after backend upload
1804
  function wppa_backend_upload_mail( $id, $alb, $name ) {
1805
  return;
1806
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1807
  }
1808
 
1809
  // Do the import photos
2204
  if ( basename( $file ) != '.' && basename( $file ) != '..' && ( isset( $_POST['file-'.$idx] ) || isset( $_GET['continue'] ) ) ) {
2205
  if ( wppa_is_dir( $file ) ) {
2206
  $iret = wppa_import_dir_to_album( $file, '0' );
2207
+ if ( wppa_is_time_up() ) {
2208
  wppa( 'continue', 'continue' );
2209
  }
2210
  $dircount++;
2537
  }
2538
 
2539
  // Time up?
2540
+ if ( wppa_is_time_up() ) {
2541
  wppa( 'continue', 'continue' );
2542
 
2543
  // Copy rest of file back to original
2784
 
2785
 
2786
  // Time up?
2787
+ if ( wppa_is_time_up() ) {
2788
  wppa( 'continue', 'continue' );
2789
 
2790
  // Copy rest of file back to original
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 7.7.04.007
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -13,7 +13,6 @@ require_once 'wppa-search-widget.php';
13
  require_once 'wppa-topten-widget.php';
14
  require_once 'wppa-featen-widget.php';
15
  require_once 'wppa-slideshow-widget.php';
16
- require_once 'wppa-gp-widget.php';
17
  require_once 'wppa-comment-widget.php';
18
  require_once 'wppa-thumbnail-widget.php';
19
  require_once 'wppa-lasten-widget.php';
@@ -76,13 +75,12 @@ if ( PHP_VERSION_ID >= 50300 ) require_once 'wppa-cloudinary.php';
76
  /* DO THE ADMIN/NON ADMIN SPECIFIC STUFF */
77
  if ( is_admin() ) {
78
  require_once 'wppa-admin.php';
 
79
  }
80
  require_once 'wppa-non-admin.php';
81
 
82
  /* ADD AJAX */
83
- if ( defined( 'DOING_AJAX' ) ) {
84
- require_once 'wppa-ajax.php';
85
- }
86
 
87
  // To fix a problem in Windows local host systems:
88
  function wppa_trims( $txt ) {
@@ -211,7 +209,7 @@ global $blog_id;
211
 
212
  global $wppa_log_file;
213
  $wppa_log_file = WPPA_UPLOAD_PATH . '/wppa-log.txt';
214
-
215
  define ( 'WPPA_LOCKDIR', WPPA_UPLOAD_PATH . '/locks' );
216
  }
217
 
@@ -246,7 +244,6 @@ function wppa_admin_bar_init() {
246
  current_user_can('wppa_moderate') ||
247
  current_user_can('wppa_export') ||
248
  current_user_can('wppa_settings') ||
249
- current_user_can('wppa_potd') ||
250
  current_user_can('wppa_comments') ||
251
  current_user_can('wppa_help') ) {
252
  require_once 'wppa-adminbar.php';
@@ -255,28 +252,40 @@ function wppa_admin_bar_init() {
255
  }
256
 
257
  function wppa_maintenance_messages() {
258
- global $pagenow;
259
 
260
  if ( ! current_user_can( 'wppa_settings' ) ) {
261
  return;
262
  }
263
 
264
- // Rerate required?
265
- if ( wppa_get_option( 'wppa_rating_on' ) == 'yes' && wppa_get_option( 'wppa_rerate_status' ) ) {
266
- if ( strpos( wppa_get_option( 'wppa_rerate_user' ), 'cron' ) === false ) {
267
- wppa_error_message( __('The avarage ratings need to be recalculated. Please run <i>Photo Albums -> Settings</i> admin page <i>Table VIII-A5</i>' , 'wp-photo-album-plus') );
268
- }
269
- }
270
-
271
  // Cron jobs postponed?
272
  if ( wppa_get_option( 'wppa_maint_ignore_cron' ) == 'yes' ) {
273
- wppa_warning_message( __( 'Please do not forget to re-enable cron jobs for wppa when you are ready doing your bulk actions. See <i>Table VIII-A0</i>', 'wp-photo-album-plus') );
274
  }
275
 
276
- // Finish setup
277
- if ( wppa_get_option( 'wppa_prevrev' ) == '100' && wppa_get_option('wppa_i_done') != 'done' && $_SERVER['QUERY_STRING'] != 'page=wppa_options' ) {
278
- wppa_ok_message( __('Please finish setting up WP Photo Album Plus on', 'wp-photo-album-plus') . ' <a href="'.get_admin_url().'admin.php?page=wppa_options">' . __('this page', 'wp-photo-album-plus') . '</a>' );
 
 
 
 
 
 
279
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  }
281
 
282
  function wppa_check_tag_system() {
@@ -298,7 +307,7 @@ global $wpdb;
298
  }
299
  }
300
  function wppa_tag_message() {
301
- wppa_error_message( __('</strong>The tags system needs to be converted. Please run <b>Photo Albums -> Settings</b> admin page <b>Table VIII-B16</b><strong>' , 'wp-photo-album-plus') );
302
  }
303
 
304
  function wppa_check_cat_system() {
@@ -320,7 +329,7 @@ global $wpdb;
320
  }
321
  }
322
  function wppa_cat_message() {
323
- wppa_error_message( __('</strong>The cats system needs to be converted. Please run <b>Photo Albums -> Settings</b> admin page <b>Table VIII-B17</b><strong>' , 'wp-photo-album-plus') );
324
  }
325
 
326
  // Print admin messages on config conflicts
@@ -335,7 +344,8 @@ global $wpdb;
335
  $nalbs = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_albums" );
336
  $ualbs = $wpdb->get_col( "SELECT DISTINCT name FROM $wpdb->wppa_albums" );
337
  if ( $nalbs > count ( $ualbs ) ) {
338
- $text .= '<br />' . __( 'Table IV-A4: Album names in urls is activated, but there are duplicate album names.', 'wp-photo-album-plus' );
 
339
  $any = true;
340
  }
341
  }
@@ -470,12 +480,10 @@ global $thegallery;
470
  $thealbum = __( 'the album', 'wp-photo-album-plus' );
471
  $thegallery = __( 'the gallery', 'wp-photo-album-plus' );
472
 
 
 
 
473
 
474
- if ( class_exists( 'WPGlobus_Core' ) || get_option( 'wppa_translate', 'no' ) == 'yes' ) {
475
- add_filter( 'gettext', 'wppa_translate' );
476
- add_filter( 'widget_title', 'wppa_translate', 1 );
477
- add_filter( 'translate_text', 'wppa_translate', 1 );
478
- }
479
  if ( get_option( 'wppa_album_use_gallery', 'no' ) == 'yes' ) {
480
  add_filter( 'gettext', 'wppa_album_to_gallery', 100 );
481
  }
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 8.0.00.012
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
13
  require_once 'wppa-topten-widget.php';
14
  require_once 'wppa-featen-widget.php';
15
  require_once 'wppa-slideshow-widget.php';
 
16
  require_once 'wppa-comment-widget.php';
17
  require_once 'wppa-thumbnail-widget.php';
18
  require_once 'wppa-lasten-widget.php';
75
  /* DO THE ADMIN/NON ADMIN SPECIFIC STUFF */
76
  if ( is_admin() ) {
77
  require_once 'wppa-admin.php';
78
+ require_once 'wppa-setting-see-also.php';
79
  }
80
  require_once 'wppa-non-admin.php';
81
 
82
  /* ADD AJAX */
83
+ require_once 'wppa-ajax.php';
 
 
84
 
85
  // To fix a problem in Windows local host systems:
86
  function wppa_trims( $txt ) {
209
 
210
  global $wppa_log_file;
211
  $wppa_log_file = WPPA_UPLOAD_PATH . '/wppa-log.txt';
212
+
213
  define ( 'WPPA_LOCKDIR', WPPA_UPLOAD_PATH . '/locks' );
214
  }
215
 
244
  current_user_can('wppa_moderate') ||
245
  current_user_can('wppa_export') ||
246
  current_user_can('wppa_settings') ||
 
247
  current_user_can('wppa_comments') ||
248
  current_user_can('wppa_help') ) {
249
  require_once 'wppa-adminbar.php';
252
  }
253
 
254
  function wppa_maintenance_messages() {
 
255
 
256
  if ( ! current_user_can( 'wppa_settings' ) ) {
257
  return;
258
  }
259
 
 
 
 
 
 
 
 
260
  // Cron jobs postponed?
261
  if ( wppa_get_option( 'wppa_maint_ignore_cron' ) == 'yes' ) {
262
+ wppa_warning_message( __( 'Please do not forget to re-enable cron jobs for wppa when you are ready doing your bulk actions', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '0', '', '', true ) );
263
  }
264
 
265
+ // Check for pending actions
266
+ if ( wppa_get_option( 'wppa_remove_empty_albums_status' ) && wppa_get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) {
267
+ wppa_warning_message( __( 'Remove empty albums needs completion.', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '31', '', '', true ) );
268
+ }
269
+ if ( wppa_get_option( 'wppa_apply_new_photodesc_all_status' ) && wppa_get_option( 'wppa_apply_new_photodesc_all_user', wppa_get_user() ) == wppa_get_user() ) {
270
+ wppa_warning_message( __( 'Applying new photo description needs completion.', 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '28', '', '', true ) );
271
+ }
272
+ if ( wppa_get_option( 'wppa_append_to_photodesc_status' ) && wppa_get_option( 'wppa_append_to_photodesc_user', wppa_get_user() ) == wppa_get_user() ) {
273
+ wppa_warning_message( __( 'Appending to photo description needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '29', '', '', true ) );
274
  }
275
+ if ( wppa_get_option( 'wppa_remove_from_photodesc_status' ) && wppa_get_option( 'wppa_remove_from_photodesc_user', wppa_get_user() ) == wppa_get_user() ) {
276
+ wppa_warning_message( __( 'Removing from photo description needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '30', '', '', true ) );
277
+ }
278
+ if ( wppa_get_option( 'wppa_remove_file_extensions_status' ) && wppa_get_option( 'wppa_remove_file_extensions_user', wppa_get_user() ) == wppa_get_user() ) {
279
+ wppa_warning_message( __( 'Removing file extensions needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '32', '', '', true ) );
280
+ }
281
+ if ( wppa_get_option( 'wppa_regen_thumbs_status' ) && wppa_get_option( 'wppa_regen_thumbs_user', wppa_get_user() ) == wppa_get_user() ) {
282
+ wppa_warning_message( __( 'Regenerating the Thumbnails needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '4', '', '', true ) );
283
+ }
284
+ if ( wppa_get_option( 'wppa_rerate_status' ) && wppa_get_option( 'wppa_rerate_user', wppa_get_user() ) == wppa_get_user() ) {
285
+ wppa_warning_message( __( 'Rerating needs completion.' , 'wp-photo-album-plus') . wppa_see_also( 'maintenance', '1', '5', '', '', true ) );
286
+ }
287
+
288
+
289
  }
290
 
291
  function wppa_check_tag_system() {
307
  }
308
  }
309
  function wppa_tag_message() {
310
+ wppa_error_message( __('The tags system needs to be converted. Please run <i>Photo Albums -> Settings -> Advanced settings -> Maintenance -> Item 44</i>' , 'wp-photo-album-plus') );
311
  }
312
 
313
  function wppa_check_cat_system() {
329
  }
330
  }
331
  function wppa_cat_message() {
332
+ wppa_error_message( __('The cats system needs to be converted. Please run <i>Photo Albums -> Settings -> Advanced settings -> Maintenance -> Item 45</i>' , 'wp-photo-album-plus') );
333
  }
334
 
335
  // Print admin messages on config conflicts
344
  $nalbs = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_albums" );
345
  $ualbs = $wpdb->get_col( "SELECT DISTINCT name FROM $wpdb->wppa_albums" );
346
  if ( $nalbs > count ( $ualbs ) ) {
347
+ $text .= '<br />' . __( 'Album names in urls is activated, but there are duplicate album names.', 'wp-photo-album-plus' ) .
348
+ '<br />' . wppa_see_also( 'system', '1', '5' );
349
  $any = true;
350
  }
351
  }
480
  $thealbum = __( 'the album', 'wp-photo-album-plus' );
481
  $thegallery = __( 'the gallery', 'wp-photo-album-plus' );
482
 
483
+ add_filter( 'gettext', 'wppa_translate' );
484
+ add_filter( 'widget_title', 'wppa_translate', 1 );
485
+ add_filter( 'translate_text', 'wppa_translate', 1 );
486
 
 
 
 
 
 
487
  if ( get_option( 'wppa_album_use_gallery', 'no' ) == 'yes' ) {
488
  add_filter( 'gettext', 'wppa_album_to_gallery', 100 );
489
  }
wppa-lasten-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
- * Version 7.3.12
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
@@ -100,43 +100,43 @@ class LasTenWidget extends WP_Widget {
100
 
101
  // Non private
102
  $non_private = is_user_logged_in() ? "" : "AND status <> 'private' ";
103
-
104
  // If you want only 'New' photos in the selection, the period must be <> 0;
105
  if ( wppa_switch( 'lasten_limit_new' ) && wppa_opt( 'max_photo_newtime' ) ) {
106
  $newtime = " " . $order_by . " >= ".( time() - wppa_opt( 'max_photo_newtime' ) );
107
  if ( $album ) {
108
- $q = "SELECT * FROM $wpdb->wppa_photos
109
- WHERE (".$newtime.")
110
- AND album IN ( ".$album." )
111
- AND status <> 'pending'
112
- AND status <> 'scheduled'
113
  $non_private
114
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
115
  }
116
  else {
117
- $q = "SELECT * FROM $wpdb->wppa_photos
118
- WHERE (".$newtime.")
119
- AND album > 0
120
- AND status <> 'pending'
121
- AND status <> 'scheduled'
122
  $non_private
123
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
124
  }
125
  }
126
  else {
127
  if ( $album ) {
128
- $q = "SELECT * FROM $wpdb->wppa_photos
129
- WHERE album IN ( ".$album." )
130
- AND status <> 'pending'
131
- AND status <> 'scheduled'
132
  $non_private
133
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
134
  }
135
  else {
136
- $q = "SELECT * FROM $wpdb->wppa_photos
137
- WHERE album > 0
138
- AND status <> 'pending'
139
- AND status <> 'scheduled'
140
  $non_private
141
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
142
  }
@@ -248,7 +248,7 @@ class LasTenWidget extends WP_Widget {
248
  'addall' => true,
249
  'addmultiple' => true,
250
  'addnumbers' => true,
251
- 'path' => wppa_switch( 'hier_albsel' ),
252
  ) );
253
  echo
254
  wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the last uploaded photos
6
+ * Version 8.0.00.007
7
  */
8
 
9
  class LasTenWidget extends WP_Widget {
100
 
101
  // Non private
102
  $non_private = is_user_logged_in() ? "" : "AND status <> 'private' ";
103
+
104
  // If you want only 'New' photos in the selection, the period must be <> 0;
105
  if ( wppa_switch( 'lasten_limit_new' ) && wppa_opt( 'max_photo_newtime' ) ) {
106
  $newtime = " " . $order_by . " >= ".( time() - wppa_opt( 'max_photo_newtime' ) );
107
  if ( $album ) {
108
+ $q = "SELECT * FROM $wpdb->wppa_photos
109
+ WHERE (".$newtime.")
110
+ AND album IN ( ".$album." )
111
+ AND status <> 'pending'
112
+ AND status <> 'scheduled'
113
  $non_private
114
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
115
  }
116
  else {
117
+ $q = "SELECT * FROM $wpdb->wppa_photos
118
+ WHERE (".$newtime.")
119
+ AND album > 0
120
+ AND status <> 'pending'
121
+ AND status <> 'scheduled'
122
  $non_private
123
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
124
  }
125
  }
126
  else {
127
  if ( $album ) {
128
+ $q = "SELECT * FROM $wpdb->wppa_photos
129
+ WHERE album IN ( ".$album." )
130
+ AND status <> 'pending'
131
+ AND status <> 'scheduled'
132
  $non_private
133
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
134
  }
135
  else {
136
+ $q = "SELECT * FROM $wpdb->wppa_photos
137
+ WHERE album > 0
138
+ AND status <> 'pending'
139
+ AND status <> 'scheduled'
140
  $non_private
141
  ORDER BY " . $order_by . " DESC LIMIT " . $max;
142
  }
248
  'addall' => true,
249
  'addmultiple' => true,
250
  'addnumbers' => true,
251
+ 'path' => true,
252
  ) );
253
  echo
254
  wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) );
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 7.7.06.001
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -100,11 +100,6 @@ global $wppa_locale;
100
  else $pl .= 'debug='.wppa( 'debug' ).'&amp;';
101
  }
102
 
103
- if ( wppa_switch( 'add_locale' ) ) {
104
- if ( $key == 'js' ) $pl .= 'wppalocale=' . $wppa_locale . '&';
105
- else $pl .= 'wppalocale=' . $wppa_locale . '&amp;';
106
- }
107
-
108
  return $pl;
109
  }
110
 
@@ -116,8 +111,8 @@ global $wppa_runtime_settings;
116
 
117
  if ( ! $key && is_search() ) $key = wppa_opt( 'search_linkpage' );
118
 
119
- if ( wppa_switch( 'ajax_non_admin' ) ) {
120
- $al = WPPA_URL.'/wppa-ajax-front.php?action=wppa&amp;wppa-action=render';
121
  }
122
  else {
123
  $al = admin_url( 'admin-ajax.php' ).'?action=wppa&amp;wppa-action=render';
@@ -170,11 +165,6 @@ global $wppa_runtime_settings;
170
  $al .= '&amp;debug=' . wppa( 'debug' );
171
  }
172
 
173
- if ( wppa_switch( 'add_locale' ) ) {
174
- if ( $key == 'js' ) $al .= '&wppalocale=' . $wppa_locale;
175
- else $al .= '&amp;wppalocale=' . $wppa_locale;
176
- }
177
-
178
  if ( is_array( $wppa_runtime_settings ) ) {
179
  foreach( array_keys( $wppa_runtime_settings ) as $key ) {
180
  $value = $wppa_runtime_settings[$key];
@@ -960,17 +950,7 @@ function wppa_moderate_links( $type, $id, $comid = '' ) {
960
 
961
  $thumb = wppa_cache_thumb( $id );
962
 
963
- if ( wppa_switch( 'fe_links_owner_only' ) ) {
964
- if ( ! wppa_user_is( 'administrator' ) ) {
965
- if ( $thumb['owner'] != wppa_get_user() ) {
966
- return;
967
- }
968
- }
969
- }
970
-
971
- $result = '';
972
-
973
- if ( current_user_can('wppa_moderate') || ( current_user_can('wppa_comments') && $type == 'comment' ) ) {
974
  switch ( $type ) {
975
  case 'thumb':
976
  $app = __('App', 'wp-photo-album-plus');
@@ -1268,90 +1248,30 @@ global $previous_page_last_id;
1268
  $result .=
1269
  '<div' .
1270
  ' style="float:left;text-align:left;'.$vis.'"' .
1271
- ' >';
1272
-
1273
- if ( wppa_switch( 'allow_ajax') ) {
1274
- $result .=
1275
- '<a' .
1276
- ' style="cursor:pointer;"' .
1277
- ' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
1278
- ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty ( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\' )"' .
1279
- ' >' .
1280
- wppa_get_svghtml( 'Prev-Button', $iconsize ) .
1281
- '</a>';
1282
- }
1283
- else {
1284
- $result .=
1285
- '<a' .
1286
- ' style="cursor:pointer;"' .
1287
- ' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
1288
- ' href="' . $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '"' .
1289
- ' >' .
1290
- wppa_get_svghtml( 'Prev-Button', $iconsize ) .
1291
- '</a>';
1292
- }
1293
- $result .=
1294
- '</div><!-- #prev-page -->';
1295
 
1296
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1297
  $result .=
1298
- '<div' .
1299
- ' style="float:right;text-align:right;' . $vis . '"' .
1300
- ' >';
1301
- if ( wppa_switch( 'allow_ajax') ) {
1302
- $result .=
1303
- '<a' .
1304
- ' id="wppa-next-pagelink-' . $mocc . '"' .
1305
- ' style="cursor:pointer;"' .
1306
- ' title="' . esc_attr( __( 'Next page', 'wp-photo-album-plus' ) ) . '"' .
1307
- ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"' .
1308
- ' >' .
1309
- wppa_get_svghtml( 'Next-Button', $iconsize ) .
1310
- '</a>';
1311
- /*
1312
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1313
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1314
- if ( wppa( 'is_slide' ) ) $result .= '
1315
- <a
1316
- id="wppa-first-pagelink-' . $mocc . '"
1317
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1318
- >
1319
- </a>
1320
- <a
1321
- id="wppa-prev-page-last-item"
1322
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1323
- >
1324
- </a>';
1325
- */
1326
- }
1327
- else {
1328
- $result .=
1329
- '<a' .
1330
- ' id="wppa-next-pagelink-' . $mocc . '"' .
1331
- ' style="cursor:pointer;"' .
1332
- ' href="' . $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '"' .
1333
- ' >' .
1334
- wppa_get_svghtml( 'Next-Button', $iconsize ) .
1335
- '</a>';
1336
- /*
1337
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1338
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1339
- if ( wppa( 'is_slide' ) ) $result .= '
1340
- <a
1341
- id="wppa-first-pagelink-' . $mocc . '"
1342
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1343
- >
1344
- </a>
1345
- <a
1346
- id="wppa-prev-page-last-item"
1347
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1348
- >
1349
- </a>';
1350
- */
1351
- }
1352
-
1353
- $result .=
1354
- '</div><!-- #next-page -->';
1355
 
1356
  // The numbered pagelinks ?
1357
  if ( wppa_opt( 'pagelinks_max' ) ) {
@@ -1373,27 +1293,16 @@ global $previous_page_last_id;
1373
  '<div' .
1374
  ' class="wppa-mini-box wppa-even"' .
1375
  ' style="display:inline;text-align:center;' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) .'"' .
1376
- ' >';
1377
- if ( ( ! $slide && wppa_switch( 'allow_ajax') ) || ( $slide && wppa_switch( 'slideshow_page_allow_ajax') ) ) {
1378
- $result .=
1379
- '<a' .
1380
- ' id="wppa-pagelink-' . $mocc . '-' . $i . '"' .
1381
- ' style="cursor:pointer;"' .
1382
- ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"' .
1383
- ' >' .
1384
- '&nbsp;' . $i . '&nbsp;' .
1385
- '</a>';
1386
- }
1387
- else {
1388
- $result .=
1389
- '<a' .
1390
- ' id="wppa-pagelink-' . $mocc . '-' . $i . '"' .
1391
- ' style="cursor:pointer;"' .
1392
- ' href="' . $link_url . '&amp;wppa-page=' . $i . '"' .
1393
- ' >' .
1394
- '&nbsp;' . $i . '&nbsp;' .
1395
- '</a>';
1396
- }
1397
  $result .=
1398
  '</div>';
1399
  }
@@ -1446,91 +1355,33 @@ global $previous_page_last_id;
1446
  >
1447
  <span
1448
  class="wppa-arrow"
1449
- style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&laquo;&nbsp;</span
1450
- >';
1451
- if ( wppa_switch( 'allow_ajax' ) ) {
1452
- $result .= '
1453
- <a
1454
- style="cursor:pointer;"
1455
- onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\')"
1456
- >' .
1457
- __( 'Previous', 'wp-photo-album-plus' ) . '
1458
- </a>';
1459
- }
1460
- else {
1461
- $result .= '
1462
- <a
1463
- style="cursor:pointer;"
1464
- href="' . $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '" >' .
1465
- __( 'Previous', 'wp-photo-album-plus' ) . '
1466
- </a>';
1467
- }
1468
- $result .= '
1469
  </div><!-- #prev-page -->';
1470
 
1471
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1472
  $result .= '
1473
  <div
1474
  style="float:right; text-align:right; ' . $vis . '"
1475
- >';
1476
- if ( wppa_switch( 'allow_ajax') ) {
1477
- $result .= '
1478
- <a
1479
- id="wppa-next-pagelink-' . $mocc . '"
1480
- style="cursor:pointer;"
1481
- onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"
1482
- >' .
1483
- __( 'Next', 'wp-photo-album-plus' ) . '
1484
- </a>';
1485
- /*
1486
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1487
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1488
- if ( wppa( 'is_slide' ) ) $result .= '
1489
- <a
1490
- id="wppa-first-pagelink-' . $mocc . '"
1491
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1492
- >
1493
- </a>
1494
- <a
1495
- id="wppa-prev-page-last-item"
1496
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1497
- >
1498
- </a>';
1499
- */
1500
- }
1501
- else {
1502
- $result .= '
1503
- <a
1504
- id="wppa-next-pagelink-' . $mocc . '"
1505
- style="cursor:pointer;"
1506
- href="' . $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '"
1507
- >' .
1508
- __( 'Next', 'wp-photo-album-plus' ) . '
1509
- </a>';
1510
- /*
1511
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1512
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1513
- if ( wppa( 'is_slide' ) ) $result .= '
1514
- <a
1515
- id="wppa-first-pagelink-' . $mocc . '"
1516
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1517
- >
1518
- </a>
1519
- <a
1520
- id="wppa-prev-page-last-item"
1521
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1522
- >
1523
- </a>';
1524
- */
1525
- }
1526
-
1527
- $result .= '
1528
- <span
1529
- class="wppa-arrow"
1530
- style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&nbsp;&raquo;</span
1531
- >
1532
-
1533
- </div><!-- #next-page -->';
1534
 
1535
  // The numbered pagelinks ?
1536
  if ( wppa_opt( 'pagelinks_max' ) ) {
@@ -1551,25 +1402,13 @@ global $previous_page_last_id;
1551
  <div
1552
  class="wppa-mini-box wppa-even"
1553
  style="display:inline; text-align:center; ' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) . '"
1554
- >';
1555
- if ( ( ! $slide && wppa_switch( 'allow_ajax') ) || ( $slide && wppa_switch( 'slideshow_page_allow_ajax') ) ) {
1556
- $result .= '
1557
- <a
1558
- id="wppa-pagelink-' . $mocc . '-' . $i . '"
1559
- style="cursor:pointer;"
1560
- onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"
1561
- >&nbsp;'.$i.'&nbsp;</a
1562
- >';
1563
- }
1564
- else {
1565
- $result .= '
1566
- <a
1567
- id="wppa-pagelink-' . $mocc . '-' . $i . '"
1568
- style="cursor:pointer;"
1569
- href="' . $link_url . '&amp;wppa-page=' . $i . '">&nbsp;' . $i . '&nbsp;</a
1570
- >';
1571
- }
1572
- $result .= '
1573
  </div>';
1574
  }
1575
  }
@@ -1745,7 +1584,7 @@ global $wpdb;
1745
  if ( $page == '0' ) $page = '-1';
1746
  if ( wppa_switch( 'coverimg_blank' ) ) $result['target'] = '_blank';
1747
  if ( $type == 'slideshowstartatimage' ) {
1748
- $result['url'] = wppa_encrypt_url( wppa_get_slideshow_url( $album, $page, $id) );
1749
  $result['is_url'] = true;
1750
  $result['is_lightbox'] = false;
1751
  return $result;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 8.0.00.009
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
100
  else $pl .= 'debug='.wppa( 'debug' ).'&amp;';
101
  }
102
 
 
 
 
 
 
103
  return $pl;
104
  }
105
 
111
 
112
  if ( ! $key && is_search() ) $key = wppa_opt( 'search_linkpage' );
113
 
114
+ if ( ! is_admin() ) {
115
+ $al = site_url() . '/wppaajax/?action=wppa&amp;wppa-action=render';
116
  }
117
  else {
118
  $al = admin_url( 'admin-ajax.php' ).'?action=wppa&amp;wppa-action=render';
165
  $al .= '&amp;debug=' . wppa( 'debug' );
166
  }
167
 
 
 
 
 
 
168
  if ( is_array( $wppa_runtime_settings ) ) {
169
  foreach( array_keys( $wppa_runtime_settings ) as $key ) {
170
  $value = $wppa_runtime_settings[$key];
950
 
951
  $thumb = wppa_cache_thumb( $id );
952
 
953
+ if ( wppa_user_is( 'administrator' ) || current_user_can('wppa_moderate') || ( current_user_can('wppa_comments') && $type == 'comment' ) ) {
 
 
 
 
 
 
 
 
 
 
954
  switch ( $type ) {
955
  case 'thumb':
956
  $app = __('App', 'wp-photo-album-plus');
1248
  $result .=
1249
  '<div' .
1250
  ' style="float:left;text-align:left;'.$vis.'"' .
1251
+ ' >
1252
+ <a' .
1253
+ ' style="cursor:pointer;"' .
1254
+ ' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
1255
+ ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty ( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\' )"' .
1256
+ ' >' .
1257
+ wppa_get_svghtml( 'Prev-Button', $iconsize ) .
1258
+ '</a>
1259
+ </div><!-- #prev-page -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1260
 
1261
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1262
  $result .=
1263
+ '<div
1264
+ style="float:right;text-align:right;' . $vis . '"
1265
+ >
1266
+ <a' .
1267
+ ' id="wppa-next-pagelink-' . $mocc . '"' .
1268
+ ' style="cursor:pointer;"' .
1269
+ ' title="' . esc_attr( __( 'Next page', 'wp-photo-album-plus' ) ) . '"' .
1270
+ ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"' .
1271
+ ' >' .
1272
+ wppa_get_svghtml( 'Next-Button', $iconsize ) .
1273
+ '</a>
1274
+ </div><!-- #next-page -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1275
 
1276
  // The numbered pagelinks ?
1277
  if ( wppa_opt( 'pagelinks_max' ) ) {
1293
  '<div' .
1294
  ' class="wppa-mini-box wppa-even"' .
1295
  ' style="display:inline;text-align:center;' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) .'"' .
1296
+ ' >' .
1297
+
1298
+ '<a' .
1299
+ ' id="wppa-pagelink-' . $mocc . '-' . $i . '"' .
1300
+ ' style="cursor:pointer;"' .
1301
+ ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"' .
1302
+ ' >' .
1303
+ '&nbsp;' . $i . '&nbsp;' .
1304
+ '</a>';
1305
+
 
 
 
 
 
 
 
 
 
 
 
1306
  $result .=
1307
  '</div>';
1308
  }
1355
  >
1356
  <span
1357
  class="wppa-arrow"
1358
+ style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&laquo;&nbsp;
1359
+ </span>
1360
+ <a
1361
+ style="cursor:pointer;"
1362
+ onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\')"
1363
+ >' .
1364
+ __( 'Previous', 'wp-photo-album-plus' ) . '
1365
+ </a>
 
 
 
 
 
 
 
 
 
 
 
 
1366
  </div><!-- #prev-page -->';
1367
 
1368
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1369
  $result .= '
1370
  <div
1371
  style="float:right; text-align:right; ' . $vis . '"
1372
+ >
1373
+ <a
1374
+ id="wppa-next-pagelink-' . $mocc . '"
1375
+ style="cursor:pointer;"
1376
+ onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"
1377
+ >' .
1378
+ __( 'Next', 'wp-photo-album-plus' ) . '
1379
+ </a>
1380
+ <span
1381
+ class="wppa-arrow"
1382
+ style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&nbsp;&raquo;</span
1383
+ >
1384
+ </div><!-- #next-page -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1385
 
1386
  // The numbered pagelinks ?
1387
  if ( wppa_opt( 'pagelinks_max' ) ) {
1402
  <div
1403
  class="wppa-mini-box wppa-even"
1404
  style="display:inline; text-align:center; ' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) . '"
1405
+ >
1406
+ <a
1407
+ id="wppa-pagelink-' . $mocc . '-' . $i . '"
1408
+ style="cursor:pointer;"
1409
+ onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"
1410
+ >&nbsp;'.$i.'&nbsp;</a
1411
+ >
 
 
 
 
 
 
 
 
 
 
 
 
1412
  </div>';
1413
  }
1414
  }
1584
  if ( $page == '0' ) $page = '-1';
1585
  if ( wppa_switch( 'coverimg_blank' ) ) $result['target'] = '_blank';
1586
  if ( $type == 'slideshowstartatimage' ) {
1587
+ $result['url'] = wppa_get_slideshow_url( $album, $page, $id );
1588
  $result['is_url'] = true;
1589
  $result['is_lightbox'] = false;
1590
  return $result;
wppa-local-cdn.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains routines for local cdn implementation
6
- * Version 7.6.01
7
  *
8
  */
9
 
@@ -83,7 +83,6 @@ function wppa_cdn_make( $id, $x, $y ) {
83
  }
84
  else {
85
  $err = wppa_image_magick( 'convert ' . $fmpath . ' ' . $quality . ' -resize ' . $x . 'x' . $y . ' ' . $topath );
86
- wppa_optimize_image_file( $topath );
87
  }
88
 
89
  // Log what we did
@@ -174,11 +173,6 @@ function wppa_cdn_make( $id, $x, $y ) {
174
  if ( $dst ) imagedestroy( $dst );
175
  if ( $tmp ) imagedestroy( $tmp );
176
 
177
- // Optimize
178
- if ( wppa_is_file( $topath ) ) {
179
- wppa_optimize_image_file( $topath );
180
- }
181
-
182
  // Log what we did
183
  if ( $bret ) {
184
  wppa_log( 'fso', 'GD Created ' . $tpshort );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains routines for local cdn implementation
6
+ * Version 8.0.00.007
7
  *
8
  */
9
 
83
  }
84
  else {
85
  $err = wppa_image_magick( 'convert ' . $fmpath . ' ' . $quality . ' -resize ' . $x . 'x' . $y . ' ' . $topath );
 
86
  }
87
 
88
  // Log what we did
173
  if ( $dst ) imagedestroy( $dst );
174
  if ( $tmp ) imagedestroy( $tmp );
175
 
 
 
 
 
 
176
  // Log what we did
177
  if ( $bret ) {
178
  wppa_log( 'fso', 'GD Created ' . $tpshort );
wppa-mailing.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Contains mailing functions
6
  *
7
- * Version 7.7.05.001
8
  *
9
  */
10
 
@@ -24,6 +24,8 @@ add_action( 'wppa_do_mailinglist_cron', 'wppa_do_mailinglist', 10, 6 );
24
  // Call this function to schedule a mailinglist emission
25
  function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $start = 0, $delay = 120 ) {
26
 
 
 
27
  $log_args = " Args: $alb, $pho, $com, $url, $start.";
28
 
29
  // If user is an admin and void_admin is active, do nothing
@@ -914,7 +916,7 @@ function wppa_unsubscribe_link( $user_id, $listtype ) {
914
 
915
  $user = get_user_by( 'ID', $user_id );
916
  $crypt = crypt( $listtype . $user->ID . $user->login_name, $user->display_name );
917
- $url = admin_url( 'admin-ajax.php' );
918
  $url .= '?action=wppa&wppa-action=mailinglist&list=' . $listtype . '&onoff=off&user=' . $user_id . '&crypt=' . $crypt;
919
 
920
  $link = '<a href="' . $url . '" >';
4
  *
5
  * Contains mailing functions
6
  *
7
+ * Version 8.0.00.008
8
  *
9
  */
10
 
24
  // Call this function to schedule a mailinglist emission
25
  function wppa_schedule_mailinglist( $type, $alb = 0, $pho = 0, $com = 0, $url = '', $start = 0, $delay = 120 ) {
26
 
27
+ if ( ! wppa_switch( 'email_on' ) ) return;
28
+
29
  $log_args = " Args: $alb, $pho, $com, $url, $start.";
30
 
31
  // If user is an admin and void_admin is active, do nothing
916
 
917
  $user = get_user_by( 'ID', $user_id );
918
  $crypt = crypt( $listtype . $user->ID . $user->login_name, $user->display_name );
919
+ $url = site_url() . 'wppaajax/'; //admin_url( 'admin-ajax.php' );
920
  $url .= '?action=wppa&wppa-action=mailinglist&list=' . $listtype . '&onoff=off&user=' . $user_id . '&crypt=' . $crypt;
921
 
922
  $link = '<a href="' . $url . '" >';
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 7.7.05.001
7
  *
8
  */
9
 
@@ -1728,7 +1728,7 @@ function wppa_log_page() {
1728
  wppa_do_maintenance_popup( 'wppa_list_errorlog' ) .
1729
 
1730
  '</div>' .
1731
- '<script>setInterval(function(){wppaAjaxReplaceLog();}, 5000);</script>' .
1732
 
1733
  '</div>';
1734
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 8.0.00.004
7
  *
8
  */
9
 
1728
  wppa_do_maintenance_popup( 'wppa_list_errorlog' ) .
1729
 
1730
  '</div>' .
1731
+ '<script>setInterval(function(){wppaAjaxReplaceLog();}, 10000);</script>' .
1732
 
1733
  '</div>';
1734
 
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 7.6.04.004
7
  *
8
  */
9
 
@@ -317,7 +317,7 @@ global $wppa_opt;
317
 
318
  // Start other (vendor) js files
319
  // google maps
320
- if ( ( wppa_switch( 'load_map_api' ) || wppa_opt( 'gpx_implementation' ) == 'wppa-plus-embedded' ) && strpos( wppa_opt( 'custom_content' ), 'w#location' ) !== false ) {
321
  $key = wppa_opt( 'map_apikey' );
322
  wp_enqueue_script( 'wppa-geo',
323
  'https://maps.googleapis.com/maps/api/js?' . ( $key ? 'key=' . $key : 'v=3.exp' ),
@@ -327,24 +327,20 @@ global $wppa_opt;
327
  }
328
 
329
  // Nicescroller
330
- if ( wppa_switch( 'nicescroll' ) || wppa_switch( 'nicescroll_window' ) || wppa_switch( 'load_nicescroller' ) ) {
331
- $nice_url = WPPA_URL . '/vendor/nicescroll/jquery.nicescroll.min.js';
332
- wp_enqueue_script( 'nicescrollr-inc-nicescroll-min-js', $nice_url, array( 'jquery', 'nicescrollr-easing-min-js' ), 'all' );
333
- $easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
334
- wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
 
 
335
  }
336
 
337
  // Panorama
338
  if ( wppa_switch( 'enable_panorama' ) ) {
339
-
340
- // Only if either in header or in footer and panorama's on the page found or ajax enabled
341
- if ( ! wppa_switch( 'defer_javascript' ) || ( wppa( 'has_panorama' ) || wppa_switch( 'allow_ajax' ) ) ) {
342
-
343
- $three_url = WPPA_URL . '/vendor/three/three.min.js';
344
- $ver = '122';
345
-
346
- wp_enqueue_script( 'wppa-three-min-js', $three_url, array(), $ver );
347
- }
348
  }
349
 
350
  // End other (vendor) js files
@@ -418,95 +414,93 @@ global $wppa_session;
418
  <!-- start WPPA+ Footer data -->
419
  ';
420
 
421
- // Do they use our lightbox?
422
- if ( wppa_opt( 'lightbox_name' ) == 'wppa' ) {
423
- $fontsize_lightbox = wppa_opt( 'fontsize_lightbox' ) ? wppa_opt( 'fontsize_lightbox' ) : '10';
424
- $d = wppa_switch( 'ovl_show_counter') ? 1 : 0;
425
- $ovlh = wppa_opt( 'ovl_txt_lines' ) == 'auto' ? 'auto' : ((wppa_opt( 'ovl_txt_lines' ) + $d) * ($fontsize_lightbox + 2));
426
- $txtcol = wppa_opt( 'ovl_theme' ) == 'black' ? '#a7a7a7' : '#272727';
427
- $dark = wppa( 'is_mobile' ) ? '0.1' : '0.1';
428
-
429
- // The lightbox overlay background
430
- echo
431
- '<div' .
432
- ' id="wppa-overlay-bg"' .
433
- ' style="' .
434
- 'text-align:center;' .
435
- 'display:none;' .
436
- 'position:fixed;' .
437
- 'top:0;' .
438
- 'left:0;' .
439
- 'width:100%;' .
440
- 'height:100%;' .
441
- 'background-color:'.wppa_opt( 'ovl_bgcolor' ).';' .
442
- '"' .
443
- ' onclick="wppaOvlOnclick(event)"' .
444
- ' onwheel="return false;"' .
445
- ' onscroll="return false;"' .
446
- ' >' .
447
- '</div>';
448
-
449
- // The Lightbox Wrapper and Image container
450
- echo
451
- '<div'.
452
- ' id="wppa-overlay-ic"'.
453
- ' style="' .
454
- 'position:fixed;' .
455
- 'top:50%;' .
456
- 'left:50%;' .
457
- 'opacity:1;' .
458
- 'box-shadow:none;' .
459
- 'box-sizing:content-box;' .
460
- 'text-align:center;' . // for panorama
461
- 'background-color:transparent;' .
462
- '"' .
463
- ' onwheel="return false;"' .
464
- ' onscroll="return false;"' .
465
- ' >' .
466
- '</div>';
467
-
468
- // The preload images
469
- echo '
470
- <img
471
- id="wppa-pre-prev"
472
- style="position:fixed;left:0;top:50%;width:100px;z-index:200011;visibility:hidden;"
473
- class="wppa-preload"
474
- title="Preload preveious image"
475
- alt=""
476
- />
477
- <img
478
- id="wppa-pre-next"
479
- style="position:fixed;right:0;top:50%;width:100px;z-index:200011;visibility:hidden;"
480
- class="wppa-preload"
481
- title="Preload next image"
482
- alt=""
483
- />
484
- <img
485
- id="wppa-pre-curr"
486
- style="position:fixed;left:0;top:0;z-index:200011;visibility:hidden;"
487
- class="wppa-preload-curr"
488
- title="Preload current image"
489
- alt=""
490
- />';
491
-
492
- // The Spinner image
493
- echo wppa_get_spinner_svg_html( array( 'id' => 'wppa-ovl-spin',
494
- 'position' => 'fixed',
495
- 'lightbox' => true,
496
- ) );
497
-
498
- $lb_global = '';
499
- if ( wppa_switch( 'lightbox_global' ) ) {
500
- if ( wppa_switch( 'lightbox_global_set' ) ) {
501
- $lb_global = 'wppa[single]';
502
- }
503
- else {
504
- $lb_global = 'wppa';
505
- }
506
  }
 
507
 
508
- // The init vars
509
- $data = '
510
  <script type="text/javascript" >
511
 
512
  /* START Lightbox vars */
@@ -535,8 +529,8 @@ global $wppa_session;
535
  /* END Lightbox vars */
536
  </script>
537
  ';
538
- echo wppa_js( $data );
539
- }
540
 
541
  // The photo views cache
542
  $data = '
@@ -584,7 +578,7 @@ global $wppa_session;
584
  }
585
 
586
  // Window nicescroller
587
- if ( wppa_switch( 'nicescroll_window' ) ) {
588
  echo '
589
  <!-- Nice scroller on window, by wppa -->
590
  ' . wppa_js(
@@ -664,6 +658,13 @@ function wppa_redirect() {
664
  $_SERVER["REQUEST_URI"] = $newuri;
665
  wppa_convert_uri_to_get( $newuri );
666
  }
 
 
 
 
 
 
 
667
  }
668
 
669
  /* ADD PAGE SPECIFIC ( http or https ) URLS */
@@ -677,7 +678,7 @@ global $wppa_lang;
677
  wppaImageDirectory = "' . wppa_get_imgdir() . '";
678
  wppaWppaUrl = "' . wppa_get_wppa_url() . '";
679
  wppaIncludeUrl = "' . trim( includes_url(), '/' ) . '";
680
- wppaAjaxUrl = "' . ( wppa_switch( 'ajax_non_admin' ) ? wppa_url( 'wppa-ajax-front.php' ) : admin_url( 'admin-ajax.php' ) ) . '";
681
  wppaUploadUrl = "' . WPPA_UPLOAD_URL . '";
682
  wppaIsIe = ' . ( wppa_is_ie() ? 'true' : 'false' ) . ';
683
  wppaIsSafari = ' . ( wppa_is_safari() ? 'true' : 'false' ) . ';
@@ -714,6 +715,7 @@ wppaGlobalFsIconSize = "'.wppa_opt( 'nav_icon_size_global_fs' ).'";
714
  wppaFsFillcolor = "'.wppa_opt( 'fs_svg_color' ).'";
715
  wppaFsBgcolor = "'.wppa_opt( 'fs_svg_bg_color' ).'";
716
  wppaFsPolicy = "'.wppa_opt( 'fs_policy' ).'";
 
717
  ';
718
 
719
  // Relative urls?
@@ -846,6 +848,9 @@ function wppa_skip_photon($val, $src, $tag) {
846
  return $result;
847
  }
848
 
 
 
 
849
  /* Create dynamic js init file */
850
  function wppa_create_wppa_init_js() {
851
  global $wppa_api_version;
@@ -902,7 +907,7 @@ wppaNextOnCallback = '.( wppa_switch( 'next_on_callback') ? 'true' : 'false' ).'
902
  wppaStarOpacity = '.str_replace(',', '.',( wppa_opt( 'star_opacity' )/'100' )).';
903
  wppaEmailRequired = "'.wppa_opt( 'comment_email_required').'";
904
  wppaSlideBorderWidth = '.$fbw.';
905
- wppaAllowAjax = '.( wppa_switch( 'allow_ajax') ? 'true' : 'false' ).';
906
  wppaUsePhotoNamesInUrls = '.( wppa_switch( 'use_photo_names_in_urls') ? 'true' : 'false' ).';
907
  wppaThumbTargetBlank = '.( wppa_switch( 'thumb_blank') ? 'true' : 'false' ).';
908
  wppaRatingMax = '.wppa_opt( 'rating_max' ).';
@@ -931,7 +936,7 @@ wppaShortQargs = '.( wppa_switch( 'use_short_qargs') ? 'true' : 'false' ).';
931
  wppaOvlHires = '.( wppa_switch( 'lb_hres' ) ? 'true' : 'false' ).';
932
  wppaSlideVideoStart = '.( wppa_switch( 'start_slide_video' ) ? 'true' : 'false' ).';
933
  wppaSlideAudioStart = '.( wppa_switch( 'start_slide_audio' ) ? 'true' : 'false' ).';
934
- wppaRel = "'.( wppa_opt( 'lightbox_name' ) == 'wppa' ? 'data-rel' : 'rel' ).'";
935
  wppaOvlRadius = '.wppa_opt( 'ovl_border_radius' ).';
936
  wppaOvlBorderWidth = '.wppa_opt( 'ovl_border_width' ).';
937
  wppaEditPhotoWidth = "'.(wppa_opt( 'upload_edit' ) == 'new' ? 500 : 960).'";
@@ -951,7 +956,6 @@ wppaHideRightClick = ' . ( wppa_switch( 'no_rightclick' ) ? 'true' : 'false' ) .
951
  wppaGeoZoom = ' . wppa_opt( 'geo_zoom' ) . ';
952
  wppaLazyLoad = ' . ( wppa_switch( 'lazy' ) ? 'true' : 'false' ) . ';
953
  wppaAreaMaxFrac = ' . ( wppa_opt( 'area_size' ) < 1 ? wppa_opt( 'area_size' ) : 1.0 ) . ';
954
- wppaNiceScroll = ' . ( wppa_switch( 'nicescroll' ) ? 'true' : 'false' ) . ';
955
  wppaIconSizeNormal = "' . wppa_opt( 'nav_icon_size' ) . '";
956
  wppaIconSizeSlide = "' . wppa_opt( 'nav_icon_size_slide' ) . '";
957
  wppaResponseSpeed = ' . wppa_opt( 'response_speed' ) . ';
@@ -974,7 +978,7 @@ wppaRequestInfoDialogText = "' . wppa_opt( 'request_info_text' ) . '";';
974
  $t = explode( ':', wppa_opt( 'thumb_aspect' ) );
975
  $aspect = $t[0] / $t[1];
976
  }
977
- elseif ( wppa_opt( 'resize_to' ) ) {
978
  $t = explode( 'x', wppa_opt( 'resize_to' ) );
979
  $aspect = $t[1] / $t[0];
980
  }
@@ -1001,21 +1005,6 @@ wppaThumbAspect = ' . $aspect . ';';
1001
  }
1002
  }
1003
 
1004
- add_action( 'init', 'wppa_set_shortcode_priority', 100 );
1005
-
1006
- function wppa_set_shortcode_priority() {
1007
-
1008
- $newpri = wppa_opt( 'shortcode_priority' );
1009
- if ( $newpri == '11' ) return; // Default, do not change
1010
-
1011
- $oldpri = has_filter( 'the_content', 'do_shortcode' );
1012
- if ( $oldpri ) {
1013
- remove_filter( 'the_content', 'do_shortcode', $oldpri );
1014
- add_filter( 'the_content', 'do_shortcode', $newpri );
1015
- }
1016
- }
1017
-
1018
-
1019
  /* We use bbPress */
1020
  // editor bbpress in tinymce mode
1021
  function wppa_enable_visual_editor_in_bbpress( $args = array() ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
317
 
318
  // Start other (vendor) js files
319
  // google maps
320
+ if ( wppa_switch( 'save_gpx' ) && strpos( wppa_opt( 'custom_content' ), 'w#location' ) !== false ) {
321
  $key = wppa_opt( 'map_apikey' );
322
  wp_enqueue_script( 'wppa-geo',
323
  'https://maps.googleapis.com/maps/api/js?' . ( $key ? 'key=' . $key : 'v=3.exp' ),
327
  }
328
 
329
  // Nicescroller
330
+ if ( ! wppa_is_mobile() ) {
331
+ if ( wppa_switch( 'nicescroll' ) || wppa_switch( 'nicescroll_window' ) || wppa_switch( 'load_nicescroller' ) ) {
332
+ $nice_url = WPPA_URL . '/vendor/nicescroll/jquery.nicescroll.min.js';
333
+ wp_enqueue_script( 'nicescrollr-inc-nicescroll-min-js', $nice_url, array( 'jquery', 'nicescrollr-easing-min-js' ), 'all' );
334
+ $easing_url = WPPA_URL . '/vendor/jquery-easing/jquery.easing.min.js';
335
+ wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
336
+ }
337
  }
338
 
339
  // Panorama
340
  if ( wppa_switch( 'enable_panorama' ) ) {
341
+ $three_url = WPPA_URL . '/vendor/three/three.min.js';
342
+ $ver = '122';
343
+ wp_enqueue_script( 'wppa-three-min-js', $three_url, array(), $ver );
 
 
 
 
 
 
344
  }
345
 
346
  // End other (vendor) js files
414
  <!-- start WPPA+ Footer data -->
415
  ';
416
 
417
+ // Needed for lightbox
418
+ $fontsize_lightbox = wppa_opt( 'fontsize_lightbox' ) ? wppa_opt( 'fontsize_lightbox' ) : '10';
419
+ $d = wppa_switch( 'ovl_show_counter') ? 1 : 0;
420
+ $ovlh = wppa_opt( 'ovl_txt_lines' ) == 'auto' ? 'auto' : ((wppa_opt( 'ovl_txt_lines' ) + $d) * ($fontsize_lightbox + 2));
421
+ $txtcol = wppa_opt( 'ovl_theme' ) == 'black' ? '#a7a7a7' : '#272727';
422
+ $dark = wppa( 'is_mobile' ) ? '0.1' : '0.1';
423
+
424
+ // The lightbox overlay background
425
+ echo
426
+ '<div' .
427
+ ' id="wppa-overlay-bg"' .
428
+ ' style="' .
429
+ 'text-align:center;' .
430
+ 'display:none;' .
431
+ 'position:fixed;' .
432
+ 'top:0;' .
433
+ 'left:0;' .
434
+ 'width:100%;' .
435
+ 'height:100%;' .
436
+ 'background-color:'.wppa_opt( 'ovl_bgcolor' ).';' .
437
+ '"' .
438
+ ' onclick="wppaOvlOnclick(event)"' .
439
+ ' onwheel="return false;"' .
440
+ ' onscroll="return false;"' .
441
+ ' >' .
442
+ '</div>';
443
+
444
+ // The Lightbox wrapper
445
+ echo '
446
+ <div
447
+ id="wppa-overlay-ic"
448
+ onwheel="return false;"
449
+ onscroll="return false;"
450
+ >
451
+ </div>';
452
+
453
+ // The lightbox wrapper for panos
454
+ echo '
455
+ <div
456
+ id="wppa-overlay-pc"
457
+ onwheel="return false;"
458
+ onscroll="return false;"
459
+ >
460
+ </div>';
461
+
462
+ // The preload images
463
+ echo '
464
+ <img
465
+ id="wppa-pre-prev"
466
+ style="position:fixed;left:0;top:50%;width:100px;z-index:200011;visibility:hidden;"
467
+ class="wppa-preload"
468
+ title="Preload preveious image"
469
+ alt=""
470
+ />
471
+ <img
472
+ id="wppa-pre-next"
473
+ style="position:fixed;right:0;top:50%;width:100px;z-index:200011;visibility:hidden;"
474
+ class="wppa-preload"
475
+ title="Preload next image"
476
+ alt=""
477
+ />
478
+ <img
479
+ id="wppa-pre-curr"
480
+ style="position:fixed;left:0;top:0;z-index:200011;visibility:hidden;"
481
+ class="wppa-preload-curr"
482
+ title="Preload current image"
483
+ alt=""
484
+ />';
485
+
486
+ // The Spinner image
487
+ echo wppa_get_spinner_svg_html( array( 'id' => 'wppa-ovl-spin',
488
+ 'position' => 'fixed',
489
+ 'lightbox' => true,
490
+ ) );
491
+
492
+ $lb_global = '';
493
+ if ( wppa_switch( 'lightbox_global' ) ) {
494
+ if ( wppa_switch( 'lightbox_global_set' ) ) {
495
+ $lb_global = 'wppa[single]';
496
+ }
497
+ else {
498
+ $lb_global = 'wppa';
 
 
 
499
  }
500
+ }
501
 
502
+ // The init vars
503
+ $data = '
504
  <script type="text/javascript" >
505
 
506
  /* START Lightbox vars */
529
  /* END Lightbox vars */
530
  </script>
531
  ';
532
+ echo wppa_js( $data );
533
+
534
 
535
  // The photo views cache
536
  $data = '
578
  }
579
 
580
  // Window nicescroller
581
+ if ( wppa_switch( 'nicescroll_window' ) && ! wppa_is_mobile() ) {
582
  echo '
583
  <!-- Nice scroller on window, by wppa -->
584
  ' . wppa_js(
658
  $_SERVER["REQUEST_URI"] = $newuri;
659
  wppa_convert_uri_to_get( $newuri );
660
  }
661
+ /*
662
+ if ( stripos( $uri, '/wppaajax/' ) ) {
663
+ wppa_log( 'obs', 'Doing AJAX directly' );
664
+ wppa_ajax_callback();
665
+ exit();
666
+ }
667
+ */
668
  }
669
 
670
  /* ADD PAGE SPECIFIC ( http or https ) URLS */
678
  wppaImageDirectory = "' . wppa_get_imgdir() . '";
679
  wppaWppaUrl = "' . wppa_get_wppa_url() . '";
680
  wppaIncludeUrl = "' . trim( includes_url(), '/' ) . '";
681
+ wppaAjaxUrl = "' . site_url() . '/wppaajax/";
682
  wppaUploadUrl = "' . WPPA_UPLOAD_URL . '";
683
  wppaIsIe = ' . ( wppa_is_ie() ? 'true' : 'false' ) . ';
684
  wppaIsSafari = ' . ( wppa_is_safari() ? 'true' : 'false' ) . ';
715
  wppaFsFillcolor = "'.wppa_opt( 'fs_svg_color' ).'";
716
  wppaFsBgcolor = "'.wppa_opt( 'fs_svg_bg_color' ).'";
717
  wppaFsPolicy = "'.wppa_opt( 'fs_policy' ).'";
718
+ wppaNiceScroll = ' . ( wppa_switch( 'nicescroll' ) && ! wppa_is_mobile() ? 'true' : 'false' ) . ';
719
  ';
720
 
721
  // Relative urls?
848
  return $result;
849
  }
850
 
851
+ /* MAKE SURE TEXT WIDGET SUPPORTS SHORTCODES */
852
+ add_filter( 'widget_text', 'do_shortcode' );
853
+
854
  /* Create dynamic js init file */
855
  function wppa_create_wppa_init_js() {
856
  global $wppa_api_version;
907
  wppaStarOpacity = '.str_replace(',', '.',( wppa_opt( 'star_opacity' )/'100' )).';
908
  wppaEmailRequired = "'.wppa_opt( 'comment_email_required').'";
909
  wppaSlideBorderWidth = '.$fbw.';
910
+ wppaAllowAjax = true;
911
  wppaUsePhotoNamesInUrls = '.( wppa_switch( 'use_photo_names_in_urls') ? 'true' : 'false' ).';
912
  wppaThumbTargetBlank = '.( wppa_switch( 'thumb_blank') ? 'true' : 'false' ).';
913
  wppaRatingMax = '.wppa_opt( 'rating_max' ).';
936
  wppaOvlHires = '.( wppa_switch( 'lb_hres' ) ? 'true' : 'false' ).';
937
  wppaSlideVideoStart = '.( wppa_switch( 'start_slide_video' ) ? 'true' : 'false' ).';
938
  wppaSlideAudioStart = '.( wppa_switch( 'start_slide_audio' ) ? 'true' : 'false' ).';
939
+ wppaRel = "data-rel";
940
  wppaOvlRadius = '.wppa_opt( 'ovl_border_radius' ).';
941
  wppaOvlBorderWidth = '.wppa_opt( 'ovl_border_width' ).';
942
  wppaEditPhotoWidth = "'.(wppa_opt( 'upload_edit' ) == 'new' ? 500 : 960).'";
956
  wppaGeoZoom = ' . wppa_opt( 'geo_zoom' ) . ';
957
  wppaLazyLoad = ' . ( wppa_switch( 'lazy' ) ? 'true' : 'false' ) . ';
958
  wppaAreaMaxFrac = ' . ( wppa_opt( 'area_size' ) < 1 ? wppa_opt( 'area_size' ) : 1.0 ) . ';
 
959
  wppaIconSizeNormal = "' . wppa_opt( 'nav_icon_size' ) . '";
960
  wppaIconSizeSlide = "' . wppa_opt( 'nav_icon_size_slide' ) . '";
961
  wppaResponseSpeed = ' . wppa_opt( 'response_speed' ) . ';
978
  $t = explode( ':', wppa_opt( 'thumb_aspect' ) );
979
  $aspect = $t[0] / $t[1];
980
  }
981
+ elseif ( wppa_opt( 'resize_to' ) != '-1' && wppa_opt( 'resize_to' ) != '0' ) {
982
  $t = explode( 'x', wppa_opt( 'resize_to' ) );
983
  $aspect = $t[1] / $t[0];
984
  }
1005
  }
1006
  }
1007
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1008
  /* We use bbPress */
1009
  // editor bbpress in tinymce mode
1010
  function wppa_enable_visual_editor_in_bbpress( $args = array() ) {
wppa-notify-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * notify events to users
6
- * Version 7.3.03
7
  */
8
 
9
  class wppaNotifyWidget extends WP_Widget {
@@ -342,5 +342,8 @@ class wppaNotifyWidget extends WP_Widget {
342
  add_action( 'widgets_init', 'wppa_register_wppaNotifyWidget' );
343
 
344
  function wppa_register_wppaNotifyWidget() {
345
- register_widget( "wppaNotifyWidget" );
 
 
 
346
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * notify events to users
6
+ * Version 8.0.00.008
7
  */
8
 
9
  class wppaNotifyWidget extends WP_Widget {
342
  add_action( 'widgets_init', 'wppa_register_wppaNotifyWidget' );
343
 
344
  function wppa_register_wppaNotifyWidget() {
345
+
346
+ if ( get_option( 'wppa_email_on', 'yes' ) == 'yes' ) {
347
+ register_widget( "wppaNotifyWidget" );
348
+ }
349
  }
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 7.7.06.002
7
  *
8
  */
9
 
@@ -1435,7 +1435,7 @@ function wppaToggleExif( id, count ) {
1435
  // If not done yet, get the album options html with the current album excluded
1436
  if ( ! isset( $album_select[$album] ) ) {
1437
  $album_select[$album] = wppa_album_select_a( array( 'checkaccess' => true,
1438
- 'path' => wppa_switch( 'hier_albsel' ),
1439
  'exclude' => $album,
1440
  'selected' => '0',
1441
  'addpleaseselect' => true,
@@ -2854,7 +2854,7 @@ function wppaSetConfirmMove( id ) {
2854
  <?php
2855
  // <select name="wppa-bulk-album" id="wppa-bulk-album" style="display:none;" onchange="wppa_setCookie( 'wppa_bulk_album',this.value,365 );" >
2856
  echo wppa_album_select_a( array( 'checkaccess' => true,
2857
- 'path' => wppa_switch( 'hier_albsel' ),
2858
  'exclude' => $album,
2859
  'selected' => '0',
2860
  'addpleaseselect' => true,
@@ -3081,7 +3081,7 @@ function wppaSetConfirmMove( id ) {
3081
  // If not done yet, get the album options html with the current album excluded
3082
  if ( ! isset( $album_select[$album] ) ) {
3083
  $album_select[$album] = wppa_album_select_a( array( 'checkaccess' => true,
3084
- 'path' => wppa_switch( 'hier_albsel' ),
3085
  'exclude' => $album,
3086
  'selected' => '0',
3087
  'addpleaseselect' => true,
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 8.0.00.007
7
  *
8
  */
9
 
1435
  // If not done yet, get the album options html with the current album excluded
1436
  if ( ! isset( $album_select[$album] ) ) {
1437
  $album_select[$album] = wppa_album_select_a( array( 'checkaccess' => true,
1438
+ 'path' => true,
1439
  'exclude' => $album,
1440
  'selected' => '0',
1441
  'addpleaseselect' => true,
2854
  <?php
2855
  // <select name="wppa-bulk-album" id="wppa-bulk-album" style="display:none;" onchange="wppa_setCookie( 'wppa_bulk_album',this.value,365 );" >
2856
  echo wppa_album_select_a( array( 'checkaccess' => true,
2857
+ 'path' => true,
2858
  'exclude' => $album,
2859
  'selected' => '0',
2860
  'addpleaseselect' => true,
3081
  // If not done yet, get the album options html with the current album excluded
3082
  if ( ! isset( $album_select[$album] ) ) {
3083
  $album_select[$album] = wppa_album_select_a( array( 'checkaccess' => true,
3084
+ 'path' => true,
3085
  'exclude' => $album,
3086
  'selected' => '0',
3087
  'addpleaseselect' => true,
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 7.7.03.003
6
  *
7
  */
8
 
@@ -132,9 +132,6 @@ function wppa_orientate_image_file( $file, $ori ) {
132
  // Output
133
  wppa_imagejpeg( $orientate, $file, wppa_opt( 'jpeg_quality' ) );
134
 
135
- // Optimized
136
- wppa_optimize_image_file( $file );
137
-
138
  // Free the memory
139
  imagedestroy( $source );
140
  @ imagedestroy( $orientate );
@@ -253,15 +250,20 @@ wppa_log('obs','method = '.wppa_opt( 'newphoto_name_method' ).', filename = '.$t
253
  if ( wppa_opt( 'resize_to' ) == '0' ) { // from fullsize
254
  $max_width = wppa_opt( 'fullsize' );
255
  $max_height = wppa_opt( 'maxheight' );
 
 
 
 
256
  }
257
  else { // from selection
258
  $screen = explode( 'x', wppa_opt( 'resize_to' ) );
259
  $max_width = $screen[0];
260
  $max_height = $screen[1];
 
261
  }
262
 
263
  // If Resize on upload is checked
264
- if ( wppa_switch( 'resize_on_upload' ) && wppa_can_resize( $file, max( $max_width, $max_height ) ) ) {
265
 
266
  // ImageMagick
267
  if ( wppa_can_magick() ) {
@@ -291,17 +293,6 @@ wppa_log('obs','method = '.wppa_opt( 'newphoto_name_method' ).', filename = '.$t
291
  }
292
  $src_height = $src_size[1];
293
 
294
- /* // Max sizes
295
- if ( wppa_opt( 'resize_to' ) == '0' ) { // from fullsize
296
- $max_width = wppa_opt( 'fullsize' );
297
- $max_height = wppa_opt( 'maxheight' );
298
- }
299
- else { // from selection
300
- $screen = explode( 'x', wppa_opt( 'resize_to' ) );
301
- $max_width = $screen[0];
302
- $max_height = $screen[1];
303
- }
304
- */
305
  // If orientation needs +/- 90 deg rotation, swap max x and max y
306
  $ori = wppa_get_exif_orientation( $file );
307
  if ( $ori >= 5 && $ori <= 8 ) {
@@ -410,23 +401,11 @@ wppa_log('obs','method = '.wppa_opt( 'newphoto_name_method' ).', filename = '.$t
410
  // wppa_log('dbg', 'Max memory used: ' . sprintf( '%6.2f MB', memory_get_peak_usage( true ) / ( 1024 * 1024 ) ) );
411
  }
412
 
413
- // No resize on upload checked
414
  else {
415
  wppa_copy( $file, $newimage );
416
  }
417
 
418
- // File successfully created ?
419
- if ( is_file ( $newimage ) ) {
420
-
421
- // Optimize file
422
- wppa_optimize_image_file( $newimage );
423
- }
424
- else {
425
- if ( is_admin() ) wppa_error_message( __( 'ERROR: Resized or copied image could not be created.' , 'wp-photo-album-plus') );
426
- else wppa_alert( __( 'ERROR: Resized or copied image could not be created.', 'wp-photo-album-plus') );
427
- return false;
428
- }
429
-
430
  // These things do not exist in pdfs
431
  if ( ! wppa_is_pdf( $id ) ) {
432
 
@@ -795,9 +774,6 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
795
  wppa_copy( $file, $thumbpath );
796
  }
797
 
798
- // Optimize
799
- wppa_optimize_image_file( $thumbpath );
800
-
801
  // Compute and save sizes
802
  wppa_get_thumbx( $id, 'force' ); // forces recalc x and y
803
 
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 8.0.00.007
6
  *
7
  */
8
 
132
  // Output
133
  wppa_imagejpeg( $orientate, $file, wppa_opt( 'jpeg_quality' ) );
134
 
 
 
 
135
  // Free the memory
136
  imagedestroy( $source );
137
  @ imagedestroy( $orientate );
250
  if ( wppa_opt( 'resize_to' ) == '0' ) { // from fullsize
251
  $max_width = wppa_opt( 'fullsize' );
252
  $max_height = wppa_opt( 'maxheight' );
253
+ $do_resize = true;
254
+ }
255
+ elseif ( wppa_opt( 'resize_to' ) == '-1' ) { // no resize
256
+ $do_resize = false;
257
  }
258
  else { // from selection
259
  $screen = explode( 'x', wppa_opt( 'resize_to' ) );
260
  $max_width = $screen[0];
261
  $max_height = $screen[1];
262
+ $do_resize = true;
263
  }
264
 
265
  // If Resize on upload is checked
266
+ if ( $do_resize && wppa_can_resize( $file, max( $max_width, $max_height ) ) ) {
267
 
268
  // ImageMagick
269
  if ( wppa_can_magick() ) {
293
  }
294
  $src_height = $src_size[1];
295
 
 
 
 
 
 
 
 
 
 
 
 
296
  // If orientation needs +/- 90 deg rotation, swap max x and max y
297
  $ori = wppa_get_exif_orientation( $file );
298
  if ( $ori >= 5 && $ori <= 8 ) {
401
  // wppa_log('dbg', 'Max memory used: ' . sprintf( '%6.2f MB', memory_get_peak_usage( true ) / ( 1024 * 1024 ) ) );
402
  }
403
 
404
+ // No resize on upload checked or too big
405
  else {
406
  wppa_copy( $file, $newimage );
407
  }
408
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  // These things do not exist in pdfs
410
  if ( ! wppa_is_pdf( $id ) ) {
411
 
774
  wppa_copy( $file, $thumbpath );
775
  }
776
 
 
 
 
777
  // Compute and save sizes
778
  wppa_get_thumbx( $id, 'force' ); // forces recalc x and y
779
 
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 7.7.06.003
7
  *
8
  */
9
 
@@ -194,13 +194,13 @@ function wppa_get_picture_html( $args ) {
194
  '<a' .
195
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
196
  ' href="' . $link['url'] . '"' .
197
- ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.esc_attr($lbtitle).'"' : '' ) .
198
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
199
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
200
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
201
  ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
202
  ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
203
- ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).$setname.'"' .
204
  wppa_get_lb_panorama_full_html( $id ) .
205
  ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
206
  ' class="thumb-img"' .
@@ -213,17 +213,16 @@ function wppa_get_picture_html( $args ) {
213
 
214
  // Link is NOT lightbox
215
  else {
216
- $result .=
217
- '<a' .
218
- ( wppa_is_mobile() ?
219
- ' ontouchstart="wppaStartTime();" ontouchend="wppaTapLink(\'' . $id . '\',\'' . $link['url'] . '\');" ' :
220
- ' onclick="_bumpClickCount( \'' . $id . '\' );window.open(\'' . $link['url'] . '\', \'' . $link['target'] . '\' )"'
221
- ) .
222
- ' title="' . $link['title'] . '"' .
223
- ' class="thumb-img"' .
224
- ' id="a-' . $id . '-' . $mocc . '"' .
225
- ' style="cursor:pointer;"' .
226
- ' >';
227
  }
228
  }
229
 
@@ -492,7 +491,7 @@ function wppa_get_spheric_pan_html( $args ) {
492
  id="wppa-pctl-prev-' . $mocc . '"
493
  class="wppa-pan-prevnext"
494
  style="margin:0 2px 0 0;float:left;display:inline-block;"
495
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlShowPrev()"
496
  >' .
497
  wppa_get_svghtml( 'Prev-Button', $iconsize, $lightbox ) .
498
  '</span>
@@ -500,7 +499,7 @@ function wppa_get_spheric_pan_html( $args ) {
500
  id="wppa-ovl-start-btn"
501
  style="margin:0 2px;float:left;display:none;"
502
  title="' . esc_attr( __( 'Start', 'wp-photo-album-plus' ) ) . '"
503
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlStartStop()"
504
  >' .
505
  wppa_get_svghtml( 'Play-Button', $iconsize, $lightbox ) .
506
  '</span>
@@ -508,7 +507,7 @@ function wppa_get_spheric_pan_html( $args ) {
508
  id="wppa-ovl-stop-btn"
509
  style="margin:0 2px;float:left;display:none;"
510
  title="' . esc_attr( __( 'Stop', 'wp-photo-album-plus' ) ) . '"
511
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlStartStop()"
512
  >' .
513
  wppa_get_svghtml( 'Pause-Button', $iconsize, $lightbox ) .
514
  '</span>';
@@ -560,7 +559,7 @@ function wppa_get_spheric_pan_html( $args ) {
560
  class="wppa-pan-prevnext"
561
  style="margin:0 0 0 2px;float:right;display:inline-block;"
562
  title="' . esc_attr( __( 'Next image', 'wp-photo-album-plus' ) ) . '"
563
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlShowNext()"
564
  >' .
565
  wppa_get_svghtml( 'Next-Button', $iconsize, $lightbox ) .
566
  '</span>' .
@@ -569,7 +568,7 @@ function wppa_get_spheric_pan_html( $args ) {
569
  class=""
570
  style="margin:0 2px;float:right;display:inline-block;"
571
  title="' . esc_attr( __( 'Exit', 'wp-photo-album-plus' ) ) . '"
572
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlHide()"
573
  >' .
574
  wppa_get_svghtml( 'Exit-2', $iconsize, $lightbox ) .
575
  '</span>';
@@ -582,7 +581,7 @@ function wppa_get_spheric_pan_html( $args ) {
582
  class="wppa-fulls-btn"
583
  style="margin:0 2px;float:right;display:none;"
584
  title="' . esc_attr( __( 'Enter fullscreen', 'wp-photo-album-plus' ) ) . '"
585
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaFsOn()"
586
  >' .
587
  wppa_get_svghtml( 'Full-Screen-2', $iconsize, $lightbox ) .
588
  '</span>' .
@@ -591,7 +590,7 @@ function wppa_get_spheric_pan_html( $args ) {
591
  class="wppa-exit-fulls-btn"
592
  style="margin:0 2px;float:right;display:none;"
593
  title="' . esc_attr( __( 'Leave fullscreen', 'wp-photo-album-plus' ) ) . '"
594
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaFsOff()"
595
  >' .
596
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, $lightbox ) .
597
  '</span>';
@@ -623,14 +622,11 @@ function wppa_get_spheric_pan_html( $args ) {
623
  $result .=
624
 
625
  '<script>' .
626
- /*
627
- // Create image object and add the image url to it
628
- ( $lightbox ?
629
- 'var image = document.getElementById(\'wppa-pre-curr\');' :
630
- 'var image = new Image();'
631
- ) .
632
- 'image.src = "' . $url . '";' .
633
- */
634
  'var data' . $mocc . ' =
635
  { mocc :' . $mocc . ',
636
  id :' . $id . ',
@@ -746,7 +742,7 @@ function wppa_get_flat_pan_html( $args ) {
746
  style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
747
  width="' . $width . '"
748
  height="' . ( $width / 2 ) . '"' .
749
- ( $lightbox && wppa_is_mobile() ? '
750
  ontouchstart="wppaTouchStart( event, \'wppa-pan-canvas-' . $mocc . '\', -1 );"
751
  ontouchend="wppaTouchEnd( event );"
752
  ontouchmove="wppaTouchMove( event );"
@@ -782,7 +778,7 @@ function wppa_get_flat_pan_html( $args ) {
782
  id="wppa-pctl-prev-' . $mocc . '"
783
  class="wppa-pan-prevnext"
784
  style="margin:0 2px 0 0;float:left;display:inline-block;"
785
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlShowPrev()"
786
  >' .
787
  wppa_get_svghtml( 'Prev-Button', $iconsize, $lightbox ) .
788
  '</span>
@@ -790,7 +786,7 @@ function wppa_get_flat_pan_html( $args ) {
790
  id="wppa-ovl-start-btn"
791
  style="margin:0 2px;float:left;display:none;"
792
  title="' . esc_attr( __( 'Start', 'wp-photo-album-plus' ) ) . '"
793
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlStartStop()"
794
  >' .
795
  wppa_get_svghtml( 'Play-Button', $iconsize, $lightbox ) .
796
  '</span>
@@ -798,7 +794,7 @@ function wppa_get_flat_pan_html( $args ) {
798
  id="wppa-ovl-stop-btn"
799
  style="margin:0 2px;float:left;display:none;"
800
  title="' . esc_attr( __( 'Stop', 'wp-photo-album-plus' ) ) . '"
801
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlStartStop()"
802
  >' .
803
  wppa_get_svghtml( 'Pause-Button', $iconsize, $lightbox ) .
804
  '</span>';
@@ -850,7 +846,7 @@ function wppa_get_flat_pan_html( $args ) {
850
  id="wppa-pctl-next-' . $mocc . '"
851
  class="wppa-pan-prevnext"
852
  style="margin:0 0 0 2px;float:right;display:inline-block;"
853
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlShowNext()"
854
  >' .
855
  wppa_get_svghtml( 'Next-Button', $iconsize, $lightbox ) .
856
  '</span>
@@ -859,7 +855,7 @@ function wppa_get_flat_pan_html( $args ) {
859
  class=""
860
  style="margin:0 2px;float:right;display:inline-block;"
861
  title="' . esc_attr( __( 'Exit', 'wp-photo-album-plus' ) ) . '"
862
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlHide()"
863
  >' .
864
  wppa_get_svghtml( 'Exit-2', $iconsize, $lightbox ) .
865
  '</span>';
@@ -872,7 +868,7 @@ function wppa_get_flat_pan_html( $args ) {
872
  class="wppa-fulls-btn"
873
  style="margin:0 2px;float:right;display:none;"
874
  title="' . esc_attr( __( 'Enter fullscreen', 'wp-photo-album-plus' ) ) . '"
875
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaFsOn()"
876
  >' .
877
  wppa_get_svghtml( 'Full-Screen-2', $iconsize, $lightbox ) .
878
  '</span>' .
@@ -881,7 +877,7 @@ function wppa_get_flat_pan_html( $args ) {
881
  class="wppa-exit-fulls-btn"
882
  style="margin:0 2px;float:right;display:none;"
883
  title="' . esc_attr( __( 'Leave fullscreen', 'wp-photo-album-plus' ) ) . '"
884
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaFsOff()"
885
  >' .
886
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, $lightbox ) .
887
  '</span>';
@@ -925,7 +921,7 @@ function wppa_get_flat_pan_html( $args ) {
925
  'wppaFlatId['.$mocc.'] = id;' .
926
 
927
  // Log we are in
928
- 'wppaConsoleLog("FLAT entered mooc = ' . $mocc . '");' .
929
 
930
  // Var declarations
931
  'var
@@ -964,7 +960,7 @@ function wppa_get_flat_pan_html( $args ) {
964
  'wppaFlatLastRenderTime[mocc] = 0;' .
965
 
966
  // Install listeners
967
- ( wppa_is_mobile() ?
968
  'right.off("touchstart");
969
  right.on("touchstart", onRightMouseDown);
970
  right.off("touchend");
@@ -989,7 +985,7 @@ function wppa_get_flat_pan_html( $args ) {
989
  zoomout.on("touchstart", onZoomOutMouseDown);
990
  zoomout.off("touchend");
991
  zoomout.on("touchend", onButtonUp);'
992
- :
993
  ( $manual ?
994
  'canvas.removeEventListener("mousedown", onCanvasMouseDown);
995
  canvas.addEventListener("mousedown", onCanvasMouseDown);
@@ -1035,7 +1031,7 @@ function wppa_get_flat_pan_html( $args ) {
1035
  zoomout.on("mousedown", onZoomOutMouseDown);
1036
  zoomout.off("mouseup");
1037
  zoomout.on("mouseup", onButtonUp);'
1038
- ) .
1039
 
1040
  // Common event handlers
1041
  /*
@@ -1075,8 +1071,6 @@ function wppa_get_flat_pan_html( $args ) {
1075
  // The render function
1076
  'function render(){' .
1077
 
1078
- // 'wppaConsoleLog("Flat render mocc " + mocc + " run = " + run);' .
1079
-
1080
  ( $lightbox ? 'if (!wppaOvlOpen) abort=true;' : 'if (!wppaIsElementInViewport(canvas)) {setTimeout(render,200);return;}' ) .
1081
 
1082
  'if (abort) {
@@ -1161,7 +1155,7 @@ function wppa_get_flat_pan_html( $args ) {
1161
  if ( ! stop ) {
1162
  stop = true;
1163
  $(this).css({opacity:0.5});
1164
- $("#wppa-overlay-ic").css({display:"none"});
1165
  $("#wppa-ovl-spin").show();
1166
  wppaOvlShowPrev();
1167
  }
@@ -1175,7 +1169,7 @@ function wppa_get_flat_pan_html( $args ) {
1175
  if ( ! stop ) {
1176
  stop = true;
1177
  $(this).css({opacity:0.5});
1178
- $("#wppa-overlay-ic").css({display:"none"});
1179
  $("#wppa-ovl-spin").show();
1180
  wppaOvlShowNext();
1181
  }
@@ -1265,10 +1259,12 @@ function wppa_get_flat_pan_html( $args ) {
1265
 
1266
  'if (abort) return;' .
1267
 
 
 
1268
  ( $lightbox ?
1269
 
1270
  // Show image container
1271
- '$("#wppa-overlay-ic").css("display", "");' .
1272
 
1273
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1274
  'var widthIsLim,
@@ -1320,8 +1316,7 @@ function wppa_get_flat_pan_html( $args ) {
1320
  '}' .
1321
 
1322
  // Set css common for all 4 situations
1323
- '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
1324
- $("#wppa-overlay-ic").css({marginTop:0,marginLeft:0});
1325
 
1326
  canvas.width = newWidth;
1327
  canvas.height = newHeight;
@@ -1339,22 +1334,22 @@ function wppa_get_flat_pan_html( $args ) {
1339
  width:newWidth,
1340
  marginLeft:0
1341
  });' .
1342
- // '$( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
1343
 
1344
  // Limit specific
1345
  'if ( widthIsLim ) {
1346
- $("#wppa-overlay-ic").css({left:4});
1347
  }
1348
  else {
1349
- $("#wppa-overlay-ic").css({left:(contWidth-newWidth)/2});
1350
  }
 
1351
  }' .
1352
 
1353
  // Mode is fullscreen
1354
  'else {' .
1355
 
1356
  // Common for mode fullscreen
1357
- '$("#wppa-overlay-ic").css({marginLeft:0});
1358
  $("#wppa-ovl-pan-container").css({
1359
  backgroundColor:"transparent",
1360
  padding:0,
@@ -1362,7 +1357,6 @@ function wppa_get_flat_pan_html( $args ) {
1362
  width:newWidth,
1363
  left:(contWidth-newWidth)/2
1364
  });' .
1365
- // '$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});' .
1366
 
1367
  'wppaAdjustControlbar();
1368
 
@@ -1456,7 +1450,7 @@ function wppa_get_flat_pan_html( $args ) {
1456
 
1457
  // Clean up
1458
  'function quitImage(e) {
1459
- wppaConsoleLog("Quit Flat Image");
1460
  abort = true;
1461
  run = 0;
1462
  autorun = false;
@@ -1571,7 +1565,7 @@ function wppa_get_zoom_pan_html( $args ) {
1571
  class="wppa-pan-prevnext"
1572
  style="margin:0 2px 0 0;float:left;display:inline-block;"
1573
  title="' . esc_attr( __( 'Previous image', 'wp-photo-album-plus' ) ) . '"
1574
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlShowPrev()"
1575
  >' .
1576
  wppa_get_svghtml( 'Prev-Button', $iconsize, $lightbox ) .
1577
  '</span>' .
@@ -1652,7 +1646,7 @@ function wppa_get_zoom_pan_html( $args ) {
1652
  class="wppa-pan-prevnext"
1653
  style="margin:0 0 0 2px;float:right;display:inline-block;"
1654
  title="' . esc_attr( __( 'Next image', 'wp-photo-album-plus' ) ) . '"
1655
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlShowNext()"
1656
  >' .
1657
  wppa_get_svghtml( 'Next-Button', $iconsize, $lightbox ) .
1658
  '</span>' .
@@ -1661,7 +1655,7 @@ function wppa_get_zoom_pan_html( $args ) {
1661
  class=""
1662
  style="margin:0 2px;float:right;display:inline-block;"
1663
  title="' . esc_attr( __( 'Exit', 'wp-photo-album-plus' ) ) . '"
1664
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaOvlHide()"
1665
  >' .
1666
  wppa_get_svghtml( 'Exit-2', $iconsize, $lightbox ) .
1667
  '</span>';
@@ -1674,7 +1668,7 @@ function wppa_get_zoom_pan_html( $args ) {
1674
  class="wppa-fulls-btn""
1675
  style="margin:0 2px;float:right;display:none;"
1676
  title="' . esc_attr( __( 'Enter fullscreen', 'wp-photo-album-plus' ) ) . '"
1677
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaFsOn()"
1678
  >' .
1679
  wppa_get_svghtml( 'Full-Screen-2', $iconsize, $lightbox ) .
1680
  '</span>' .
@@ -1683,7 +1677,7 @@ function wppa_get_zoom_pan_html( $args ) {
1683
  class="wppa-exit-fulls-btn"
1684
  style="margin:0 2px;float:right;display:none;"
1685
  title="' . esc_attr( __( 'Leave fullscreen', 'wp-photo-album-plus' ) ) . '"
1686
- ' . ( wppa_is_mobile() ? 'ontouchstart' : 'onclick' ) . '="wppaFsOff()"
1687
  >' .
1688
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, $lightbox ) .
1689
  '</span>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
194
  '<a' .
195
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
196
  ' href="' . $link['url'] . '"' .
197
+ ( $lbtitle ? ' ' . 'data-lbtitle' . '="'.esc_attr($lbtitle).'"' : '' ) .
198
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
199
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
200
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
201
  ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
202
  ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
203
+ ' data-rel="wppa'.$setname.'"' .
204
  wppa_get_lb_panorama_full_html( $id ) .
205
  ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
206
  ' class="thumb-img"' .
213
 
214
  // Link is NOT lightbox
215
  else {
216
+ $result .= '
217
+ <a
218
+ ontouchstart="wppaStartTime();"
219
+ ontouchend="wppaTapLink(\'' . $id . '\',\'' . $link['url'] . '\');"
220
+ onclick="_bumpClickCount( \'' . $id . '\' );window.open(\'' . $link['url'] . '\', \'' . $link['target'] . '\' )"
221
+ title="' . $link['title'] . '"
222
+ class="thumb-img"
223
+ id="a-' . $id . '-' . $mocc . '"
224
+ style="cursor:pointer;"
225
+ >';
 
226
  }
227
  }
228
 
491
  id="wppa-pctl-prev-' . $mocc . '"
492
  class="wppa-pan-prevnext"
493
  style="margin:0 2px 0 0;float:left;display:inline-block;"
494
+ onclick="wppaOvlShowPrev()"
495
  >' .
496
  wppa_get_svghtml( 'Prev-Button', $iconsize, $lightbox ) .
497
  '</span>
499
  id="wppa-ovl-start-btn"
500
  style="margin:0 2px;float:left;display:none;"
501
  title="' . esc_attr( __( 'Start', 'wp-photo-album-plus' ) ) . '"
502
+ onclick="wppaOvlStartStop()"
503
  >' .
504
  wppa_get_svghtml( 'Play-Button', $iconsize, $lightbox ) .
505
  '</span>
507
  id="wppa-ovl-stop-btn"
508
  style="margin:0 2px;float:left;display:none;"
509
  title="' . esc_attr( __( 'Stop', 'wp-photo-album-plus' ) ) . '"
510
+ onclick="wppaOvlStartStop()"
511
  >' .
512
  wppa_get_svghtml( 'Pause-Button', $iconsize, $lightbox ) .
513
  '</span>';
559
  class="wppa-pan-prevnext"
560
  style="margin:0 0 0 2px;float:right;display:inline-block;"
561
  title="' . esc_attr( __( 'Next image', 'wp-photo-album-plus' ) ) . '"
562
+ onclick="wppaOvlShowNext()"
563
  >' .
564
  wppa_get_svghtml( 'Next-Button', $iconsize, $lightbox ) .
565
  '</span>' .
568
  class=""
569
  style="margin:0 2px;float:right;display:inline-block;"
570
  title="' . esc_attr( __( 'Exit', 'wp-photo-album-plus' ) ) . '"
571
+ onclick="wppaOvlHide()"
572
  >' .
573
  wppa_get_svghtml( 'Exit-2', $iconsize, $lightbox ) .
574
  '</span>';
581
  class="wppa-fulls-btn"
582
  style="margin:0 2px;float:right;display:none;"
583
  title="' . esc_attr( __( 'Enter fullscreen', 'wp-photo-album-plus' ) ) . '"
584
+ onclick="wppaFsOn()"
585
  >' .
586
  wppa_get_svghtml( 'Full-Screen-2', $iconsize, $lightbox ) .
587
  '</span>' .
590
  class="wppa-exit-fulls-btn"
591
  style="margin:0 2px;float:right;display:none;"
592
  title="' . esc_attr( __( 'Leave fullscreen', 'wp-photo-album-plus' ) ) . '"
593
+ onclick="wppaFsOff()"
594
  >' .
595
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, $lightbox ) .
596
  '</span>';
622
  $result .=
623
 
624
  '<script>' .
625
+
626
+ // Create image object and add the image url to it to preload it
627
+ // 'var image = new Image();' .
628
+ // 'image.src = "' . $url . '";' .
629
+
 
 
 
630
  'var data' . $mocc . ' =
631
  { mocc :' . $mocc . ',
632
  id :' . $id . ',
742
  style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
743
  width="' . $width . '"
744
  height="' . ( $width / 2 ) . '"' .
745
+ ( $lightbox ? '
746
  ontouchstart="wppaTouchStart( event, \'wppa-pan-canvas-' . $mocc . '\', -1 );"
747
  ontouchend="wppaTouchEnd( event );"
748
  ontouchmove="wppaTouchMove( event );"
778
  id="wppa-pctl-prev-' . $mocc . '"
779
  class="wppa-pan-prevnext"
780
  style="margin:0 2px 0 0;float:left;display:inline-block;"
781
+ onclick="wppaOvlShowPrev()"
782
  >' .
783
  wppa_get_svghtml( 'Prev-Button', $iconsize, $lightbox ) .
784
  '</span>
786
  id="wppa-ovl-start-btn"
787
  style="margin:0 2px;float:left;display:none;"
788
  title="' . esc_attr( __( 'Start', 'wp-photo-album-plus' ) ) . '"
789
+ onclick="wppaOvlStartStop()"
790
  >' .
791
  wppa_get_svghtml( 'Play-Button', $iconsize, $lightbox ) .
792
  '</span>
794
  id="wppa-ovl-stop-btn"
795
  style="margin:0 2px;float:left;display:none;"
796
  title="' . esc_attr( __( 'Stop', 'wp-photo-album-plus' ) ) . '"
797
+ onclick="wppaOvlStartStop()"
798
  >' .
799
  wppa_get_svghtml( 'Pause-Button', $iconsize, $lightbox ) .
800
  '</span>';
846
  id="wppa-pctl-next-' . $mocc . '"
847
  class="wppa-pan-prevnext"
848
  style="margin:0 0 0 2px;float:right;display:inline-block;"
849
+ onclick="wppaOvlShowNext()"
850
  >' .
851
  wppa_get_svghtml( 'Next-Button', $iconsize, $lightbox ) .
852
  '</span>
855
  class=""
856
  style="margin:0 2px;float:right;display:inline-block;"
857
  title="' . esc_attr( __( 'Exit', 'wp-photo-album-plus' ) ) . '"
858
+ onclick="wppaOvlHide()"
859
  >' .
860
  wppa_get_svghtml( 'Exit-2', $iconsize, $lightbox ) .
861
  '</span>';
868
  class="wppa-fulls-btn"
869
  style="margin:0 2px;float:right;display:none;"
870
  title="' . esc_attr( __( 'Enter fullscreen', 'wp-photo-album-plus' ) ) . '"
871
+ onclick="wppaFsOn()"
872
  >' .
873
  wppa_get_svghtml( 'Full-Screen-2', $iconsize, $lightbox ) .
874
  '</span>' .
877
  class="wppa-exit-fulls-btn"
878
  style="margin:0 2px;float:right;display:none;"
879
  title="' . esc_attr( __( 'Leave fullscreen', 'wp-photo-album-plus' ) ) . '"
880
+ onclick="wppaFsOff()"
881
  >' .
882
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, $lightbox ) .
883
  '</span>';
921
  'wppaFlatId['.$mocc.'] = id;' .
922
 
923
  // Log we are in
924
+ 'wppaConsoleLog("FLAT entered mooc = ' . $mocc . '","force");' .
925
 
926
  // Var declarations
927
  'var
960
  'wppaFlatLastRenderTime[mocc] = 0;' .
961
 
962
  // Install listeners
963
+
964
  'right.off("touchstart");
965
  right.on("touchstart", onRightMouseDown);
966
  right.off("touchend");
985
  zoomout.on("touchstart", onZoomOutMouseDown);
986
  zoomout.off("touchend");
987
  zoomout.on("touchend", onButtonUp);'
988
+ .
989
  ( $manual ?
990
  'canvas.removeEventListener("mousedown", onCanvasMouseDown);
991
  canvas.addEventListener("mousedown", onCanvasMouseDown);
1031
  zoomout.on("mousedown", onZoomOutMouseDown);
1032
  zoomout.off("mouseup");
1033
  zoomout.on("mouseup", onButtonUp);'
1034
+ .
1035
 
1036
  // Common event handlers
1037
  /*
1071
  // The render function
1072
  'function render(){' .
1073
 
 
 
1074
  ( $lightbox ? 'if (!wppaOvlOpen) abort=true;' : 'if (!wppaIsElementInViewport(canvas)) {setTimeout(render,200);return;}' ) .
1075
 
1076
  'if (abort) {
1155
  if ( ! stop ) {
1156
  stop = true;
1157
  $(this).css({opacity:0.5});
1158
+ $("#wppa-overlay-pc").css({display:"none"});
1159
  $("#wppa-ovl-spin").show();
1160
  wppaOvlShowPrev();
1161
  }
1169
  if ( ! stop ) {
1170
  stop = true;
1171
  $(this).css({opacity:0.5});
1172
+ $("#wppa-overlay-pc").css({display:"none"});
1173
  $("#wppa-ovl-spin").show();
1174
  wppaOvlShowNext();
1175
  }
1259
 
1260
  'if (abort) return;' .
1261
 
1262
+ 'wppaConsoleLog("onResize","force");' .
1263
+
1264
  ( $lightbox ?
1265
 
1266
  // Show image container
1267
+ '$("#wppa-overlay-pc").css("display", "");' .
1268
 
1269
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1270
  'var widthIsLim,
1316
  '}' .
1317
 
1318
  // Set css common for all 4 situations
1319
+ '$("#wppa-ovl-pan-container").css({top:0,marginTop:topMarg});
 
1320
 
1321
  canvas.width = newWidth;
1322
  canvas.height = newHeight;
1334
  width:newWidth,
1335
  marginLeft:0
1336
  });' .
 
1337
 
1338
  // Limit specific
1339
  'if ( widthIsLim ) {
1340
+ $("#wppa-overlay-pc").css({left:4});
1341
  }
1342
  else {
1343
+ $("#wppa-overlay-pc").css({left:(contWidth-newWidth)/2});
1344
  }
1345
+ wppaAdjustControlbar();
1346
  }' .
1347
 
1348
  // Mode is fullscreen
1349
  'else {' .
1350
 
1351
  // Common for mode fullscreen
1352
+ '$("#wppa-overlay-pc").css({marginLeft:0});
1353
  $("#wppa-ovl-pan-container").css({
1354
  backgroundColor:"transparent",
1355
  padding:0,
1357
  width:newWidth,
1358
  left:(contWidth-newWidth)/2
1359
  });' .
 
1360
 
1361
  'wppaAdjustControlbar();
1362
 
1450
 
1451
  // Clean up
1452
  'function quitImage(e) {
1453
+ wppaConsoleLog("Quit Flat Image", "force");
1454
  abort = true;
1455
  run = 0;
1456
  autorun = false;
1565
  class="wppa-pan-prevnext"
1566
  style="margin:0 2px 0 0;float:left;display:inline-block;"
1567
  title="' . esc_attr( __( 'Previous image', 'wp-photo-album-plus' ) ) . '"
1568
+ onclick="wppaOvlShowPrev()"
1569
  >' .
1570
  wppa_get_svghtml( 'Prev-Button', $iconsize, $lightbox ) .
1571
  '</span>' .
1646
  class="wppa-pan-prevnext"
1647
  style="margin:0 0 0 2px;float:right;display:inline-block;"
1648
  title="' . esc_attr( __( 'Next image', 'wp-photo-album-plus' ) ) . '"
1649
+ onclick="wppaOvlShowNext()"
1650
  >' .
1651
  wppa_get_svghtml( 'Next-Button', $iconsize, $lightbox ) .
1652
  '</span>' .
1655
  class=""
1656
  style="margin:0 2px;float:right;display:inline-block;"
1657
  title="' . esc_attr( __( 'Exit', 'wp-photo-album-plus' ) ) . '"
1658
+ onclick="wppaOvlHide()"
1659
  >' .
1660
  wppa_get_svghtml( 'Exit-2', $iconsize, $lightbox ) .
1661
  '</span>';
1668
  class="wppa-fulls-btn""
1669
  style="margin:0 2px;float:right;display:none;"
1670
  title="' . esc_attr( __( 'Enter fullscreen', 'wp-photo-album-plus' ) ) . '"
1671
+ onclick="wppaFsOn()"
1672
  >' .
1673
  wppa_get_svghtml( 'Full-Screen-2', $iconsize, $lightbox ) .
1674
  '</span>' .
1677
  class="wppa-exit-fulls-btn"
1678
  style="margin:0 2px;float:right;display:none;"
1679
  title="' . esc_attr( __( 'Leave fullscreen', 'wp-photo-album-plus' ) ) . '"
1680
+ onclick="wppaFsOff()"
1681
  >' .
1682
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, $lightbox ) .
1683
  '</span>';
wppa-potd-admin.php DELETED
@@ -1,683 +0,0 @@
1
- <?php
2
- /* wppa-potd-admin.php
3
- * Pachkage: wp-photo-album-plus
4
- *
5
- * admin photo of the day widget
6
- * Version 7.5.01
7
- *
8
- */
9
-
10
- function _wppa_sidebar_page_options() {
11
- global $wpdb;
12
- global $wppa_defaults;
13
-
14
- // wppa_set_defaults();
15
-
16
- $onch = 'myReload()';
17
-
18
- // Handle spinner js and declare functions
19
- echo
20
- '<script type="text/javascript" >' .
21
- 'var didsome=false;' .
22
- 'jQuery(document).ready(function() {' .
23
- 'jQuery(\'#wppa-spinner\').css(\'display\', \'none\');' .
24
- '});' .
25
- 'function myReload() {' .
26
- 'jQuery(\'#wppa-spinner\').css(\'display\', \'block\');' .
27
- '_wppaRefreshAfter = true;' .
28
- '};' .
29
- 'function wppaSetFixed(id) {' .
30
- 'if (jQuery(\'#wppa-widget-photo-\' + id).prop(\'checked\') ) {' .
31
- '_wppaRefreshAfter = true;' .
32
- 'wppaAjaxUpdateOptionValue(\'potd_photo\', id);' .
33
- '}' .
34
- '};' .
35
- '</script>';
36
-
37
- // The spinner
38
- echo
39
- '<img' .
40
- ' id="wppa-spinner"' .
41
- ' style="position:fixed;top:50%;left:50%;z-index:1000;margin-top:-33px;margin-left:-33px;display:block;"' .
42
- ' src="' . wppa_get_imgdir( 'loader.gif' ) . '"' .
43
- '/>';
44
-
45
- // Open wrapper
46
- echo
47
- '<div class="wrap">';
48
-
49
- // The settings icon
50
- echo
51
- '<img src="' . wppa_get_imgdir( 'settings32.png' ) . '" />';
52
-
53
- // The Page title
54
- echo
55
- '<h1 style="display:inline;" >' . __( 'Photo of the Day (Widget) Settings', 'wp-photo-album-plus' ) . ' </h1>' .
56
- __( 'Changes are updated immediately. The page will reload if required.', 'wp-photo-album-plus' ) .
57
- '<br />&nbsp;';
58
-
59
- // The nonce
60
- wp_nonce_field( 'wppa-nonce', 'wppa-nonce' );
61
-
62
- // The settings table
63
- echo
64
- '<table class="widefat wppa-table wppa-setting-table">';
65
-
66
- // The header
67
- echo
68
- '<thead style="font-weight: bold; " class="wppa_table_1">' .
69
- '<tr>' .
70
- '<td>' . __( '#', 'wp-photo-album-plus' ) . '</td>' .
71
- '<td>' . __( 'Name', 'wp-photo-album-plus' ) . '</td>' .
72
- '<td>' . __( 'Description', 'wp-photo-album-plus') . '</td>' .
73
- '<td>' . __( 'Setting', 'wp-photo-album-plus') . '</td>' .
74
- '</tr>' .
75
- '</thead>';
76
-
77
- // Open the table body
78
- echo
79
- '<tbody class="wppa_table" >';
80
-
81
- $name = __( 'Widget Title:', 'wp-photo-album-plus' );
82
- $desc = __( 'The title of the widget.', 'wp-photo-album-plus' );
83
- $slug = 'wppa_potd_title';
84
- $html = wppa_potd_input( $slug, '85%' );
85
- wppa_potd_setting( $slug, '1', $name, $desc, $html );
86
-
87
- $name = __( 'Widget Photo Width:', 'wp-photo-album-plus' );
88
- $desc = __( 'Enter the desired display width of the photo in the sidebar.', 'wp-photo-album-plus' );
89
- $slug = 'wppa_potd_widget_width';
90
- $html = wppa_potd_input( $slug, '40px', '', __( 'pixels wide', 'wp-photo-album-plus' ) );
91
- wppa_potd_setting( $slug, '2', $name, $desc, $html );
92
-
93
- $name = __( 'Horizontal alignment:', 'wp-photo-album-plus' );
94
- $desc = __( 'Enter the desired display alignment of the photo in the sidebar.', 'wp-photo-album-plus' );
95
- $slug = 'wppa_potd_align';
96
- $opts = array( __( '--- none ---', 'wp-photo-album-plus' ),
97
- __( 'left', 'wp-photo-album-plus' ),
98
- __( 'center', 'wp-photo-album-plus' ),
99
- __( 'right', 'wp-photo-album-plus' ),
100
- );
101
- $vals = array( 'none',
102
- 'left',
103
- 'center',
104
- 'right',
105
- );
106
- $html = wppa_potd_select( $slug, $opts, $vals );
107
- wppa_potd_setting( $slug, '3', $name, $desc, $html );
108
-
109
- $linktype = wppa_opt( 'potd_linktype' );
110
- if ( $linktype == 'custom' ) {
111
-
112
- $name = __( 'Link to:', 'wp-photo-album-plus' );
113
- $desc = __( 'Enter the url. Do\'nt forget the HTTP://', 'wp-photo-album-plus' );
114
- $slug = 'wppa_potd_linkurl';
115
- $html = wppa_potd_input( $slug, '85%', '', '', '', __( 'Type your custom url here', 'wp-photo-album-plus' ) );
116
- wppa_potd_setting( $slug, '4', $name, $desc, $html );
117
-
118
- $name = __( 'Link Title:', 'wp-photo-album-plus' );
119
- $desc = __( 'The balloon text when hovering over the photo.', 'wp-photo-album-plus' );
120
- $slug = 'wppa_potd_linktitle';
121
- $html = wppa_potd_input( $slug, '85%', '', '', '', __( 'Type the title here', 'wp-photo-album-plus' ) );
122
- wppa_potd_setting($slug, '4a', $name, $desc, $html );
123
- }
124
- else {
125
- $name = __( 'Link to:', 'wp-photo-album-plus' );
126
- $desc = __( 'Links are set on the <b>Photo Albums -> Settings</b> screen.', 'wp-photo-album-plus' );
127
- $slug = 'wppa_potd_linkurl';
128
- $html = '';
129
- wppa_potd_setting( $slug, '4', $name, $desc, $html );
130
- }
131
-
132
- $name = __( 'Subtitle:', 'wp-photo-album-plus' );
133
- $desc = __( 'Select the content of the subtitle.', 'wp-photo-album-plus' );
134
- $slug = 'wppa_potd_subtitle';
135
- $opts = array( __( '--- none ---', 'wp-photo-album-plus' ),
136
- __( 'Photo Name', 'wp-photo-album-plus' ),
137
- __( 'Description', 'wp-photo-album-plus' ),
138
- __( 'Owner', 'wp-photo-album-plus' ),
139
- __( 'Extended', 'wp-photo-album-plus' ),
140
- );
141
- $vals = array( 'none',
142
- 'name',
143
- 'desc',
144
- 'owner',
145
- 'extended',
146
- );
147
- $html = wppa_potd_select( $slug, $opts, $vals );
148
- wppa_potd_setting( $slug, '5', $name, $desc, $html );
149
-
150
- $name = __( 'Counter:', 'wp-photo-album-plus' );
151
- $desc = __( 'Display a counter of other photos in the album.', 'wp-photo-album-plus' );
152
- $slug = 'wppa_potd_counter';
153
- $html = wppa_potd_checkbox( $slug );
154
- wppa_potd_setting( $slug, '6', $name, $desc, $html );
155
-
156
- $name = __( 'Link to:', 'wp-photo-album-plus' );
157
- $desc = __( 'The counter links to.', 'wp-photo-album-plus' );
158
- $slug = 'wppa_potd_counter_link';
159
- $opts = array( __( 'thumbnails', 'wp-photo-album-plus' ),
160
- __( 'slideshow', 'wp-photo-album-plus' ),
161
- __( 'single image', 'wp-photo-album-plus' ),
162
- );
163
- $vals = array( 'thumbs',
164
- 'slide',
165
- 'single',
166
- );
167
- $html = wppa_potd_select( $slug, $opts, $vals );
168
- wppa_potd_setting( $slug, '7', $name, $desc, $html );
169
-
170
- $name = __( 'Type of album(s) to use:', 'wp-photo-album-plus' );
171
- $desc = __( 'Select physical or virtual.', 'wp-photo-album-plus' );
172
- $slug = 'wppa_potd_album_type';
173
- $opts = array( __( 'physical albums', 'wp-photo-album-plus' ),
174
- __( 'virtual albums', 'wp-photo-album-plus' ),
175
- );
176
- $vals = array( 'physical',
177
- 'virtual',
178
- );
179
- $html = wppa_potd_select( $slug, $opts, $vals, $onch );
180
- wppa_potd_setting( $slug, '8', $name, $desc, $html );
181
-
182
- $name = __( 'Albums to use:', 'wp-photo-album-plus' );
183
- $desc = __( 'Select the albums to use for the photo of the day.', 'wp-photo-album-plus' );
184
- $slug = 'wppa_potd_album';
185
- if ( wppa_get_option( 'wppa_potd_album_type' ) == 'physical' ) {
186
- $html = '<select
187
- id="wppa_potd_album"
188
- name="wppa_potd_album"
189
- style="float:left; max-width: 400px; height: auto !important;"
190
- multiple="multiple"
191
- onchange="didsome=true;wppaAjaxUpdateOptionValue(\'potd_album\', this, true)"
192
- onmouseout="if(didsome)document.location.reload(true);"
193
- size="10"
194
- >' .
195
- wppa_album_select_a( array ( 'path' => true,
196
- 'optionclass' => 'potd_album',
197
- 'selected' => wppa_get_option( 'wppa_potd_album' ),
198
- ) ) . '
199
- </select>
200
- <img
201
- id="img_potd_album"
202
- src="' . esc_url( wppa_get_imgdir() ) . 'star.ico"
203
- title="' . esc_attr( __( 'Setting unmodified', 'wp-photo-album-plus' ) ) . '"
204
- style="padding:0 4px; float:left; height:16px; width:16px;"
205
- />';
206
- wppa_potd_setting( $slug, '9', $name, $desc, $html );
207
- }
208
- else {
209
- $desc = __( 'Select the albums to use for the photo of the day.', 'wp-photo-album-plus' );
210
- $opts = array( __( '- all albums -' , 'wp-photo-album-plus' ),
211
- __( '- all -separate- albums -' , 'wp-photo-album-plus' ),
212
- __( '- all albums except -separate-' , 'wp-photo-album-plus' ),
213
- __( '- top rated photos -' , 'wp-photo-album-plus' ),
214
- );
215
- $vals = array( 'all',
216
- 'sep',
217
- 'all-sep',
218
- 'topten',
219
- );
220
- $html = wppa_potd_select( $slug, $opts, $vals );
221
- wppa_potd_setting( $slug, '9', $name, $desc, $html );
222
- }
223
-
224
- if ( wppa_get_option( 'wppa_potd_album_type' ) == 'physical' ) {
225
- $name = __( 'Include (grand)children:', 'wp-photo-album-plus' );
226
- $desc = __( 'Include the photos of all sub albums?', 'wp-photo-album-plus' );
227
- $slug = 'wppa_potd_include_subs';
228
- $html = wppa_potd_checkbox( $slug, $onch );
229
- wppa_potd_setting( $slug, '9a', $name, $desc, $html );
230
-
231
- $name = __( 'Inverse selection:', 'wp-photo-album-plus' );
232
- $desc = __( 'Use any album, except the selection made above.', 'wp-photo-album-plus' );
233
- $slug = 'wppa_potd_inverse';
234
- $html = wppa_potd_checkbox( $slug, $onch );
235
- wppa_potd_setting( $slug, '9b', $name, $desc, $html );
236
- }
237
-
238
- $name = __( 'Status filter:', 'wp-photo-album-plus' );
239
- $desc = __( 'Use only photos with a certain status.', 'wp-photo-album-plus' );
240
- $slug = 'wppa_potd_status_filter';
241
- $opts = array( __( '- none -', 'wp-photo-album-plus' ),
242
- __( 'Publish' , 'wp-photo-album-plus' ),
243
- __( 'Featured' , 'wp-photo-album-plus' ),
244
- __( 'Gold' , 'wp-photo-album-plus' ),
245
- __( 'Silver' , 'wp-photo-album-plus' ),
246
- __( 'Bronze' , 'wp-photo-album-plus' ),
247
- __( 'Any medal' , 'wp-photo-album-plus' ),
248
- );
249
- $vals = array( 'none',
250
- 'publish',
251
- 'featured',
252
- 'gold',
253
- 'silver',
254
- 'bronze',
255
- 'anymedal',
256
- );
257
- $html = wppa_potd_select( $slug, $opts, $vals );
258
- wppa_potd_setting( $slug, '10', $name, $desc, $html );
259
-
260
- $name = __( 'Display method:', 'wp-photo-album-plus' );
261
- $desc = __( 'Select the way a photo will be selected.', 'wp-photo-album-plus' );
262
- $slug = 'wppa_potd_method';
263
- $opts = array( __( 'Fixed photo', 'wp-photo-album-plus' ),
264
- __( 'Random', 'wp-photo-album-plus' ),
265
- __( 'Last upload', 'wp-photo-album-plus' ),
266
- __( 'Change every', 'wp-photo-album-plus' ),
267
- );
268
- $vals = array( '1',
269
- '2',
270
- '3',
271
- '4',
272
- );
273
- $html = wppa_potd_select( $slug, $opts, $vals, $onch );
274
- wppa_potd_setting( $slug, '11', $name, $desc, $html );
275
-
276
- if ( wppa_get_option( 'wppa_potd_method' ) == '4' ) { // Change every
277
- $name = __( 'Change every period:', 'wp-photo-album-plus' );
278
- $desc = __( 'The time period a certain photo is used.', 'wp-photo-album-plus' );
279
- $slug = 'wppa_potd_period';
280
- $opts = array( __( 'pageview.', 'wp-photo-album-plus' ),
281
- __( 'hour.', 'wp-photo-album-plus' ),
282
- __( 'day.', 'wp-photo-album-plus' ),
283
- __( 'week.', 'wp-photo-album-plus' ),
284
- __( 'month.', 'wp-photo-album-plus' ),
285
- __( 'day of week is order#', 'wp-photo-album-plus' ),
286
- __( 'day of month is order#', 'wp-photo-album-plus' ),
287
- __( 'day of year is order#', 'wp-photo-album-plus' ),
288
- __( 'week number is order#', 'wp-photo-album-plus' ),
289
- );
290
- $vals = array( '0',
291
- '1',
292
- '24',
293
- '168',
294
- '736',
295
- 'day-of-week',
296
- 'day-of-month',
297
- 'day-of-year',
298
- 'week',
299
- );
300
- $html = wppa_potd_select( $slug, $opts, $vals, $onch );
301
- wppa_potd_setting( $slug, '11a', $name, $desc, $html );
302
-
303
- $wppa_widget_period = wppa_get_option( 'wppa_potd_period' );
304
- if ( substr( $wppa_widget_period, 0, 7 ) == 'day-of-' ) {
305
- switch( substr( $wppa_widget_period, 7 ) ) {
306
- case 'week':
307
- $n_days = '7';
308
- $date_key = 'w';
309
- break;
310
- case 'month':
311
- $n_days = '31';
312
- $date_key = 'd';
313
- break;
314
- case 'year':
315
- $n_days = '366';
316
- $date_key = 'z';
317
- break;
318
- default:
319
- $n_days = '';
320
- $date_key = '';
321
- break;
322
- }
323
- while ( wppa_get_option( 'wppa_potd_offset', '0' ) > $n_days ) {
324
- update_option( 'wppa_potd_offset', wppa_get_option( 'wppa_potd_offset') - $n_days );
325
- }
326
- while ( wppa_get_option( 'wppa_potd_offset', '0' ) < '0' ) {
327
- update_option( 'wppa_potd_offset', wppa_get_option( 'wppa_potd_offset') + $n_days );
328
- }
329
-
330
- $name = __( 'Day offset:', 'wp-photo-album-plus' );
331
- $desc = __( 'The difference between daynumber and photo order number.', 'wp-photo-album-plus' );
332
- $slug = 'wppa_potd_offset';
333
- $opts = array();
334
- $day = '0';
335
- while ( $day < $n_days ) {
336
- $opts[] = $day;
337
- $day++;
338
- }
339
- $vals = $opts;
340
- $html = '<span style="float:left;" >' .
341
- sprintf( __('Current day# = %s, offset =', 'wp-photo-album-plus'), wppa_local_date( $date_key ) ) .
342
- '</span> ' .
343
- wppa_potd_select( $slug, $opts, $vals, $onch );
344
-
345
- $photo_order = wppa_local_date( $date_key ) - wppa_get_option( 'wppa_potd_offset', '0' );
346
- while ( $photo_order < '0' ) {
347
- $photo_order += $n_days;
348
- }
349
-
350
- $html .= sprintf( __( 'Todays photo order# = %s.', 'wp-photo-album-plus' ), $photo_order );
351
- wppa_potd_setting( $slug, '11b', $name, $desc, $html );
352
-
353
- }
354
- }
355
-
356
- $name = __( 'Preview', 'wp-photo-album-plus' );
357
- $desc = __( 'Current "photo of the day":', 'wp-photo-album-plus' );
358
- $slug = 'wppa_potd_photo';
359
- $photo = wppa_get_potd();
360
- if ( $photo ) {
361
- $html = '<div style="display:inline-block;width:25%;text-align:center;vertical-align:middle;">' .
362
- '<img
363
- src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"
364
- style="max-width:' . wppa_opt( 'thumbsize' ) . 'px;"
365
- />' .
366
- '</div>' .
367
- '<div style="display:inline-block;width:75%;text-align:center;vertical-align:middle;" >' .
368
- __( 'Album', 'wp-photo-album-plus' ) . ': ' . htmlspecialchars( wppa_get_album_name( $photo['album'] ) ) .
369
- '<br />' .
370
- __('Uploader', 'wp-photo-album-plus') . ': ' . htmlspecialchars( $photo['owner'] ) .
371
- '</div>';
372
-
373
- }
374
- else {
375
- $html = __( 'Not found.', 'wp-photo-album-plus' );
376
- }
377
- wppa_potd_setting( $slug, '12', $name, $desc, $html );
378
-
379
- $name = __( 'Show selection', 'wp-photo-album-plus' );
380
- $desc = __( 'Show the photos in the current selection.', 'wp-photo-album-plus' );
381
- $slug = 'wppa_potd_preview';
382
- $html = wppa_potd_checkbox( $slug, $onch );
383
- wppa_potd_setting( $slug, '13', $name, $desc, $html );
384
-
385
- $name = __( 'Log potd', 'wp-photo-album-plus' );
386
- $desc = __( 'Keep track of the potd history', 'wp-photo-album-plus' );
387
- $slug = 'wppa_potd_log';
388
- $html = wppa_potd_checkbox( $slug );
389
- wppa_potd_setting( $slug, '14', $name, $desc, $html );
390
-
391
- $name = __( 'Log potd max', 'wp-photo-album-plus' );
392
- $desc = __( 'Max length of the potd history (items)', 'wp-photo-album-plus' );
393
- $slug = 'wppa_potd_log_max';
394
- $opts = array( '5', '10', '15', '20', '30', '50', '100' );
395
- $html = wppa_potd_select( $slug, $opts, $opts );
396
- wppa_potd_setting( $slug, '15', $name, $desc, $html );
397
-
398
-
399
- // Cose table body
400
- echo
401
- '</tbody>';
402
-
403
- // Table footer
404
- echo
405
- '<tfoot style="font-weight: bold;" >' .
406
- '<tr>' .
407
- '<td>' . __( '#', 'wp-photo-album-plus' ) . '</td>' .
408
- '<td>' . __( 'Name', 'wp-photo-album-plus' ) . '</td>' .
409
- '<td>' . __( 'Description', 'wp-photo-album-plus') . '</td>' .
410
- '<td>' . __( 'Setting', 'wp-photo-album-plus') . '</td>' .
411
- '</tr>' .
412
- '</tfoot>' .
413
- '</table>';
414
-
415
- // Status star must be here for js
416
- echo
417
- '<img' .
418
- ' id="img_potd_photo"' .
419
- ' src="' . esc_url( wppa_get_imgdir( 'star.ico' ) ) . '" style="height:12px;display:none;"' .
420
- ' />';
421
-
422
- // The potd photo pool
423
- echo
424
- '<table class="widefat wppa-table wppa-setting-table" >';
425
-
426
- // Table header
427
- echo
428
- '<thead>' .
429
- '<tr>' .
430
- '<td>' .
431
- htmlspecialchars( __( 'Photos in the current selection', 'wp-photo-album-plus' ) ) .
432
- '</td>' .
433
- '</tr>' .
434
- '</thead>';
435
-
436
- // Table body
437
- if ( wppa_switch( 'potd_preview' ) ) {
438
- echo
439
- '<tbody>' .
440
- '<tr>' .
441
- '<td>';
442
-
443
- // Get the photos
444
- $alb = wppa_opt( 'potd_album' );
445
- $opt = wppa_is_int( $alb ) ? ' ' . wppa_get_photo_order( $alb ) . ' ' : '';
446
- $photos = wppa_get_widgetphotos( $alb, $opt );
447
-
448
- // Count them
449
- $cnt = $photos ? count( $photos ) : 0;
450
-
451
- // Find current
452
- $curid = wppa_opt( 'potd_photo' );
453
-
454
- // See if we do this
455
- if ( empty( $photos ) ) {
456
- echo htmlspecialchars( __( 'No photos in the selection', 'wp-photo-album-plus' ) );
457
- }
458
- elseif ( $cnt > '5000' ) {
459
- echo htmlspecialchars( sprintf( __( 'There are too many photos in the selection to show a preview ( %d )', 'wp-photo-album-plus' ), $cnt ) );
460
- }
461
- else {
462
-
463
- // Yes, display the pool
464
- foreach ( $photos as $photo ) {
465
- $id = $photo['id'];
466
-
467
- // Open container div
468
- echo '
469
- <div
470
- class="photoselect"
471
- style="width:180px;height:200px;overflow:hidden;"
472
- >';
473
-
474
- // Open image container div
475
- echo '
476
- <div
477
- style="width:180px;height:135px;overflow:hidden;text-align:center;"
478
- >';
479
-
480
- // The image if a video
481
- if ( wppa_is_video( $id ) ) {
482
- echo wppa_get_video_html( array( 'id' => $id,
483
- 'style' => 'width:180px;'
484
- ));
485
- }
486
-
487
- // The image if a photo
488
- else {
489
- echo '
490
- <img
491
- src="' . esc_url( wppa_get_thumb_url( $id ) ) . '"
492
- style="max-width:180px;max-height:135px;margin:auto;"
493
- alt="' . esc_attr( wppa_get_photo_name( $id ) ) . '"
494
- />';
495
-
496
- // Audio ?
497
- if ( wppa_has_audio( $id ) ) {
498
- echo wppa_get_audio_html( array( 'id' => $id,
499
- 'style' => 'width:180px;' .
500
- 'position:relative;' .
501
- 'bottom:' . ( wppa_get_audio_control_height() + 4 ) .'px;'
502
- ));
503
- }
504
- }
505
-
506
- // Close image container div
507
- echo '
508
- </div>';
509
-
510
- // The order# and select radio box
511
- echo '
512
- <div
513
- style="clear:both;width:100%;margin:3px 0;position:relative;top:5px;"
514
- >
515
- <div
516
- style="font-size:9px; line-height:10px;float:left;"
517
- >
518
- (#' . strval( intval( $photo['p_order'] ) ) . ')
519
- </div>';
520
-
521
- if ( wppa_get_option( 'wppa_potd_method' ) == '1' ) { // Only if fixed photo
522
- echo '
523
- <input
524
- style="float:right;"
525
- type="radio"
526
- name="wppa-widget-photo"
527
- id="wppa-widget-photo-' . strval( intval( $id ) ) . '"
528
- value="' . esc_attr( $id ) . '"' .
529
- ( $id == $curid ? 'checked="checked"' : '' ) . '
530
- onchange="wppaSetFixed(' . strval( intval( $id ) ) . ');"
531
- />';
532
- }
533
-
534
- echo '
535
- </div>';
536
-
537
- // The name/desc boxecho
538
- echo '
539
- <div
540
- style="clear:both;overflow:hidden;height:150px;position:relative;top:10px;"
541
- >
542
- <div
543
- style="font-size:11px;overflow:hidden;"
544
- >' .
545
- wppa_get_photo_name( $id ) . '
546
- </div>
547
- <div
548
- style="font-size:9px;line-height:10px;"
549
- >' .
550
- wppa_get_photo_desc( $id ) . '
551
- </div>
552
- </div>';
553
-
554
- // Close container
555
- echo '
556
- </div>';
557
- }
558
- echo '
559
- <div class="clear"></div>';
560
- }
561
-
562
- // Close the table
563
- echo '
564
- </td>
565
- </tr>
566
- </tbody>';
567
- }
568
- echo '
569
- </table>';
570
-
571
- // Close wrap
572
- echo '
573
- </div>';
574
- }
575
-
576
- // The functions below this line are different from the ones with the same names in the Settings page!!!
577
- function wppa_potd_setting( $slug, $num, $name, $desc, $html ) {
578
-
579
- echo '
580
- <tr
581
- id="potd-setting"
582
- style="color:#333;"
583
- >
584
- <td>' . htmlspecialchars( $num ) . '</td>
585
- <td>' . htmlspecialchars( $name ) . '</td>
586
- <td><small>' . htmlspecialchars( $desc ) . '</small></td>
587
- <td>' . $html . '</td>
588
- </tr>';
589
- }
590
-
591
-
592
- function wppa_potd_checkbox( $xslug, $onchange = '' ) {
593
-
594
- $slug = substr( $xslug, 5 );
595
-
596
- $html = '
597
- <input
598
- id="' . $slug . '"
599
- style="float:left;height:15px;margin:0px;padding:0px;"
600
- type="checkbox"' .
601
- ( wppa_switch( $slug ) ? ' checked="checked"' : '' ) . '
602
- onchange="' . $onchange . ';wppaAjaxUpdateOptionCheckBox(\'' . $slug . '\', this)"
603
- />
604
- <img
605
- id="img_' . $slug . '"
606
- src="' . esc_url( wppa_get_imgdir() . 'star.ico' ) . '"
607
- title="' . esc_attr( __( 'Setting unmodified', 'wp-photo-album-plus' ) ) . '"
608
- style="padding-left:4px;float:left;height:16px;width:16px;"
609
- />';
610
-
611
- return $html;
612
- }
613
-
614
- function wppa_potd_input( $xslug, $width, $minwidth = '', $text = '', $onchange = '', $placeholder = '' ) {
615
-
616
- $slug = substr( $xslug, 5 );
617
-
618
- $html = '
619
- <input
620
- id="' . $slug . '"
621
- style="float:left;
622
- width:' . $width . ';
623
- height:20px;
624
- ' . ( $minwidth ? ' min-width:' . $minwidth . ';' : '' ) . '
625
- font-size:11px;
626
- margin:0px;
627
- padding:0px;"
628
- type="text"
629
- placeholder="' . $placeholder . '"
630
- onchange="' . $onchange . ';wppaAjaxUpdateOptionValue(\'' . $slug . '\', this)"
631
- value="' . esc_attr( wppa_opt( $slug ) ) . '"
632
- />
633
- <img
634
- id="img_' . $slug . '"
635
- src="' . esc_url( wppa_get_imgdir() . 'star.ico' ) . '"
636
- title="' . esc_attr( __( 'Setting unmodified', 'wp-photo-album-plus' ) ) .'"
637
- style="padding:04px;float:left;height:16px;width:16px;"
638
- />
639
- <span style="float:left">' . $text . '</span>';
640
-
641
- return $html;
642
- }
643
-
644
- function wppa_potd_select( $xslug, $options, $values, $onchange = '', $class = '', $first_disable = false, $postaction = '', $max_width = '220' ) {
645
-
646
- $slug = substr( $xslug, 5 );
647
-
648
- $html = '
649
- <select
650
- id="' . $slug . '"
651
- style="float:left;font-size:11px;height:20px;margin:0px;padding:0px;max-width:' . $max_width . 'px;"
652
- onchange="' . $onchange . ';wppaAjaxUpdateOptionValue(\'' . $slug . '\', this);' . $postaction . '"
653
- class="' . $class . '"
654
- >';
655
-
656
- $val = wppa_opt( $slug );
657
-
658
- foreach( array_keys( $options ) as $idx ) {
659
-
660
- $html .= '
661
- <option
662
- value="' . $values[$idx] . '"' .
663
- ( $idx == 0 && $first_disable ? ' disabled="disabled"' : '' ) .
664
- ( $val == $values[$idx] ? ' selected="selected"' : '' ) . '
665
- >' .
666
- $options[$idx] . '
667
- </option>';
668
- }
669
-
670
- $html .= '
671
- </select>
672
- <img
673
- id="img_' . $slug . '"
674
- class="' . $class . '"
675
- src="' . esc_url( wppa_get_imgdir() . 'star.ico' ) . '"
676
- title="' . esc_attr( __( 'Setting unmodified', 'wp-photo-album-plus' ) ) . '"
677
- style="padding:0 4px;float:left;height:16px;width:16px;"
678
- />';
679
-
680
- return $html;
681
- }
682
-
683
- require_once 'wppa-widget-functions.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wppa-potd-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
- * Version 7.5.10
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -64,27 +64,19 @@ class PhotoOfTheDay extends WP_Widget {
64
  // Make the HTML for current picture
65
  $widget_content = "\n".'<!-- WPPA+ Photo of the day Widget start -->';
66
 
67
- $ali = wppa_opt( 'potd_align' );
68
- if ( $ali != 'none' ) {
69
- $align = 'text-align:'.$ali.';';
70
- }
71
- else $align = '';
72
-
73
  $widget_content .= '
74
  <div' .
75
  ' class="wppa-widget-photo"' .
76
- ' style="' . $align . ' padding-top:2px;position:relative;"' .
77
  ' data-wppa="yes"' .
78
  ' >';
79
 
80
  if ( $image ) {
81
 
82
  $id = $image['id'];
83
- $w = wppa_opt( 'potd_widget_width' );
84
  $ratio = ( wppa_get_photox( $id ) ? wppa_get_photoy( $id ) / wppa_get_photox( $id ) : 1 );
85
- $h = round( $w * $ratio );
86
- $usethumb = wppa_use_thumb_file( $id, wppa_opt( 'potd_widget_width' ), '0' );
87
- $imgurl = $usethumb ? wppa_get_thumb_url( $id, true, '', $w, $h ) : wppa_get_photo_url( $id, true, '', $w, $h );
88
  $name = wppa_get_photo_name( $id );
89
  $page = ( in_array( wppa_opt( 'potd_linktype' ), wppa( 'links_no_page' ) ) && ! wppa_switch( 'potd_counter' ) ) ? '' : wppa_get_the_landing_page( 'potd_linkpage', __('Photo of the day', 'wp-photo-album-plus') );
90
  $link = wppa_get_imglnk_a( 'potdwidget' , $id );
@@ -99,7 +91,7 @@ class PhotoOfTheDay extends WP_Widget {
99
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
100
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
101
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
102
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '"' .
103
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
104
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
105
  wppa_get_lb_panorama_full_html( $id ) .
@@ -131,12 +123,11 @@ class PhotoOfTheDay extends WP_Widget {
131
  $widget_content .= wppa_get_medal_html_a( array( 'id' => $id, 'size' => 'M', 'where' => 'top' ) );
132
 
133
  // The link, if any
134
- if ($link) $widget_content .= "\n\t".'<a href = "'.$link['url'].'" target="'.$link['target'].'" '.$lightbox.' ' . wppa( 'lbtitle' ) . '="'.$ltitle.'">';
135
 
136
  // The image
137
  if ( wppa_is_video( $id ) ) {
138
  $widget_content .= "\n\t\t".wppa_get_video_html( array ( 'id' => $id,
139
- 'width' => wppa_opt( 'potd_widget_width' ),
140
  'title' => $title,
141
  'controls' => ( wppa_opt( 'potd_linktype' ) == 'none' ),
142
  'cursor' => $cursor
@@ -145,7 +136,7 @@ class PhotoOfTheDay extends WP_Widget {
145
  else {
146
  $widget_content .= '<img' .
147
  ' src="'.$imgurl.'"' .
148
- ' style="width: '.wppa_opt( 'potd_widget_width' ).'px;'.$cursor.'"' .
149
  ' ' . wppa_get_imgalt( $id ) .
150
  ( $title ? 'title="' . $title . '"' : '' ) .
151
  ' />';
@@ -185,7 +176,6 @@ class PhotoOfTheDay extends WP_Widget {
185
  // Audio
186
  if ( wppa_has_audio( $id ) ) {
187
  $widget_content .= wppa_get_audio_html( array ( 'id' => $id,
188
- 'width' => wppa_opt( 'potd_widget_width' ),
189
  'controls' => true
190
  ));
191
  }
@@ -202,21 +192,21 @@ class PhotoOfTheDay extends WP_Widget {
202
  case 'none':
203
  break;
204
  case 'name':
205
- $widget_content .= '<div class="wppa-widget-text wppa-potd-text" style="'.$align.'">' . wppa_get_photo_name( $id ) . '</div>';
206
  break;
207
  case 'desc':
208
- $widget_content .= "\n".'<div class="wppa-widget-text wppa-potd-text" style="'.$align.'">' . wppa_get_photo_desc( $id ) . '</div>';
209
  break;
210
  case 'owner':
211
  $owner = $image['owner'];
212
  $user = wppa_get_user_by('login', $owner);
213
  $owner = $user->display_name;
214
- $widget_content .= "\n".'<div class="wppa-widget-text wppa-potd-text" style="'.$align.'">'.__('By:', 'wp-photo-album-plus').' ' . $owner . '</div>';
215
  break;
216
  case 'extended':
217
  $alb = wppa_get_photo_item( $id, 'album' );
218
  $widget_content .=
219
- '<div class="wppa-widget-text wppa-potd-text" style="'.$align.'">' .
220
  '<span class="potd-pname" >' . wppa_get_photo_name( $id ) . '</span>' .
221
  '<span class="pots-pdesc" >' . wppa_get_photo_desc( $id ) . '</span>' .
222
  '<br />' .
@@ -293,7 +283,7 @@ class PhotoOfTheDay extends WP_Widget {
293
  // Set defaults
294
  function get_defaults() {
295
 
296
- $defaults = array( 'title' => wppa_opt( 'potd_title' ),
297
  'logonly' => 'no',
298
  'cache' => '0',
299
  );
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
+ * Version 8.0.00.012
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
64
  // Make the HTML for current picture
65
  $widget_content = "\n".'<!-- WPPA+ Photo of the day Widget start -->';
66
 
 
 
 
 
 
 
67
  $widget_content .= '
68
  <div' .
69
  ' class="wppa-widget-photo"' .
70
+ ' style="padding-top:2px;position:relative;"' .
71
  ' data-wppa="yes"' .
72
  ' >';
73
 
74
  if ( $image ) {
75
 
76
  $id = $image['id'];
 
77
  $ratio = ( wppa_get_photox( $id ) ? wppa_get_photoy( $id ) / wppa_get_photox( $id ) : 1 );
78
+ $usethumb = wppa_use_thumb_file( $id, '300', '0' );
79
+ $imgurl = $usethumb ? wppa_get_thumb_url( $id, true ) : wppa_get_photo_url( $id, true );
 
80
  $name = wppa_get_photo_name( $id );
81
  $page = ( in_array( wppa_opt( 'potd_linktype' ), wppa( 'links_no_page' ) ) && ! wppa_switch( 'potd_counter' ) ) ? '' : wppa_get_the_landing_page( 'potd_linkpage', __('Photo of the day', 'wp-photo-album-plus') );
82
  $link = wppa_get_imglnk_a( 'potdwidget' , $id );
91
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
92
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
93
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
94
+ ' data-rel="wppa"' .
95
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
96
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
97
  wppa_get_lb_panorama_full_html( $id ) .
123
  $widget_content .= wppa_get_medal_html_a( array( 'id' => $id, 'size' => 'M', 'where' => 'top' ) );
124
 
125
  // The link, if any
126
+ if ($link) $widget_content .= "\n\t".'<a href = "'.$link['url'].'" target="'.$link['target'].'" '.$lightbox.' ' . 'data-lbtitle' . '="'.$ltitle.'">';
127
 
128
  // The image
129
  if ( wppa_is_video( $id ) ) {
130
  $widget_content .= "\n\t\t".wppa_get_video_html( array ( 'id' => $id,
 
131
  'title' => $title,
132
  'controls' => ( wppa_opt( 'potd_linktype' ) == 'none' ),
133
  'cursor' => $cursor
136
  else {
137
  $widget_content .= '<img' .
138
  ' src="'.$imgurl.'"' .
139
+ ' style="width: auto;'.$cursor.'"' .
140
  ' ' . wppa_get_imgalt( $id ) .
141
  ( $title ? 'title="' . $title . '"' : '' ) .
142
  ' />';
176
  // Audio
177
  if ( wppa_has_audio( $id ) ) {
178
  $widget_content .= wppa_get_audio_html( array ( 'id' => $id,
 
179
  'controls' => true
180
  ));
181
  }
192
  case 'none':
193
  break;
194
  case 'name':
195
+ $widget_content .= '<div class="wppa-widget-text wppa-potd-text" >' . wppa_get_photo_name( $id ) . '</div>';
196
  break;
197
  case 'desc':
198
+ $widget_content .= "\n".'<div class="wppa-widget-text wppa-potd-text" >' . wppa_get_photo_desc( $id ) . '</div>';
199
  break;
200
  case 'owner':
201
  $owner = $image['owner'];
202
  $user = wppa_get_user_by('login', $owner);
203
  $owner = $user->display_name;
204
+ $widget_content .= "\n".'<div class="wppa-widget-text wppa-potd-text" >'.__('By:', 'wp-photo-album-plus').' ' . $owner . '</div>';
205
  break;
206
  case 'extended':
207
  $alb = wppa_get_photo_item( $id, 'album' );
208
  $widget_content .=
209
+ '<div class="wppa-widget-text wppa-potd-text" >' .
210
  '<span class="potd-pname" >' . wppa_get_photo_name( $id ) . '</span>' .
211
  '<span class="pots-pdesc" >' . wppa_get_photo_desc( $id ) . '</span>' .
212
  '<br />' .
283
  // Set defaults
284
  function get_defaults() {
285
 
286
+ $defaults = array( 'title' => __('Photo of the day', 'wp-photo-album-plus'),
287
  'logonly' => 'no',
288
  'cache' => '0',
289
  );
wppa-search-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
- * Version 7.3.03
7
  *
8
  */
9
 
@@ -188,14 +188,9 @@ class SearchPhotos extends WP_Widget {
188
 
189
  if ( $pages ) {
190
 
191
- // Add parents optionally OR translate only
192
- if ( wppa_switch( 'hier_pagesel' ) ) $pages = wppa_add_parents( $pages );
193
-
194
- // Just translate qTranslate-x
195
- else {
196
- foreach ( array_keys( $pages ) as $index ) {
197
- $pages[$index]['post_title'] = __( stripslashes( $pages[$index]['post_title'] ) );
198
- }
199
  }
200
 
201
  // Sort alpahbetically
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the search widget
6
+ * Version 8.0.00.007
7
  *
8
  */
9
 
188
 
189
  if ( $pages ) {
190
 
191
+ // Translate qTranslate-x
192
+ foreach ( array_keys( $pages ) as $index ) {
193
+ $pages[$index]['post_title'] = __( stripslashes( $pages[$index]['post_title'] ) );
 
 
 
 
 
194
  }
195
 
196
  // Sort alpahbetically
wppa-setting-functions.php ADDED
@@ -0,0 +1,1031 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* wppa-setting-functions.php
3
+ * Package: wp-photo-album-plus
4
+ *
5
+ * manage all options
6
+ * Version 8.0.00.012
7
+ *
8
+ */
9
+
10
+ function wppa_input( $xslug, $width, $minwidth = '', $text = '', $onchange = '', $placeholder = '' ) {
11
+ global $wppa_opt;
12
+
13
+ $slug = substr( $xslug, 5 );
14
+ $tit = __( 'Slug =', 'wp-photo-album-plus') . ' ' . $xslug;
15
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? esc_attr( $tit ) : '';
16
+ $val = wppa_opt( $slug );
17
+ $html = '
18
+ <input
19
+ id="' . $slug . '"
20
+ title="' . $title . '"
21
+ style="
22
+ float:left;
23
+ width:' . $width . ';
24
+ height:20px;padding:0 0 0 5px;
25
+ min-width:' . $minwidth . ';
26
+ font-size: 11px;
27
+ margin: 0px;
28
+ "
29
+ type="text"
30
+ onchange="' .
31
+ esc_attr( $onchange ) . ';
32
+ wppaAjaxUpdateOptionValue(\'' . $slug . '\', this);
33
+ "
34
+ placeholder="' . $placeholder . '"
35
+ value="' . $val . '"
36
+ />
37
+ <img
38
+ id="img_' . $slug . '"
39
+ src="' . wppa_get_imgdir() . 'star.ico"
40
+ title="' . __( 'Setting unmodified', 'wp-photo-album-plus' ) . '"
41
+ style="
42
+ padding:0 4px;
43
+ float:left;
44
+ height:16px;
45
+ width:16px;
46
+ "
47
+ />
48
+ <span
49
+ style="float:left"
50
+ >' .
51
+ $text . '
52
+ </span>';
53
+
54
+ $html .= wppa_setting_star( $onchange );
55
+
56
+ return $html;
57
+ }
58
+
59
+ function wppa_number($xslug, $min, $max, $text = '', $onchange = '') {
60
+ global $wppa_opt;
61
+
62
+ $slug = substr( $xslug, 5 );
63
+ $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
64
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
65
+ $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : wppa_get_option( $xslug, '' );
66
+ $html = '<input'.$title.' style="float:left; height:20px; width:50px;padding:0 0 0 5px;';
67
+ $html .= ' font-size: 11px; margin: 0px;" type="number" id="'.$slug.'"';
68
+ if ($onchange != '') $html .= ' onchange="'. esc_attr( $onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);').'"';
69
+ else $html .= ' onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)"';
70
+ $html .= ' value="'.$val.'" min="'.$min.'" max="'.$max.'" />';
71
+ $html .= '<img id="img_'.$slug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
72
+ $html .= '<span style="float:left">'.$text.'</span>';
73
+
74
+ $html .= wppa_setting_star( $onchange );
75
+
76
+ return $html;
77
+ }
78
+
79
+ function wppa_input_color($xslug, $width, $minwidth = '', $text = '', $onchange = '', $placeholder = '') {
80
+ global $wppa_opt;
81
+
82
+ $slug = substr( $xslug, 5 );
83
+ $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
84
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
85
+ $val = isset ( $wppa_opt[ $xslug ] ) ? esc_attr( $wppa_opt[ $xslug ] ) : wppa_get_option( $xslug, '' );
86
+ $html = '<input'.$title.' type="color" style="float:left; width: '.$width.'; height:20px;padding:0 0 0 5px;';
87
+ if ($minwidth != '') $html .= ' min-width:'.$minwidth.';';
88
+ $html .= ' font-size: 11px; margin: 0px; padding:" type="text" id="'.$slug.'"';
89
+ if ($onchange != '') $html .= ' onchange="'.esc_attr($onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);').'"';
90
+ else $html .= ' onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)"';
91
+ if ( $placeholder ) $html .= ' placeholder="'.$placeholder.'"';
92
+ $html .= ' value="'.$val.'" />';
93
+ $html .= '<img id="img_'.$slug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
94
+ $html .= '<span style="float:left">'.$text.'</span>';
95
+
96
+ $html .= wppa_setting_star( $onchange );
97
+
98
+ return $html;
99
+ }
100
+
101
+ function wppa_edit( $xslug, $value, $width = '90%', $minwidth = '', $text = '', $onch = '' ) {
102
+
103
+ // Slug
104
+ $slug = substr( $xslug, 5 );
105
+
106
+ // Title
107
+ $tit = __( 'Slug =', 'wp-photo-album-plus' ) . ' ' . $xslug;
108
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? esc_attr( $tit ) : '';
109
+
110
+ // Style
111
+ $style = 'float:left;width:' . $width . ';height:20px;';
112
+ $style .= 'font-size:11px;margin:0;padding:0 0 0 5px;';
113
+ if ( $minwidth != '' ) {
114
+ $style .= 'min-width:' . $minwidth . ';';
115
+ }
116
+
117
+ // Onchange
118
+ $onchange = ltrim( $onch . ';wppaAjaxUpdateOptionValue(\'' . $slug . '\',this)', ';' );
119
+
120
+ // Compose the html
121
+ $html = '
122
+ <input
123
+ id="' . esc_attr( $slug ) . '"
124
+ title="' . esc_attr( $title ) . '"
125
+ type="text"
126
+ style="' . esc_attr( $style ) . '"
127
+ value="' . esc_attr( $value ) . '"
128
+ onchange="' . esc_attr( $onchange ) . '"
129
+ />
130
+ <img
131
+ id="' . esc_attr( 'img_' . str_replace( '#', 'H', $slug ) ) . '"
132
+ src="' . esc_url( wppa_get_imgdir() . 'star.ico' ) . '"
133
+ title="' . esc_attr( __( 'Setting unmodified', 'wp-photo-album-plus' ) ) . '"
134
+ style="padding:0 4px;float:left;height:16px;width:16px;"
135
+ />' .
136
+ $text;
137
+
138
+ $html .= wppa_setting_star( $onchange );
139
+
140
+ return $html;
141
+ }
142
+
143
+ function wppa_textarea($xslug, $buttonlabel = '' ) {
144
+
145
+ $slug = substr( $xslug, 5 );
146
+ if ( wppa_switch( 'use_wp_editor') ) { // New style textarea, use wp_editor
147
+ $editor_id = str_replace( '_', '', $slug);
148
+ ob_start();
149
+ $quicktags_settings = array( 'buttons' => 'strong,em,link,block,ins,ul,ol,li,code,close' );
150
+ wp_editor( wppa_opt( $slug ), $editor_id, $settings = array('wpautop' => false, 'media_buttons' => false, 'textarea_rows' => '6', 'textarea_name' => $slug, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
151
+ $html = ob_get_clean();
152
+ $blbl = __('Update', 'wp-photo-album-plus');
153
+ if ( $buttonlabel ) $blbl .= ' '.$buttonlabel;
154
+
155
+ $html .= wppa_ajax_button($blbl, $slug, $editor_id, 'no_confirm');
156
+ }
157
+ else {
158
+ $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug;
159
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
160
+
161
+ $html = '<textarea id="'.esc_attr($slug).'"'.$title.' style="float:left; width:300px;" onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)" >';
162
+ $html .= esc_textarea( stripslashes( wppa_opt( $slug )));
163
+ $html .= '</textarea>';
164
+
165
+ $html .= '<img id="img_'.$slug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
166
+ }
167
+
168
+ return $html;
169
+ }
170
+
171
+ function wppa_checkbox($xslug, $onchange = '', $class = '') {
172
+ global $wppa_defaults;
173
+ global $wppa_opt;
174
+
175
+ $html = '';
176
+ $slug = substr( $xslug, 5 );
177
+ $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug."\n".__('Values = yes, no', 'wp-photo-album-plus');
178
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
179
+ $html .= '<input style="float:left; height: 15px; margin: 0px; padding: 0px;" type="checkbox" id="'.$slug.'"'.$title;
180
+ if ( wppa_switch( $slug ) ) $html .= ' checked="checked"';
181
+ if ($onchange != '') $html .= ' onchange="'.esc_attr($onchange.';wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this);').'"';
182
+ else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$slug.'\', this)"';
183
+
184
+ if ($class != '') $html .= ' class="'.$class.'"';
185
+ $html .= ' /><img id="img_'.$slug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;"';
186
+ if ($class != '') $html .= ' class="'.$class.'"';
187
+ $html .= ' />';
188
+
189
+ $html .= wppa_setting_star( $onchange );
190
+
191
+ return $html;
192
+ }
193
+
194
+ function wppa_checkbox_e($xslug, $curval, $onchange = '', $class = '', $enabled = true) {
195
+
196
+ $slug = substr( $xslug, 5 );
197
+ $html = '<input style="float:left; height: 15px; margin: 0px; padding: 0px;" type="checkbox" id="'.$slug.'"';
198
+ if ($curval) $html .= ' checked="checked"';
199
+ if ( ! $enabled ) $html .= ' disabled="disabled"';
200
+ if ($onchange != '') $html .= ' onchange="'.esc_attr( $onchange.';wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this);').'"';
201
+ else $html .= ' onchange="wppaAjaxUpdateOptionCheckBox(\''.$xslug.'\', this)"';
202
+
203
+ if ($class != '') $html .= ' class="'.$class.'"';
204
+ $html .= ' /><img id="img_'.$xslug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;"';
205
+ if ($class != '') $html .= ' class="'.$class.'"';
206
+ $html .= ' />';
207
+
208
+ return $html;
209
+ }
210
+
211
+ function wppa_select($xslug, $opts, $vals, $onchange = '', $class = '', $first_disable = false, $postaction = '', $max_width = '300' ) {
212
+ global $wppa_opt;
213
+
214
+ $slug = substr( $xslug, 5 );
215
+
216
+ if ( ! is_array( $opts ) ) {
217
+ $html = __('There is nothing to select.', 'wp-photo-album-plus');
218
+ return $html;
219
+ }
220
+
221
+ $tit = __('Slug =', 'wp-photo-album-plus').' '.$xslug."\n".__('Values = ', 'wp-photo-album-plus');
222
+ foreach( $vals as $val ) $tit.= $val.', ';
223
+ $tit = trim( $tit, ', ');
224
+ $title = wppa_switch( 'enable_shortcode_wppa_set' ) ? ' title="'.esc_attr( $tit ).'"' : '';
225
+
226
+ $html = '<select style="float:left; font-size: 11px; height: 20px; margin: 0px; padding: 0px; max-width:'.$max_width.'px;" id="'.$slug.'"'.$title;
227
+ $html .= ' onchange="'.esc_attr($onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);'.$postaction.';').'"';
228
+
229
+ if ($class != '') $html .= ' class="'.$class.'"';
230
+ $html .= '>';
231
+
232
+ $val = wppa_opt( $xslug );
233
+ $idx = 0;
234
+ $cnt = count($opts);
235
+ while ($idx < $cnt) {
236
+ $html .= "\n";
237
+ $html .= '<option value="'.esc_attr($vals[$idx]).'" ';
238
+ $dis = false;
239
+ if ($idx == 0 && $first_disable) $dis = true;
240
+ $opt = trim($opts[$idx], '|');
241
+ if ($opt != $opts[$idx]) $dis = true;
242
+ if ($val == $vals[$idx]) $html .= ' selected="selected"';
243
+ if ($dis) $html .= ' disabled="disabled"';
244
+ $html .= '>'.$opt.'</option>';
245
+ $idx++;
246
+ }
247
+ $html .= '</select>';
248
+ $html .= '<img id="img_'.str_replace( '#', 'H', $slug ).'" class="'.$class.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
249
+
250
+ $html .= wppa_setting_star( $onchange );
251
+ $html .= wppa_setting_star( $postaction );
252
+
253
+ return $html;
254
+ }
255
+
256
+ function wppa_select_m($xslug, $opts, $vals, $onchange = '', $class = '', $first_disable = false, $postaction = '', $max_width = '220' ) {
257
+ global $wppa_opt;
258
+
259
+ $slug = substr( $xslug, 5 );
260
+
261
+ if ( ! is_array( $opts ) ) {
262
+ $html = __('There is nothing to select.', 'wp-photo-album-plus');
263
+ return $html;
264
+ }
265
+
266
+ $size = min( 10, count( $opts ) );
267
+
268
+ $html = '<select' .
269
+ ' style="float:left;font-size:11px;margin:0px;padding:0px;max-width:'.$max_width.'px;height:auto !important;"' .
270
+ ' id="' . $slug . '"' .
271
+ ' multiple="multiple"' .
272
+ ' size="' . $size . '"' .
273
+ ' onchange="' . esc_attr($onchange . ';wppaAjaxUpdateOptionValue(\'' . $slug . '\', this, true);' . $postaction . ';').'"' .
274
+ ' class="'.$class.'"' .
275
+ ' >';
276
+
277
+ $val = wppa_opt( $xslug );
278
+ $idx = 0;
279
+ $cnt = count( $opts );
280
+
281
+ $pages = wppa_expand_enum( wppa_opt( $slug ) );
282
+ $pages = explode( '.', $pages );
283
+
284
+ while ( $idx < $cnt ) {
285
+
286
+ $dis = false;
287
+ if ( $idx == 0 && $first_disable ) $dis = true;
288
+ $opt = trim( $opts[$idx], '|' );
289
+ if ( $opt != $opts[$idx] ) $dis = true;
290
+
291
+ $sel = false;
292
+ if ( in_array( $vals[$idx], $pages ) ) $sel = true;
293
+
294
+ $html .= '<option' .
295
+ ' class="' . $slug . '"' .
296
+ ' value="' . esc_attr( $vals[$idx] ) . '" ' .
297
+ ( $sel ? ' selected="selected"' : '' ) .
298
+ ( $dis ? ' disabled="disabled"' : '' ) .
299
+ ' >' .
300
+ $opt .
301
+ '</option>';
302
+ $idx++;
303
+ }
304
+ $html .= '</select>';
305
+ $html .= '<img id="img_'.$slug.'" class="'.$class.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
306
+
307
+ $html .= wppa_setting_star( $onchange );
308
+
309
+ return $html;
310
+ }
311
+
312
+ function wppa_select_e( $xslug, $curval, $opts, $vals, $onchange = '', $class = '' ) {
313
+
314
+ $slug = substr( $xslug, 5 );
315
+
316
+ if ( ! is_array( $opts ) ) {
317
+ $html = __('There is nothing to select.', 'wp-photo-album-plus');
318
+ return $html;
319
+ }
320
+
321
+ $html = '<select style="float:left; font-size: 11px; height: 20px; margin: 0px; padding: 0px;" id="'.$slug.'"';
322
+ if ($onchange != '') $html .= ' onchange="'.esc_attr($onchange.';wppaAjaxUpdateOptionValue(\''.$slug.'\', this);').'"';
323
+ else $html .= ' onchange="wppaAjaxUpdateOptionValue(\''.$slug.'\', this)"';
324
+
325
+ if ($class != '') $html .= ' class="'.$class.'"';
326
+ $html .= '>';
327
+
328
+ $val = $curval;
329
+ $idx = 0;
330
+ $cnt = count($opts);
331
+ while ($idx < $cnt) {
332
+ $html .= "\n";
333
+ $html .= '<option value="'.esc_attr($vals[$idx]).'" ';
334
+ if ($val == $vals[$idx]) $html .= ' selected="selected"';
335
+ $html .= '>'.$opts[$idx].'</option>';
336
+ $idx++;
337
+ }
338
+ $html .= '</select>';
339
+ $html .= '<img id="img_'.str_replace( '#', 'H', $slug ).'" class="'.$class.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Setting unmodified', 'wp-photo-album-plus').'" style="padding-left:4px; float:left; height:16px; width:16px;" />';
340
+
341
+ return $html;
342
+ }
343
+
344
+ function wppa_dflt($slug) {
345
+ global $wppa_defaults;
346
+ global $no_default;
347
+
348
+ if ( $slug == '' ) return '';
349
+ if ( $no_default ) return '';
350
+
351
+ $dflt = isset( $wppa_defaults[$slug] ) ? $wppa_defaults[$slug] : '';
352
+
353
+ $dft = $dflt;
354
+ switch ($dflt) {
355
+ case 'yes': $dft .= ': '.__('Checked', 'wp-photo-album-plus'); break;
356
+ case 'no': $dft .= ': '.__('Unchecked', 'wp-photo-album-plus'); break;
357
+ /* case 'none': $dft .= ': '.__('no link at all.', 'wp-photo-album-plus'); break;
358
+ case 'file': $dft .= ': '.__('the plain photo (file).', 'wp-photo-album-plus'); break;
359
+ case 'photo': $dft .= ': '.__('the full size photo in a slideshow.', 'wp-photo-album-plus'); break;
360
+ case 'single': $dft .= ': '.__('the fullsize photo on its own.', 'wp-photo-album-plus'); break;
361
+ case 'indiv': $dft .= ': '.__('the photo specific link.', 'wp-photo-album-plus'); break;
362
+ case 'album': $dft .= ': '.__('the content of the album.', 'wp-photo-album-plus'); break;
363
+ case 'widget': $dft .= ': '.__('defined at widget activation.', 'wp-photo-album-plus'); break;
364
+ case 'custom': $dft .= ': '.__('defined on widget admin page.', 'wp-photo-album-plus'); break;
365
+ case 'same': $dft .= ': '.__('same as title.', 'wp-photo-album-plus'); break;
366
+ */
367
+ default:
368
+ }
369
+
370
+ return $dft;
371
+ }
372
+
373
+ function wppa_color_box( $xslug ) {
374
+
375
+ $slug = substr( $xslug, 5 );
376
+
377
+ return '
378
+ <div
379
+ id="colorbox-' . $slug . '"
380
+ class="wppa-colorbox"
381
+ style="width:100px; height:16px; float:left; background-color:' . wppa_opt( $slug ) . '; border:1px solid #dfdfdf;"
382
+ >
383
+ </div>';
384
+
385
+ }
386
+
387
+ function wppa_moveup_button( $slug, $i ) {
388
+ global $wppa_cur_tab;
389
+
390
+ $label = __('Move up', 'wp-photo-album-plus');
391
+ $onclick = 'jQuery(\'#wppa-admin-spinner\').show();' .
392
+ 'document.getElementById(\'wppa-key\').value=\'wppa_moveup\';' .
393
+ 'document.getElementById(\'wppa-sub\').value=' . $i . ';' .
394
+ 'if ( confirm(\'Are you sure?\')) return true; else return false;';
395
+ $tab = $wppa_cur_tab;
396
+
397
+ $result = '
398
+ <form
399
+ enctype="multipart/form-data"
400
+ action="' . get_admin_url() . 'admin.php?page=wppa_options&wppa-tab=' . $tab . '&wppa-nonce=' . wp_create_nonce( 'wppa-nonce' ) . '"
401
+ method="post"
402
+ >
403
+ <input
404
+ type="hidden"
405
+ name="wppa-key"
406
+ id="wppa-key-' . $slug . '"
407
+ value="' . $slug . '"
408
+ />
409
+ <input
410
+ type="hidden"
411
+ name="wppa-sub"
412
+ id="wppa-sub-' . $i . '"
413
+ value="' . $i . '"
414
+ />
415
+ <input
416
+ type="submit"
417
+ class="wppa-doit-button"
418
+ name="wppa_settings_submit"
419
+ value="' . $label . '"
420
+ />
421
+ </form>';
422
+
423
+ return $result;
424
+ }
425
+
426
+ function wppa_upload_form( $slug, $tab, $accept = 'image/*' ) {
427
+
428
+ $label = __('Upload now!', 'wp-photo-album-plus');
429
+ $onclick = 'jQuery(\'#wppa-admin-spinner\').show();';
430
+
431
+ $result = '
432
+ <form
433
+ enctype="multipart/form-data"
434
+ action="' . get_admin_url() . 'admin.php?page=wppa_options&wppa-tab=' . $tab . '&wppa-nonce=' . wp_create_nonce( 'wppa-nonce' ) . '"
435
+ method="post"
436
+ >
437
+ <input
438
+ id="my_file_element"
439
+ type="file"
440
+ accept="' . $accept . '"
441
+ name="file_1"
442
+ style="float:left;
443
+ font-size: 11px;"
444
+ />
445
+ <input
446
+ type="hidden"
447
+ name="wppa-key"
448
+ id="wppa-key-' . $slug . '"
449
+ value="' . $slug . '"
450
+ />
451
+ <input
452
+ type="submit"
453
+ class="wppa-doit-button"
454
+ style="height:30px;"
455
+ name="wppa_settings_submit"
456
+ value="' . $label . '"
457
+ onclick="' . $onclick . '"
458
+ />
459
+ </form>';
460
+
461
+ return $result;
462
+ }
463
+
464
+ function wppa_doit_button_new( $slug, $height = '18' ) {
465
+
466
+ $result = '
467
+ <input
468
+ type="button"
469
+ class="wppa-doit-button"
470
+ style="height: ' . $height . 'px;"
471
+ name="wppa_settings_submit" value="' . __( 'Do it!', 'wp-photo-album-plus' ) . '"
472
+ onclick="if ( confirm(\'' . __( 'Are you sure?', 'wp-photo-album-plus' ) . '\') ) {
473
+ jQuery(\'#wppa-admin-spinner\').show();document.location.href=wppaReturnUrl(\''.$slug.'\');
474
+ } else return false;"
475
+ />';
476
+
477
+ return $result;
478
+ }
479
+
480
+ function wppa_popup_button( $slug, $height = '18' ) {
481
+
482
+ $label = __('Show!', 'wp-photo-album-plus');
483
+ $result = '
484
+ <input
485
+ type="button"
486
+ class="wppa-doit-button"
487
+ style="height: ' . $height . 'px;"
488
+ value="' . esc_attr($label) . '"
489
+ onclick="wppaAjaxPopupWindow(\''.$slug.'\')"
490
+ />';
491
+
492
+ return $result;
493
+ }
494
+
495
+ function wppa_ajax_button( $label, $slug, $elmid = '0', $no_confirm = false ) {
496
+ if ( $label == '' ) $label = __('Do it!', 'wp-photo-album-plus');
497
+
498
+ $result = '
499
+ <input
500
+ type="button"
501
+ class="wppa-doit-button"
502
+ style="height: 18px;"
503
+ value="' . esc_attr( $label ) . '"';
504
+
505
+ $result .= ' onclick="';
506
+ if ( ! $no_confirm ) $result .= 'if (confirm(\''.__('Are you sure?', 'wp-photo-album-plus').'\')) ';
507
+ if ( $elmid ) {
508
+ $result .= 'wppaAjaxUpdateOptionValue(\''.$slug.'\', document.getElementById(\''.$elmid.'\'))" />';
509
+ }
510
+ else {
511
+ $result .= 'wppaAjaxUpdateOptionValue(\''.$slug.'\', 0)" />';
512
+ }
513
+
514
+ $result .= '<img id="img_'.$slug.'" src="'.wppa_get_imgdir().'star.ico" title="'.__('Not done yet', 'wp-photo-album-plus').'" style="padding:0 4px; float:left; height:16px; width:16px;" />';
515
+
516
+ return $result;
517
+ }
518
+
519
+ function wppa_cronjob_button( $slug ) {
520
+
521
+ $label = __( 'Start as cron job', 'wp-photo-album-plus' );
522
+ $me = wppa_get_user();
523
+ $user = wppa_get_option( $slug.'_user', $me );
524
+
525
+ if ( $user && $user != $me ) {
526
+ $label = __( 'Locked!', 'wp-photo-album-plus' );
527
+ $locked = true;
528
+ }
529
+ else {
530
+ $locked = false;
531
+ }
532
+
533
+ // Check for apparently crashed cron job
534
+ $crashed = wppa_is_maintenance_cron_job_crashed( $slug );
535
+ if ( $crashed ) {
536
+ $label = __( 'Crashed!', 'wp-photo-album-plus' );
537
+ }
538
+
539
+ // Make the html
540
+ $result = '
541
+ <input
542
+ id="' . $slug . '_cron_button"
543
+ type="button"
544
+ class="wppa-doit-button"
545
+ style="height: 18px;' . ( $crashed ? 'color:red;': '' ) . '"
546
+ value="' . esc_attr( $label ) . '"';
547
+
548
+ if ( ! $locked ) {
549
+ $result .= ' onclick="if ( jQuery(\'#'.$slug.'_status\').html() != \'\' || confirm(\''.__('Are you sure?', 'wp-photo-album-plus').'\') ) wppaMaintenanceProc(\''.$slug.'\', false, true);" />';
550
+ }
551
+ else {
552
+ if ( $crashed ) {
553
+ $result .= ' title="' . esc_attr( __( 'Click me to resume', 'wp-photo-album-plus' ) ) . '"';
554
+ }
555
+ $result .= ' onclick="if ( confirm(\''.__('Are you sure you want to unlock and resume cron job?', 'wp-photo-album-plus').'\') ) wppaMaintenanceProc(\''.$slug.'\', false, true); " />';
556
+ }
557
+
558
+ return $result;
559
+ }
560
+
561
+ function wppa_maintenance_button( $slug, $height = '18' ) {
562
+
563
+ $label = __('Start!', 'wp-photo-album-plus');
564
+ $me = wppa_get_user();
565
+ $user = wppa_get_option( $slug.'_user', $me );
566
+
567
+ if ( $user && $user != $me ) {
568
+ $label = __('Locked!', 'wp-photo-album-plus');
569
+ $locked = true;
570
+ }
571
+ else {
572
+ $locked = false;
573
+ }
574
+
575
+ $result = '
576
+ <input id="'.$slug.'_button"
577
+ type="button"
578
+ class="wppa-doit-button"
579
+ style="height: ' . $height . 'px;"
580
+ value="'.esc_attr($label).'"';
581
+
582
+ if ( ! $locked ) {
583
+ $result .= ' onclick="if ( jQuery(\'#'.$slug.'_status\').html() != \'\' || confirm(\''.__('Are you sure?', 'wp-photo-album-plus').'\') ) wppaMaintenanceProc(\''.$slug.'\', false);" />';
584
+ }
585
+ else {
586
+ $result .= ' onclick="alert(\'Is currently being executed by '.$user.'.\')" />';
587
+ }
588
+ $result .= '<input id="'.$slug.'_continue" type="hidden" value="no" />';
589
+
590
+ return $result;
591
+ }
592
+
593
+ function wppa_status_field( $slug ) {
594
+ $result = '<span id="'.$slug.'_status" >'.wppa_get_option( $slug.'_status', '' ).'</span>';
595
+ return $result;
596
+ }
597
+
598
+ function wppa_togo_field( $slug ) {
599
+ $togo = wppa_get_option($slug.'_togo', '' );
600
+ $is_cron = wppa_get_option($slug.'_user', '' ) == 'cron-job';
601
+ $result = '<span id="'.$slug.'_togo" >' . $togo . '</span>';
602
+ if ( $togo || $is_cron ) {
603
+ $result .= '<script>wppaAjaxUpdateTogo(\'' . $slug . '\');</script>';
604
+ }
605
+ return $result;
606
+ }
607
+
608
+ // See if a given page exist, if vanished, set the option to 0
609
+ function wppa_verify_page( $xslug ) {
610
+ global $wpdb;
611
+ global $wppa_opt;
612
+
613
+ // Does slug exist?
614
+ if ( ! isset( $wppa_opt[$xslug] ) ) {
615
+ wppa_error_message('Unexpected error in wppa_verify_page()', 'red', 'force');
616
+ return;
617
+ }
618
+
619
+ // A page number 0 or -1 is allowed ( same post/page )
620
+ if ( $wppa_opt[$xslug] == '0' || $wppa_opt[$xslug] == '-1' ) {
621
+ return;
622
+ }
623
+
624
+ $slug = substr( $xslug, 5 );
625
+
626
+ // If page vanished, update to 0
627
+ $iret = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->posts
628
+ WHERE post_type = 'page'
629
+ AND post_status = 'publish'
630
+ AND ID = %s", wppa_opt( $slug )));
631
+ if ( ! $iret ) {
632
+ wppa_update_option($slug, '0');
633
+ }
634
+ }
635
+
636
+ // Find imageMagick external cmmands
637
+ function wppa_search_magick( $root = '' ) {
638
+ static $level;
639
+ if ( ! $level ) $level = 1;
640
+
641
+ static $result;
642
+ if ( ! $result ) $result = array();
643
+
644
+ $paths = glob( $root . '/*', GLOB_ONLYDIR );
645
+ foreach( $paths as $path ) if ( $path != '..' && $path != '.' ) {
646
+
647
+ $file = basename( $path );
648
+ if ( ! in_array( $file, array( 'wp-admin', 'wp-content', 'wp-include' ) ) ) {
649
+
650
+ if ( is_readable( $path ) ) {
651
+
652
+ if ( is_file( $path . '/convert' ) ) {
653
+ exec( escapeshellcmd( $path . '/convert -version' ), $out, $err );
654
+ if ( ! $err ) {
655
+ $ver = strpos( $out[0], 'ImageMagick' );
656
+ if ( $ver != false ) {
657
+ $result[] = array( $path, $out[0] );
658
+ }
659
+ }
660
+ unset( $out );
661
+ }
662
+ elseif ( $level < 4 ) {
663
+ $level++;
664
+ wppa_search_magick( $path );
665
+ $level--;
666
+ }
667
+ }
668
+ }
669
+ }
670
+ return $result;
671
+ }
672
+
673
+ // New style settings page master tab
674
+ function wppa_master_tab( $slug, $target, $caption, $active = false ) {
675
+
676
+ echo '
677
+ <li
678
+ id="wppa-master-tab-' . $slug . '"
679
+ class="' . ( $active ? 'active ' : '' ) . 'mtabli ' . $slug . '"
680
+ onclick="wppaSettingTab(\'' . $target . '\');"
681
+ style="background-color:' . ( $active ? '#ffffff;' : '#eeeeee;' ) . '"
682
+ >
683
+ ' . $caption . '
684
+ </li>';
685
+ }
686
+
687
+ // New style settings page selection tab html
688
+ function wppa_setting_tab( $slug, $caption, $show = true ) {
689
+ global $wppa_cur_tab;
690
+
691
+ $active = $wppa_cur_tab == $slug;
692
+
693
+ echo '
694
+ <li
695
+ id="wppa-setting-tab-' . $slug . '"
696
+ class="' . ( $active ? 'active ' : '' ) . 'tabli ' . $slug . '"
697
+ onclick="wppaSettingTab(\'' . $slug . '\');"
698
+ style="' . ( $show ? '' : 'display:none;' ) . 'background-color:' . ( $active ? '#ffffff;' : '#eeeeee;' ) . '"
699
+ >
700
+ ' . $caption . '
701
+ </li>';
702
+ }
703
+
704
+ // New style setting
705
+ function wppa_setting_new( $slug, $xnum, $name, $desc, $html, $help = '', $show = true ) {
706
+ global $wppa_defaults;
707
+ global $no_default;
708
+ global $wppa_opt;
709
+ global $wppa_requested_subtab;
710
+ global $wppa_requested_items;
711
+ global $wppa_cur_subtab_id;
712
+ global $wppa_cur_tab;
713
+ global $wppa_setting_error;
714
+
715
+ // Unique item id
716
+ $item_id = $wppa_cur_tab . '-' . $wppa_cur_subtab_id . '-' . str_replace( array( ' ', '.' ), '-', $xnum );
717
+
718
+ // Is this item requested?
719
+ $is_requested = false;
720
+ if ( $wppa_requested_subtab == $wppa_cur_subtab_id ) {
721
+ if ( $wppa_requested_items !== false && in_array( $xnum, $wppa_requested_items ) ) {
722
+ $is_requested = true;
723
+ }
724
+ }
725
+
726
+ // Bg color
727
+ $error = isset( $_REQUEST['wppa-error'] );
728
+ if ( $is_requested ) {
729
+ if ( $error ) {
730
+ $bgcolor = '#ffeeee';
731
+ }
732
+ else {
733
+ $bgcolor = '#eeffee';
734
+ }
735
+ }
736
+ else {
737
+ $bgcolor = '#ffffff';
738
+ }
739
+ if ( $wppa_setting_error ) {
740
+ $bgcolor = '#ffeeee';
741
+ }
742
+
743
+ // Default helptext
744
+ if ( ! $help ) {
745
+ $help = __('No helptext available', 'wp-photo-album-plus');
746
+ }
747
+
748
+ // Convert sungle slug to array with 1 elm
749
+ if ( is_array( $slug ) ) $slugs = $slug;
750
+ else {
751
+ $slugs = false;
752
+ if ( $slug ) $slugs[] = $slug;
753
+ else $slugs[0] = '';
754
+ }
755
+
756
+ if ( is_array( $html ) ) $htmls = $html;
757
+ else {
758
+ $htmls = array();
759
+ if ( $html ) $htmls[0] = $html;
760
+ }
761
+
762
+ if ( strpos( $xnum, ',' ) !== false ) {
763
+ $nums = explode( ',', $xnum );
764
+ $nums[0] = substr( $nums[0], 1 );
765
+ }
766
+ else {
767
+ $nums = false;
768
+ if ( $xnum ) $nums[] = $xnum;
769
+ }
770
+
771
+ // Make the helptext
772
+ if ( $help ) {
773
+ $is_dflt = true;
774
+
775
+ $helptext = $help;
776
+
777
+ if ( ! $no_default ) {
778
+ if ( $slugs && wppa_dflt($slugs[0]) ) {
779
+ $helptext .= '<br />' . __( 'The default for this setting is:', 'wp-photo-album-plus' );
780
+ if ( count($slugs) == 1) {
781
+ if ( $slugs[0] != '' ) {
782
+ $helptext .= ' '.htmlspecialchars(wppa_dflt($slugs[0]));
783
+ if ( $wppa_opt[$slugs[0]] != $wppa_defaults[$slugs[0]] ) {
784
+ $is_dflt = false;
785
+ }
786
+ }
787
+ }
788
+ else foreach ( array_keys($slugs) as $slugidx ) {
789
+ if ( $slugs[$slugidx] != '' && isset($nums[$slugidx]) ) $helptext .= ' '.$nums[$slugidx].'. '.wppa_dflt($slugs[$slugidx]);
790
+ if ( $slugs[$slugidx] != '' && isset($wppa_opt[$slugs[$slugidx]]) && $wppa_opt[$slugs[$slugidx]] != $wppa_defaults[$slugs[$slugidx]] ) {
791
+ $is_dflt = false;
792
+ }
793
+ }
794
+ }
795
+ }
796
+ }
797
+ else {
798
+ $helptext = '';
799
+ }
800
+
801
+ // Start the item
802
+ echo
803
+ '<tr
804
+ id="wppa-setting-item-' . $item_id . '"
805
+ class="wppa-setting-new ' . $item_id . '"
806
+ style="color:#333;background-color:' . $bgcolor . ';' .
807
+ ( $show ? '' : 'display:none;' ) .
808
+ '"
809
+ >';
810
+
811
+ // The item number
812
+ echo '
813
+ <td>' . $xnum . '</td>';
814
+
815
+ // The Item name
816
+ echo '
817
+ <td>' . $name . '</td>';
818
+
819
+ // The item description
820
+ echo '
821
+ <td><small>' . $desc . '</small></td>';
822
+
823
+ // The html
824
+ if ( $htmls ) foreach ( $htmls as $html ) {
825
+ echo '<td>' . $html . '</td>';
826
+ }
827
+ else {
828
+ echo '<td></td>';
829
+ }
830
+
831
+ // The helpbutton
832
+ echo '
833
+ <td>
834
+ <input
835
+ type="button"
836
+ style="font-size: 11px; height:20px; padding:0; cursor: pointer;"
837
+ class=""
838
+ title="' . esc_attr( __( 'Click for help', 'wp-photo-album-plus' ) ) . '"
839
+ onclick="
840
+ if ( jQuery( \'#help-' . $item_id . '\' ).css(\'display\') == \'none\' ) {
841
+ jQuery( \'#help-' . $item_id . '\' ).css(\'display\',\'\');
842
+ }
843
+ else {
844
+ jQuery( \'#help-' . $item_id . '\' ).css(\'display\',\'none\');
845
+ }"
846
+ value="&nbsp;?&nbsp;"
847
+ />
848
+ </td>';
849
+
850
+ // Close item
851
+ echo '
852
+ </tr>';
853
+
854
+ // The Helptext
855
+ if ( $help ) {
856
+ echo '
857
+ <tr
858
+ id="help-' . $item_id . '"
859
+ class="wppa-setting-new"
860
+ style="display:none;"
861
+ >
862
+ <td></td>
863
+ <td></td>
864
+ <td
865
+ style="color:#000077;"
866
+ colspan="' . ( count( $htmls ) ) . '"
867
+ >
868
+ <small>
869
+ <i>' .
870
+ $helptext . '
871
+ </i>
872
+ </small>
873
+ </td>
874
+ <td></td>
875
+ <td></td>
876
+ </tr>';
877
+ }
878
+ }
879
+
880
+ // The tab description
881
+ function wppa_setting_tab_description( $desc ) {
882
+ global $wppa_cur_subtab;
883
+ global $wppa_cur_subtab_id;
884
+
885
+ $wppa_cur_subtab = md5( $desc );
886
+ if ( ! $wppa_cur_subtab_id ) {
887
+ $wppa_cur_subtab_id = 0;
888
+ }
889
+ $wppa_cur_subtab_id++;
890
+ $greek = array('0', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X');
891
+ echo '
892
+ <script>
893
+ jQuery(document).ready(function(){
894
+ var cookie = wppa_getCookie(\'' . $wppa_cur_subtab . '\');
895
+ if ( cookie == "on" ) {
896
+ jQuery(".wppa-tabdesc-' . $wppa_cur_subtab . '").css("background-color","#ffffff");
897
+ jQuery(".wppa-tabdesc-' . $wppa_cur_subtab . '").attr("data-inactive","0");
898
+ }
899
+ else {
900
+ jQuery(".wppa-tabdesc-' . $wppa_cur_subtab . '").css("background-color","#eeeeee");
901
+ jQuery(".wppa-tabdesc-' . $wppa_cur_subtab . '").attr("data-inactive","1");
902
+ }
903
+ });
904
+ </script>
905
+ <div
906
+ class="wppa-tabdesc wppa-tabdesc-' . $wppa_cur_subtab . ' ' . $wppa_cur_subtab_id . '"
907
+ style="text-align:center;border-bottom:1px solid darkgrey;cursor:pointer;"
908
+ onclick="wppaToggleSubtab(\'' . $wppa_cur_subtab . '\');"
909
+ >
910
+ <h3>' .
911
+ $greek[$wppa_cur_subtab_id] .
912
+ ': ' .
913
+ $desc .
914
+ '</h3>
915
+ <span
916
+ id="' . $wppa_cur_subtab . '-cm"
917
+ style="color:red;display:none;"
918
+ >' .
919
+ __('Click to toggle open / close', 'wp-photo-album-plus') . '
920
+ </span>
921
+ </div>';
922
+ }
923
+
924
+ // The new style setting box header
925
+ function wppa_setting_box_header_new( $tab, $cols = false ) {
926
+ global $wppa_cur_tab;
927
+ global $wppa_cur_subtab;
928
+
929
+ if ( ! $cols ) {
930
+ $cols = array(
931
+ __( '#', 'wp-photo-album-plus' ) => '24px;',
932
+ __( 'Name', 'wp-photo-album-plus') => '15%;',
933
+ __( 'Description', 'wp-photo-album-plus' ) => '30%;',
934
+ __( 'Setting', 'wp-photo-album-plus' ) => 'auto;',
935
+ __( 'Help', 'wp-photo-album-plus' ) => '24px;',
936
+ );
937
+ }
938
+
939
+ echo '
940
+ <script>
941
+ jQuery(document).ready(function(){
942
+ if ( \'' . $wppa_cur_tab . '\' == \'general\' ||
943
+ \'' . $wppa_cur_tab . '\' == \'generaladv\' ) {
944
+ wppa_setCookie(\'' . $wppa_cur_subtab . '\', \'on\', 30);
945
+ }
946
+ var cookie = wppa_getCookie(\'' . $wppa_cur_subtab . '\');
947
+ jQuery(\'#' . $wppa_cur_subtab . '-cm\').hide();
948
+ if ( cookie == \'on\' ) {
949
+ jQuery(\'#' . $wppa_cur_subtab . '\').show();
950
+ }
951
+ else if ( cookie == \'\' ) {
952
+ jQuery(\'#' . $wppa_cur_subtab . '-cm\').show();
953
+ }
954
+ });
955
+ </script>
956
+ <div
957
+ id="' . $wppa_cur_subtab . '"
958
+ class="wppa-setting-content ' . $wppa_cur_subtab . '"
959
+ style="display:none;"
960
+ >
961
+ <table class="widefat wppa-table wppa-setting-table">
962
+
963
+ <colgroup>';
964
+ foreach( $cols as $size ) {
965
+ echo '<col style="width: ' . $size . '" >';
966
+ }
967
+ echo '
968
+ </colgroup>
969
+
970
+ <thead style="font-weight: bold;" >
971
+ <tr>';
972
+ foreach( array_keys( $cols ) as $caption ) {
973
+ echo '<td>' . $caption . '</td>';
974
+ }
975
+ echo '
976
+ </tr>
977
+ </thead>
978
+
979
+ <tbody class="wppa_table_' . $tab . '" >';
980
+
981
+ }
982
+
983
+ // The new style setting box footer
984
+ function wppa_setting_box_footer_new() {
985
+ echo '</tbody></table></div>';
986
+ }
987
+
988
+ function wppa_need_page( $slug ) {
989
+ global $wppa_opt;
990
+
991
+ $value = $wppa_opt[$slug];
992
+
993
+ if ( in_array( $value, array( 'none',
994
+ 'file',
995
+ 'widget',
996
+ 'custom',
997
+ 'same',
998
+ 'fullpopup',
999
+ 'lightbox',
1000
+ ) ) ) {
1001
+ $result = false;
1002
+ }
1003
+ else {
1004
+ $result = true;
1005
+ }
1006
+
1007
+ return $result;
1008
+ }
1009
+
1010
+ // Star indcator page will be reloaded after changing the setting
1011
+ function wppa_setting_star( $onch ) {
1012
+
1013
+ if ( strpos( $onch, 'wppaRefreshAfter()' ) !== false ) {
1014
+ $html = '
1015
+ <span
1016
+ style=" float:left;
1017
+ color:red;
1018
+ font-size:28px;
1019
+ line-height:8px;
1020
+ cursor:pointer;
1021
+ "
1022
+ title="' . __( 'After changing this setting the page will be reloaded', 'wp-photo-album-plus' ) . '"
1023
+ ><sup>*</sup>
1024
+ </span>';
1025
+ return $html;
1026
+ }
1027
+ else {
1028
+ return '';
1029
+ }
1030
+ }
1031
+
wppa-setting-see-also.php ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* wppa-setting-see-also.php
3
+ * Package: wp-photo-album-plus
4
+ *
5
+ * manage all options
6
+ * Version 8.0.00.012
7
+ *
8
+ */
9
+
10
+ global $wppa_tab_names;
11
+ global $wppa_subtab_names;
12
+
13
+ // The header tabs
14
+ $wppa_tab_names = array(
15
+ 'general' => __( 'General', 'wp-photo-album-plus' ),
16
+ 'generaladv' => __( 'General', 'wp-photo-album-plus' ),
17
+ 'layout' => __( 'Layout', 'wp-photo-album-plus' ),
18
+ 'covers' => __( 'Albums', 'wp-photo-album-plus'),
19
+ 'photos' => __( 'Photos', 'wp-photo-album-plus'),
20
+ 'thumbs' => __( 'Thumbnails', 'wp-photo-album-plus'),
21
+ 'slide' => __( 'Slideshow', 'wp-photo-album-plus'),
22
+ 'lightbox' => __( 'Lightbox', 'wp-photo-album-plus' ),
23
+ 'comments' => __( 'Comments', 'wp-photo-album-plus' ),
24
+ 'rating' => __( 'Rating', 'wp-photo-album-plus' ),
25
+ 'search' => __( 'Search', 'wp-photo-album-plus' ),
26
+ 'widget' => __( 'Widget', 'wp-photo-album-plus' ),
27
+ 'links' => __( 'Links', 'wp-photo-album-plus' ),
28
+ 'users' => __( 'Users', 'wp-photo-album-plus' ),
29
+ 'email' => __( 'Email', 'wp-photo-album-plus' ),
30
+ 'share' => __( 'Share', 'wp-photo-album-plus' ),
31
+ 'system' => __( 'System', 'wp-photo-album-plus' ),
32
+ 'files' => __( 'Files', 'wp-photo-album-plus' ),
33
+ 'new' => __( 'New', 'wp-photo-album-plus' ),
34
+ 'admin' => __( 'Admin', 'wp-photo-album-plus' ),
35
+ 'maintenance' => __( 'Maintenance', 'wp-photo-album-plus' ),
36
+ 'exif' => 'EXIF',
37
+ 'iptc' => 'IPTC',
38
+ 'gpx' => 'GPX',
39
+ 'watermark' => __( 'Watermark', 'wp-photo-album-plus' ),
40
+ 'custom' => __( 'Custom data', 'wp-photo-album-plus' ),
41
+ 'constants' => __( 'Constants', 'wp-photo-album-plus' ),
42
+ 'misc' => __( 'Misc', 'wp-photo-album-plus' ),
43
+ 'miscadv' => __( 'Misc', 'wp-photo-album-plus' ),
44
+ );
45
+ $wppa_subtab_names = array(
46
+ 'general' => array(
47
+ '1' => __('On this tab you can select the features you want to use', 'wp-photo-album-plus'),
48
+ ),
49
+ 'generaladv' => array(
50
+ '1' => __('On this tab you can select the features you want to use', 'wp-photo-album-plus'),
51
+ ),
52
+ 'layout' => array(
53
+ '1' => __('General layout settings', 'wp-photo-album-plus'),
54
+ '2' => __('Breadcrumb specifications', 'wp-photo-album-plus'),
55
+ '3' => __('Navigation symbol specifications', 'wp-photo-album-plus'),
56
+ '4' => __('Multimedia icon and stubfile specifications', 'wp-photo-album-plus'),
57
+ '5' => __('Fonts', 'wp-photo-album-plus'),
58
+ ),
59
+ 'covers' => array(
60
+ '1' => __('Album cover size specifications', 'wp-photo-album-plus'),
61
+ '2' => __('Album cover options', 'wp-photo-album-plus'),
62
+ '3' => __('Album cover layout settings', 'wp-photo-album-plus'),
63
+ ),
64
+ 'photos' => array(
65
+ '1' => __('Photo specifications', 'wp-photo-album-plus'),
66
+ '2' => __('Shortcode [photo ... ] specifications', 'wp-photo-album-plus'),
67
+ '3' => __('Photo of the day settings', 'wp-photo-album-plus'),
68
+ ),
69
+ 'thumbs' => array(
70
+ '1' => __('Thumbnail size specifications', 'wp-photo-album-plus'),
71
+ '2' => __('Thumbnail display options', 'wp-photo-album-plus'),
72
+ '3' => __('Thumbnail layout settings', 'wp-photo-album-plus'),
73
+ ),
74
+ 'slide' => array(
75
+ '1' => __('Sllideshow component specifications', 'wp-photo-album-plus'),
76
+ '2' => __('Slideshow component sequence', 'wp-photo-album-plus'),
77
+ '3' => __('Slideshow layout settings', 'wp-photo-album-plus'),
78
+ '4' => __('Slideshow dynamic behaviour', 'wp-photo-album-plus'),
79
+ ),
80
+ 'lightbox' => array(
81
+ '1' => __('Lightbox overlay configuration settings', 'wp-photo-album-plus'),
82
+ ),
83
+ 'comments' => array(
84
+ '1' => __('Comments system related settings', 'wp-photo-album-plus'),
85
+ ),
86
+ 'rating' => array(
87
+ '1' => __('Rating system related settings', 'wp-photo-album-plus'),
88
+ ),
89
+ 'search' => array(
90
+ '1' => __('Search albums and photos features related settings', 'wp-photo-album-plus'),
91
+ ),
92
+ 'widget' => array(
93
+ '1' => __('General widget size settings', 'wp-photo-album-plus'),
94
+ '2' => __('Visibility settings', 'wp-photo-album-plus'),
95
+ '3' => __('QR Code widget settings', 'wp-photo-album-plus'),
96
+ ),
97
+ 'links' => array(
98
+ '1' => __('System Links configuration', 'wp-photo-album-plus'),
99
+ '2' => __('Links from standard images', 'wp-photo-album-plus'),
100
+ '3' => __('Links from items and images in widgets', 'wp-photo-album-plus'),
101
+ '4' => __('Other links', 'wp-photo-album-plus'),
102
+ ),
103
+ 'users' => array(
104
+ '1' => __('Frontend (user) upload related settings', 'wp-photo-album-plus'),
105
+ ),
106
+ 'email' => array(
107
+ '1' => __('Email configuration settings', 'wp-photo-album-plus'),
108
+ '2' => __('Failed mails', 'wp-photo-album-plus'),
109
+ '3' => __('Permanently failed mails', 'wp-photo-album-plus'),
110
+ ),
111
+ 'share' => array(
112
+ '1' => __('Social media related settings', 'wp-photo-album-plus'),
113
+ '2' => __('Search Engine Optimalisation settings', 'wp-photo-album-plus'),
114
+ ),
115
+ 'system' => array(
116
+ '1' => __('System behaviour related settings' , 'wp-photo-album-plus'),
117
+ ),
118
+ 'files' => array(
119
+ '1' => __('Original source file related settings', 'wp-photo-album-plus'),
120
+ ),
121
+ 'new' => array(
122
+ '1' => __('New albums / photos related settings', 'wp-photo-album-plus'),
123
+ ),
124
+ 'admin' => array(
125
+ '1' => __('WPPA+ related roles and capabilities', 'wp-photo-album-plus'),
126
+ '2' => __('Frontend create Albums and upload Photos enabling and limiting settings' , 'wp-photo-album-plus'),
127
+ '3' => __('Import related settings', 'wp-photo-album-plus'),
128
+ '4' => __('Admin Functionality restrictions for non administrators' , 'wp-photo-album-plus'),
129
+ '5' => __('Miscellaneous limiting settings' , 'wp-photo-album-plus'),
130
+ '6' => __('Miscellaneous admin related settings', 'wp-photo-album-plus' ),
131
+ ),
132
+ 'maintenance' => array(
133
+ '1' => __('Regular maintenance procedures', 'wp-photo-album-plus'),
134
+ '2' => __('Clearing and other irreversable maintenance procedures', 'wp-photo-album-plus'),
135
+ ),
136
+ 'exif' => array(
137
+ '1' => __('EXIF tags and their labels as found in the uploaded photos', 'wp-photo-album-plus'),
138
+ ),
139
+ 'iptc' => array(
140
+ '1' => __('IPTC tags and their labels as found in the uploaded photos', 'wp-photo-album-plus'),
141
+ ),
142
+ 'gpx' => array(
143
+ '1' => __('GPX configuration', 'wp-photo-album-plus'),
144
+ ),
145
+ 'custom' => array(
146
+ '1' => __( 'Album custom data fields configuration', 'wp-photo-album-plus' ),
147
+ '2' => __( 'Photo custom data fields configuration', 'wp-photo-album-plus' ),
148
+ ),
149
+ 'watermark' => array(
150
+ '1' => __('Watermark related settings', 'wp-photo-album-plus'),
151
+ ),
152
+ 'constants' => array(
153
+ '1' => __('System constants (read only)', 'wp-photo-album-plus'),
154
+ ),
155
+ 'misc' => array(
156
+ '1' => __('Miscellaneous settings', 'wp-photo-album-plus'),
157
+ '2' => __('Panorma related settings', 'wp-photo-album-plus'),
158
+ ),
159
+ 'miscadv' => array(
160
+ '1' => __('Advanced miscellaneous settings', 'wp-photo-album-plus'),
161
+ '2' => __('Logging', 'wp-photo-album-plus'),
162
+ '3' => __('External services related settings and actions', 'wp-photo-album-plus'),
163
+ '4' => __('Other plugins related settings', 'wp-photo-album-plus'),
164
+ ),
165
+ );
166
+
167
+ // See also
168
+ function wppa_see_also( $tab, $subtab = '', $items = '', $switch = '', $value = '', $error = false ) {
169
+ global $wppa_tab_names;
170
+ global $wppa_subtab_names;
171
+
172
+ // Do they need us?
173
+ if ( $switch && ! $value ) {
174
+ if ( ! wppa_switch( $switch ) ) {
175
+ return;
176
+ }
177
+ }
178
+ if ( $switch && $value ) {
179
+ if ( wppa_opt( $switch ) != $value ) {
180
+ return;
181
+ }
182
+ }
183
+
184
+ // Make the full link
185
+ $link = admin_url( 'admin.php' ) . '?page=wppa_options';
186
+ if ( $tab ) {
187
+ $link .= '&wppa-tab=' . sanitize_text_field( $tab );
188
+ }
189
+ if ( $subtab ) {
190
+ $link .= '&wppa-subtab=' . strval( intval( $subtab ) );
191
+ }
192
+ if ( $items !== '' ) {
193
+ $link .= '&wppa-item=' . sanitize_text_field( $items );
194
+ }
195
+ if ( $error ) {
196
+ $link .= '&wppa-error=1';
197
+ }
198
+
199
+ // Make the htnl
200
+ $result = '
201
+ &nbsp;<a
202
+ href="' . $link . '"
203
+ title="' . esc_attr( 'Jump to related (sub)tab', 'wp-photo-album-plus' ) . '"
204
+ style="cursor:pointer;"
205
+ >' .
206
+ __( 'See also', 'wp-photo-album-plus' ) . ': ' . $wppa_tab_names[$tab] . ' -> ' . $wppa_subtab_names[$tab][$subtab] . '
207
+ </a>&nbsp;';
208
+
209
+ return $result;
210
+ }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.7.07.006
7
  *
8
  */
9
 
@@ -14,17 +14,19 @@ global $wpdb;
14
  global $wppa;
15
  global $wppa_opt;
16
  global $blog_id;
17
- global $wppa_status;
18
- global $options_error;
19
  global $wppa_api_version;
20
  global $wp_roles;
21
- global $wppa_table;
22
- global $wppa_subtable;
23
  global $wppa_revno;
24
  global $no_default;
25
- global $wppa_tags;
26
  global $wp_version;
27
  global $wppa_supported_camara_brands;
 
 
 
 
 
 
28
 
29
  // Start test area
30
 
@@ -32,7 +34,7 @@ global $wppa_supported_camara_brands;
32
 
33
  // Initialize
34
  wppa_initialize_runtime( true );
35
- $options_error = false;
36
 
37
  // Re-animate crashec cron jobs
38
  wppa_re_animate_cron();
@@ -55,9 +57,9 @@ global $wppa_supported_camara_brands;
55
  if ( isset($_REQUEST['wppa_settings_submit']) ) { // Yep!
56
 
57
  if ( ! wp_verify_nonce( $_REQUEST['wppa-nonce'], 'wppa-nonce' ) ) {
58
- wp_die( 'Security chekc failuere' );
59
  }
60
- // check_admin_referer( 'wppa-nonce', 'wppa-nonce' );
61
  $key = $_REQUEST['wppa-key'];
62
  $sub = isset( $_REQUEST['wppa-sub'] ) ? $_REQUEST['wppa-sub'] : '';
63
 
@@ -87,6 +89,7 @@ global $wppa_supported_camara_brands;
87
  // Should better be here
88
  case 'wppa_setup':
89
  wppa_setup(true); // Message on success or fail is in the routine
 
90
  break;
91
 
92
  // Must be here
@@ -99,13 +102,16 @@ global $wppa_supported_camara_brands;
99
 
100
  $fname = wppa_opt( 'skinfile' );
101
 
102
- if ( $fname == 'default' ) {
 
 
 
103
  if ( wppa_set_defaults( true ) ) {
104
  wppa_ok_message( __( 'Reset to default settings', 'wp-photo-album-plus' ) );
105
  }
106
  else {
107
  wppa_error_message( __( 'Unable to set defaults', 'wp-photo-album-plus' ) );
108
- $options_error = true;
109
  }
110
  }
111
  else {
@@ -123,13 +129,14 @@ global $wppa_supported_camara_brands;
123
  }
124
  else {
125
  wppa_error_message( __( 'Unable to restore saved settings', 'wp-photo-album-plus' ) );
126
- $options_error = true;
127
  }
128
  }
 
129
  break;
130
 
131
  // Must be here
132
- case 'wppa_watermark_upload':
133
  if ( isset($_FILES['file_1']) && $_FILES['file_1']['error'] != 4 ) { // Expected a fileupload for a watermark
134
  $file = $_FILES['file_1'];
135
  if ( $file['error'] ) {
@@ -152,8 +159,8 @@ global $wppa_supported_camara_brands;
152
  break;
153
 
154
  case 'wppa_watermark_font_upload':
155
- if ( isset($_FILES['file_2']) && $_FILES['file_2']['error'] != 4 ) { // Expected a fileupload for a watermark font file
156
- $file = $_FILES['file_2'];
157
  if ( $file['error'] ) {
158
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
159
  }
@@ -173,8 +180,8 @@ global $wppa_supported_camara_brands;
173
  break;
174
 
175
  case 'wppa_audiostub_upload':
176
- if ( isset( $_FILES['file_3'] ) && $_FILES['file_3']['error'] != 4 ) {
177
- $file = $_FILES['file_3'];
178
  if ( $file['error'] ) {
179
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
180
  }
@@ -207,8 +214,8 @@ global $wppa_supported_camara_brands;
207
  break;
208
 
209
  case 'wppa_documentstub_upload':
210
- if ( isset( $_FILES['file_4'] ) && $_FILES['file_4']['error'] != 4 ) {
211
- $file = $_FILES['file_4'];
212
  if ( $file['error'] ) {
213
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
214
  }
@@ -241,8 +248,8 @@ global $wppa_supported_camara_brands;
241
  break;
242
 
243
  case 'wppa_multimedia_icon_upload':
244
- if ( isset( $_FILES['file_5'] ) && $_FILES['file_5']['error'] != 4 ) {
245
- $file = $_FILES['file_5'];
246
  if ( $file['error'] ) {
247
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
248
  }
@@ -312,38 +319,32 @@ global $wppa_supported_camara_brands;
312
 
313
  } // wppa-settings-submit
314
 
315
- // Fix invalid ratings
316
- $iret = $wpdb->query( "DELETE FROM $wpdb->wppa_rating WHERE value = 0" );
317
- if ( $iret ) wppa_update_message( sprintf( __( '%s invalid ratings removed. Please run Table VIII-A5: Rerate to fix the averages.' , 'wp-photo-album-plus'), $iret ) );
318
-
319
  // Fix invalid source path
320
  wppa_fix_source_path();
321
 
322
- // Cleanup obsolete settings
323
- if ( $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->options
324
- WHERE option_name LIKE 'wppa_last_album_used-%'" ) > 100 ) {
325
- $iret = $wpdb->query( "DELETE FROM $wpdb->options
326
- WHERE option_name LIKE 'wppa_last_album_used-%'" );
327
- wppa_update_message( sprintf( __( '%s last album used settings removed.', 'wp-photo-album-plus'), $iret ) );
328
- }
329
-
330
- ?>
331
- <div class="wrap">
332
- <?php wppa_admin_spinner() ?>
333
- <?php $iconurl = WPPA_URL.'/img/settings32.png'; ?>
334
- <img id="icon-album" src="<?php echo $iconurl ?>" />
335
- <h1 style="display:inline" ><?php _e('WP Photo Album Plus Settings', 'wp-photo-album-plus'); ?> <span style="color:blue;"><?php _e('Auto Save', 'wp-photo-album-plus') ?></span></h1>
336
- <?php
337
- if ( current_user_can( 'administrator' ) ) {
338
- echo ' ' .
339
- __( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . wppa_get_option( 'wppa_revision', '100') . '. ' .
340
- __( 'WP Charset:', 'wp-photo-album-plus') . ' ' . get_bloginfo( 'charset' ) . '. ' .
341
- // __( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
342
- __( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ';
343
- // __( 'Filesystem method:', 'wp-photo-album-plus' ) . ' ' . get_filesystem_method();
344
- }
345
- ?>
346
- <br /><?php if ( is_multisite() ) {
347
  if ( WPPA_MULTISITE_GLOBAL ) {
348
  _e('Multisite in singlesite mode.', 'wp-photo-album-plus');
349
  }
@@ -387,66 +388,58 @@ global $wppa_supported_camara_brands;
387
  wppa_error_message(__('There is a serious misconfiguration in your servers PHP config. Function imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.', 'wp-photo-album-plus'));
388
  }
389
 
 
390
  if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON == true ) {
391
  wppa_error_message(__("Please remove 'define( 'DISABLE_WP_CRON', true );' from wp-config.php", 'wp-photo-album-plus' ) );
392
  }
393
 
394
- // Check for pending actions
395
- if ( wppa_get_option( 'wppa_remove_empty_albums_status' ) && wppa_get_option( 'wppa_remove_empty_albums_user', wppa_get_user() ) == wppa_get_user() ) wppa_warning_message( __( 'Remove empty albums needs completion. See Table VIII', 'wp-photo-album-plus') );
396
- if ( wppa_get_option( 'wppa_apply_
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.0.00.012
7
  *
8
  */
9
 
14
  global $wppa;
15
  global $wppa_opt;
16
  global $blog_id;
17
+ global $opts_error;
 
18
  global $wppa_api_version;
19
  global $wp_roles;
 
 
20
  global $wppa_revno;
21
  global $no_default;
 
22
  global $wp_version;
23
  global $wppa_supported_camara_brands;
24
+ global $wppa_cur_tab;
25
+ global $wppa_cur_mtab;
26
+ global $wppa_requested_subtab;
27
+ global $wppa_requested_items;
28
+ global $wppa_tab_names;
29
+ global $wppa_subtab_names;
30
 
31
  // Start test area
32
 
34
 
35
  // Initialize
36
  wppa_initialize_runtime( true );
37
+ $opts_error = false;
38
 
39
  // Re-animate crashec cron jobs
40
  wppa_re_animate_cron();
57
  if ( isset($_REQUEST['wppa_settings_submit']) ) { // Yep!
58
 
59
  if ( ! wp_verify_nonce( $_REQUEST['wppa-nonce'], 'wppa-nonce' ) ) {
60
+ wp_die( 'Security check failuere' );
61
  }
62
+
63
  $key = $_REQUEST['wppa-key'];
64
  $sub = isset( $_REQUEST['wppa-sub'] ) ? $_REQUEST['wppa-sub'] : '';
65
 
89
  // Should better be here
90
  case 'wppa_setup':
91
  wppa_setup(true); // Message on success or fail is in the routine
92
+ wppa_ok_message( __( 'Plugin successfully set up' , 'wp-photo-album-plus') );
93
  break;
94
 
95
  // Must be here
102
 
103
  $fname = wppa_opt( 'skinfile' );
104
 
105
+ if ( $fname == '' ) {
106
+ wppa_error_message( __( 'Please select a valid option first', 'wp-photo-album-plus' ) );
107
+ }
108
+ elseif ( $fname == 'default' ) {
109
  if ( wppa_set_defaults( true ) ) {
110
  wppa_ok_message( __( 'Reset to default settings', 'wp-photo-album-plus' ) );
111
  }
112
  else {
113
  wppa_error_message( __( 'Unable to set defaults', 'wp-photo-album-plus' ) );
114
+ $opts_error = true;
115
  }
116
  }
117
  else {
129
  }
130
  else {
131
  wppa_error_message( __( 'Unable to restore saved settings', 'wp-photo-album-plus' ) );
132
+ $opts_error = true;
133
  }
134
  }
135
+ delete_option( 'wppa_skinfile' );
136
  break;
137
 
138
  // Must be here
139
+ case 'wppa_watermark_file_upload':
140
  if ( isset($_FILES['file_1']) && $_FILES['file_1']['error'] != 4 ) { // Expected a fileupload for a watermark
141
  $file = $_FILES['file_1'];
142
  if ( $file['error'] ) {
159
  break;
160
 
161
  case 'wppa_watermark_font_upload':
162
+ if ( isset($_FILES['file_1']) && $_FILES['file_1']['error'] != 4 ) { // Expected a fileupload for a watermark font file
163
+ $file = $_FILES['file_1'];
164
  if ( $file['error'] ) {
165
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
166
  }
180
  break;
181
 
182
  case 'wppa_audiostub_upload':
183
+ if ( isset( $_FILES['file_1'] ) && $_FILES['file_1']['error'] != 4 ) {
184
+ $file = $_FILES['file_1'];
185
  if ( $file['error'] ) {
186
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
187
  }
214
  break;
215
 
216
  case 'wppa_documentstub_upload':
217
+ if ( isset( $_FILES['file_1'] ) && $_FILES['file_1']['error'] != 4 ) {
218
+ $file = $_FILES['file_1'];
219
  if ( $file['error'] ) {
220
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
221
  }
248
  break;
249
 
250
  case 'wppa_multimedia_icon_upload':
251
+ if ( isset( $_FILES['file_1'] ) && $_FILES['file_1']['error'] != 4 ) {
252
+ $file = $_FILES['file_1'];
253
  if ( $file['error'] ) {
254
  wppa_error_message(sprintf(__('Upload error %s', 'wp-photo-album-plus'), $file['error']));
255
  }
319
 
320
  } // wppa-settings-submit
321
 
 
 
 
 
322
  // Fix invalid source path
323
  wppa_fix_source_path();
324
 
325
+ echo '
326
+ <div class="wrap">';
327
+ wppa_admin_spinner();
328
+ $iconurl = WPPA_URL.'/img/settings32.png';
329
+
330
+ // General header
331
+ echo '
332
+ <img id="icon-album" src="'.$iconurl.'" />
333
+ <h1 style="display:inline" >' . __('WP Photo Album Plus Settings', 'wp-photo-album-plus') . '
334
+ <span style="color:blue;"> ' . __('Auto Save', 'wp-photo-album-plus'). '</span>
335
+ </h1>';
336
+ if ( current_user_can( 'administrator' ) ) {
337
+ echo ' ' .
338
+ __( 'Database revision:', 'wp-photo-album-plus' ) . ' ' . wppa_get_option( 'wppa_revision', '100') . '. ' .
339
+ __( 'WP Charset:', 'wp-photo-album-plus') . ' ' . get_bloginfo( 'charset' ) . '. ' .
340
+ __( 'Current PHP version:', 'wp-photo-album-plus' ) . ' ' . phpversion() . '. ' .
341
+ __( 'WPPA+ API Version:', 'wp-photo-album-plus' ) . ' ' . $wppa_api_version . '. ' .
342
+ __( 'Filesystem method:', 'wp-photo-album-plus' ) . ' ' . get_filesystem_method();
343
+ }
344
+ echo '
345
+ <br />';
346
+
347
+ if ( is_multisite() ) {
 
 
348
  if ( WPPA_MULTISITE_GLOBAL ) {
349
  _e('Multisite in singlesite mode.', 'wp-photo-album-plus');
350
  }
388
  wppa_error_message(__('There is a serious misconfiguration in your servers PHP config. Function imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.', 'wp-photo-album-plus'));
389
  }
390
 
391
+ // Cron disabled?
392
  if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON == true ) {
393
  wppa_error_message(__("Please remove 'define( 'DISABLE_WP_CRON', true );' from wp-config.php", 'wp-photo-album-plus' ) );
394
  }
395