WP Photo Album Plus - Version 7.2.16.006

Version Description

= 7.2.14 =

  • This version addresses various bug fixes and feature requests.

= 7.2.13 =

  • This version addresses various bug fixes and feature requests.

= 7.2.12 =

  • This version addresses various bug fixes and feature requests.

= 7.2.11 =

  • This version addresses various bug fixes and feature requests.

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.02 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.0.08 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.07 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

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

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

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

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

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

= 6.9.05 =

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

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

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

= 6.9.02 =

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

= 6.9.01 =

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

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

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

Code changes from version 7.2.15.006 to 7.2.16.006

changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 7.2.15 =
4
 
5
  * The initial display width in cases where the shortcode specifies a maximum responsive size like size="auto,550" is now correctly set to 550 as opposed to the value in Table I-A1.1.
@@ -14,7 +24,7 @@ Note that parent="0" means: all non separate albums, and parent="-1" means: all
14
 
15
  * You can now enter a name for your backup of the settings; this means you can now have multiple backups without the need to ftp them to your local pc and rename them.
16
  * Settings backup files are no longer removed from the depot when the user enters the import adnmin screen.
17
- * Real calendar days with items now also show the daynumber; Improved (initial)initial display.
18
  * Real calendar now also displayes properly in static (non responsive) environments.
19
  * When the real calendar links to slideshow, partially wrong images were displayed in the slideshow. Fixed.
20
  * Added 5:8 as selectable thumbnail aspect ratio.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.2.16 =
4
+
5
+ * The horizon on the photo admin page is now up/down draggable. Note: Imagick must be activated to adjust photos to the horizon.
6
+ * New setting: Table IV-B16: Filmonly continu. The filmstrip will move almost continously. The speed is approx the animation time per item. Make sure the speed is not set to --- off ---.
7
+ * New setting: Table II-B1.1: Start/stop on Filmonly.
8
+ * Lightbox on filmstrip now never uses thumbnail images.
9
+ * Fixed a lay-out issue on theme twentytwenty for lightbox panoramic images where the controls did not align and on filmstrips.
10
+ * The filmstrip now looks to continue on a running slideshow between last and first image without jumping back.
11
+ * Table IV-B12 now also works on xphoto.
12
+
13
  = 7.2.15 =
14
 
15
  * The initial display width in cases where the shortcode specifies a maximum responsive size like size="auto,550" is now correctly set to 550 as opposed to the value in Table I-A1.1.
24
 
25
  * You can now enter a name for your backup of the settings; this means you can now have multiple backups without the need to ftp them to your local pc and rename them.
26
  * Settings backup files are no longer removed from the depot when the user enters the import adnmin screen.
27
+ * Real calendar days with items now also show the daynumber; Improved (initial) display.
28
  * Real calendar now also displayes properly in static (non responsive) environments.
29
  * When the real calendar links to slideshow, partially wrong images were displayed in the slideshow. Fixed.
30
  * Added 5:8 as selectable thumbnail aspect ratio.
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 7.2.03
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -2441,3 +2441,48 @@ function wppaAjaxGetSpinnerHtml( type, target ) {
2441
  }
2442
  } );
2443
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 7.2.16
5
  /* Various js routines used in admin pages
6
  */
7
 
2441
  }
2442
  } );
2443
  }
2444
+
2445
+
2446
+ // Movable horizon on photo admin page
2447
+ function wppaDragHorizon(elmnt) {
2448
+
2449
+ // var pos1 = 0, pos3 = 0;
2450
+ var pos2 = 0, pos4 = 0;
2451
+
2452
+ elmnt.onmousedown = dragMouseDown;
2453
+
2454
+ function dragMouseDown(e) {
2455
+ e = e || window.event;
2456
+ e.preventDefault();
2457
+
2458
+ // get the mouse cursor position at startup:
2459
+ pos3 = e.clientX;
2460
+ pos4 = e.clientY;
2461
+ document.onmouseup = closeDragElement;
2462
+
2463
+ // call a function whenever the cursor moves:
2464
+ document.onmousemove = elementDrag;
2465
+ }
2466
+
2467
+ function elementDrag(e) {
2468
+ e = e || window.event;
2469
+ e.preventDefault();
2470
+
2471
+ // calculate the new cursor position:
2472
+ // pos1 = pos3 - e.clientX;
2473
+ pos2 = pos4 - e.clientY;
2474
+ // pos3 = e.clientX;
2475
+ pos4 = e.clientY;
2476
+
2477
+ // set the element's new position:
2478
+ elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
2479
+ // elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
2480
+ }
2481
+
2482
+ function closeDragElement() {
2483
+
2484
+ // stop moving when mouse button is released:
2485
+ document.onmouseup = null;
2486
+ document.onmousemove = null;
2487
+ }
2488
+ }
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,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),n=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var i=a.files[0];if(i.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+i.name);else if(i.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");n.value="Uploading...",n.style.color="black";var o=new FormData;o.append("photo",i,i.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!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":jQuery("#remark-"+t).html(e[2]),n.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",n.value="Error occured",n.style.color="red"}}else alert("An error occurred!")},s.send(o)}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(),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");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<13;subtab++)"on"==(p=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","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;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){var p=e.substring(5);document.getElementById(p).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",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("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;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(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"==p?(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"))}else 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 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),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",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(),o=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",o,!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:if(200==i.status){var e=wppaTrim(i.responseText).split("||");"ER"==e[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")}else 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:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[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")}else 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(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("remark-"+t).innerHTML=e[2];break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(l,r,e,t,u,c){u||(u=""),c||(c=""),wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+l).html(u+'<span style="color:red">'+a[2]+"</span>"+c);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+l).html(s);break;case"photourl":if(wppaCropper[l])wppaCropper[l].replace(i);else jQuery("#photourl-"+l).attr("src",i);jQuery("#thumba-"+l).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+l).html(i),0<i.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(i)}}"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+l).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 wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var 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,s=!1,l=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(s=!0,l=o),o++;if(!s){wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],l=i}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][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(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).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 n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==s&&wppaAlbumUpdateMatrix[n][1]==l&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=r||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).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(),n=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(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]);break;default:jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",n,!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("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default: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))}else 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(n,e,o){if(o);else if(!e&&"yes"==document.getElementById(n+"_continue").value)return document.getElementById(n+"_continue").value="no",document.getElementById(n+"_button").value="Start!",void(0<jQuery("#"+n+"_togo").html()&&(jQuery("#"+n+"_status").html("Pausing..."),jQuery("#"+n+"_button").css("display","none")));o||(document.getElementById(n+"_continue").value="yes",document.getElementById(n+"_button").value="Stop!",""==jQuery("#"+n+"_status").html()&&jQuery("#"+n+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+n+"&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 = "+n+", Error = "+p+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==n&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==n&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==n&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+n+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,n="action=wppa&wppa-action=maintenancepopup&slug="+e;if(n+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),4==p.readyState&&200==p.status){var i=wppaEntityDecode(p.responseText).split("|"),o=i[0];i[0]="";var s=i.join("|").substring(1),l={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(s).dialog(l).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:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+o+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r.replace("#","H")).attr("title",a[2]),a[4])for(var n,i,o,s=a[4].split(";"),l=0;l<s.length;)n=s[l].split(":"),i=jQuery("#"+n[0]).html(),o=n[1],""!=i&&""==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("#"+n[0]).html(o),l++}},error:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}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 window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=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){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}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,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(o=n,p==++o?s=!0:s?(a+=n==i?t+n+t+p:t+t+n+t+p,s=!1):a+=t+p,s||(i=p,i++),n=p),l++;for(s&&(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){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}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){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[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(o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+o,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o+"_togo").html(a[0]);var n=jQuery("#"+o+"_status").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("#"+o+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(o)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}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,n){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){var a=e.split("|");jQuery("#"+n).html(a[0])},error:function(e){},complete:function(e){}})}
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,t,p){document.getElementById("wppa-re-up-form-"+t);var a=document.getElementById("wppa-re-up-file-"+t),n=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var i=a.files[0];if(i.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+i.name);else if(i.name!=p&&!confirm("Filename is different.\nIf you continue, the filename will not be updated!.\n\nContinue?"))return void jQuery("#re-up-"+t).css("display","none");n.value="Uploading...",n.style.color="black";var o=new FormData;o.append("photo",i,i.name);var s=new XMLHttpRequest,l="?action=wppa&wppa-action=update-photo&photo-id="+t+"&item=file&wppa-nonce="+document.getElementById("photo-nonce-"+t).value;s.open("POST",wppaAjaxUrl+l,!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":jQuery("#remark-"+t).html(e[2]),n.value="Upload",jQuery("#re-up-"+t).css("display","none");break;case"99":document.getElementById("photoitem-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>";break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",n.value="Error occured",n.style.color="red"}}else alert("An error occurred!")},s.send(o)}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(),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");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<13;subtab++)"on"==(p=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","Z");for(table=1;table<13;table++)for(table<13?wppaShowTable(table):wppaHideTable(table),wppa_tablecookieoff(table),subtab=0;subtab<12;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){var p=e.substring(5);document.getElementById(p).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",a=wppaFontDirectory+"wmf"+t+"-"+e+".png";jQuery("#wm-font-preview").attr("src",p),jQuery("#wm-type-preview").attr("src",a)}function wppaCheckWidgetMethod(){var e,t;if("4"==document.getElementById("wppa-wm").value){document.getElementById("wppa-wp").style.visibility="visible";var p=jQuery("#wppa-wp").val();"day-of-week"==p||"day-of-month"==p||"day-of-year"==p?jQuery(".wppa-order").css("visibility",""):jQuery(".wppa-order").css("visibility","hidden")}else document.getElementById("wppa-wp").style.visibility="hidden",jQuery(".wppa-order").css("visibility","hidden");if("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;if(e||t){jQuery(".wppa_bc").css("display",""),jQuery(".wppa_bc_html").css("display","");var p=document.getElementById("bc_separator").value;"txt"==p?(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"==p?(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"))}else 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 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),p=jQuery("#"+t).val();jQuery("#colorbox-"+t).css("background-color",p)}function checkAll(e,t){var p=document.getElementById(e);p&&(p.checked?jQuery(t).prop("checked","checked"):jQuery(t).prop("checked",""))}function impUpd(e,t){e.checked?(jQuery(t).prop("value",wppa_update),jQuery(".hideifupdate").css("display","none")):(jQuery(t).prop("value",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(),o=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+t;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+t).value,i.open("GET",o,!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:if(200==i.status){var e=wppaTrim(i.responseText).split("||");"ER"==e[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")}else 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:if(200==p.status){var e=wppaTrim(p.responseText).split("||");"ER"==e[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")}else 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(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":document.getElementById("remark-"+t).innerHTML=e[2];break;default:document.getElementById("remark-"+t).innerHTML='<span style="color:red">'+e[2]+"</span>"}jQuery("#wppa-water-spin-"+t).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("remark-"+t).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}function wppaAjaxUpdatePhoto(l,r,e,t,u,c){u=u||"",c=c||"",wppaFeAjaxLog("in"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+l+"&item="+r+"&wppa-nonce="+document.getElementById("photo-nonce-"+l).value+"&value="+wppaEncode(e),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"visible"}),jQuery("#remark-"+l).html("Working, please wait...")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"99":jQuery("#photoitem-"+l).html(u+'<span style="color:red">'+a[2]+"</span>"+c);break;default:var n,i,o=JSON.parse(a[2]);for(n in o)switch(i=o[n],n){case"remark":var s;i=(i=(i=i.replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\/g,""),s="0"!=a[1]?'<span style="color:red;" >'+i+"</span>":'<span style="color:green;" >'+i+"</span>",jQuery("#remark-"+l).html(s);break;case"photourl":if(wppaCropper[l])wppaCropper[l].replace(i);else jQuery("#photourl-"+l).attr("src",i);jQuery("#thumba-"+l).attr("href",i);break;case"thumburl":jQuery("#thumburl-"+l).attr("src",i);break;case"magickstack":jQuery("#magickstack-"+l).html(i),0<i.length?jQuery("#imstackbutton-"+l).css("display","inline"):jQuery("#imstackbutton-"+l).css("display","none");break;default:jQuery("#"+n+"-"+l).html(i)}}"description"==r&&jQuery("#wppa-photo-spin-"+l).css({visibility:"hidden"}),wppaFeAjaxLog("out")},error:function(e,t,p){jQuery("#remark-"+l).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 wppaChangeScheduleAlbum(e,t){jQuery(t).prop("checked")?jQuery(".wppa-datetime-"+e).css("display","inline"):(jQuery(".wppa-datetime-"+e).css("display","none"),wppaAjaxUpdateAlbum(e,"scheduledtm",document.getElementById("wppa-dummy")))}_wppaRefreshAfter=!1;var 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,s=!1,l=-1;o<i;)wppaAlbumUpdateMatrix[o][0]==e&&wppaAlbumUpdateMatrix[o][1]==t&&(s=!0,l=o),o++;if(!s){wppaAlbumUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],l=i}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][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(s,l,r,u,c){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+s+"&item="+l+"&wppa-nonce="+document.getElementById("album-nonce-"+s).value+"&value="+wppaEncode(r),async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"description"==l&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(e,t,p){var a=wppaTrim(e).split("||");switch(wppaAjaxAlbumCount--,""!=a[0]&&alert("The server returned unexpected output:\n"+a[0]),a[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+s).html(a[2]):jQuery("#albumstatus-"+s).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+s).html='<span style="color:red">'+a[2]+" ("+a[1]+")</span>"}if(void 0!==a[3]&&wppaProcessFull(a[3],a[4]),c&&"0"==a[1])return jQuery("#albumstatus-"+s).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 n=0,i=-1,o=wppaAlbumUpdateMatrix.length;n<o;)wppaAlbumUpdateMatrix[n][0]==s&&wppaAlbumUpdateMatrix[n][1]==l&&(i=n),n++;wppaAlbumUpdateMatrix[i][2]=r||0,wppaAlbumUpdateMatrix[i][4]=!1,wppaAlbumUpdateMatrix[i][5]=!1,wppaAjaxUpdateAlbumMonitor(u)},error:function(e,t,p){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+s).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(),n=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(){if(4==a.readyState)if(200==a.status){var e=wppaTrim(a.responseText).split("||");switch(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),e[1]){case"0":jQuery("#remark-"+t).html(e[2]);break;default:jQuery("#remark-"+t).html('<span style="color:red">'+e[2]+"</span>")}jQuery("#wppa-comment-spin-"+p).css("visibility","hidden")}else jQuery("#remark-"+t).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",n,!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("||");if(""!=e[0]&&alert("The server returned unexpected output:\n"+e[0]),404!=p.status)switch(e[1]){case"0":jQuery("#img_"+t).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+t).attr("title",e[2]),e[3]&&alert(e[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default: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))}else 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(n,e,o){if(!o&&!e&&"yes"==document.getElementById(n+"_continue").value)return document.getElementById(n+"_continue").value="no",document.getElementById(n+"_button").value="Start!",void(0<jQuery("#"+n+"_togo").html()&&(jQuery("#"+n+"_status").html("Pausing..."),jQuery("#"+n+"_button").css("display","none")));o||(document.getElementById(n+"_continue").value="yes",document.getElementById(n+"_button").value="Stop!",""==jQuery("#"+n+"_status").html()&&jQuery("#"+n+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+n+"&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 = "+n+", Error = "+p+", status = "+t,"force"),jQuery("#"+n+"_status").html("Server error #"+(11-wppaAlwaysContinue));var a=!1;--wppaAlwaysContinue<1&&(a=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(a||0<wppaAlwaysContinue)&&("wppa_remake"==n&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==n&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==n&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+n+"', true)",2e3))},complete:function(e,t,p){}})}function wppaAjaxPopupWindow(e){switch(e){case"wppa_list_index":"Search index table";break;case"wppa_list_errorlog":"WPPA+ Error log";break;case"wppa_list_rating":"Recent ratings";break;case"wppa_list_session":"Active sessions";break;case"wppa_list_comments":"Recent comments"}var t=.9*wppaWindowWidth(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,n="action=wppa&wppa-action=maintenancepopup&slug="+e;if(n+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(n),4==p.readyState&&200==p.status){var i=wppaEntityDecode(p.responseText).split("|"),o=i[0];i[0]="";var s=i.join("|").substring(1),l={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(s).dialog(l).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:"24px"}),jQuery(".ui-dialog-title").html("<h2>"+o+"</h2>"),jQuery(".ui-button").css({position:"absolute",top:"12px",right:"12px"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(r,e,t){var p="action=wppa&wppa-action=update-option&wppa-option="+wppaEncode(r)+"&wppa-nonce="+document.getElementById("wppa-nonce").value;0!=e&&(p+="number"==typeof e?"&value="+e:t?"&value="+wppaGetSelectionEnumByClass("."+r,","):"&value="+wppaEncode(e.value)),jQuery.ajax({url:wppaAjaxUrl,data:p,async:!0,type:"POST",timeout:1e5,beforeSend:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,t,p){var a=wppaTrim(e).split("||");if(""!=a[0])alert("The server returned unexpected output:\n"+a[0]);else{switch(a[1]){case"0":jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"tick.png"),a[3]&&alert(a[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),a[3]&&alert(a[3])}if(jQuery("#img_"+r.replace("#","H")).attr("title",a[2]),a[4])for(var n,i,o,s=a[4].split(";"),l=0;l<s.length;)n=s[l].split(":"),i=jQuery("#"+n[0]).html(),o=n[1],""!=i&&""==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("#"+n[0]).html(o),l++}},error:function(e){jQuery("#img_"+r.replace("#","H")).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+r).title="Communication error"},complete:function(e){wppaCheckInconsistencies(),"spinner_shape"!=r&&"icon_corner_style"!=r||(wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")),"svg_color"!=r&&"svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("normal","wppa-spin-pre-1"),"ovl_svg_color"!=r&&"ovl_svg_bg_color"!=r||wppaAjaxGetSpinnerHtml("lightbox","wppa-spin-pre-2")}})}function wppaEncode(e){var t;if(void 0!==e){if("number"==typeof e)return e;var p=(t=(t=e.replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0;for(t="";a<p.length;)t+=p[a],++a<p.length&&(t+="||PLUS||");return t}}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){var p=document.getElementById(t);e&&(p.value?p.value+=","+e:p.value=e,"-clear-"==e&&(p.value=""))}function wppaRefresh(e){var t=new String(document.location).split("#")[0]+"#"+e;document.location=t}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,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(o=n,p==++o?s=!0:s?(a+=n==i?t+n+t+p:t+t+n+t+p,s=!1):a+=t+p,s||(i=p,i++),n=p),l++;for(s&&(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){var p=jQuery("#"+t).val();0==p.length?alert("Please enter searchstring"):document.location.href=e+"&wppa-searchstring="+p}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){var a=e.split("||");"0"==a[1]?document.location=a[2]:alert("Error: "+a[1]+"\n\n"+a[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(o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+o,async:!0,type:"GET",timeout:1e5,beforeSend:function(e){},success:function(e,t,p){var a=e.split("|");jQuery("#"+o+"_togo").html(a[0]);var n=jQuery("#"+o+"_status").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("#"+o+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(o)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}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,n){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){var a=e.split("|");jQuery("#"+n).html(a[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}}
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '7.2.03';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -1411,6 +1411,13 @@ wppaConsoleLog( 'wppaOvlHide' );
1411
 
1412
  // Record we are out
1413
  wppaOvlOpen = false;
 
 
 
 
 
 
 
1414
  }
1415
 
1416
  // Perform onclick action
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '7.2.16';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
1411
 
1412
  // Record we are out
1413
  wppaOvlOpen = false;
1414
+
1415
+ // Reatart slideshow if requested
1416
+ if ( document.onLbquitMocc ) {
1417
+ wppaStartStop( document.onLbquitMocc );
1418
+ document.onLbquitMocc = null;
1419
+ document.onLbquitIdx = null;
1420
+ }
1421
  }
1422
 
1423
  // Perform onclick action
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.2.03",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href,"force")),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p,"force"),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(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[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":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[p]+' 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[p]+"\" ></iframe><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(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[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',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[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#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[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' 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[p]+'" ></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[p]+'" 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[p]+'" />',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[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";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;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop+(w-l)/2,parseInt((d-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,O=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted","force")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=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),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.2.16",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href,"force")),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p,"force"),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(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[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":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[p]+' 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[p]+"\" ></iframe><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(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[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',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[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#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[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' 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[p]+'" ></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[p]+'" 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[p]+'" />',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[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";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;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),c?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted","force")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null)}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=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),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
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.2.14';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -335,6 +335,31 @@ function wppaValidateComment( mocc ) {
335
 
336
  function _wppaNextSlide( mocc, mode ) {
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  var fg = _wppaFg[mocc];
339
  var bg = 1 - fg;
340
 
@@ -1259,7 +1284,17 @@ function _wppaAdjustFilmstrip( mocc ) {
1259
  var xoffset;
1260
  xoffset = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1261
  if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1262
- jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed);
 
 
 
 
 
 
 
 
 
 
1263
  }
1264
  else {
1265
  _wppaFilmNoMove[mocc] = false; // reset
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '7.2.16';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
335
 
336
  function _wppaNextSlide( mocc, mode ) {
337
 
338
+ // Remember current
339
+ _wppaLastIdx[mocc] = _wppaCurIdx[mocc];
340
+
341
+ // Filmonly continuously?
342
+ if ( ! document.getElementById( 'slide_frame-'+mocc ) && document.getElementById( 'filmwindow-'+mocc ) && wppaFilmonlyContinuous ) {
343
+
344
+ if ( ! _wppaSSRuns[mocc] ) {
345
+ _wppaCurIdx[mocc] = _wppaNxtIdx[mocc];
346
+ _wppaAdjustFilmstrip( mocc );
347
+ return;
348
+ }
349
+
350
+ // Find index of next slide if in auto mode and not stop in progress
351
+ _wppaCurIdx[mocc] ++;;
352
+ if ( _wppaCurIdx[mocc] == _wppaSlides[mocc].length ) _wppaCurIdx[mocc] = 0;
353
+
354
+ // Adjust filmstrip
355
+ _wppaAdjustFilmstrip( mocc );
356
+ _wppaNxtIdx[mocc] = _wppaCurIdx[mocc];
357
+
358
+ // Go for the next
359
+ setTimeout( '_wppaNextSlide( '+mocc+', \''+mode+'\' )', wppaAnimationSpeed );
360
+ return;
361
+ }
362
+
363
  var fg = _wppaFg[mocc];
364
  var bg = 1 - fg;
365
 
1284
  var xoffset;
1285
  xoffset = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1286
  if ( wppaFilmShowGlue ) xoffset -= ( wppaFilmStripMargin[mocc] * 2 + 2 ); // Glue
1287
+
1288
+ // If going to the first (0) and running and the last was top: jump to -1 and animate to 0. No glue correction, we are before the seam.
1289
+ if ( ( typeof( _wppaLastIdx[mocc] ) == 'undefined' ) || ( _wppaCurIdx[mocc] == 0 && _wppaSSRuns[mocc] && _wppaLastIdx[mocc] == ( _wppaSlides[mocc].length -1 ) ) ) {
1290
+
1291
+ var loc_1 = wppaFilmStripLength[mocc] / 2 - ( -1 + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1292
+ jQuery( '#wppa-filmstrip-'+mocc ).stop().css( {marginLeft: loc_1+'px'} );
1293
+ _wppaLastIdx[mocc] = _wppaCurIdx[mocc];
1294
+ }
1295
+ jQuery( '#wppa-filmstrip-'+mocc ).stop().animate( {marginLeft: xoffset+'px'}, wppaAnimationSpeed );
1296
+
1297
+ /* end new */
1298
  }
1299
  else {
1300
  _wppaFilmNoMove[mocc] = false; // reset
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSlideshowVersion="7.2.14";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,s,l,d,u,_,m,y,c,h,S,f,g,x,j,Q,I,b,v,N,T,k,C){var R,L;(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":0<parseInt(h)?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[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]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<C.length&&(_wppaSlides[p][a]+=' poster="'+C+'" ')):_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])?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=I,_wppaId[p][a]=s,_wppaAvg[p][a]=l,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=y,""!=c?_wppaLinkTarget[p][a]=c:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=f,_wppaExifHtml[p][a]=g,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(x),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=k}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(p,a):_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=_wppaFg[p],t=1-e;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"+e+"-"+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]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):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 s=0;s<_wppaSlides[p].length;)0!=s&&s!=r&&(s<i||w<s)?jQuery("#wppa-numbar-"+p+"-"+s).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+s).css({display:"block"}),s++}if(_wppaFirst[p]){if(-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)),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){var l=wppaIconSize(p,"1.5em",!1);jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",l,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",l,!1,!0))}else 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))}else wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]);_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),wppaColWidth[p]=0,_wppaDoAutocol(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}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,s=parseInt(jQuery(w).css("width")),l="nil";switch(t==i&&(l="none"),t==i-1&&(l="left"),t==i+1&&(l="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(l="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(l="right"),"nil"==l&&(l=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:s}),jQuery(r).css({marginLeft:0,width:s}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(l){case"left":jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(l){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(l){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(l){case"left":case"right":var d=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:s},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:d,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}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){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),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]])}if(_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 t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=_wppaShareUrl[p][_wppaCurIdx[p]];"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(0<w.length){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}wppaProtect(),jQuery(window).trigger("resize")}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 s=wppaAspectRatio[p],l=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var y,c,h,S,f,g,x,j,Q=wppaStretch;if(u)y=w-d,S=h=0,x=f=w,j=g=(c=parseInt(y*n/o))+d,jQuery("#"+i).css({width:x,height:j}),jQuery("#"+t).css({width:f,height:g}),jQuery("#"+a).css({width:y,height:c});else{if(l<(x=w)&&(x=l),f=x,g=j=parseInt(x*s),Q||x-d<=o||j-d<=n?s<(n+d)/(o+d)?(c=j-d,y=parseInt(c*o/n)):(y=x-d,c=parseInt(y*n/o)):(y=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((j-(c+d))/2);break;case"bottom":S=j-(c+d);break;case"fit":S=0,g=j=c+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:x,height:j}),jQuery("#"+t).css({width:f,height:g}),jQuery("#"+a).css({width:y,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((w-x)/2);break;case"right":h=w-x}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:h})}var I=jQuery(r).height(),b=(x-y)/2;I&&0<I&&(wppaAudioHeight=I,jQuery(r).css({height:wppaAudioHeight,width:y,left:b}))}var v,N=parseInt(x/3),T=2*N;v=0<r.length?j-wppaAudioHeight-wppaSlideBorderWidth-S:j,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<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[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else 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":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}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,s=""==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+s+' 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+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+s+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var l="",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),l+='<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),l+='<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 "+s+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+s+' 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),l+='<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=l}""!=_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 _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){var a;if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed);if(-1!=_wppaCurIdx[p]){var e=_wppaCurIdx[p]-10;e<0&&(e=0);var t=_wppaCurIdx[p]+10;t>_wppaSlides[p].length&&(t=_wppaSlides[p].length);for(var i=0;i<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html()&&(jQuery(window).trigger("scroll"),""!=jQuery("#wppa-film-"+i+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+i+"-"+p).attr("title",jQuery("#wppa-film-"+i+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+i+"-"+p).attr("title",jQuery("#wppa-film-"+i+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==i?(jQuery("#wppa-film-"+i+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+i+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+i+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][i]),jQuery("#wppa-pre-"+i+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][i]))),i++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_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&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_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):(wppaConsoleLog("GotoRunning "+p),_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){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_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).html(wppaSlideShow):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).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_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).html(_wppaNames[p][_wppaCurIdx[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).html(_wppaNames[p][_wppaCurIdx[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,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=a&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){var a,e,t,w,r;if(document.getElementById("wppa-rating-"+p)&&void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){"void"==(r=_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 o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[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(a=(e=a.split("|"))[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(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",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==r)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<r)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span 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(n)}0==r?(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(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}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("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+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="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).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"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}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;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
1
+ var wppaJsSlideshowVersion="7.2.16";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,s,l,d,u,_,m,y,c,h,S,x,f,g,j,I,Q,b,v,N,T,C,k){var R,L;(n=wppaRepairScriptTags(n),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,"random"==h?_wppaTimeOut[p]="random":0<parseInt(h)?_wppaTimeOut[p]=parseInt(h):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[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]=[]),R="default",""!=m?R="pointer":""!=wppaLightBox[p]&&(R="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=v,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+C+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<k.length&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+C+'" 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])?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=s,_wppaAvg[p][a]=l,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=y,""!=c?_wppaLinkTarget[p][a]=c:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=S,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(g),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(I),_wppaHiresUrl[p][a]=b,_wppaVideoHtml[p][a]=v,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=T,_wppaImageAlt[p][a]=C}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(p,a):_wppaGoto(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){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),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],void _wppaAdjustFilmstrip(p));var e=_wppaFg[p],t=1-e;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"+e+"-"+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]&&_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][_wppaId[p][_wppaNxtIdx[p]]],_wppaLon[p][_wppaId[p][_wppaNxtIdx[p]]])):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 s=0;s<_wppaSlides[p].length;)0!=s&&s!=r&&(s<i||w<s)?jQuery("#wppa-numbar-"+p+"-"+s).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+s).css({display:"block"}),s++}if(_wppaFirst[p]){if(-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)),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){var l=wppaIconSize(p,"1.5em",!1);jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",l,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",l,!1,!0))}else 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))}else wppaMakeTheSlideHtml(p,t,_wppaNxtIdx[p]);_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),wppaColWidth[p]=0,_wppaDoAutocol(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType&&"IMG"==t.nodeName&&!t.complete)return setTimeout("_wppaNextSlide_2( "+p+" )",200),void wppaConsoleLog("Retry next2");wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)}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,s=parseInt(jQuery(w).css("width")),l="nil";switch(t==i&&(l="none"),t==i-1&&(l="left"),t==i+1&&(l="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(l="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(l="right"),"nil"==l&&(l=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:s}),jQuery(r).css({marginLeft:0,width:s}),wppaFormatSlide(p),wppaAnimationType){case"fadeover":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"fadeafter":jQuery(o).fadeOut(wppaAnimationSpeed),jQuery(n).delay(wppaAnimationSpeed).fadeIn(wppaAnimationSpeed,_wppaNextSlide_4(p));break;case"swipe":switch(l){case"left":jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-s+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackon":switch(l){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:-s+"px",zIndex:81}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"stackoff":switch(l){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"right":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:s+"px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(r).css({marginLeft:0,zIndex:80}),jQuery(n).fadeIn(10),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;case"turnover":switch(l){case"left":case"right":var d=parseInt(jQuery(r).css("width")),u=parseInt(jQuery(n).css("marginLeft"));jQuery(w).css({zIndex:80}),jQuery(r).css({zIndex:81,width:0}),jQuery(n).css({maxWidth:0,marginLeft:0}),jQuery(n).fadeIn(10),jQuery(r).animate({width:s},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:d,marginLeft:u},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p)),jQuery(o).delay(wppaAnimationSpeed).fadeOut(10);break;case"none":jQuery(n).fadeIn(10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:alert("Animation type "+wppaAnimationType+" is not supported in this version")}}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){if(!_wppaToTheSame){var a=_wppaDsc[p][_wppaCurIdx[p]];if(jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty){var e=_wppaDsc[p][_wppaCurIdx[p]];""==e||"&nbsp;"==e?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")}jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),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]])}if(_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 t=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),void wppaStartStop(p,t)}if(wppaUpdateLightboxes(),!wppaIsMini[p]){var i=_wppaShareUrl[p][_wppaCurIdx[p]];"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],i)}if(_wppaSSRuns[p]&&setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p),wppaStopAudio(p),wppaSlideAudioStart){var w=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p);if(0<w.length){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}wppaProtect(),jQuery(window).trigger("resize")}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 s=wppaAspectRatio[p],l=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var y,c,h,S,x,f,g,j,I=wppaStretch;if(u)y=w-d,S=h=0,g=x=w,j=f=(c=parseInt(y*n/o))+d,jQuery("#"+i).css({width:g,height:j}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c});else{if(l<(g=w)&&(g=l),x=g,f=j=parseInt(g*s),I||g-d<=o||j-d<=n?s<(n+d)/(o+d)?(c=j-d,y=parseInt(c*o/n)):(y=g-d,c=parseInt(y*n/o)):(y=o,c=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((j-(c+d))/2);break;case"bottom":S=j-(c+d);break;case"fit":S=0,f=j=c+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:g,height:j}),jQuery("#"+t).css({width:x,height:f}),jQuery("#"+a).css({width:y,height:c}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((w-g)/2);break;case"right":h=w-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-y)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:y,left:b}))}var v,N=parseInt(g/3),T=2*N;v=0<r.length?j-wppaAudioHeight-wppaSlideBorderWidth-S:j,jQuery("#bbb-"+p+"-l").css({height:v,width:N,left:0}),jQuery("#bbb-"+p+"-r").css({height:v,width:N,left:T})}}function wppaMakeNameHtml(p){var a="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])a=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":if(wppaArtMonkeyButton)if(_wppaFullNames[p][_wppaCurIdx[p]]){var e=_wppaFullNames[p][_wppaCurIdx[p]].split("<img");a='<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[0]+'" />',e[1]&&(a+="<img"+e[1])}else a="";else 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":a=_wppaFullNames[p][_wppaCurIdx[p]];break;default:a=""}return wppaRepairBrTags(a)}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,s=""==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+s+' 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+s+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+s+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var l="",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),l+='<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),l+='<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 "+s+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+s+' 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),l+='<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=l}""!=_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 _wppaAdjustFilmstrip(p){if(document.getElementById("wppa-filmstrip-"+p)){if(jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p])_wppaFilmNoMove[p]=!1;else{var a;if(a=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(a-=2*wppaFilmStripMargin[p]+2),void 0===_wppaLastIdx[p]||0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1){var e=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p];jQuery("#wppa-filmstrip-"+p).stop().css({marginLeft:e+"px"}),_wppaLastIdx[p]=_wppaCurIdx[p]}jQuery("#wppa-filmstrip-"+p).stop().animate({marginLeft:a+"px"},wppaAnimationSpeed)}if(-1!=_wppaCurIdx[p]){var t=_wppaCurIdx[p]-10;t<0&&(t=0);var i=_wppaCurIdx[p]+10;i>_wppaSlides[p].length&&(i=_wppaSlides[p].length);for(var w=0;w<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][w]+"_"+p).html()&&(jQuery(window).trigger("scroll"),""!=jQuery("#wppa-film-"+w+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+w+"-"+p).attr("title",jQuery("#wppa-film-"+w+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==w?(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]),jQuery("#wppa-pre-"+w+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][w]))),w++}}jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0),_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&&(_wppaNxtIdx[p]=_wppaSlides[p].length-1),_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):(wppaConsoleLog("GotoRunning "+p),_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){"icons"==wppaSlideshowNavigationType?_wppaStartIcons(p,a):_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).html(wppaSlideShow):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).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){"icons"==wppaSlideshowNavigationType?_wppaStopIcons(p):_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).html(_wppaNames[p][_wppaCurIdx[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).html(_wppaNames[p][_wppaCurIdx[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,t;document.getElementById("wppa-filmstrip-"+p)&&((a=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=a&&(e=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(e+=2+2*wppaFilmStripMargin[p]),t=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?t-=e:t+=e,jQuery("#wppa-filmstrip-"+p).css("margin-left",t+"px")))}function _wppaSetRatingDisplay(p){var a,e,t,w,r;if(document.getElementById("wppa-rating-"+p)&&void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){"void"==(r=_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 o=a.split("|");return jQuery("#wppa-like-"+p).attr("title",o[0]),jQuery("#wppa-liketext-"+p).html(o[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(a=(e=a.split("|"))[0],t=e[1],w=_wppaDisc[p][_wppaCurIdx[p]],r=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,a,"#wppa-avg-"),_wppaSetRd(p,r,"#wppa-rate-"),0==r?(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",w));else{if(jQuery("#wppa-numrate-avg-"+p).html(a+" ( "+t+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==r)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<r)jQuery("#wppa-numrate-mine-"+p).html(r);else if(r<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)r==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(r>i-1&&r<i&&(n+="&nbsp;( "+r+" )&nbsp;"),n+='<span 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(n)}0==r?(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(w+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==r?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(t)}}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("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+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="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).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"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":var i;if("l"==a&&(i=_wppaCurIdx[p]-1)<0){if(!wppaSlideWrap[p])return;i=_wppaSlides[p].length-1}if("r"==a&&(i=_wppaCurIdx[p]+1)==_wppaSlides[p].length){if(!wppaSlideWrap[p])return;i=0}wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),wppaGotoKeepState(p,i);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}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;if("random"==_wppaTimeOut[p]){var e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed;a=Math.floor(Math.random()*(t-e+1))+e}else a=_wppaTimeOut[p];return a}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains common vars and functions
4
  //
5
- var wppaJsVersion = '7.2.14';
6
 
7
  // Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
  var wppaSlideShow;
@@ -167,6 +167,7 @@ var wppaResponseSpeed = 500;
167
  var wppaExtendedResizeCount = 0;
168
  var wppaExtendedResizeDelay = 200;
169
  var wppaThumbAspect = 3/4;
 
170
 
171
  // 'Internal' variables ( private )
172
  var _wppaId = [];
@@ -212,6 +213,7 @@ var _wppaVideoNatWidth = [];
212
  var _wppaVideoNatHeight = [];
213
  var _wppaWaitTexts = [];
214
  var _wppaImageAlt = [];
 
215
 
216
  var __wppaOverruleRun = false;
217
 
2
  //
3
  // contains common vars and functions
4
  //
5
+ var wppaJsVersion = '7.2.16';
6
 
7
  // Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
  var wppaSlideShow;
167
  var wppaExtendedResizeCount = 0;
168
  var wppaExtendedResizeDelay = 200;
169
  var wppaThumbAspect = 3/4;
170
+ var wppaFilmonlyContinuous = false;
171
 
172
  // 'Internal' variables ( private )
173
  var _wppaId = [];
213
  var _wppaVideoNatHeight = [];
214
  var _wppaWaitTexts = [];
215
  var _wppaImageAlt = [];
216
+ var _wppaLastIdx = [];
217
 
218
  var __wppaOverruleRun = false;
219
 
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="7.2.14",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,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var 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;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var 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,_wppaId=[],_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=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,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,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("resize scroll wheel",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeAutoDiv)});var wppaDoAllAutocolsLastI=0;function wppaDoAllAutocols(p){if("number"!=typeof p?p=1:p++,!(p<=wppaDoAllAutocolsLastI)){wppaDoAllAutocolsLastI=p,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var a=1;a<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[a]&&_wppaDoAutocol(a,p),a++;return wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){wppaDoAllAutocols(p)},wppaExtendedResizeDelay),!0}wppaDoAllAutocolsLastI=0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").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 a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a),!wppaAutoColumnWidth[p])return!0;var e,t;if(e=jQuery("#wppa-container-"+p).width(),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var o=document.getElementById("wppa-albumlist-"+p).clientWidth,r=parseInt((o+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,s=r-1,i=parseInt((o+wppaCoverSpacing)/r-wppaCoverSpacing);if(wppaColWidth[p]!=o||wppaMCRWidth[p]!=i){wppaColWidth[p]=o,wppaMCRWidth[p]=i;for(var n=0;n<t.length;){switch(n%r){case 0:jQuery(t[n]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[n]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[n]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}n++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:i-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:i},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var w=parseInt(e/wppaMaxCoverWidth+.9999);w<1&&(w=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/w+"%"})}if(wppaThumbSpaceAuto){var l=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(l){var u=wppaMinThumbSpace,c=e-wppaThumbnailAreaDelta-7,d=Math.max(1,parseInt(c/(l+u))),y=parseInt(.5+(c-d*l)/(d+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:y})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,m=1,f=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");f;)h=f*(e-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",h),m++,f=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-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",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/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*e),wppaSetRealCalendarHeights(p),!0}function wppaSetRealCalendarHeights(a){var p=jQuery("#wppa-real-calendar-"+a).width();if(0<p){var e=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+a).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+a).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+a).css({marginTop:r,marginBottom:r});var s=t/2;jQuery(".wppa-realcalimg-"+a).each(function(){if(0==this.height)e=!1;else{var p=jQuery(this).attr("data-day");thisb=s-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+a).css({bottom:thisb})}}),e||setTimeout(function(){wppaSetRealCalendarHeights(a)},100),wppaConsoleLog("Cal heights set mocc="+a,"force")}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){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(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}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;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){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 e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){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 s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).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","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).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","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).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","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}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,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){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,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),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"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;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,a,e,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}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="7.2.16",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,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var 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;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var 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,_wppaId=[],_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=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,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,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("resize scroll wheel",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeAutoDiv)});var wppaDoAllAutocolsLastI=0;function wppaDoAllAutocols(p){if("number"!=typeof p?p=1:p++,!(p<=wppaDoAllAutocolsLastI)){wppaDoAllAutocolsLastI=p,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var a=1;a<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[a]&&_wppaDoAutocol(a,p),a++;return wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){wppaDoAllAutocols(p)},wppaExtendedResizeDelay),!0}wppaDoAllAutocolsLastI=0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").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 a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a),!wppaAutoColumnWidth[p])return!0;var e,t;if(e=jQuery("#wppa-container-"+p).width(),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var o=document.getElementById("wppa-albumlist-"+p).clientWidth,r=parseInt((o+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,s=r-1,i=parseInt((o+wppaCoverSpacing)/r-wppaCoverSpacing);if(wppaColWidth[p]!=o||wppaMCRWidth[p]!=i){wppaColWidth[p]=o,wppaMCRWidth[p]=i;for(var n=0;n<t.length;){switch(n%r){case 0:jQuery(t[n]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[n]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[n]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}n++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:i-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:i},wppaResponseSpeed)}}else if(1==t.length&&!wppaCoverImageResponsive[p]){jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var w=parseInt(e/wppaMaxCoverWidth+.9999);w<1&&(w=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/w+"%"})}if(wppaThumbSpaceAuto){var l=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(l){var u=wppaMinThumbSpace,c=e-wppaThumbnailAreaDelta-7,d=Math.max(1,parseInt(c/(l+u))),y=parseInt(.5+(c-d*l)/(d+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:y})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var h,m=1,f=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");f;)h=f*(e-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",h),m++,f=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-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",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/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*e),wppaSetRealCalendarHeights(p),!0}function wppaSetRealCalendarHeights(a){var p=jQuery("#wppa-real-calendar-"+a).width();if(0<p){var e=!0,t=p*wppaThumbAspect/7;jQuery(".wppa-real-calendar-day-"+a).css({height:t});var o=p/50+2;jQuery("#wppa-real-calendar-"+a).css({fontSize:o});var r=o/4;jQuery(".wppa-real-calendar-head-td-"+a).css({marginTop:r,marginBottom:r});var s=t/2;jQuery(".wppa-realcalimg-"+a).each(function(){if(0==this.height)e=!1;else{var p=jQuery(this).attr("data-day");thisb=s-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+a).css({bottom:thisb})}}),e||setTimeout(function(){wppaSetRealCalendarHeights(a)},100),wppaConsoleLog("Cal heights set mocc="+a,"force")}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){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(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}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;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){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 e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){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 s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).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","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).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","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).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","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}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,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){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,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),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"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;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,a,e,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}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.2.15.006
6
- Stable tag: 7.2.14.008
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.2.16.06
6
+ Stable tag: 7.2.15.006
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.2.15
7
  *
8
  */
9
 
@@ -2107,8 +2107,10 @@ global $wpdb;
2107
  }
2108
 
2109
  // Log query
2110
- wppa_dbg_msg( $query, 'red' ); // , 'force' ); /**/
2111
- wppa_log( 'dbg', htmlspecialchars( $query ) );
 
 
2112
 
2113
  // Process extended duplicate removal
2114
  if ( $exduprem ) {
@@ -4272,6 +4274,9 @@ function wppa_smx_photo( $stype ) {
4272
  wppa_out( '<div id="wppa-comments-' . wppa( 'mocc' ) . '" >' );
4273
  wppa_out( wppa_comment_html( $id, ! wppa_switch( 'comment_login' ) || is_user_logged_in() ) );
4274
  wppa_out( '</div>' );
 
 
 
4275
  }
4276
  }
4277
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.2.16
7
  *
8
  */
9
 
2107
  }
2108
 
2109
  // Log query
2110
+ // wppa_dbg_msg( $query, 'red' ); // , 'force' ); /**/
2111
+ if ( strlen( $query ) > 1000 ) {
2112
+ wppa_log( 'war', 'Long query: ' . substr( htmlspecialchars( $query ), 0, 100 ) . '...' , true );
2113
+ }
2114
 
2115
  // Process extended duplicate removal
2116
  if ( $exduprem ) {
4274
  wppa_out( '<div id="wppa-comments-' . wppa( 'mocc' ) . '" >' );
4275
  wppa_out( wppa_comment_html( $id, ! wppa_switch( 'comment_login' ) || is_user_logged_in() ) );
4276
  wppa_out( '</div>' );
4277
+ if ( wppa_switch( 'auto_open_comments' ) ) {
4278
+ wppa_out( '<script>jQuery(document).ready(function(){wppaOpenComments('.wppa('mocc').');});</script>' );
4279
+ }
4280
  }
4281
  }
4282
 
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.2.10
7
  *
8
  */
9
 
@@ -1012,6 +1012,7 @@ wppaResponseSpeed = ' . wppa_opt( 'response_speed' ) . ';
1012
  wppaExtendedResizeCount = ' . wppa_opt( 'extended_resize_count' ) . ';
1013
  wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1014
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
 
1015
  ';
1016
 
1017
  // Thumbnail aspect (for real calendar)
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 7.2.16
7
  *
8
  */
9
 
1012
  wppaExtendedResizeCount = ' . wppa_opt( 'extended_resize_count' ) . ';
1013
  wppaExtendedResizeDelay = ' . wppa_opt( 'extended_resize_delay' ) . ';
1014
  wppaCoverSpacing = ' . wppa_opt( 'cover_spacing' ) . ';
1015
+ wppaFilmonlyContinuous = ' . ( wppa_switch( 'filmonly_continuous' ) ? 'true' : 'false' ) . ';
1016
  ';
1017
 
1018
  // Thumbnail aspect (for real calendar)
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.2.15
7
  *
8
  */
9
 
@@ -499,7 +499,18 @@ function wppaToggleExif( id, count ) {
499
  wppa_admin_page_links( $page, $pagesize, $count, $link );
500
 
501
  // Horizon
502
- echo '<hr id="horizon" style="position:fixed;top:300px;left:0px;border:none;background-color:#777777;z-index:100000;display:none;height:1px;width:100%;" />';
 
 
 
 
 
 
 
 
 
 
 
503
 
504
  // Albun name if moderate
505
  static $modalbum;
@@ -3290,7 +3301,9 @@ global $wppa_search_stats;
3290
  if ( wppa_user_is( 'administrator' ) ) {
3291
  foreach ( $words as $word ) {
3292
  if ( wppa_is_int( $word ) ) {
3293
- $photo_array[] = $word;
 
 
3294
  }
3295
  }
3296
  asort( $photo_array );
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.2.16
7
  *
8
  */
9
 
499
  wppa_admin_page_links( $page, $pagesize, $count, $link );
500
 
501
  // Horizon
502
+ echo '
503
+ <div
504
+ id="horizon"
505
+ style="background-color:transparent;height:11px;position:fixed;width:100%;top:500px;z-index:100000;display:none;cursor:ns-resize;"
506
+ >
507
+ <hr
508
+ style="position:relative;top:5px;left:0px;border:none;background-color:black;height:1px;width:100%;"
509
+ />
510
+ </div>
511
+ <script>
512
+ wppaDragHorizon(document.getElementById("horizon"));
513
+ </script>';
514
 
515
  // Albun name if moderate
516
  static $modalbum;
3301
  if ( wppa_user_is( 'administrator' ) ) {
3302
  foreach ( $words as $word ) {
3303
  if ( wppa_is_int( $word ) ) {
3304
+ if ( wppa_photo_exists( $word ) ) {
3305
+ $photo_array[] = $word;
3306
+ }
3307
  }
3308
  }
3309
  asort( $photo_array );
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 7.2.02
7
  *
8
  */
9
 
@@ -28,1538 +28,1542 @@
28
  //
29
  function wppa_get_picture_html( $args ) {
30
 
31
- // Init
32
- $defaults = array( 'id' => '0',
33
- 'type' => '',
34
- 'class' => '',
35
- 'width' => false,
36
- 'height' => false,
37
- );
38
- $args = wp_parse_args( $args, $defaults );
39
-
40
- $id = strval( intval ( $args['id'] ) );
41
- $type = $args['type'];
42
- $class = $args['class'];
43
- $mocc = wppa( 'mocc' );
44
- if ( wppa_is_pdf( $id ) ) {
45
- $class = trim( $class . ' smxpdf-' . $mocc );
46
- $is_pdf = true;
47
- }
48
- else {
49
- $is_pdf = false; }
50
-
51
- // Check existance of required args
52
- foreach( array( 'id', 'type' ) as $item ) {
53
- if ( ! $args[$item] ) {
54
- wppa_dbg_msg( 'Missing ' . $item . ' in call to wppa_get_picture_html()', 'red' );
55
- return false;
56
- }
57
- }
58
-
59
- // Check validity of args
60
- if ( ! wppa_photo_exists( $id ) ) {
61
- wppa_dbg_msg( 'Photo ' . $id . ' does not exist in call to wppa_get_picture_html(). Type = ' . $type, 'red', 'force' );
62
- return false;
63
- }
64
- $types = array( 'sphoto', // Single image with optional border like slideshow border
65
- 'mphoto', // Media type like single image. Caption should be provided in wrappping div
66
- 'xphoto', // Like xphoto with extended features
67
- 'cover', // Album cover image
68
- 'thumb', // Normal tumbnail
69
- 'ttthumb', // Topten
70
- 'comthumb', // Comment widget
71
- 'fthumb', // Filmthumb
72
- 'twthumb', // Thumbnail widget
73
- 'ltthumb', // Lasten widget
74
- 'albthumb', // Album widget
75
- );
76
- if ( ! in_array( $type, $types ) ) {
77
- wppa_dbg_msg( 'Unimplemented type ' . $type . ' in call to wppa_get_picture_html()', 'red', 'force' );
78
- return false;
79
- }
80
-
81
- // Get other data
82
- $link = wppa_get_imglnk_a( $type, $id );
83
- $isthumb = strpos( $type, 'thumb' ) !== false;
84
- $file = $isthumb ? wppa_get_thumb_path( $id ) : wppa_get_photo_path( $id );
85
-
86
- if ( $args['width'] && $args['height'] ) {
87
- $href = $isthumb ? wppa_get_thumb_url( $id, true, '', $args['width'], $args['height'] ) :
88
- wppa_get_photo_url( $id, true, '', $args['width'], $args['height'] );
89
- }
90
- else {
91
- $href = $isthumb ? wppa_get_thumb_url( $id ) : wppa_get_photo_url( $id );
92
- }
93
- if ( $is_pdf ) {
94
- $href = wppa_get_hires_url( $id );
95
- }
96
-
97
- $autocol = wppa( 'auto_colwidth' ) || ( wppa( 'fullsize' ) > 0 && wppa( 'fullsize' ) <= 1.0 );
98
- $title = $link ? esc_attr( $link['title'] ) : esc_attr( stripslashes( wppa_get_photo_name( $id ) ) );
99
- $alt = wppa_get_imgalt( $id );
100
-
101
- // Find image style
102
- switch ( $type ) {
103
- case 'sphoto':
104
- $style = 'width:100%;margin:0;';
105
- if ( ! wppa_in_widget() ) {
106
- switch ( wppa_opt( 'fullimage_border_width' ) ) {
107
- case '':
108
- $style .= 'padding:0;' .
109
- 'border:none;';
110
- break;
111
- case '0':
112
- $style .= 'padding:0;' .
113
- 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
114
- 'box-sizing:border-box;';
115
- break;
116
- default:
117
- $style .= 'padding:' . ( wppa_opt( 'fullimage_border_width' ) - '1' ) . 'px;' .
118
- 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
119
- 'box-sizing:border-box;' .
120
- 'background-color:' . wppa_opt( 'bgcolor_fullimg' ) . ';';
121
-
122
- // If we do round corners...
123
- if ( wppa_opt( 'bradius' ) > '0' ) {
124
-
125
- // then also here
126
- $style .= 'border-radius:' . wppa_opt( 'fullimage_border_width' ) . 'px;';
127
- }
128
- }
129
- }
130
- break;
131
- case 'mphoto':
132
- case 'xphoto':
133
- $style = 'width:100%;margin:0;padding:0;border:none;';
134
- break;
135
- default:
136
- wppa_dbg_msg( 'Style for type ' . $type . ' is not implemented yet in wppa_get_picture_html()', 'red', 'force' );
137
- return false;
138
-
139
- }
140
- if ( $link['is_lightbox'] ) {
141
- $title = wppa_zoom_in( $id );
142
- }
143
-
144
- // Create the html. To prevent mis-alignment of the audio control bar or to escape from the <a> tag for the pan controlbar
145
- // we wrap it in a div with zero fontsize and lineheight.
146
- $result = '<div style="font-size:0;line-height:0;" >';
147
-
148
- if ( $is_pdf && $mocc ) {
149
- $result .= wppa_js( '<script>wppaAutoColumnWidth[' . $mocc . '] = true;wppaAutoColumnFrac[' . $mocc . ']=1;wppaTopMoc=' . $mocc . ';</script>' );
150
- }
151
-
152
- // The link
153
- if ( $link ) {
154
-
155
- // Link is lightbox
156
- if ( $link['is_lightbox'] ) {
157
- $lbtitle = wppa_get_lbtitle( $type, $id );
158
- $videobody = esc_attr( wppa_get_video_body( $id ) );
159
- $audiobody = esc_attr( wppa_get_audio_body( $id ) );
160
- $videox = wppa_get_videox( $id );
161
- $videoy = wppa_get_videoy( $id );
162
- if ( $type == 'photo' || $type == 'mphoto' || $type == 'xphoto' ) {
163
- $setname = '['.$type.']';
164
- }
165
- else {
166
- $setname = '';
167
- }
168
-
169
- $result .=
170
- '<a' .
171
- ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
172
- ' href="' . $link['url'] . '"' .
173
- ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.esc_attr($lbtitle).'"' : '' ) .
174
- ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
175
- ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
176
- ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
177
- ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
178
- ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
179
- ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).$setname.'"' .
180
- wppa_get_lb_panorama_full_html( $id ) .
181
- ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
182
- ' class="thumb-img"' .
183
- ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
184
- ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
185
- ' style="cursor:' . wppa_wait() . ';"' .
186
- ' onclick="return false;"' .
187
- ' >';
188
- }
189
-
190
- // Link is NOT lightbox
191
- else {
192
- $result .=
193
- '<a' .
194
- ( wppa_is_mobile() ?
195
- ' ontouchstart="wppaStartTime();" ontouchend="wppaTapLink(\'' . $id . '\',\'' . $link['url'] . '\');" ' :
196
- ' onclick="_bumpClickCount( \'' . $id . '\' );window.open(\'' . $link['url'] . '\', \'' . $link['target'] . '\' )"'
197
- ) .
198
- ' title="' . $link['title'] . '"' .
199
- ' class="thumb-img"' .
200
- ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
201
- ' style="cursor:pointer;"' .
202
- ' >';
203
- }
204
- }
205
-
206
- // The image
207
- // Panorama? Only if browser supports html5
208
- if ( wppa_is_panorama( $id ) && wppa_browser_can_html5() ) {
209
- $result .= wppa_get_panorama_html( array( 'id' => $id,
210
- 'width' => $args['width'],
211
- 'height' => $args['height'],
212
- 'haslink' => $link,
213
- ) );
214
- }
215
-
216
- // Video?
217
- elseif ( wppa_is_video( $id ) ) {
218
- $result .=
219
- wppa_get_video_html( array( 'id' => $id,
220
- 'controls' => ! $link,
221
- 'style' => $style,
222
- 'class' => $class,
223
- )
224
- );
225
-
226
- }
227
-
228
- // Pdf?
229
- elseif ( $is_pdf ) {
230
- $result .= '
231
- <iframe
232
- id="pdf-' . $id . '-' . wppa( 'mocc' ) . '"
233
- src="' . $href . '" ' .
234
- wppa_get_imgalt( $id ) .
235
- ( $class ? ' class="' . $class . '" ' : '' ) .
236
- ( $title ? ' title="' . $title . '" ' : '' ) . '
237
- style="' . $style . '"
238
- >
239
- </iframe>';
240
- }
241
-
242
- // No video, just a photo
243
- else {
244
- $result .=
245
- '<img' .
246
- ' id="ph-' . $id . '-' . wppa( 'mocc' ) . '"' .
247
- ' src="' . $href . '"' .
248
- ' ' . wppa_get_imgalt( $id ) .
249
- ( $class ? ' class="' . $class . '" ' : '' ) .
250
- ( $title ? ' title="' . $title . '" ' : '' ) .
251
- ' style="' . $style . '"' .
252
- ' />';
253
- }
254
-
255
- // Close the link
256
- if ( $link ) {
257
- $result .= '</a>';
258
- }
259
-
260
- // Add audio? sphoto
261
- if ( wppa_has_audio( $id ) ) {
262
-
263
- $result .= '<div style="position:relative;z-index:11;" >';
264
-
265
- // Find style for audio controls
266
- switch ( $type ) {
267
- case 'sphoto':
268
- $pad = ( wppa_opt( 'fullimage_border_width' ) === '' ) ? 0 : wppa_opt( 'fullimage_border_width' );
269
- $bot = ( wppa_opt( 'fullimage_border_width' ) === '' ) ? 0 : wppa_opt( 'fullimage_border_width' );
270
-
271
- $style = 'margin:0;' .
272
- 'padding:0 ' . $pad . 'px;' .
273
- 'bottom:' . $bot .'px;';
274
-
275
- $class = 'size-medium wppa-sphoto wppa-sphoto-' . wppa( 'mocc' );
276
- break;
277
- case 'mphoto':
278
- case 'xphoto':
279
- $style = 'margin:0;' .
280
- 'padding:0;' .
281
- 'bottom:0;';
282
- $class = 'size-medium wppa-' . $type . ' wppa-' . $type . '-' . wppa( 'mocc' );
283
- break;
284
- default:
285
- $style = 'margin:0;' .
286
- 'padding:0;';
287
-
288
- $class = '';
289
- }
290
-
291
- // Get the html for audio
292
- $result .= wppa_get_audio_html( array( 'id' => $id,
293
- 'cursor' => 'cursor:pointer;',
294
- 'style' => $style .
295
- 'position:absolute;' .
296
- 'box-sizing:border-box;' .
297
- 'width:100%;' .
298
- 'border:none;' .
299
- 'height:' . wppa_get_audio_control_height() . 'px;' .
300
- 'border-radius:0;',
301
- 'class' => $class,
302
- )
303
- );
304
- $result .= '</div>';
305
- }
306
-
307
- $result .= '</div>';
308
-
309
- // Update statistics
310
- if ( ! wppa_in_widget() ) {
311
- wppa_bump_viewcount( 'photo', $id );
312
- }
313
-
314
- // Done !
315
- return $result;
 
 
316
  }
317
 
318
  // Get full html for a lightbox pan image, e.g. ' data-panorama="'..."' for use in lightbox anchor link
319
  function wppa_get_lb_panorama_full_html( $id ) {
320
 
321
- $result = wppa_get_lb_panorama_html( $id );
322
- if ( $result ) {
323
- return ' data-panorama="' . esc_attr( $result ) . '"';
324
- }
325
- else {
326
- return '';
327
- }
328
  }
329
 
330
  // Get the html for a lightbox pan image
331
  function wppa_get_lb_panorama_html( $id ) {
332
 
333
- return wppa_get_panorama_html( array( 'id' => $id, 'lightbox' => true, ) );
334
  }
335
 
336
  // Get the html for a pan image
337
  function wppa_get_panorama_html( $args ) {
338
 
339
- // If no id given, quit
340
- if ( ! isset( $args['id'] ) ) return;
341
 
342
- $args['controls'] = ( wppa_opt( 'panorama_control' ) == 'all' ) || ( wppa_opt( 'panorama_control' ) == 'mobile' && wppa_is_mobile() );
343
- $args['manual'] = wppa_opt( 'panorama_manual' ) == 'all' ? true : false;
344
- $args['autorun'] = wppa_opt( 'panorama_autorun' ) == 'none' ? '' : wppa_opt( 'panorama_autorun' );
345
- $args['autorunspeed'] = wppa_opt( 'panorama_autorun_speed' );
346
- $args['zoomsensitivity'] = wppa_opt( 'panorama_wheel_sensitivity' );
347
 
348
- switch( wppa_is_panorama( $args['id'] ) ) {
349
 
350
- case '1':
351
- $result = wppa_get_spheric_pan_html( $args );
352
 
353
- // Save we have a spheric panorama on board for loading THREE.js
354
- wppa( 'has_panorama', true );
355
- break;
356
- case '2':
357
- $result = wppa_get_flat_pan_html( $args );
358
- break;
359
- default:
360
- $result = '';
361
- }
362
 
363
- return $result;
364
  }
365
 
366
  // Spheric 360deg pan
367
  function wppa_get_spheric_pan_html( $args ) {
368
 
369
- // Init
370
- $defaults = array( 'id' => '0',
371
- 'mocc' => '0',
372
- 'width' => false,
373
- 'height' => false,
374
- 'haslink' => false,
375
- 'lightbox' => 0,
376
- 'controls' => true,
377
- 'autorun' => '',
378
- 'manual' => true,
379
- 'autorunspeed' => '3',
380
- 'zoomsensitivity' => '3',
381
-
382
- );
383
-
384
- $args = wp_parse_args( $args, $defaults );
385
-
386
- $id = strval( intval ( $args['id'] ) );
387
- $mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
388
- $width = $args['width'] ? $args['width'] : wppa_get_container_width();
389
- $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
390
- $haslink = $args['haslink'];
391
- $icsiz = wppa_opt( 'nav_icon_size_panorama' );
392
- $iconsize = $icsiz . 'px;';
393
- $lightbox = $args['lightbox'];
394
- $controls = $args['controls'];
395
- $autorun = $args['autorun'];
396
- $manual = $args['manual'];
397
- $autorunspeed = $args['autorunspeed'];
398
- $zoomsensitivity = $args['zoomsensitivity'];
399
-
400
- $url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
401
-
402
- $result =
403
- ( $lightbox ? $id . '.' : '' ) .
404
- ( $haslink ? '</a>' : '' ) .
405
- ( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
406
- '<div
407
- id="wppa-pan-div-' . $mocc . '"
408
- class="wppa-pan-div wppa-pan-div-' . $mocc . '"
409
- style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . ( $manual ? 'cursor:grab;': '' ) . 'line-height:0;"
410
- >
411
- </div>' .
412
- ( $controls ?
413
- '<div
414
- id="wppa-pctl-div-' . $mocc . '"
415
- class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
416
- style="text-align:center;"
417
- >' .
418
- ( $lightbox ?
419
- '<span
420
- id="wppa-pctl-prev-' . $mocc . '"
421
- class="wppa-pan-prevnext"
422
- style="margin:0 2px 0 0;float:left;"
423
- >' .
424
- wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
425
- '</span>'
426
- :
427
- ''
428
- ) .
429
- '<span
430
- id="wppa-pctl-left-' . $mocc . '"
431
- style="margin:0 2px;"
432
- >' .
433
- wppa_get_svghtml( 'Left-4', $iconsize, true ) .
434
- '</span>
435
- <span
436
- id="wppa-pctl-right-' . $mocc . '"
437
- style="margin:0 2px;"
438
- >' .
439
- wppa_get_svghtml( 'Right-4', $iconsize, true ) .
440
- '</span>
441
- <span
442
- id="wppa-pctl-up-' . $mocc . '"
443
- style="margin:0 2px;"
444
- >' .
445
- wppa_get_svghtml( 'Up-4', $iconsize, true ) .
446
- '</span>
447
- <span
448
- id="wppa-pctl-down-' . $mocc . '"
449
- style="margin:0 2px;"
450
- >' .
451
- wppa_get_svghtml( 'Down-4', $iconsize, true ) .
452
- '</span>
453
- <span
454
- id="wppa-pctl-zoomin-' . $mocc . '"
455
- style="margin:0 2px;"
456
- >' .
457
- wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
458
- '</span>
459
- <span
460
- id="wppa-pctl-zoomout-' . $mocc . '"
461
- style="margin:0 2px;"
462
- >' .
463
- wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
464
- '</span>' .
465
- ( $lightbox ?
466
- '<span
467
- id="wppa-pctl-next-' . $mocc . '"
468
- class="wppa-pan-prevnext"
469
- style="margin:0 0 0 2px;float:right;"
470
- >' .
471
- wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
472
- '</span>'
473
- :
474
- ''
475
- ) .
476
- '</div>'
477
- :
478
- '' ) .
479
-
480
- ( $lightbox ? '</div>' : '' ) .
481
-
482
- '<script>' .
483
-
484
- // Create image object and add the image url to it
485
- 'var image' . $mocc . ' = new Image();
486
- image' . $mocc . '.src = "' . $url . '";' .
487
-
488
- // When document complete, run the main proc
489
- 'jQuery(document).ready(function(){wppaDoSphericPanorama' . $mocc . '();});' .
490
-
491
- // The main proccedure
492
- 'function wppaDoSphericPanorama' . $mocc . '(){' .
493
-
494
- // Wait until the image file has been completely loaded
495
- 'if (!image' . $mocc . '.complete){setTimeout( wppaDoSphericPanorama' . $mocc . ', 100 );return;};' .
496
-
497
- // Var declarations
498
- 'var
499
- $ = jQuery,
500
- uniqueId,
501
- manualControl = false,
502
- longitude = 180,
503
- latitude = 0,
504
- savedX,
505
- savedY,
506
- savedLongitude,
507
- savedLatitude,' .
508
- ( $autorun == 'right' ? 'deltaX = 0.05 * ' . $autorunspeed . ' / 3,' : '' ) .
509
- ( $autorun == 'left' ? 'deltaX = -0.05 * ' . $autorunspeed . ' / 3,' : '' ) .
510
- ( $autorun == '' ? 'deltaX = 0,' : '' ) .
511
- 'deltaY = 0,
512
- deltaFov = 0,
513
- fov = 75,
514
- abort = false,
515
- aspect = 2,
516
- div = $( "#wppa-pan-div-' . $mocc . '" ),
517
- left = $("#wppa-pctl-left-' . $mocc . '" ),
518
- right = $("#wppa-pctl-right-' . $mocc . '" ),
519
- up = $("#wppa-pctl-up-' . $mocc . '" ),
520
- down = $("#wppa-pctl-down-' . $mocc . '" ),
521
- zoomin = $("#wppa-pctl-zoomin-' . $mocc . '" ),
522
- zoomout = $("#wppa-pctl-zoomout-' . $mocc . '" ),
523
- prev = $("#wppa-pctl-prev-' . $mocc . '" ),
524
- next = $("#wppa-pctl-next-' . $mocc . '" );' .
525
-
526
- // Setting the global id, indicating the most recent invocation
527
- ( $lightbox ? '
528
- wppaGlobalOvlPanoramaId++;
529
- uniqueId = wppaGlobalOvlPanoramaId;' :
530
- '' ) .
531
-
532
- // Lghtbox uses the global vars used for the webGL context
533
- ( $lightbox ?
534
- // setting up the renderer
535
- 'if ( ! wppaRenderer ) {
536
- wppaRenderer = new THREE.WebGLRenderer();
537
- }
538
- wppaRenderer.setSize(' . $width . ', ' . $height . ');
539
- $(div).append(wppaRenderer.domElement);' .
540
-
541
- // Creating a new scene if not yet available
542
- 'if ( ! wppaScene ) {
543
- wppaScene = new THREE.Scene();
544
- }' .
545
-
546
- // Adding a camera
547
- 'if ( ! wppaCamera ) {
548
- wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
549
- wppaCamera.target = new THREE.Vector3(0, 0, 0);
550
- }' .
551
-
552
- // Creation of a big sphere geometry
553
- 'if ( ! wppaSphere ) {
554
- wppaSphere = new THREE.SphereGeometry(100, 100, 40);
555
- wppaSphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));
556
- }' .
557
-
558
- // Creation of the sphere material
559
- 'if ( ! wppaSphereMaterial ) {
560
- wppaSphereMaterial = new THREE.MeshBasicMaterial();
561
- }
562
- wppaSphereMaterial.map = THREE.ImageUtils.loadTexture("' . $url . '");' .
563
-
564
- // geometry + material = mesh (actual object)
565
- 'if ( ! wppaSphereMesh ) {
566
- wppaSphereMesh = new THREE.Mesh(wppaSphere, wppaSphereMaterial);
567
- wppaScene.add(wppaSphereMesh);
568
- }
569
- ' :
570
-
571
- // setting up the wpparenderer
572
- 'var wppaRenderer = new THREE.WebGLRenderer();
573
- wppaRenderer.setSize(' . $width . ', ' . $height . ');' .
574
-
575
- // Place the element
576
- '$(div).append(wppaRenderer.domElement);' .
577
-
578
- // Creating a new scene
579
- 'var wppaScene = new THREE.Scene();' .
580
-
581
- // Adding a camera
582
- 'var wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
583
- wppaCamera.target = new THREE.Vector3(0, 0, 0);' .
584
-
585
- // Creation of a big sphere geometry
586
- 'var wppaSphere = new THREE.SphereGeometry(100, 100, 40);
587
- wppaSphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));' .
588
-
589
- // Creation of the sphere material
590
- 'var wppaSphereMaterial = new THREE.MeshBasicMaterial();
591
- wppaSphereMaterial.map = THREE.ImageUtils.loadTexture("' . $url . '");' .
592
-
593
- // geometry + material = mesh (actual object)
594
- 'var wppaSphereMesh = new THREE.Mesh(wppaSphere, wppaSphereMaterial);
595
- wppaScene.add(wppaSphereMesh);'
596
- ) .
597
-
598
- // listeners
599
- ( wppa_is_mobile() ?
600
- '$(right).on("touchstart", onRightMouseDown);
601
- $(right).on("touchend", onButtonUp);
602
- $(left).on("touchstart", onLeftMouseDown);
603
- $(left).on("touchend", onButtonUp);
604
- $(up).on("touchstart", onUpMouseDown);
605
- $(up).on("touchend", onButtonUp);
606
- $(down).on("touchstart", onDownMouseDown);
607
- $(down).on("touchend", onButtonUp);
608
- $(zoomin).on("touchstart", onZoomInMouseDown);
609
- $(zoomin).on("touchend", onButtonUp);
610
- $(zoomout).on("touchstart", onZoomOutMouseDown);
611
- $(zoomout).on("touchend", onButtonUp);'
612
- :
613
- ( $manual ?
614
- '$(div).on("mousedown", onDivMouseDown);
615
- $(div).on("mousemove", onDivMouseMove);
616
- $(div).on("mouseup", onDivMouseUp);
617
- document.getElementById("wppa-pan-div-' . $mocc . '").addEventListener("wheel", onDivWheel);' : '' ) .
618
- '$(right).on("mousedown", onRightMouseDown);
619
- $(right).on("mouseup", onButtonUp);
620
- $(left).on("mousedown", onLeftMouseDown);
621
- $(left).on("mouseup", onButtonUp);
622
- $(up).on("mousedown", onUpMouseDown);
623
- $(up).on("mouseup", onButtonUp);
624
- $(down).on("mousedown", onDownMouseDown);
625
- $(down).on("mouseup", onButtonUp);
626
- $(zoomin).on("mousedown", onZoomInMouseDown);
627
- $(zoomin).on("mouseup", onButtonUp);
628
- $(zoomout).on("mousedown", onZoomOutMouseDown);
629
- $(zoomout).on("mouseup", onButtonUp);
630
- '
631
- ) .
632
-
633
- // Common event handlers
634
- ( $lightbox ? '
635
- if (prev) {
636
- prev.on("click", panPrev);
637
- next.on("click", panNext);
638
- }' : '' ) .
639
-
640
- // Install Resize hanler
641
- '$(window).on("DOMContentLoaded load resize orientationchange",onResize);' .
642
-
643
- // Resize
644
- 'onResize();' .
645
-
646
- // Remove spinner
647
- '$("#wppa-ovl-spin").hide();' .
648
-
649
- // Doit!
650
- 'render();' .
651
-
652
- // The rendering function
653
- 'function render(){' .
654
-
655
- // See if a lightbox instance has to die
656
- ( $lightbox ? 'if ( ! wppaOvlOpen || wppaOvlActivePanorama != ' . $id . ' || wppaGlobalOvlPanoramaId > uniqueId ) abort=true;' : '' ) .
657
-
658
- // If the abort flag is risen, die gracefully
659
- 'if(abort){
660
- return;
661
- }' .
662
-
663
- 'requestAnimationFrame(render);
664
-
665
- if ( ! manualControl ) {
666
- longitude += deltaX;
667
- latitude += deltaY;
668
- }' .
669
-
670
- // limiting latitude from -85 to 85 (cannot point to the sky or under your feet)
671
- 'latitude = Math.max(-85, Math.min(85, latitude));' .
672
-
673
- // moving the wppaCamera according to current latitude (vertical movement) and longitude (horizontal movement)
674
- 'wppaCamera.target.x = 500 * Math.sin(THREE.Math.degToRad(90 - latitude)) * Math.cos(THREE.Math.degToRad(longitude));
675
- wppaCamera.target.y = 500 * Math.cos(THREE.Math.degToRad(90 - latitude));
676
- wppaCamera.target.z = 500 * Math.sin(THREE.Math.degToRad(90 - latitude)) * Math.sin(THREE.Math.degToRad(longitude));
677
- wppaCamera.lookAt(wppaCamera.target);' .
678
-
679
- // calling again render function
680
- 'wppaRenderer.render(wppaScene, wppaCamera);
681
- }' .
682
-
683
- // Mouse wheel
684
- 'function onDivWheel(e) {
685
- e.preventDefault();
686
- deltaFov=-e.deltaY * ' . $zoomsensitivity . ' / 6;
687
- doZoom(true);
688
- e.stopPropagation();
689
- }' .
690
-
691
- // Zoom in/out
692
- 'function doZoom(once){
693
- fov += deltaFov;
694
- fov = Math.max(20, Math.min(120, fov));
695
- wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
696
- wppaCamera.target = new THREE.Vector3(0, 0, 0);
697
- if ( ! once && deltaFov != 0 ) {
698
- setTimeout(function(){doZoom()}, 25);
699
- }
700
- if ( once ) {
701
- deltaFov = 0;
702
- }
703
- }' .
704
-
705
- // Previous
706
- 'function panPrev(e) {
707
- var stop;
708
- if ( ! stop ) {
709
- stop = true;
710
- $(this).css({opacity:0.5});
711
- $("#wppa-overlay-ic").css({display:"none"});
712
- $("#wppa-ovl-spin").show();
713
- wppaOvlShowPrev();
714
- }
715
- }' .
716
-
717
- // Next
718
- 'function panNext(e) {
719
- var stop;
720
- if ( ! stop ) {
721
- stop = true;
722
- $(this).css({opacity:0.5});
723
- $("#wppa-overlay-ic").css({display:"none"});
724
- $("#wppa-ovl-spin").show();
725
- wppaOvlShowNext();
726
- }
727
- }' .
728
-
729
- // Manual movement on the image div
730
- 'function onDivMouseDown(e){
731
- e.preventDefault();
732
- manualControl = true;
733
- savedX = e.clientX;
734
- savedY = e.clientY;
735
- savedLongitude = longitude;
736
- savedLatitude = latitude;
737
- }' .
738
- 'function onDivMouseMove(e){
739
- if(manualControl){
740
- longitude = (savedX - e.clientX) * 0.1 + savedLongitude;
741
- latitude = (e.clientY - savedY) * 0.1 + savedLatitude;
742
- }
743
- }' .
744
- 'function onDivMouseUp(e){
745
- manualControl = false;
746
- deltaX=0;
747
- }' .
748
-
749
- // Horizontal movement by buttons
750
- 'function onRightMouseDown(e) {
751
- deltaX=0.2;
752
- }' .
753
- 'function onLeftMouseDown(e) {
754
- deltaX=-0.2;
755
- }' .
756
-
757
- // Vertical movement by buttons
758
- 'function onUpMouseDown(e) {
759
- deltaY=0.2;
760
- }' .
761
- 'function onDownMouseDown(e) {
762
- deltaY=-0.2;
763
- }' .
764
-
765
- // Zooming
766
- 'function onZoomInMouseDown(e) {
767
- deltaFov=-0.4;
768
- doZoom();
769
- }' .
770
- 'function onZoomOutMouseDown(e) {
771
- deltaFov=0.4;
772
- doZoom();
773
- }' .
774
-
775
- // Release a button resets all deltas
776
- 'function onButtonUp(e) {
777
- deltaX=0;
778
- deltaY=0;
779
- deltaFov=0;
780
- }' .
781
-
782
- // When a (responsive) resize is required, we resize the wppaScene
783
- 'function onResize(e){' .
784
-
785
- ( $lightbox ?
786
-
787
- // Show image container
788
- '$("#wppa-overlay-ic").css("display", "");
789
- $("#wppa-overlay-ic").css("width", "");' .
790
-
791
- // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
792
- 'var widthIsLim,
793
- modeIsNormal = wppaOvlMode == "normal";' .
794
-
795
- // Find container dimensions dependant of mode
796
- 'var contWidth, contHeight;
797
-
798
- if ( modeIsNormal ) {
799
- contWidth = window.innerWidth ? window.innerWidth : screen.width;
800
- contHeight = window.innerHeight ? window.innerHeight : screen.height;
801
- }
802
- else {
803
- contWidth = screen.width;
804
- contHeight = screen.height;
805
- }'.
806
- // alert("contWidth="+contWidth);' .
807
-
808
- // Initialize new display sizes
809
- 'var newWidth,
810
- newHeight,
811
- topMarg,
812
- leftMarg,
813
- extraX = 8,
814
- extraY = 8 + ' . ( $controls ? $icsiz + 10 : 0 ) . ' + 30;' .
815
-
816
- // Add borderwidth in case of mode == normal
817
- 'if ( modeIsNormal ) {
818
- extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
819
- extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
820
- }
821
- ' .
822
-
823
- // Find out if the width is the limitng dimension
824
- 'widthIsLim = ( contHeight > ( ( ( contWidth - extraX ) / 2 ) + extraY ) );' .
825
-
826
- // Compute new sizes and margins
827
- 'if ( widthIsLim ) {
828
- newWidth = contWidth - extraX;
829
- newHeight = newWidth / 2;
830
- topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
831
- '}
832
- else {
833
- newHeight = contHeight - extraY;
834
- newWidth = newHeight * 2;
835
- topMarg = 20;' .
836
-
837
- '}
838
- newWidth = parseInt(newWidth);
839
- newHeight = parseInt(newHeight);
840
- ' .
841
-
842
- // Set css common for all 4 situations
843
- '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
844
- $("#wppa-overlay-ic").css({marginTop:0});' .
845
-
846
- // Now set css for all 4 situations: Mode is normal
847
- 'if ( modeIsNormal ) {' .
848
-
849
- // Common for mode normal
850
- '$("#wppa-ovl-pan-container").css({
851
- backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
852
- padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
853
- borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
854
- width:newWidth,
855
- marginLeft:0
856
- });
857
- $( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
858
-
859
- // Limit specific
860
- 'if ( widthIsLim ) {
861
- $("#wppa-overlay-ic").css({marginLeft:4});
862
- }
863
- else {
864
- $("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
865
- }
866
- }' .
867
-
868
- // Mode is fullscreen
869
- 'else {' .
870
-
871
- // Common for mode fullscreen
872
- '$("#wppa-overlay-ic").css({marginLeft:0});
873
- $("#wppa-ovl-pan-container").css({
874
- backgroundColor:"transparent",
875
- padding:0,
876
- borderRadius:0,
877
- width:newWidth,
878
- marginLeft:(contWidth-newWidth)/2
879
- });
880
-
881
- if ( widthIsLim ) {
882
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
883
- }
884
- else {
885
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
886
- }
887
- }
888
-
889
- wppaRenderer.setSize(newWidth, newHeight);
890
- doZoom(true);
891
- ' :
892
- '
893
- var containerwidth = $(div).parent().width();
894
- var newWidth = containerwidth;
895
- var newHeight = newWidth * ' . ( $height / $width ) . ';
896
- wppaRenderer.setSize(newWidth, newHeight);
897
- doZoom(true);'
898
- ) . '
899
- }' .
900
- '};
901
-
902
- </script>
903
- ' . ( $haslink ? '<a>' : '' ) . '';
904
-
905
- return wppa_pan_min( $result );
 
 
906
  }
907
 
908
  // Non 360 flat pan
909
  function wppa_get_flat_pan_html( $args ) {
910
 
911
- // Init
912
- $defaults = array( 'id' => '0',
913
- 'mocc' => '0',
914
- 'width' => false,
915
- 'height' => false,
916
- 'haslink' => false,
917
- 'lightbox' => 0,
918
- 'controls' => true,
919
- 'autorun' => '',
920
- 'manual' => true,
921
- 'autorunspeed' => '3',
922
- 'zoomsensitivity' => '3',
923
- );
924
-
925
- $args = wp_parse_args( $args, $defaults );
926
-
927
- $id = strval( intval ( $args['id'] ) );
928
- $mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
929
- $width = $args['width'] ? $args['width'] : wppa_get_container_width();
930
- $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
931
- $haslink = $args['haslink'];
932
- $icsiz = wppa_opt( 'nav_icon_size_panorama' );
933
- $iconsize = $icsiz . 'px;';
934
- $lightbox = $args['lightbox'];
935
- $controls = $args['controls'];
936
- $autorun = $args['autorun'];
937
- $manual = $args['manual'];
938
- $autorunspeed = $args['autorunspeed'];
939
- $zoomsensitivity = $args['zoomsensitivity'];
940
-
941
- switch ( $autorun ) {
942
- case 'right':
943
- $deltaX = $autorunspeed / 3;
944
- break;
945
- case 'left':
946
- $deltaX = - $autorunspeed / 3;
947
- break;
948
- default:
949
- $deltaX = '0';
950
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
951
 
952
- $url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
953
-
954
- $result =
955
- ( $lightbox ? $id . '.' : '' ) .
956
- ( $haslink ? '</a>' : '' ) .
957
-
958
- // The overall container
959
- ( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
960
-
961
- // The canvas container
962
- '<div
963
- id="wppa-pan-div-' . $mocc . '"
964
- class="wppa-pan-div wppa-pan-div-' . $mocc . '"
965
- style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . 'line-height:0;"
966
- >' .
967
-
968
- // The actual drawing area
969
- '<canvas
970
- id="wppa-pan-canvas-' . $mocc . '"
971
- style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
972
- width="' . $width . '"
973
- height="' . ( $width / 2 ) . '"
974
- ></canvas>' .
975
-
976
- // The preview image
977
- '<canvas
978
- id="wppa-pan-prev-canvas-' . $mocc . '"
979
- style="margin-top:4px;background-color:black;"
980
- width="' . $width . '"
981
- height=' . $height . '"
982
- ></canvas>
983
-
984
- </div>' .
985
-
986
- // The controlbar
987
- ( $controls ?
988
- '<div
989
- id="wppa-pctl-div-' . $mocc . '"
990
- class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
991
- style="text-align:center;"
992
- >' .
993
- ( $lightbox ?
994
- '<span
995
- id="wppa-pctl-prev-' . $mocc . '"
996
- class="wppa-pan-prevnext"
997
- style="margin:0 2px 0 0;float:left;"
998
- >' .
999
- wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
1000
- '</span>'
1001
- :
1002
- ''
1003
- ) .
1004
- '<span
1005
- id="wppa-pctl-left-' . $mocc . '"
1006
- style="margin:0 2px;"
1007
- >' .
1008
- wppa_get_svghtml( 'Left-4', $iconsize, true ) .
1009
- '</span>
1010
- <span
1011
- id="wppa-pctl-right-' . $mocc . '"
1012
- style="margin:0 2px;"
1013
- >' .
1014
- wppa_get_svghtml( 'Right-4', $iconsize, true ) .
1015
- '</span>
1016
- <span
1017
- id="wppa-pctl-up-' . $mocc . '"
1018
- style="margin:0 2px;"
1019
- >' .
1020
- wppa_get_svghtml( 'Up-4', $iconsize, true ) .
1021
- '</span>
1022
- <span
1023
- id="wppa-pctl-down-' . $mocc . '"
1024
- style="margin:0 2px;"
1025
- >' .
1026
- wppa_get_svghtml( 'Down-4', $iconsize, true ) .
1027
- '</span>
1028
- <span
1029
- id="wppa-pctl-zoomin-' . $mocc . '"
1030
- style="margin:0 2px;"
1031
- >' .
1032
- wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
1033
- '</span>
1034
- <span
1035
- id="wppa-pctl-zoomout-' . $mocc . '"
1036
- style="margin:0 2px;"
1037
- >' .
1038
- wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
1039
- '</span>' .
1040
- ( $lightbox ?
1041
- '<span
1042
- id="wppa-pctl-next-' . $mocc . '"
1043
- class="wppa-pan-prevnext"
1044
- style="margin:0 0 0 2px;float:right;"
1045
- >' .
1046
- wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
1047
- '</span>'
1048
- :
1049
- ''
1050
- ) .
1051
- '</div>'
1052
- :
1053
- '' ) .
1054
-
1055
- ( $lightbox ? '</div>' : '' ) .
1056
-
1057
- '<script>' .
1058
-
1059
- // Create image object and add the image url to it
1060
- 'var image' . $mocc . ' = new Image();
1061
- image' . $mocc . '.src = "' . $url . '";' .
1062
-
1063
- // When document complete, run the main proc
1064
- 'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
1065
-
1066
- // The main proccedure
1067
- 'function wppaDoFlatPanorama' . $mocc . '(){' .
1068
-
1069
- // Wait until the image file has been completely loaded
1070
- 'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 100 );return;}' .
1071
-
1072
- // Var declarations
1073
- 'var
1074
- $ = jQuery,
1075
- manualControl = false,
1076
- zoomsensitivity = ' . $zoomsensitivity . ',
1077
- deltaX = ' . $deltaX . ',
1078
- deltaY = 0,
1079
- deltaFactor = 1.0,
1080
- autorun = ' . ( $autorun ? 'true' : 'false' ) . ',
1081
- run = deltaX ? 5 : 4,
1082
- busy = false,
1083
- abort = false,
1084
- div = $("#wppa-pan-div-' . $mocc . '"),
1085
- canvas = document.getElementById("wppa-pan-canvas-' . $mocc . '"),
1086
- prevCanvas = document.getElementById("wppa-pan-prev-canvas-' . $mocc . '"),
1087
- left = $("#wppa-pctl-left-' . $mocc . '"),
1088
- right = $("#wppa-pctl-right-' . $mocc . '"),
1089
- up = $("#wppa-pctl-up-' . $mocc . '"),
1090
- down = $("#wppa-pctl-down-' . $mocc . '"),
1091
- zoomin = $("#wppa-pctl-zoomin-' . $mocc . '"),
1092
- zoomout = $("#wppa-pctl-zoomout-' . $mocc . '"),
1093
- prev = $("#wppa-pctl-prev-' . $mocc . '"),
1094
- next = $("#wppa-pctl-next-' . $mocc . '"),
1095
- canvasWidth = $(div).parent().width(),
1096
- canvasHeight = canvasWidth / 2,
1097
- savedCanvasX = 0,
1098
- savedCanvasY = 0,
1099
- fromHeight = image' . $mocc . '.height / 2,
1100
- fromWidth = fromHeight * 2,
1101
- fromX = ( image' . $mocc . '.width - fromWidth ) / 2,
1102
- fromY = ( image' . $mocc . '.height - fromHeight ) / 2,
1103
- centerX = fromX + fromWidth / 2,
1104
- centerY = fromY + fromHeight / 2;' .
1105
-
1106
- // Install listeners
1107
- ( wppa_is_mobile() ?
1108
- 'right.on("touchstart", onRightMouseDown);
1109
- right.on("touchend", onButtonUp);
1110
- left.on("touchstart", onLeftMouseDown);
1111
- left.on("touchend", onButtonUp);
1112
- up.on("touchstart", onUpMouseDown);
1113
- up.on("touchend", onButtonUp);
1114
- down.on("touchstart", onDownMouseDown);
1115
- down.on("touchend", onButtonUp);
1116
- zoomin.on("touchstart", onZoomInMouseDown);
1117
- zoomin.on("touchend", onButtonUp);
1118
- zoomout.on("touchstart", onZoomOutMouseDown);
1119
- zoomout.on("touchend", onButtonUp);'
1120
- :
1121
- ( $manual ?
1122
- 'canvas.addEventListener("mousedown", onCanvasMouseDown);
1123
- canvas.addEventListener("mousemove", onCanvasMouseMove);
1124
- canvas.addEventListener("mouseup", onCanvasMouseUp);
1125
- canvas.addEventListener("mouseout", onCanvasMouseUp);
1126
- document.getElementById("wppa-pan-canvas-' . $mocc . '").addEventListener("wheel", onDivWheel);
1127
- prevCanvas.addEventListener("mousedown", onCanvasMouseDown);
1128
- prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove);
1129
- prevCanvas.addEventListener("mouseup", onCanvasMouseUp);
1130
- prevCanvas.addEventListener("mouseout", onCanvasMouseUp);' : '' ) .
1131
- 'right.on("mousedown", onRightMouseDown);
1132
- right.on("mouseup", onButtonUp);
1133
- left.on("mousedown", onLeftMouseDown);
1134
- left.on("mouseup", onButtonUp);
1135
- up.on("mousedown", onUpMouseDown);
1136
- up.on("mouseup", onButtonUp);
1137
- down.on("mousedown", onDownMouseDown);
1138
- down.on("mouseup", onButtonUp);
1139
- zoomin.on("mousedown", onZoomInMouseDown);
1140
- zoomin.on("mouseup", onButtonUp);
1141
- zoomout.on("mousedown", onZoomOutMouseDown);
1142
- zoomout.on("mouseup", onButtonUp);'
1143
- ) .
1144
-
1145
- // Common event handlers
1146
- ( $lightbox ? '
1147
- $("#wppa-fulls-btn").on("click", function(){abort=true;});
1148
- if (prev) {
1149
- prev.on("click", panPrev);
1150
- next.on("click", panNext);
1151
- }' : '' ) .
1152
-
1153
- // Install Resize handler
1154
- '$(window).on("DOMContentLoaded load resize orientationchange",onResize' . $mocc . ');' .
1155
-
1156
- // Remove spinner
1157
- '$("#wppa-ovl-spin").hide();' .
1158
-
1159
- // Do the rendering
1160
- 'render();' .
1161
-
1162
- // Resize
1163
- 'onResize' . $mocc . '();' .
1164
-
1165
- // The render function
1166
- 'function render(){' .
1167
-
1168
- ( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
1169
- 'if (abort) {
1170
- ctx = null;
1171
- prevctx = null;
1172
- return;
1173
- }
1174
- if (run==0) return;
1175
- if (busy) return;
1176
- busy = true;' .
1177
 
1178
- ( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
 
1179
 
1180
- // manualControl is true when a drag on the canvas is being performed
1181
- 'if(!manualControl){' .
1182
 
1183
- // Panning
1184
- 'fromX += deltaX;
1185
- fromY += deltaY;' .
1186
 
1187
- // Zooming
1188
- 'var newHeight = fromHeight / deltaFactor;
1189
- var newWidth = fromWidth / deltaFactor;' .
1190
 
1191
- // Keep zooming in range
1192
- 'if ( deltaFactor != 1 && newHeight <= image' . $mocc . '.height && newHeight > 50 ) {
1193
- fromX -= ( newWidth - fromWidth ) / 2;
1194
- fromY -= ( newHeight - fromHeight ) / 2;
1195
- fromWidth = newWidth;
1196
- fromHeight = newHeight;
1197
- }
1198
- }' .
1199
 
1200
- // Keep viewport within image boundaries
1201
- 'fromX = Math.max(0, Math.min(image' . $mocc . '.width-fromWidth, fromX));' .
1202
- 'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
1203
 
1204
- // Check for turningpoint in case autrun
1205
- 'if ( autorun ) {
1206
- if ( fromX == 0 || fromX == ( image' . $mocc . '.width-fromWidth ) ) {
1207
- deltaX *= -1;
1208
- }
1209
- }' .
1210
-
1211
- // Draw the image
1212
- 'var ctx = canvas.getContext("2d");' .
1213
- 'ctx.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvas.width,canvas.height);' .
1214
-
1215
- // Draw the preview image
1216
- 'var prevctx = prevCanvas.getContext("2d");' .
1217
- 'prevctx.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
1218
- 'prevctx.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
1219
-
1220
- // Draw viewport rect on preview image
1221
- 'var factor = prevCanvas.width / image' . $mocc . '.width;' .
1222
- 'prevctx.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
1223
-
1224
- // Done so far
1225
- 'busy = false;' .
1226
-
1227
- // Re-render if needed
1228
- 'if (run>0) {' .
1229
- 'if (manualControl||autorun){setTimeout(function(){render()},25);}' .
1230
- 'else {setTimeout(function(){render()},5);}' .
1231
- '}
1232
- if(run<5)run--;' .
1233
- '}' .
1234
-
1235
- // Previous
1236
- 'function panPrev(e) {
1237
- e.preventDefault();
1238
- abort = true;
1239
- var stop;
1240
- if ( ! stop ) {
1241
- stop = true;
1242
- $(this).css({opacity:0.5});
1243
- $("#wppa-overlay-ic").css({display:"none"});
1244
- $("#wppa-ovl-spin").show();
1245
- wppaOvlShowPrev();
1246
- }
1247
- }' .
1248
-
1249
- // Next
1250
- 'function panNext(e) {
1251
- e.preventDefault();
1252
- abort = true;
1253
- var stop;
1254
- if ( ! stop ) {
1255
- stop = true;
1256
- $(this).css({opacity:0.5});
1257
- $("#wppa-overlay-ic").css({display:"none"});
1258
- $("#wppa-ovl-spin").show();
1259
- wppaOvlShowNext();
1260
- }
1261
- }' .
1262
-
1263
- // Horizontal movement by button
1264
- 'function onRightMouseDown(e){
1265
- e.preventDefault();
1266
- run=5;deltaX=3;render();
1267
- }' .
1268
-
1269
- 'function onLeftMouseDown(e){
1270
- e.preventDefault();
1271
- run=5;deltaX=-3;render();
1272
- }' .
1273
-
1274
- // Vertical movement by button
1275
- 'function onUpMouseDown(e){
1276
- e.preventDefault();
1277
- run=5;deltaY=-3;render();
1278
- }' .
1279
-
1280
- 'function onDownMouseDown(e){
1281
- e.preventDefault();
1282
- run=5;deltaY=3;render();
1283
- }' .
1284
-
1285
- // Zooming
1286
- 'function onZoomInMouseDown(e){
1287
- e.preventDefault();
1288
- run=5;deltaFactor=1.005;render();
1289
- }' .
1290
-
1291
- 'function onZoomOutMouseDown(e){
1292
- e.preventDefault();
1293
- run=5;deltaFactor=0.995;render();
1294
- }' .
1295
-
1296
- // Mouse wheel
1297
- 'function onDivWheel(e) {
1298
- e.preventDefault();
1299
- run=(autorun?5:4);
1300
- deltaFactor = 1 + e.deltaY * zoomsensitivity / 1000;
1301
- if ( ! autorun ) render();
1302
- setTimeout(function(){deltaFactor = 1}, 25);
1303
- e.stopPropagation();
1304
- }' .
1305
-
1306
- // When a navigation button is released, stop and reset all deltas
1307
- 'function onButtonUp(e) {
1308
- e.preventDefault();
1309
- deltaX=0;deltaY=0;deltaFactor=1;
1310
- if ( ! ' . $lightbox . ' ) run--;
1311
- run=4;
1312
- }' .
1313
-
1314
- // When a (responsive) resize is required, we resize the wppaScene
1315
- 'function onResize' . $mocc . '(e){' .
1316
-
1317
- 'if (abort) return;' .
1318
-
1319
- ( $lightbox ?
1320
-
1321
- // Show image container
1322
- '$("#wppa-overlay-ic").css("display", "");' .
1323
-
1324
- // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1325
- 'var widthIsLim,
1326
- modeIsNormal = wppaOvlMode == "normal";' .
1327
-
1328
- // First find container dimensions dependant of mode
1329
- 'var contWidth, contHeight;
1330
-
1331
- if ( modeIsNormal ) {
1332
- contWidth = window.innerWidth ? window.innerWidth : screen.width;
1333
- contHeight = window.innerHeight ? window.innerHeight : screen.height;
1334
- }
1335
- else {
1336
- contWidth = screen.width;
1337
- contHeight = screen.height;
1338
- }
1339
- newWidth = parseInt(newWidth);
1340
- newHeight = parseInt(newHeight);
1341
- ' .
1342
-
1343
- // Initialize new display sizes
1344
- 'var newWidth,
1345
- newHeight,
1346
- topMarg,
1347
- leftMarg,
1348
- extraX = 8,
1349
- extraY = 24 + ' . ( $controls ? $icsiz : 0 ) . ' + contWidth * ' . $height . ' / ' . $width . ' + 40;' .
1350
-
1351
- // Add borderwidth in case of mode == normal
1352
- 'if ( modeIsNormal ) {
1353
- extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
1354
- extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
1355
- }
1356
- ' .
1357
-
1358
- // Find out if the width is the limitng dimension
1359
- 'widthIsLim = ( contHeight > ( ( contWidth / 2 ) + extraY ) );' .
1360
-
1361
- // Compute new sizes and margins
1362
- 'if ( widthIsLim ) {
1363
- newWidth = contWidth - extraX;
1364
- newHeight = newWidth / 2;
1365
- topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
1366
- '}
1367
- else {
1368
- newWidth = 2 * ( contHeight - ' . ( $controls ? $icsiz : 0 ) . ' - 24 - 40 ) / ( 1 + 2 * ' . $height . ' / ' . $width . ' );
1369
- newHeight = newWidth / 2;
1370
- topMarg = 20;' .
1371
-
1372
- '}' .
1373
-
1374
- // Set css common for all 4 situations
1375
- '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
1376
- $("#wppa-overlay-ic").css({marginTop:0});
1377
-
1378
- canvas.width = newWidth;
1379
- canvas.height = newHeight;
1380
- prevCanvas.width = newWidth;
1381
- prevCanvas.height = newWidth * ' . $height . ' / ' . $width . ';' .
1382
-
1383
- // Now set css for all 4 situations: Mode is normal
1384
- 'if ( modeIsNormal ) {' .
1385
-
1386
- // Common for mode normal
1387
- '$("#wppa-ovl-pan-container").css({
1388
- backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
1389
- padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
1390
- borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
1391
- width:newWidth,
1392
- marginLeft:0
1393
- });
1394
- $( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
1395
-
1396
- // Limit specific
1397
- 'if ( widthIsLim ) {
1398
- $("#wppa-overlay-ic").css({marginLeft:4});
1399
- }
1400
- else {
1401
- $("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
1402
- }
1403
-
1404
- }' .
1405
-
1406
- // Mode is fullscreen
1407
- 'else {' .
1408
-
1409
- // Common for mode fullscreen
1410
- '$("#wppa-overlay-ic").css({marginLeft:0});
1411
- $("#wppa-ovl-pan-container").css({
1412
- backgroundColor:"transparent",
1413
- padding:0,
1414
- borderRadius:0,
1415
- width:newWidth,
1416
- marginLeft:(contWidth-newWidth)/2
1417
- });
1418
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});' .
1419
-
1420
- /*
1421
-
1422
- if ( widthIsLim ) {
1423
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
1424
- }
1425
- else {
1426
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:(contWidth-newWidth)/2});
1427
 
1428
- } */ '
1429
- }' .
1430
 
1431
- 'run=(autorun?5:4);
1432
- render();
1433
 
1434
- ' :
1435
- 'canvasWidth = $(div).parent().width();' .
1436
- 'canvasHeight = canvasWidth / 2;' .
1437
- 'canvas.width = canvasWidth;' .
1438
- 'canvas.height = canvasHeight;' .
1439
- 'prevCanvas.width = canvasWidth;' .
1440
- 'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
1441
- 'run=(autorun?5:4);' .
1442
- 'render();'
1443
- ) .
1444
 
1445
- '}' .
1446
 
1447
- // when the mouse is pressed on the canvas, we switch to manual control and save current coordinates
1448
- 'function onCanvasMouseDown(e){
1449
 
1450
- e.preventDefault();
 
 
 
 
1451
 
1452
- manualControl = true;
1453
 
1454
- savedCanvasX = e.offsetX;
1455
- savedCanvasY = e.offsetY;
1456
 
1457
- run=5;
1458
- render();
 
 
1459
 
1460
- }' .
 
 
 
 
1461
 
1462
- 'function onCanvasMouseMove(e){
1463
 
1464
- var factor = canvas.width / fromWidth;
 
 
 
1465
 
1466
- if ( manualControl ){
1467
-
1468
- var x = ( savedCanvasX - e.offsetX ) / factor + fromX;
1469
- var y = ( savedCanvasY - e.offsetY ) / factor + fromY;
1470
-
1471
- if ( x > 0 && y > 0 && ( x + fromWidth ) < image' . $mocc . '.width && ( y + fromHeight ) < image' . $mocc . '.height ) {
1472
-
1473
- fromX = x;
1474
- fromY = y;
1475
-
1476
- savedCanvasX = e.offsetX;
1477
- savedCanvasY = e.offsetY;
1478
- }
1479
- }
1480
- }' .
1481
 
1482
- 'function onPrevCanvasMouseMove(e){
 
1483
 
1484
- var factor = prevCanvas.width / image' . $mocc . '.width;
 
 
1485
 
1486
- if (e.offsetX > factor * fromX &&
1487
- e.offsetX < factor * ( fromX + fromWidth ) &&
1488
- e.offsetY > factor * fromY &&
1489
- e.offsetY < factor * ( fromY + fromHeight ) ) {
1490
 
1491
- $(prevCanvas).css("cursor","grab");
1492
- }
1493
- else {
1494
- $(prevCanvas).css("cursor","default");
1495
- }
1496
-
1497
- if ( manualControl && !busy ){
1498
-
1499
- if (e.offsetX > factor * fromX &&
1500
- e.offsetX < factor * ( fromX + fromWidth ) &&
1501
- e.offsetY > factor * fromY &&
1502
- e.offsetY < factor * ( fromY + fromHeight ) ) {
1503
-
1504
- fromX = ( e.offsetX - savedCanvasX ) / factor + fromX;
1505
- fromY = ( e.offsetY - savedCanvasY ) / factor + fromY;
1506
-
1507
- savedCanvasX = e.offsetX;
1508
- savedCanvasY = e.offsetY;
1509
-
1510
- }
1511
- }
1512
- }' .
1513
-
1514
- 'function onCanvasMouseUp(e){
1515
-
1516
- if ( manualControl ) {
1517
- run=4;
1518
- manualControl = false;
1519
- }
1520
- }' .
1521
- '}
1522
 
1523
- </script>
1524
- ' . ( $haslink ? '<a>' : '' ) . '';
1525
 
1526
- return wppa_pan_min( $result );
1527
  }
1528
 
1529
  // Minimize inine mixed html / js code
1530
  function wppa_pan_min( $result ) {
1531
- // return $result; // debug
1532
- // wppa_log('dbg','voor len='.strlen($result));
1533
 
1534
- // Remove tabs
1535
- $result = str_replace( "\t", '', $result );
1536
 
1537
- // Remove newlines
1538
- $result = str_replace( array( "\r\n", "\n\r", "\n", "\r" ), ' ', $result );
1539
 
1540
- // Trim operators
1541
- $result = str_replace( array( ' = ',' + ',' * ',' / ' ), array( '=','+','*','/' ), $result );
1542
 
1543
- // Replace multiple spaces by one
1544
- $olen = 0;
1545
- $nlen = strlen( $result );
1546
- do {
1547
- $olen = $nlen;
1548
- $result = str_replace( ' ', ' ', $result );
1549
- $nlen = strlen( $result );
1550
- } while ( $nlen != $olen );
1551
 
1552
- // Trim , ; and !
1553
- $result = str_replace( array( ', ', '; ', '! ' ), array( ',', ';', '!' ), $result );
1554
 
1555
- // Trim braces
1556
- $result = str_replace( array( ' ) ', ') ', ' )' ), ')', $result );
1557
- $result = str_replace( array( ' ( ', '( ', ' (' ), '(', $result );
1558
 
1559
- // Remove space between html tags
1560
- $result = str_replace( '> <', '><', $result );
1561
 
1562
- // wppa_log('dbg',' na len='.strlen($result));
1563
- // wppa_dump($result);
1564
- return $result;
1565
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 7.2.16
7
  *
8
  */
9
 
28
  //
29
  function wppa_get_picture_html( $args ) {
30
 
31
+ // Init
32
+ $defaults = array( 'id' => '0',
33
+ 'type' => '',
34
+ 'class' => '',
35
+ 'width' => false,
36
+ 'height' => false,
37
+ );
38
+ $args = wp_parse_args( $args, $defaults );
39
+
40
+ $id = strval( intval ( $args['id'] ) );
41
+ $type = $args['type'];
42
+ $class = $args['class'];
43
+ $mocc = wppa( 'mocc' );
44
+
45
+ if ( wppa_is_pdf( $id ) ) {
46
+ $class = trim( $class . ' smxpdf-' . $mocc );
47
+ $is_pdf = true;
48
+ }
49
+ else {
50
+ $is_pdf = false;
51
+ }
52
+
53
+ // Check existance of required args
54
+ foreach( array( 'id', 'type' ) as $item ) {
55
+ if ( ! $args[$item] ) {
56
+ wppa_dbg_msg( 'Missing ' . $item . ' in call to wppa_get_picture_html()', 'red' );
57
+ return false;
58
+ }
59
+ }
60
+
61
+ // Check validity of args
62
+ if ( ! wppa_photo_exists( $id ) ) {
63
+ wppa_dbg_msg( 'Photo ' . $id . ' does not exist in call to wppa_get_picture_html(). Type = ' . $type, 'red', 'force' );
64
+ return false;
65
+ }
66
+
67
+ $types = array( 'sphoto', // Single image with optional border like slideshow border
68
+ 'mphoto', // Media type like single image. Caption should be provided in wrappping div
69
+ 'xphoto', // Like xphoto with extended features
70
+ 'cover', // Album cover image
71
+ 'thumb', // Normal tumbnail
72
+ 'ttthumb', // Topten
73
+ 'comthumb', // Comment widget
74
+ 'fthumb', // Filmthumb
75
+ 'twthumb', // Thumbnail widget
76
+ 'ltthumb', // Lasten widget
77
+ 'albthumb', // Album widget
78
+ );
79
+
80
+ if ( ! in_array( $type, $types ) ) {
81
+ wppa_dbg_msg( 'Unimplemented type ' . $type . ' in call to wppa_get_picture_html()', 'red', 'force' );
82
+ return false;
83
+ }
84
+
85
+ // Get other data
86
+ $link = wppa_get_imglnk_a( $type, $id );
87
+ $isthumb = strpos( $type, 'thumb' ) !== false;
88
+ $file = $isthumb ? wppa_get_thumb_path( $id ) : wppa_get_photo_path( $id );
89
+
90
+ if ( $args['width'] && $args['height'] ) {
91
+ $href = $isthumb ? wppa_get_thumb_url( $id, true, '', $args['width'], $args['height'] ) :
92
+ wppa_get_photo_url( $id, true, '', $args['width'], $args['height'] );
93
+ }
94
+ else {
95
+ $href = $isthumb ? wppa_get_thumb_url( $id ) : wppa_get_photo_url( $id );
96
+ }
97
+ if ( $is_pdf ) {
98
+ $href = wppa_get_hires_url( $id );
99
+ }
100
+
101
+ $autocol = wppa( 'auto_colwidth' ) || ( wppa( 'fullsize' ) > 0 && wppa( 'fullsize' ) <= 1.0 );
102
+ $title = $link ? esc_attr( $link['title'] ) : esc_attr( stripslashes( wppa_get_photo_name( $id ) ) );
103
+ $alt = wppa_get_imgalt( $id );
104
+
105
+ // Find image style
106
+ switch ( $type ) {
107
+ case 'sphoto':
108
+ $style = 'width:100%;margin:0;';
109
+ if ( ! wppa_in_widget() ) {
110
+ switch ( wppa_opt( 'fullimage_border_width' ) ) {
111
+ case '':
112
+ $style .= 'padding:0;' .
113
+ 'border:none;';
114
+ break;
115
+ case '0':
116
+ $style .= 'padding:0;' .
117
+ 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
118
+ 'box-sizing:border-box;';
119
+ break;
120
+ default:
121
+ $style .= 'padding:' . ( wppa_opt( 'fullimage_border_width' ) - '1' ) . 'px;' .
122
+ 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
123
+ 'box-sizing:border-box;' .
124
+ 'background-color:' . wppa_opt( 'bgcolor_fullimg' ) . ';';
125
+
126
+ // If we do round corners...
127
+ if ( wppa_opt( 'bradius' ) > '0' ) {
128
+
129
+ // then also here
130
+ $style .= 'border-radius:' . wppa_opt( 'fullimage_border_width' ) . 'px;';
131
+ }
132
+ }
133
+ }
134
+ break;
135
+ case 'mphoto':
136
+ case 'xphoto':
137
+ $style = 'width:100%;margin:0;padding:0;border:none;';
138
+ break;
139
+ default:
140
+ wppa_dbg_msg( 'Style for type ' . $type . ' is not implemented yet in wppa_get_picture_html()', 'red', 'force' );
141
+ return false;
142
+ }
143
+
144
+ if ( $link['is_lightbox'] ) {
145
+ $title = wppa_zoom_in( $id );
146
+ }
147
+
148
+ // Create the html. To prevent mis-alignment of the audio control bar or to escape from the <a> tag for the pan controlbar
149
+ // we wrap it in a div with zero fontsize and lineheight.
150
+ $result = '<div style="font-size:0;line-height:0;" >';
151
+
152
+ if ( $is_pdf && $mocc ) {
153
+ $result .= wppa_js( '<script>wppaAutoColumnWidth[' . $mocc . '] = true;wppaAutoColumnFrac[' . $mocc . ']=1;wppaTopMoc=' . $mocc . ';</script>' );
154
+ }
155
+
156
+ // The link
157
+ if ( $link ) {
158
+
159
+ // Link is lightbox
160
+ if ( $link['is_lightbox'] ) {
161
+ $lbtitle = wppa_get_lbtitle( $type, $id );
162
+ $videobody = esc_attr( wppa_get_video_body( $id ) );
163
+ $audiobody = esc_attr( wppa_get_audio_body( $id ) );
164
+ $videox = wppa_get_videox( $id );
165
+ $videoy = wppa_get_videoy( $id );
166
+
167
+ if ( $type == 'photo' || $type == 'mphoto' || $type == 'xphoto' ) {
168
+ $setname = '['.$type.']';
169
+ }
170
+ else {
171
+ $setname = '';
172
+ }
173
+
174
+ $result .=
175
+ '<a' .
176
+ ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
177
+ ' href="' . $link['url'] . '"' .
178
+ ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.esc_attr($lbtitle).'"' : '' ) .
179
+ ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
180
+ ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
181
+ ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
182
+ ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
183
+ ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
184
+ ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).$setname.'"' .
185
+ wppa_get_lb_panorama_full_html( $id ) .
186
+ ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
187
+ ' class="thumb-img"' .
188
+ ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
189
+ ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
190
+ ' style="cursor:' . wppa_wait() . ';"' .
191
+ ' onclick="return false;"' .
192
+ ' >';
193
+ }
194
+
195
+ // Link is NOT lightbox
196
+ else {
197
+ $result .=
198
+ '<a' .
199
+ ( wppa_is_mobile() ?
200
+ ' ontouchstart="wppaStartTime();" ontouchend="wppaTapLink(\'' . $id . '\',\'' . $link['url'] . '\');" ' :
201
+ ' onclick="_bumpClickCount( \'' . $id . '\' );window.open(\'' . $link['url'] . '\', \'' . $link['target'] . '\' )"'
202
+ ) .
203
+ ' title="' . $link['title'] . '"' .
204
+ ' class="thumb-img"' .
205
+ ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
206
+ ' style="cursor:pointer;"' .
207
+ ' >';
208
+ }
209
+ }
210
+
211
+ // The image
212
+ // Panorama? Only if browser supports html5
213
+ if ( wppa_is_panorama( $id ) && wppa_browser_can_html5() ) {
214
+ $result .= wppa_get_panorama_html( array( 'id' => $id,
215
+ 'width' => $args['width'],
216
+ 'height' => $args['height'],
217
+ 'haslink' => $link,
218
+ )
219
+ );
220
+ }
221
+
222
+ // Video?
223
+ elseif ( wppa_is_video( $id ) ) {
224
+ $result .=
225
+ wppa_get_video_html( array( 'id' => $id,
226
+ 'controls' => ! $link,
227
+ 'style' => $style,
228
+ 'class' => $class,
229
+ )
230
+ );
231
+ }
232
+
233
+ // Pdf?
234
+ elseif ( $is_pdf ) {
235
+ $result .= '
236
+ <iframe
237
+ id="pdf-' . $id . '-' . wppa( 'mocc' ) . '"
238
+ src="' . $href . '" ' .
239
+ wppa_get_imgalt( $id ) .
240
+ ( $class ? ' class="' . $class . '" ' : '' ) .
241
+ ( $title ? ' title="' . $title . '" ' : '' ) . '
242
+ style="' . $style . '"
243
+ >
244
+ </iframe>';
245
+ }
246
+
247
+ // No video, just a photo
248
+ else {
249
+ $result .=
250
+ '<img' .
251
+ ' id="ph-' . $id . '-' . wppa( 'mocc' ) . '"' .
252
+ ' src="' . $href . '"' .
253
+ ' ' . wppa_get_imgalt( $id ) .
254
+ ( $class ? ' class="' . $class . '" ' : '' ) .
255
+ ( $title ? ' title="' . $title . '" ' : '' ) .
256
+ ' style="' . $style . '"' .
257
+ ' />';
258
+ }
259
+
260
+ // Close the link
261
+ if ( $link ) {
262
+ $result .= '</a>';
263
+ }
264
+
265
+ // Add audio? sphoto
266
+ if ( wppa_has_audio( $id ) ) {
267
+
268
+ $result .= '<div style="position:relative;z-index:11;" >';
269
+
270
+ // Find style for audio controls
271
+ switch ( $type ) {
272
+ case 'sphoto':
273
+ $pad = ( wppa_opt( 'fullimage_border_width' ) === '' ) ? 0 : wppa_opt( 'fullimage_border_width' );
274
+ $bot = ( wppa_opt( 'fullimage_border_width' ) === '' ) ? 0 : wppa_opt( 'fullimage_border_width' );
275
+ $style = 'margin:0;' .
276
+ 'padding:0 ' . $pad . 'px;' .
277
+ 'bottom:' . $bot .'px;';
278
+ $class = 'size-medium wppa-sphoto wppa-sphoto-' . wppa( 'mocc' );
279
+ break;
280
+ case 'mphoto':
281
+ case 'xphoto':
282
+ $style = 'margin:0;' .
283
+ 'padding:0;' .
284
+ 'bottom:0;';
285
+ $class = 'size-medium wppa-' . $type . ' wppa-' . $type . '-' . wppa( 'mocc' );
286
+ break;
287
+ default:
288
+ $style = 'margin:0;' .
289
+ 'padding:0;';
290
+ $class = '';
291
+ }
292
+
293
+ // Get the html for audio
294
+ $result .= wppa_get_audio_html( array( 'id' => $id,
295
+ 'cursor' => 'cursor:pointer;',
296
+ 'style' => $style .
297
+ 'position:absolute;' .
298
+ 'box-sizing:border-box;' .
299
+ 'width:100%;' .
300
+ 'border:none;' .
301
+ 'height:' . wppa_get_audio_control_height() . 'px;' .
302
+ 'border-radius:0;',
303
+ 'class' => $class,
304
+ )
305
+ );
306
+ $result .= '</div>';
307
+ }
308
+
309
+ $result .= '</div>';
310
+
311
+ // Update statistics
312
+ if ( ! wppa_in_widget() ) {
313
+ wppa_bump_viewcount( 'photo', $id );
314
+ }
315
+
316
+ // Done !
317
+ return $result;
318
  }
319
 
320
  // Get full html for a lightbox pan image, e.g. ' data-panorama="'..."' for use in lightbox anchor link
321
  function wppa_get_lb_panorama_full_html( $id ) {
322
 
323
+ $result = wppa_get_lb_panorama_html( $id );
324
+ if ( $result ) {
325
+ return ' data-panorama="' . esc_attr( $result ) . '"';
326
+ }
327
+ else {
328
+ return '';
329
+ }
330
  }
331
 
332
  // Get the html for a lightbox pan image
333
  function wppa_get_lb_panorama_html( $id ) {
334
 
335
+ return wppa_get_panorama_html( array( 'id' => $id, 'lightbox' => true, ) );
336
  }
337
 
338
  // Get the html for a pan image
339
  function wppa_get_panorama_html( $args ) {
340
 
341
+ // If no id given, quit
342
+ if ( ! isset( $args['id'] ) ) return;
343
 
344
+ $args['controls'] = ( wppa_opt( 'panorama_control' ) == 'all' ) || ( wppa_opt( 'panorama_control' ) == 'mobile' && wppa_is_mobile() );
345
+ $args['manual'] = wppa_opt( 'panorama_manual' ) == 'all' ? true : false;
346
+ $args['autorun'] = wppa_opt( 'panorama_autorun' ) == 'none' ? '' : wppa_opt( 'panorama_autorun' );
347
+ $args['autorunspeed'] = wppa_opt( 'panorama_autorun_speed' );
348
+ $args['zoomsensitivity'] = wppa_opt( 'panorama_wheel_sensitivity' );
349
 
350
+ switch( wppa_is_panorama( $args['id'] ) ) {
351
 
352
+ case '1':
353
+ $result = wppa_get_spheric_pan_html( $args );
354
 
355
+ // Save we have a spheric panorama on board for loading THREE.js
356
+ wppa( 'has_panorama', true );
357
+ break;
358
+ case '2':
359
+ $result = wppa_get_flat_pan_html( $args );
360
+ break;
361
+ default:
362
+ $result = '';
363
+ }
364
 
365
+ return $result;
366
  }
367
 
368
  // Spheric 360deg pan
369
  function wppa_get_spheric_pan_html( $args ) {
370
 
371
+ // Init
372
+ $defaults = array( 'id' => '0',
373
+ 'mocc' => '0',
374
+ 'width' => false,
375
+ 'height' => false,
376
+ 'haslink' => false,
377
+ 'lightbox' => 0,
378
+ 'controls' => true,
379
+ 'autorun' => '',
380
+ 'manual' => true,
381
+ 'autorunspeed' => '3',
382
+ 'zoomsensitivity' => '3',
383
+ );
384
+
385
+ $args = wp_parse_args( $args, $defaults );
386
+
387
+ $id = strval( intval ( $args['id'] ) );
388
+ $mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
389
+ $width = $args['width'] ? $args['width'] : wppa_get_container_width();
390
+ $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
391
+ $haslink = $args['haslink'];
392
+ $icsiz = wppa_opt( 'nav_icon_size_panorama' );
393
+ $iconsize = $icsiz . 'px;';
394
+ $lightbox = $args['lightbox'];
395
+ $controls = $args['controls'];
396
+ $autorun = $args['autorun'];
397
+ $manual = $args['manual'];
398
+ $autorunspeed = $args['autorunspeed'];
399
+ $zoomsensitivity = $args['zoomsensitivity'];
400
+
401
+ $url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
402
+
403
+ $result =
404
+ ( $lightbox ? $id . '.' : '' ) .
405
+ ( $haslink ? '</a>' : '' ) .
406
+ ( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
407
+ '<div
408
+ id="wppa-pan-div-' . $mocc . '"
409
+ class="wppa-pan-div wppa-pan-div-' . $mocc . '"
410
+ style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . ( $manual ? 'cursor:grab;': '' ) . 'line-height:0;"
411
+ >
412
+ </div>' .
413
+ ( $controls ?
414
+ '<div
415
+ id="wppa-pctl-div-' . $mocc . '"
416
+ class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
417
+ style="text-align:center;"
418
+ >' .
419
+ ( $lightbox ?
420
+ '<span
421
+ id="wppa-pctl-prev-' . $mocc . '"
422
+ class="wppa-pan-prevnext"
423
+ style="margin:0 2px 0 0;float:left;display:inline-block;"
424
+ >' .
425
+ wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
426
+ '</span>'
427
+ :
428
+ ''
429
+ ) .
430
+ '<span
431
+ id="wppa-pctl-left-' . $mocc . '"
432
+ style="margin:0 2px;display:inline-block;"
433
+ >' .
434
+ wppa_get_svghtml( 'Left-4', $iconsize, true ) .
435
+ '</span>
436
+ <span
437
+ id="wppa-pctl-right-' . $mocc . '"
438
+ style="margin:0 2px;display:inline-block;"
439
+ >' .
440
+ wppa_get_svghtml( 'Right-4', $iconsize, true ) .
441
+ '</span>
442
+ <span
443
+ id="wppa-pctl-up-' . $mocc . '"
444
+ style="margin:0 2px;display:inline-block;"
445
+ >' .
446
+ wppa_get_svghtml( 'Up-4', $iconsize, true ) .
447
+ '</span>
448
+ <span
449
+ id="wppa-pctl-down-' . $mocc . '"
450
+ style="margin:0 2px;display:inline-block;"
451
+ >' .
452
+ wppa_get_svghtml( 'Down-4', $iconsize, true ) .
453
+ '</span>
454
+ <span
455
+ id="wppa-pctl-zoomin-' . $mocc . '"
456
+ style="margin:0 2px;display:inline-block;"
457
+ >' .
458
+ wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
459
+ '</span>
460
+ <span
461
+ id="wppa-pctl-zoomout-' . $mocc . '"
462
+ style="margin:0 2px;display:inline-block;"
463
+ >' .
464
+ wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
465
+ '</span>' .
466
+ ( $lightbox ?
467
+ '<span
468
+ id="wppa-pctl-next-' . $mocc . '"
469
+ class="wppa-pan-prevnext"
470
+ style="margin:0 0 0 2px;float:right;display:inline-block;"
471
+ >' .
472
+ wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
473
+ '</span>'
474
+ :
475
+ ''
476
+ ) .
477
+ '</div>'
478
+ :
479
+ ''
480
+ ) .
481
+
482
+ ( $lightbox ? '</div>' : '' ) .
483
+
484
+ '<script>' .
485
+
486
+ // Create image object and add the image url to it
487
+ 'var image' . $mocc . ' = new Image();
488
+ image' . $mocc . '.src = "' . $url . '";' .
489
+
490
+ // When document complete, run the main proc
491
+ 'jQuery(document).ready(function(){wppaDoSphericPanorama' . $mocc . '();});' .
492
+
493
+ // The main proccedure
494
+ 'function wppaDoSphericPanorama' . $mocc . '(){' .
495
+
496
+ // Wait until the image file has been completely loaded
497
+ 'if (!image' . $mocc . '.complete){setTimeout( wppaDoSphericPanorama' . $mocc . ', 100 );return;};' .
498
+
499
+ // Var declarations
500
+ 'var
501
+ $ = jQuery,
502
+ uniqueId,
503
+ manualControl = false,
504
+ longitude = 180,
505
+ latitude = 0,
506
+ savedX,
507
+ savedY,
508
+ savedLongitude,
509
+ savedLatitude,' .
510
+ ( $autorun == 'right' ? 'deltaX = 0.05 * ' . $autorunspeed . ' / 3,' : '' ) .
511
+ ( $autorun == 'left' ? 'deltaX = -0.05 * ' . $autorunspeed . ' / 3,' : '' ) .
512
+ ( $autorun == '' ? 'deltaX = 0,' : '' ) .
513
+ 'deltaY = 0,
514
+ deltaFov = 0,
515
+ fov = 75,
516
+ abort = false,
517
+ aspect = 2,
518
+ div = $( "#wppa-pan-div-' . $mocc . '" ),
519
+ left = $("#wppa-pctl-left-' . $mocc . '" ),
520
+ right = $("#wppa-pctl-right-' . $mocc . '" ),
521
+ up = $("#wppa-pctl-up-' . $mocc . '" ),
522
+ down = $("#wppa-pctl-down-' . $mocc . '" ),
523
+ zoomin = $("#wppa-pctl-zoomin-' . $mocc . '" ),
524
+ zoomout = $("#wppa-pctl-zoomout-' . $mocc . '" ),
525
+ prev = $("#wppa-pctl-prev-' . $mocc . '" ),
526
+ next = $("#wppa-pctl-next-' . $mocc . '" );' .
527
+
528
+ // Setting the global id, indicating the most recent invocation
529
+ ( $lightbox ? '
530
+ wppaGlobalOvlPanoramaId++;
531
+ uniqueId = wppaGlobalOvlPanoramaId;' :
532
+ '' ) .
533
+
534
+ // Lghtbox uses the global vars used for the webGL context
535
+ ( $lightbox ?
536
+ // setting up the renderer
537
+ 'if ( ! wppaRenderer ) {
538
+ wppaRenderer = new THREE.WebGLRenderer();
539
+ }
540
+ wppaRenderer.setSize(' . $width . ', ' . $height . ');
541
+ $(div).append(wppaRenderer.domElement);' .
542
+
543
+ // Creating a new scene if not yet available
544
+ 'if ( ! wppaScene ) {
545
+ wppaScene = new THREE.Scene();
546
+ }' .
547
+
548
+ // Adding a camera
549
+ 'if ( ! wppaCamera ) {
550
+ wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
551
+ wppaCamera.target = new THREE.Vector3(0, 0, 0);
552
+ }' .
553
+
554
+ // Creation of a big sphere geometry
555
+ 'if ( ! wppaSphere ) {
556
+ wppaSphere = new THREE.SphereGeometry(100, 100, 40);
557
+ wppaSphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));
558
+ }' .
559
+
560
+ // Creation of the sphere material
561
+ 'if ( ! wppaSphereMaterial ) {
562
+ wppaSphereMaterial = new THREE.MeshBasicMaterial();
563
+ }
564
+ wppaSphereMaterial.map = THREE.ImageUtils.loadTexture("' . $url . '");' .
565
+
566
+ // geometry + material = mesh (actual object)
567
+ 'if ( ! wppaSphereMesh ) {
568
+ wppaSphereMesh = new THREE.Mesh(wppaSphere, wppaSphereMaterial);
569
+ wppaScene.add(wppaSphereMesh);
570
+ }
571
+ ' :
572
+
573
+ // setting up the wpparenderer
574
+ 'var wppaRenderer = new THREE.WebGLRenderer();
575
+ wppaRenderer.setSize(' . $width . ', ' . $height . ');' .
576
+
577
+ // Place the element
578
+ '$(div).append(wppaRenderer.domElement);' .
579
+
580
+ // Creating a new scene
581
+ 'var wppaScene = new THREE.Scene();' .
582
+
583
+ // Adding a camera
584
+ 'var wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
585
+ wppaCamera.target = new THREE.Vector3(0, 0, 0);' .
586
+
587
+ // Creation of a big sphere geometry
588
+ 'var wppaSphere = new THREE.SphereGeometry(100, 100, 40);
589
+ wppaSphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));' .
590
+
591
+ // Creation of the sphere material
592
+ 'var wppaSphereMaterial = new THREE.MeshBasicMaterial();
593
+ wppaSphereMaterial.map = THREE.ImageUtils.loadTexture("' . $url . '");' .
594
+
595
+ // geometry + material = mesh (actual object)
596
+ 'var wppaSphereMesh = new THREE.Mesh(wppaSphere, wppaSphereMaterial);
597
+ wppaScene.add(wppaSphereMesh);'
598
+ ) .
599
+
600
+ // listeners
601
+ ( wppa_is_mobile() ?
602
+ '$(right).on("touchstart", onRightMouseDown);
603
+ $(right).on("touchend", onButtonUp);
604
+ $(left).on("touchstart", onLeftMouseDown);
605
+ $(left).on("touchend", onButtonUp);
606
+ $(up).on("touchstart", onUpMouseDown);
607
+ $(up).on("touchend", onButtonUp);
608
+ $(down).on("touchstart", onDownMouseDown);
609
+ $(down).on("touchend", onButtonUp);
610
+ $(zoomin).on("touchstart", onZoomInMouseDown);
611
+ $(zoomin).on("touchend", onButtonUp);
612
+ $(zoomout).on("touchstart", onZoomOutMouseDown);
613
+ $(zoomout).on("touchend", onButtonUp);'
614
+ :
615
+ ( $manual ?
616
+ '$(div).on("mousedown", onDivMouseDown);
617
+ $(div).on("mousemove", onDivMouseMove);
618
+ $(div).on("mouseup", onDivMouseUp);
619
+ document.getElementById("wppa-pan-div-' . $mocc . '").addEventListener("wheel", onDivWheel);' : ''
620
+ ) .
621
+ '$(right).on("mousedown", onRightMouseDown);
622
+ $(right).on("mouseup", onButtonUp);
623
+ $(left).on("mousedown", onLeftMouseDown);
624
+ $(left).on("mouseup", onButtonUp);
625
+ $(up).on("mousedown", onUpMouseDown);
626
+ $(up).on("mouseup", onButtonUp);
627
+ $(down).on("mousedown", onDownMouseDown);
628
+ $(down).on("mouseup", onButtonUp);
629
+ $(zoomin).on("mousedown", onZoomInMouseDown);
630
+ $(zoomin).on("mouseup", onButtonUp);
631
+ $(zoomout).on("mousedown", onZoomOutMouseDown);
632
+ $(zoomout).on("mouseup", onButtonUp);
633
+ '
634
+ ) .
635
+
636
+ // Common event handlers
637
+ ( $lightbox ? '
638
+ if (prev) {
639
+ prev.on("click", panPrev);
640
+ next.on("click", panNext);
641
+ }' : ''
642
+ ) .
643
+
644
+ // Install Resize hanler
645
+ '$(window).on("DOMContentLoaded load resize orientationchange",onResize);' .
646
+
647
+ // Resize
648
+ 'onResize();' .
649
+
650
+ // Remove spinner
651
+ '$("#wppa-ovl-spin").hide();' .
652
+
653
+ // Doit!
654
+ 'render();' .
655
+
656
+ // The rendering function
657
+ 'function render(){' .
658
+
659
+ // See if a lightbox instance has to die
660
+ ( $lightbox ? 'if ( ! wppaOvlOpen || wppaOvlActivePanorama != ' . $id . ' || wppaGlobalOvlPanoramaId > uniqueId ) abort=true;' : '' ) .
661
+
662
+ // If the abort flag is risen, die gracefully
663
+ 'if(abort){
664
+ return;
665
+ }' .
666
+
667
+ 'requestAnimationFrame(render);
668
+
669
+ if ( ! manualControl ) {
670
+ longitude += deltaX;
671
+ latitude += deltaY;
672
+ }' .
673
+
674
+ // limiting latitude from -85 to 85 (cannot point to the sky or under your feet)
675
+ 'latitude = Math.max(-85, Math.min(85, latitude));' .
676
+
677
+ // moving the wppaCamera according to current latitude (vertical movement) and longitude (horizontal movement)
678
+ 'wppaCamera.target.x = 500 * Math.sin(THREE.Math.degToRad(90 - latitude)) * Math.cos(THREE.Math.degToRad(longitude));
679
+ wppaCamera.target.y = 500 * Math.cos(THREE.Math.degToRad(90 - latitude));
680
+ wppaCamera.target.z = 500 * Math.sin(THREE.Math.degToRad(90 - latitude)) * Math.sin(THREE.Math.degToRad(longitude));
681
+ wppaCamera.lookAt(wppaCamera.target);' .
682
+
683
+ // calling again render function
684
+ 'wppaRenderer.render(wppaScene, wppaCamera);
685
+ }' .
686
+
687
+ // Mouse wheel
688
+ 'function onDivWheel(e) {
689
+ e.preventDefault();
690
+ deltaFov=-e.deltaY * ' . $zoomsensitivity . ' / 6;
691
+ doZoom(true);
692
+ e.stopPropagation();
693
+ }' .
694
+
695
+ // Zoom in/out
696
+ 'function doZoom(once){
697
+ fov += deltaFov;
698
+ fov = Math.max(20, Math.min(120, fov));
699
+ wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
700
+ wppaCamera.target = new THREE.Vector3(0, 0, 0);
701
+ if ( ! once && deltaFov != 0 ) {
702
+ setTimeout(function(){doZoom()}, 25);
703
+ }
704
+ if ( once ) {
705
+ deltaFov = 0;
706
+ }
707
+ }' .
708
+
709
+ // Previous
710
+ 'function panPrev(e) {
711
+ var stop;
712
+ if ( ! stop ) {
713
+ stop = true;
714
+ $(this).css({opacity:0.5});
715
+ $("#wppa-overlay-ic").css({display:"none"});
716
+ $("#wppa-ovl-spin").show();
717
+ wppaOvlShowPrev();
718
+ }
719
+ }' .
720
+
721
+ // Next
722
+ 'function panNext(e) {
723
+ var stop;
724
+ if ( ! stop ) {
725
+ stop = true;
726
+ $(this).css({opacity:0.5});
727
+ $("#wppa-overlay-ic").css({display:"none"});
728
+ $("#wppa-ovl-spin").show();
729
+ wppaOvlShowNext();
730
+ }
731
+ }' .
732
+
733
+ // Manual movement on the image div
734
+ 'function onDivMouseDown(e){
735
+ e.preventDefault();
736
+ manualControl = true;
737
+ savedX = e.clientX;
738
+ savedY = e.clientY;
739
+ savedLongitude = longitude;
740
+ savedLatitude = latitude;
741
+ }' .
742
+ 'function onDivMouseMove(e){
743
+ if(manualControl){
744
+ longitude = (savedX - e.clientX) * 0.1 + savedLongitude;
745
+ latitude = (e.clientY - savedY) * 0.1 + savedLatitude;
746
+ }
747
+ }' .
748
+ 'function onDivMouseUp(e){
749
+ manualControl = false;
750
+ deltaX=0;
751
+ }' .
752
+
753
+ // Horizontal movement by buttons
754
+ 'function onRightMouseDown(e) {
755
+ deltaX=0.2;
756
+ }' .
757
+ 'function onLeftMouseDown(e) {
758
+ deltaX=-0.2;
759
+ }' .
760
+
761
+ // Vertical movement by buttons
762
+ 'function onUpMouseDown(e) {
763
+ deltaY=0.2;
764
+ }' .
765
+ 'function onDownMouseDown(e) {
766
+ deltaY=-0.2;
767
+ }' .
768
+
769
+ // Zooming
770
+ 'function onZoomInMouseDown(e) {
771
+ deltaFov=-0.4;
772
+ doZoom();
773
+ }' .
774
+ 'function onZoomOutMouseDown(e) {
775
+ deltaFov=0.4;
776
+ doZoom();
777
+ }' .
778
+
779
+ // Release a button resets all deltas
780
+ 'function onButtonUp(e) {
781
+ deltaX=0;
782
+ deltaY=0;
783
+ deltaFov=0;
784
+ }' .
785
+
786
+ // When a (responsive) resize is required, we resize the wppaScene
787
+ 'function onResize(e){' .
788
+
789
+ ( $lightbox ?
790
+
791
+ // Show image container
792
+ '$("#wppa-overlay-ic").css("display", "");
793
+ $("#wppa-overlay-ic").css("width", "");' .
794
+
795
+ // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
796
+ 'var widthIsLim,
797
+ modeIsNormal = wppaOvlMode == "normal";' .
798
+
799
+ // Find container dimensions dependant of mode
800
+ 'var contWidth, contHeight;
801
+
802
+ if ( modeIsNormal ) {
803
+ contWidth = window.innerWidth ? window.innerWidth : screen.width;
804
+ contHeight = window.innerHeight ? window.innerHeight : screen.height;
805
+ }
806
+ else {
807
+ contWidth = screen.width;
808
+ contHeight = screen.height;
809
+ }'.
810
+ // alert("contWidth="+contWidth);' .
811
+
812
+ // Initialize new display sizes
813
+ 'var newWidth,
814
+ newHeight,
815
+ topMarg,
816
+ leftMarg,
817
+ extraX = 8,
818
+ extraY = 8 + ' . ( $controls ? $icsiz + 10 : 0 ) . ' + 30;' .
819
+
820
+ // Add borderwidth in case of mode == normal
821
+ 'if ( modeIsNormal ) {
822
+ extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
823
+ extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
824
+ }
825
+ ' .
826
+
827
+ // Find out if the width is the limitng dimension
828
+ 'widthIsLim = ( contHeight > ( ( ( contWidth - extraX ) / 2 ) + extraY ) );' .
829
+
830
+ // Compute new sizes and margins
831
+ 'if ( widthIsLim ) {
832
+ newWidth = contWidth - extraX;
833
+ newHeight = newWidth / 2;
834
+ topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
835
+ '}
836
+ else {
837
+ newHeight = contHeight - extraY;
838
+ newWidth = newHeight * 2;
839
+ topMarg = 20;' .
840
+
841
+ '}
842
+ newWidth = parseInt(newWidth);
843
+ newHeight = parseInt(newHeight);
844
+ ' .
845
+
846
+ // Set css common for all 4 situations
847
+ '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
848
+ $("#wppa-overlay-ic").css({marginTop:0});' .
849
+
850
+ // Now set css for all 4 situations: Mode is normal
851
+ 'if ( modeIsNormal ) {' .
852
+
853
+ // Common for mode normal
854
+ '$("#wppa-ovl-pan-container").css({
855
+ backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
856
+ padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
857
+ borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
858
+ width:newWidth,
859
+ marginLeft:0
860
+ });
861
+ $( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
862
+
863
+ // Limit specific
864
+ 'if ( widthIsLim ) {
865
+ $("#wppa-overlay-ic").css({marginLeft:4});
866
+ }
867
+ else {
868
+ $("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
869
+ }
870
+ }' .
871
+
872
+ // Mode is fullscreen
873
+ 'else {' .
874
+
875
+ // Common for mode fullscreen
876
+ '$("#wppa-overlay-ic").css({marginLeft:0});
877
+ $("#wppa-ovl-pan-container").css({
878
+ backgroundColor:"transparent",
879
+ padding:0,
880
+ borderRadius:0,
881
+ width:newWidth,
882
+ marginLeft:(contWidth-newWidth)/2
883
+ });
884
+
885
+ if ( widthIsLim ) {
886
+ $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
887
+ }
888
+ else {
889
+ $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
890
+ }
891
+ }
892
+
893
+ wppaRenderer.setSize(newWidth, newHeight);
894
+ doZoom(true);
895
+ ' :
896
+ '
897
+ var containerwidth = $(div).parent().width();
898
+ var newWidth = containerwidth;
899
+ var newHeight = newWidth * ' . ( $height / $width ) . ';
900
+ wppaRenderer.setSize(newWidth, newHeight);
901
+ doZoom(true);'
902
+ ) . '
903
+ }' .
904
+ '};
905
+
906
+ </script>
907
+ ' . ( $haslink ? '<a>' : '' ) . '';
908
+
909
+ return wppa_pan_min( $result );
910
  }
911
 
912
  // Non 360 flat pan
913
  function wppa_get_flat_pan_html( $args ) {
914
 
915
+ // Init
916
+ $defaults = array( 'id' => '0',
917
+ 'mocc' => '0',
918
+ 'width' => false,
919
+ 'height' => false,
920
+ 'haslink' => false,
921
+ 'lightbox' => 0,
922
+ 'controls' => true,
923
+ 'autorun' => '',
924
+ 'manual' => true,
925
+ 'autorunspeed' => '3',
926
+ 'zoomsensitivity' => '3',
927
+ );
928
+
929
+ $args = wp_parse_args( $args, $defaults );
930
+
931
+ $id = strval( intval ( $args['id'] ) );
932
+ $mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
933
+ $width = $args['width'] ? $args['width'] : wppa_get_container_width();
934
+ $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
935
+ $haslink = $args['haslink'];
936
+ $icsiz = wppa_opt( 'nav_icon_size_panorama' );
937
+ $iconsize = $icsiz . 'px;';
938
+ $lightbox = $args['lightbox'];
939
+ $controls = $args['controls'];
940
+ $autorun = $args['autorun'];
941
+ $manual = $args['manual'];
942
+ $autorunspeed = $args['autorunspeed'];
943
+ $zoomsensitivity = $args['zoomsensitivity'];
944
+
945
+ switch ( $autorun ) {
946
+ case 'right':
947
+ $deltaX = $autorunspeed / 3;
948
+ break;
949
+ case 'left':
950
+ $deltaX = - $autorunspeed / 3;
951
+ break;
952
+ default:
953
+ $deltaX = '0';
954
+ }
955
+
956
+ $url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
957
+
958
+ $result =
959
+ ( $lightbox ? $id . '.' : '' ) .
960
+ ( $haslink ? '</a>' : '' ) .
961
+
962
+ // The overall container
963
+ ( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
964
+
965
+ // The canvas container
966
+ '<div
967
+ id="wppa-pan-div-' . $mocc . '"
968
+ class="wppa-pan-div wppa-pan-div-' . $mocc . '"
969
+ style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . 'line-height:0;"
970
+ >' .
971
+
972
+ // The actual drawing area
973
+ '<canvas
974
+ id="wppa-pan-canvas-' . $mocc . '"
975
+ style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
976
+ width="' . $width . '"
977
+ height="' . ( $width / 2 ) . '"
978
+ ></canvas>' .
979
+
980
+ // The preview image
981
+ '<canvas
982
+ id="wppa-pan-prev-canvas-' . $mocc . '"
983
+ style="margin-top:4px;background-color:black;"
984
+ width="' . $width . '"
985
+ height=' . $height . '"
986
+ ></canvas>
987
+
988
+ </div>' .
989
+
990
+ // The controlbar
991
+ ( $controls ?
992
+ '<div
993
+ id="wppa-pctl-div-' . $mocc . '"
994
+ class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
995
+ style="text-align:center;"
996
+ >' .
997
+ ( $lightbox ?
998
+ '<span
999
+ id="wppa-pctl-prev-' . $mocc . '"
1000
+ class="wppa-pan-prevnext"
1001
+ style="margin:0 2px 0 0;float:left;display:inline-block;"
1002
+ >' .
1003
+ wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
1004
+ '</span>'
1005
+ :
1006
+ ''
1007
+ ) .
1008
+ '<span
1009
+ id="wppa-pctl-left-' . $mocc . '"
1010
+ style="margin:0 2px;display:inline-block;"
1011
+ >' .
1012
+ wppa_get_svghtml( 'Left-4', $iconsize, true ) .
1013
+ '</span>
1014
+ <span
1015
+ id="wppa-pctl-right-' . $mocc . '"
1016
+ style="margin:0 2px;display:inline-block;"
1017
+ >' .
1018
+ wppa_get_svghtml( 'Right-4', $iconsize, true ) .
1019
+ '</span>
1020
+ <span
1021
+ id="wppa-pctl-up-' . $mocc . '"
1022
+ style="margin:0 2px;display:inline-block;"
1023
+ >' .
1024
+ wppa_get_svghtml( 'Up-4', $iconsize, true ) .
1025
+ '</span>
1026
+ <span
1027
+ id="wppa-pctl-down-' . $mocc . '"
1028
+ style="margin:0 2px;display:inline-block;"
1029
+ >' .
1030
+ wppa_get_svghtml( 'Down-4', $iconsize, true ) .
1031
+ '</span>
1032
+ <span
1033
+ id="wppa-pctl-zoomin-' . $mocc . '"
1034
+ style="margin:0 2px;display:inline-block;"
1035
+ >' .
1036
+ wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
1037
+ '</span>
1038
+ <span
1039
+ id="wppa-pctl-zoomout-' . $mocc . '"
1040
+ style="margin:0 2px;display:inline-block;"
1041
+ >' .
1042
+ wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
1043
+ '</span>' .
1044
+ ( $lightbox ?
1045
+ '<span
1046
+ id="wppa-pctl-next-' . $mocc . '"
1047
+ class="wppa-pan-prevnext"
1048
+ style="margin:0 0 0 2px;float:right;display:inline-block;"
1049
+ >' .
1050
+ wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
1051
+ '</span>'
1052
+ :
1053
+ ''
1054
+ ) .
1055
+ '</div>'
1056
+ :
1057
+ '' ) .
1058
+
1059
+ ( $lightbox ? '</div>' : '' ) .
1060
+
1061
+ '<script>' .
1062
+
1063
+ // Create image object and add the image url to it
1064
+ 'var image' . $mocc . ' = new Image();
1065
+ image' . $mocc . '.src = "' . $url . '";' .
1066
+
1067
+ // When document complete, run the main proc
1068
+ 'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
1069
+
1070
+ // The main proccedure
1071
+ 'function wppaDoFlatPanorama' . $mocc . '(){' .
1072
+
1073
+ // Wait until the image file has been completely loaded
1074
+ 'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 100 );return;}' .
1075
+
1076
+ // Var declarations
1077
+ 'var
1078
+ $ = jQuery,
1079
+ manualControl = false,
1080
+ zoomsensitivity = ' . $zoomsensitivity . ',
1081
+ deltaX = ' . $deltaX . ',
1082
+ deltaY = 0,
1083
+ deltaFactor = 1.0,
1084
+ autorun = ' . ( $autorun ? 'true' : 'false' ) . ',
1085
+ run = deltaX ? 5 : 4,
1086
+ busy = false,
1087
+ abort = false,
1088
+ div = $("#wppa-pan-div-' . $mocc . '"),
1089
+ canvas = document.getElementById("wppa-pan-canvas-' . $mocc . '"),
1090
+ prevCanvas = document.getElementById("wppa-pan-prev-canvas-' . $mocc . '"),
1091
+ left = $("#wppa-pctl-left-' . $mocc . '"),
1092
+ right = $("#wppa-pctl-right-' . $mocc . '"),
1093
+ up = $("#wppa-pctl-up-' . $mocc . '"),
1094
+ down = $("#wppa-pctl-down-' . $mocc . '"),
1095
+ zoomin = $("#wppa-pctl-zoomin-' . $mocc . '"),
1096
+ zoomout = $("#wppa-pctl-zoomout-' . $mocc . '"),
1097
+ prev = $("#wppa-pctl-prev-' . $mocc . '"),
1098
+ next = $("#wppa-pctl-next-' . $mocc . '"),
1099
+ canvasWidth = $(div).parent().width(),
1100
+ canvasHeight = canvasWidth / 2,
1101
+ savedCanvasX = 0,
1102
+ savedCanvasY = 0,
1103
+ fromHeight = image' . $mocc . '.height / 2,
1104
+ fromWidth = fromHeight * 2,
1105
+ fromX = ( image' . $mocc . '.width - fromWidth ) / 2,
1106
+ fromY = ( image' . $mocc . '.height - fromHeight ) / 2,
1107
+ centerX = fromX + fromWidth / 2,
1108
+ centerY = fromY + fromHeight / 2;' .
1109
+
1110
+ // Install listeners
1111
+ ( wppa_is_mobile() ?
1112
+ 'right.on("touchstart", onRightMouseDown);
1113
+ right.on("touchend", onButtonUp);
1114
+ left.on("touchstart", onLeftMouseDown);
1115
+ left.on("touchend", onButtonUp);
1116
+ up.on("touchstart", onUpMouseDown);
1117
+ up.on("touchend", onButtonUp);
1118
+ down.on("touchstart", onDownMouseDown);
1119
+ down.on("touchend", onButtonUp);
1120
+ zoomin.on("touchstart", onZoomInMouseDown);
1121
+ zoomin.on("touchend", onButtonUp);
1122
+ zoomout.on("touchstart", onZoomOutMouseDown);
1123
+ zoomout.on("touchend", onButtonUp);'
1124
+ :
1125
+ ( $manual ?
1126
+ 'canvas.addEventListener("mousedown", onCanvasMouseDown);
1127
+ canvas.addEventListener("mousemove", onCanvasMouseMove);
1128
+ canvas.addEventListener("mouseup", onCanvasMouseUp);
1129
+ canvas.addEventListener("mouseout", onCanvasMouseUp);
1130
+ document.getElementById("wppa-pan-canvas-' . $mocc . '").addEventListener("wheel", onDivWheel);
1131
+ prevCanvas.addEventListener("mousedown", onCanvasMouseDown);
1132
+ prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove);
1133
+ prevCanvas.addEventListener("mouseup", onCanvasMouseUp);
1134
+ prevCanvas.addEventListener("mouseout", onCanvasMouseUp);' : '' ) .
1135
+ 'right.on("mousedown", onRightMouseDown);
1136
+ right.on("mouseup", onButtonUp);
1137
+ left.on("mousedown", onLeftMouseDown);
1138
+ left.on("mouseup", onButtonUp);
1139
+ up.on("mousedown", onUpMouseDown);
1140
+ up.on("mouseup", onButtonUp);
1141
+ down.on("mousedown", onDownMouseDown);
1142
+ down.on("mouseup", onButtonUp);
1143
+ zoomin.on("mousedown", onZoomInMouseDown);
1144
+ zoomin.on("mouseup", onButtonUp);
1145
+ zoomout.on("mousedown", onZoomOutMouseDown);
1146
+ zoomout.on("mouseup", onButtonUp);'
1147
+ ) .
1148
+
1149
+ // Common event handlers
1150
+ ( $lightbox ? '
1151
+ $("#wppa-fulls-btn").on("click", function(){abort=true;});
1152
+ if (prev) {
1153
+ prev.on("click", panPrev);
1154
+ next.on("click", panNext);
1155
+ }' : '' ) .
1156
+
1157
+ // Install Resize handler
1158
+ '$(window).on("DOMContentLoaded load resize orientationchange",onResize' . $mocc . ');' .
1159
+
1160
+ // Remove spinner
1161
+ '$("#wppa-ovl-spin").hide();' .
1162
+
1163
+ // Do the rendering
1164
+ 'render();' .
1165
+
1166
+ // Resize
1167
+ 'onResize' . $mocc . '();' .
1168
+
1169
+ // The render function
1170
+ 'function render(){' .
1171
+
1172
+ ( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
1173
+ 'if (abort) {
1174
+ ctx = null;
1175
+ prevctx = null;
1176
+ return;
1177
+ }
1178
+ if (run==0) return;
1179
+ if (busy) return;
1180
+ busy = true;' .
1181
+
1182
+ ( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
1183
+
1184
+ // manualControl is true when a drag on the canvas is being performed
1185
+ 'if(!manualControl){' .
1186
+
1187
+ // Panning
1188
+ 'fromX += deltaX;
1189
+ fromY += deltaY;' .
1190
+
1191
+ // Zooming
1192
+ 'var newHeight = fromHeight / deltaFactor;
1193
+ var newWidth = fromWidth / deltaFactor;' .
1194
+
1195
+ // Keep zooming in range
1196
+ 'if ( deltaFactor != 1 && newHeight <= image' . $mocc . '.height && newHeight > 50 ) {
1197
+ fromX -= ( newWidth - fromWidth ) / 2;
1198
+ fromY -= ( newHeight - fromHeight ) / 2;
1199
+ fromWidth = newWidth;
1200
+ fromHeight = newHeight;
1201
+ }
1202
+ }' .
1203
+
1204
+ // Keep viewport within image boundaries
1205
+ 'fromX = Math.max(0, Math.min(image' . $mocc . '.width-fromWidth, fromX));' .
1206
+ 'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
1207
+
1208
+ // Check for turningpoint in case autrun
1209
+ 'if ( autorun ) {
1210
+ if ( fromX == 0 || fromX == ( image' . $mocc . '.width-fromWidth ) ) {
1211
+ deltaX *= -1;
1212
+ }
1213
+ }' .
1214
+
1215
+ // Draw the image
1216
+ 'var ctx = canvas.getContext("2d");' .
1217
+ 'ctx.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvas.width,canvas.height);' .
1218
+
1219
+ // Draw the preview image
1220
+ 'var prevctx = prevCanvas.getContext("2d");' .
1221
+ 'prevctx.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
1222
+ 'prevctx.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
1223
+
1224
+ // Draw viewport rect on preview image
1225
+ 'var factor = prevCanvas.width / image' . $mocc . '.width;' .
1226
+ 'prevctx.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
1227
+
1228
+ // Done so far
1229
+ 'busy = false;' .
1230
+
1231
+ // Re-render if needed
1232
+ 'if (run>0) {' .
1233
+ 'if (manualControl||autorun){setTimeout(function(){render()},25);}' .
1234
+ 'else {setTimeout(function(){render()},5);}' .
1235
+ '}
1236
+ if(run<5)run--;' .
1237
+ '}' .
1238
+
1239
+ // Previous
1240
+ 'function panPrev(e) {
1241
+ e.preventDefault();
1242
+ abort = true;
1243
+ var stop;
1244
+ if ( ! stop ) {
1245
+ stop = true;
1246
+ $(this).css({opacity:0.5});
1247
+ $("#wppa-overlay-ic").css({display:"none"});
1248
+ $("#wppa-ovl-spin").show();
1249
+ wppaOvlShowPrev();
1250
+ }
1251
+ }' .
1252
+
1253
+ // Next
1254
+ 'function panNext(e) {
1255
+ e.preventDefault();
1256
+ abort = true;
1257
+ var stop;
1258
+ if ( ! stop ) {
1259
+ stop = true;
1260
+ $(this).css({opacity:0.5});
1261
+ $("#wppa-overlay-ic").css({display:"none"});
1262
+ $("#wppa-ovl-spin").show();
1263
+ wppaOvlShowNext();
1264
+ }
1265
+ }' .
1266
+
1267
+ // Horizontal movement by button
1268
+ 'function onRightMouseDown(e){
1269
+ e.preventDefault();
1270
+ run=5;deltaX=3;render();
1271
+ }' .
1272
+
1273
+ 'function onLeftMouseDown(e){
1274
+ e.preventDefault();
1275
+ run=5;deltaX=-3;render();
1276
+ }' .
1277
+
1278
+ // Vertical movement by button
1279
+ 'function onUpMouseDown(e){
1280
+ e.preventDefault();
1281
+ run=5;deltaY=-3;render();
1282
+ }' .
1283
+
1284
+ 'function onDownMouseDown(e){
1285
+ e.preventDefault();
1286
+ run=5;deltaY=3;render();
1287
+ }' .
1288
+
1289
+ // Zooming
1290
+ 'function onZoomInMouseDown(e){
1291
+ e.preventDefault();
1292
+ run=5;deltaFactor=1.005;render();
1293
+ }' .
1294
+
1295
+ 'function onZoomOutMouseDown(e){
1296
+ e.preventDefault();
1297
+ run=5;deltaFactor=0.995;render();
1298
+ }' .
1299
+
1300
+ // Mouse wheel
1301
+ 'function onDivWheel(e) {
1302
+ e.preventDefault();
1303
+ run=(autorun?5:4);
1304
+ deltaFactor = 1 + e.deltaY * zoomsensitivity / 1000;
1305
+ if ( ! autorun ) render();
1306
+ setTimeout(function(){deltaFactor = 1}, 25);
1307
+ e.stopPropagation();
1308
+ }' .
1309
+
1310
+ // When a navigation button is released, stop and reset all deltas
1311
+ 'function onButtonUp(e) {
1312
+ e.preventDefault();
1313
+ deltaX=0;deltaY=0;deltaFactor=1;
1314
+ if ( ! ' . $lightbox . ' ) run--;
1315
+ run=4;
1316
+ }' .
1317
+
1318
+ // When a (responsive) resize is required, we resize the wppaScene
1319
+ 'function onResize' . $mocc . '(e){' .
1320
+
1321
+ 'if (abort) return;' .
1322
+
1323
+ ( $lightbox ?
1324
+
1325
+ // Show image container
1326
+ '$("#wppa-overlay-ic").css("display", "");' .
1327
+
1328
+ // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1329
+ 'var widthIsLim,
1330
+ modeIsNormal = wppaOvlMode == "normal";' .
1331
+
1332
+ // First find container dimensions dependant of mode
1333
+ 'var contWidth, contHeight;
1334
+
1335
+ if ( modeIsNormal ) {
1336
+ contWidth = window.innerWidth ? window.innerWidth : screen.width;
1337
+ contHeight = window.innerHeight ? window.innerHeight : screen.height;
1338
+ }
1339
+ else {
1340
+ contWidth = screen.width;
1341
+ contHeight = screen.height;
1342
+ }
1343
+ newWidth = parseInt(newWidth);
1344
+ newHeight = parseInt(newHeight);
1345
+ ' .
1346
+
1347
+ // Initialize new display sizes
1348
+ 'var newWidth,
1349
+ newHeight,
1350
+ topMarg,
1351
+ leftMarg,
1352
+ extraX = 8,
1353
+ extraY = 24 + ' . ( $controls ? $icsiz : 0 ) . ' + contWidth * ' . $height . ' / ' . $width . ' + 40;' .
1354
+
1355
+ // Add borderwidth in case of mode == normal
1356
+ 'if ( modeIsNormal ) {
1357
+ extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
1358
+ extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
1359
+ }
1360
+ ' .
1361
+
1362
+ // Find out if the width is the limitng dimension
1363
+ 'widthIsLim = ( contHeight > ( ( contWidth / 2 ) + extraY ) );' .
1364
+
1365
+ // Compute new sizes and margins
1366
+ 'if ( widthIsLim ) {
1367
+ newWidth = contWidth - extraX;
1368
+ newHeight = newWidth / 2;
1369
+ topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
1370
+ '}
1371
+ else {
1372
+ newWidth = 2 * ( contHeight - ' . ( $controls ? $icsiz : 0 ) . ' - 24 - 40 ) / ( 1 + 2 * ' . $height . ' / ' . $width . ' );
1373
+ newHeight = newWidth / 2;
1374
+ topMarg = 20;' .
1375
+
1376
+ '}' .
1377
+
1378
+ // Set css common for all 4 situations
1379
+ '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
1380
+ $("#wppa-overlay-ic").css({marginTop:0});
1381
+
1382
+ canvas.width = newWidth;
1383
+ canvas.height = newHeight;
1384
+ prevCanvas.width = newWidth;
1385
+ prevCanvas.height = newWidth * ' . $height . ' / ' . $width . ';' .
1386
+
1387
+ // Now set css for all 4 situations: Mode is normal
1388
+ 'if ( modeIsNormal ) {' .
1389
+
1390
+ // Common for mode normal
1391
+ '$("#wppa-ovl-pan-container").css({
1392
+ backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
1393
+ padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
1394
+ borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
1395
+ width:newWidth,
1396
+ marginLeft:0
1397
+ });
1398
+ $( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
1399
+
1400
+ // Limit specific
1401
+ 'if ( widthIsLim ) {
1402
+ $("#wppa-overlay-ic").css({marginLeft:4});
1403
+ }
1404
+ else {
1405
+ $("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
1406
+ }
1407
+
1408
+ }' .
1409
+
1410
+ // Mode is fullscreen
1411
+ 'else {' .
1412
+
1413
+ // Common for mode fullscreen
1414
+ '$("#wppa-overlay-ic").css({marginLeft:0});
1415
+ $("#wppa-ovl-pan-container").css({
1416
+ backgroundColor:"transparent",
1417
+ padding:0,
1418
+ borderRadius:0,
1419
+ width:newWidth,
1420
+ marginLeft:(contWidth-newWidth)/2
1421
+ });
1422
+ $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});' .
1423
+
1424
+ /*
1425
+
1426
+ if ( widthIsLim ) {
1427
+ $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
1428
+ }
1429
+ else {
1430
+ $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:(contWidth-newWidth)/2});
1431
+
1432
+ } */ '
1433
+ }' .
1434
+
1435
+ 'run=(autorun?5:4);
1436
+ render();
1437
+
1438
+ ' :
1439
+ 'canvasWidth = $(div).parent().width();' .
1440
+ 'canvasHeight = canvasWidth / 2;' .
1441
+ 'canvas.width = canvasWidth;' .
1442
+ 'canvas.height = canvasHeight;' .
1443
+ 'prevCanvas.width = canvasWidth;' .
1444
+ 'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
1445
+ 'run=(autorun?5:4);' .
1446
+ 'render();'
1447
+ ) .
1448
 
1449
+ '}' .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
 
1451
+ // when the mouse is pressed on the canvas, we switch to manual control and save current coordinates
1452
+ 'function onCanvasMouseDown(e){
1453
 
1454
+ e.preventDefault();
 
1455
 
1456
+ manualControl = true;
 
 
1457
 
1458
+ savedCanvasX = e.offsetX;
1459
+ savedCanvasY = e.offsetY;
 
1460
 
1461
+ run=5;
1462
+ render();
 
 
 
 
 
 
1463
 
1464
+ }' .
 
 
1465
 
1466
+ 'function onCanvasMouseMove(e){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1467
 
1468
+ var factor = canvas.width / fromWidth;
 
1469
 
1470
+ if ( manualControl ){
 
1471
 
1472
+ var x = ( savedCanvasX - e.offsetX ) / factor + fromX;
1473
+ var y = ( savedCanvasY - e.offsetY ) / factor + fromY;
 
 
 
 
 
 
 
 
1474
 
1475
+ if ( x > 0 && y > 0 && ( x + fromWidth ) < image' . $mocc . '.width && ( y + fromHeight ) < image' . $mocc . '.height ) {
1476
 
1477
+ fromX = x;
1478
+ fromY = y;
1479
 
1480
+ savedCanvasX = e.offsetX;
1481
+ savedCanvasY = e.offsetY;
1482
+ }
1483
+ }
1484
+ }' .
1485
 
1486
+ 'function onPrevCanvasMouseMove(e){
1487
 
1488
+ var factor = prevCanvas.width / image' . $mocc . '.width;
 
1489
 
1490
+ if (e.offsetX > factor * fromX &&
1491
+ e.offsetX < factor * ( fromX + fromWidth ) &&
1492
+ e.offsetY > factor * fromY &&
1493
+ e.offsetY < factor * ( fromY + fromHeight ) ) {
1494
 
1495
+ $(prevCanvas).css("cursor","grab");
1496
+ }
1497
+ else {
1498
+ $(prevCanvas).css("cursor","default");
1499
+ }
1500
 
1501
+ if ( manualControl && !busy ){
1502
 
1503
+ if (e.offsetX > factor * fromX &&
1504
+ e.offsetX < factor * ( fromX + fromWidth ) &&
1505
+ e.offsetY > factor * fromY &&
1506
+ e.offsetY < factor * ( fromY + fromHeight ) ) {
1507
 
1508
+ fromX = ( e.offsetX - savedCanvasX ) / factor + fromX;
1509
+ fromY = ( e.offsetY - savedCanvasY ) / factor + fromY;
 
 
 
 
 
 
 
 
 
 
 
 
 
1510
 
1511
+ savedCanvasX = e.offsetX;
1512
+ savedCanvasY = e.offsetY;
1513
 
1514
+ }
1515
+ }
1516
+ }' .
1517
 
1518
+ 'function onCanvasMouseUp(e){
 
 
 
1519
 
1520
+ if ( manualControl ) {
1521
+ run=4;
1522
+ manualControl = false;
1523
+ }
1524
+ }' .
1525
+ '}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1526
 
1527
+ </script>
1528
+ ' . ( $haslink ? '<a>' : '' ) . '';
1529
 
1530
+ return wppa_pan_min( $result );
1531
  }
1532
 
1533
  // Minimize inine mixed html / js code
1534
  function wppa_pan_min( $result ) {
1535
+ // return $result; // debug
1536
+ // wppa_log('dbg','voor len='.strlen($result));
1537
 
1538
+ // Remove tabs
1539
+ $result = str_replace( "\t", '', $result );
1540
 
1541
+ // Remove newlines
1542
+ $result = str_replace( array( "\r\n", "\n\r", "\n", "\r" ), ' ', $result );
1543
 
1544
+ // Trim operators
1545
+ $result = str_replace( array( ' = ',' + ',' * ',' / ' ), array( '=','+','*','/' ), $result );
1546
 
1547
+ // Replace multiple spaces by one
1548
+ $olen = 0;
1549
+ $nlen = strlen( $result );
1550
+ do {
1551
+ $olen = $nlen;
1552
+ $result = str_replace( ' ', ' ', $result );
1553
+ $nlen = strlen( $result );
1554
+ } while ( $nlen != $olen );
1555
 
1556
+ // Trim , ; and !
1557
+ $result = str_replace( array( ', ', '; ', '! ' ), array( ',', ';', '!' ), $result );
1558
 
1559
+ // Trim braces
1560
+ $result = str_replace( array( ' ) ', ') ', ' )' ), ')', $result );
1561
+ $result = str_replace( array( ' ( ', '( ', ' (' ), '(', $result );
1562
 
1563
+ // Remove space between html tags
1564
+ $result = str_replace( '> <', '><', $result );
1565
 
1566
+ // wppa_log('dbg',' na len='.strlen($result));
1567
+ // wppa_dump($result);
1568
+ return $result;
1569
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.2.14
7
  *
8
  */
9
 
@@ -1123,7 +1123,7 @@ global $wppa_supported_camara_brands;
1123
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
1124
 
1125
  $name = __('Slideonly max', 'wp-photo-album-plus');
1126
- $desc = __('The max number of slides in a slideonly display', 'wp-photo-album-plus');
1127
  $help = '';
1128
  $slug = 'wppa_slideonly_max';
1129
  $html = wppa_input($slug, '40px', '', __('slides', 'wp-photo-album-plus'));
@@ -2049,6 +2049,15 @@ global $wppa_supported_camara_brands;
2049
  $clas = '';
2050
  $tags = 'slide,navi';
2051
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
 
 
 
 
 
 
 
 
 
2052
 
2053
  $name = __('Browse bar', 'wp-photo-album-plus');
2054
  $desc = __('Show Browse photos bar.', 'wp-photo-album-plus');
@@ -4592,7 +4601,7 @@ global $wppa_supported_camara_brands;
4592
 
4593
  $name = __('Auto open comments', 'wp-photo-album-plus');
4594
  $desc = __('Automatic opens comments box when slideshow does not run.', 'wp-photo-album-plus');
4595
- $help = '';
4596
  $slug = 'wppa_auto_open_comments';
4597
  $html = wppa_checkbox($slug);
4598
  $clas = '';
@@ -4626,6 +4635,15 @@ global $wppa_supported_camara_brands;
4626
  $tags = 'slide,system';
4627
  wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
4628
 
 
 
 
 
 
 
 
 
 
4629
  }
4630
  wppa_setting_subheader( 'C', '1', __( 'Thumbnail related settings' , 'wp-photo-album-plus') );
4631
  {
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.2.16
7
  *
8
  */
9
 
1123
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
1124
 
1125
  $name = __('Slideonly max', 'wp-photo-album-plus');
1126
+ $desc = __('The max number of slides in a slideonly or filmonly display', 'wp-photo-album-plus');
1127
  $help = '';
1128
  $slug = 'wppa_slideonly_max';
1129
  $html = wppa_input($slug, '40px', '', __('slides', 'wp-photo-album-plus'));
2049
  $clas = '';
2050
  $tags = 'slide,navi';
2051
  wppa_setting($slug, '1', $name, $desc, $html, $help, $clas, $tags);
2052
+
2053
+ $name = __('Start/stop on Filmonly');
2054
+ $desc = __('Show the Start/Stop slideshow bar on filmonly displays.', 'wp-photo-album-plus');
2055
+ $help = '';
2056
+ $slug = 'wppa_show_startstop_filmonly';
2057
+ $html = wppa_checkbox($slug);
2058
+ $clas = '';
2059
+ $tags = 'slide,navi';
2060
+ wppa_setting($slug, '1.1', $name, $desc, $html, $help, $clas, $tags);
2061
 
2062
  $name = __('Browse bar', 'wp-photo-album-plus');
2063
  $desc = __('Show Browse photos bar.', 'wp-photo-album-plus');
4601
 
4602
  $name = __('Auto open comments', 'wp-photo-album-plus');
4603
  $desc = __('Automatic opens comments box when slideshow does not run.', 'wp-photo-album-plus');
4604
+ $help = __('Works also on type="xphoto"', 'wp-photo-album-plus');
4605
  $slug = 'wppa_auto_open_comments';
4606
  $html = wppa_checkbox($slug);
4607
  $clas = '';
4635
  $tags = 'slide,system';
4636
  wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
4637
 
4638
+ $name = __('Filmonly continu', 'wp-photo-album-plus');
4639
+ $desc = __('The filmstrip will move almost continously', 'wp-photo-album-plus');
4640
+ $help = '';
4641
+ $slug = 'wppa_filmonly_continuous';
4642
+ $html = wppa_checkbox($slug);
4643
+ $clas = '';
4644
+ $tags = 'slide,system';
4645
+ wppa_setting($slug, '16', $name, $desc, $html, $help, $clas, $tags);
4646
+
4647
  }
4648
  wppa_setting_subheader( 'C', '1', __( 'Thumbnail related settings' , 'wp-photo-album-plus') );
4649
  {
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 7.2.15
7
  *
8
  */
9
 
@@ -959,6 +959,7 @@ cursorborder:'2px solid transparent',";
959
  // B Slideshow
960
  'wppa_navigation_type' => 'icons', // 0
961
  'wppa_show_startstop_navigation' => 'yes', // 1
 
962
  'wppa_show_browse_navigation' => 'yes', // 2
963
  'wppa_filmstrip' => 'yes', // 3
964
  'wppa_film_show_glue' => 'yes', // 4
@@ -1320,6 +1321,7 @@ cursorborder:'2px solid transparent',";
1320
  'wppa_film_hover_goto' => 'no',
1321
  'wppa_slide_swipe' => 'no',
1322
  'wppa_slideshow_page_allow_ajax' => 'yes',
 
1323
 
1324
  // C Thumbnail
1325
  'wppa_list_photos_by' => '0',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 7.2.16
7
  *
8
  */
9
 
959
  // B Slideshow
960
  'wppa_navigation_type' => 'icons', // 0
961
  'wppa_show_startstop_navigation' => 'yes', // 1
962
+ 'wppa_show_startstop_filmonly' => 'no',
963
  'wppa_show_browse_navigation' => 'yes', // 2
964
  'wppa_filmstrip' => 'yes', // 3
965
  'wppa_film_show_glue' => 'yes', // 4
1321
  'wppa_film_hover_goto' => 'no',
1322
  'wppa_slide_swipe' => 'no',
1323
  'wppa_slideshow_page_allow_ajax' => 'yes',
1324
+ 'wppa_filmonly_continuous' => 'no',
1325
 
1326
  // C Thumbnail
1327
  'wppa_list_photos_by' => '0',
wppa-slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
- * Version 7.2.12
7
  *
8
  */
9
 
@@ -232,13 +232,21 @@ function wppa_start_stop_icons( $opt = '' ) {
232
 
233
  // A single image slideshow needs no navigation
234
  if ( wppa( 'is_single' ) ) return;
235
- if ( wppa( 'is_filmonly' ) ) return;
 
 
 
 
 
 
 
236
 
237
  // we always need the js part for the functionality (through filmstrip etc).
238
  // so if not wanted: hide it
239
  $hide = 'display:none; '; // assume hide
240
  if ( $opt != 'optional' ) $hide = ''; // not optional: show
241
  if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
 
242
 
243
  if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
244
  wppa_out( wppa_js( '
@@ -254,14 +262,17 @@ function wppa_start_stop_icons( $opt = '' ) {
254
  wppa_out( '<div' .
255
  ' id="prevnext1-'.wppa( 'mocc' ).'"' .
256
  ' class="wppa-box wppa-nav wppa-nav-text"' .
257
- ' style="text-align:center;'.wppa_wcs('wppa-box').wppa_wcs('wppa-nav').wppa_wcs('wppa-nav-text').$hide.'"' .
258
  ' >' .
259
  '<span' .
260
  ' id="speed0-'.wppa( 'mocc' ).'"' .
261
  ' class="wppa-nav-text speed0"' .
262
- ' style="'.wppa_wcs('wppa-nav-text').'"' .
263
  ' title="' . __('Slower', 'wp-photo-album-plus') . '"' .
264
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"' .
 
 
 
265
  ' >' .
266
  wppa_get_svghtml( 'Snail', $iconsize ) .
267
  '</span>' .
@@ -269,7 +280,7 @@ function wppa_start_stop_icons( $opt = '' ) {
269
  '<span' .
270
  ' id="startstop-'.wppa( 'mocc' ).'"' .
271
  ' class="wppa-nav-text startstop"' .
272
- ' style="'.wppa_wcs('wppa-nav-text').'"' .
273
  ' title="' . __( 'Start / stop slideshow', 'wp-photo-album-plus' ) . '"' .
274
  ' onclick="wppaStartStop(' . wppa( 'mocc' ) . ', -1); return false;"' .
275
  ' >' .
@@ -279,9 +290,13 @@ function wppa_start_stop_icons( $opt = '' ) {
279
  '<span' .
280
  ' id="speed1-'.wppa( 'mocc' ).'"' .
281
  ' class="wppa-nav-text speed1"' .
282
- ' style="'.wppa_wcs('wppa-nav-text').'"' .
283
  ' title="' . __('Faster', 'wp-photo-album-plus') . '"' .
284
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;">' .
 
 
 
 
285
  wppa_get_svghtml( 'Eagle-1', $iconsize ) .
286
  '</span>' .
287
  '</div>' );
@@ -293,13 +308,21 @@ function wppa_start_stop_text( $opt = '' ) {
293
 
294
  // A single image slideshow needs no navigation
295
  if ( wppa( 'is_single' ) ) return;
296
- if ( wppa( 'is_filmonly' ) ) return;
 
 
 
 
 
 
 
297
 
298
  // we always need the js part for the functionality (through filmstrip etc).
299
  // so if not wanted: hide it
300
  $hide = 'display:none; '; // assume hide
301
  if ( $opt != 'optional' ) $hide = ''; // not optional: show
302
  if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
 
303
 
304
  if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
305
  wppa_out( wppa_js( '
@@ -319,7 +342,10 @@ function wppa_start_stop_text( $opt = '' ) {
319
  ' id="speed0-'.wppa( 'mocc' ).'"' .
320
  ' class="wppa-nav-text speed0"' .
321
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
322
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"' .
 
 
 
323
  ' >' .
324
  __('Slower', 'wp-photo-album-plus') .
325
  '</a>' .
@@ -336,7 +362,11 @@ function wppa_start_stop_text( $opt = '' ) {
336
  ' id="speed1-'.wppa( 'mocc' ).'"' .
337
  ' class="wppa-nav-text speed1"' .
338
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
339
- ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;">' .
 
 
 
 
340
  __('Faster', 'wp-photo-album-plus') .
341
  '</a>' .
342
  '</div>' );
@@ -1280,7 +1310,7 @@ function wppa_slide_filmstrip( $opt = '' ) {
1280
  ' >' .
1281
  '<span' .
1282
  ' class="wppa-first-'.wppa( 'mocc' ).' wppa-arrow"' .
1283
- ' style="'.wppa_wcs('wppa-arrow').'"' .
1284
  ' id="first-film-arrow-'.wppa( 'mocc' ).'"' .
1285
  ' onclick="wppaFirst('.wppa( 'mocc' ).');"' .
1286
  ' title="'.__('First', 'wp-photo-album-plus').'"' .
@@ -1294,7 +1324,7 @@ function wppa_slide_filmstrip( $opt = '' ) {
1294
  ' >' .
1295
  '<span' .
1296
  ' class="wppa-last-'.wppa( 'mocc' ).' wppa-arrow"' .
1297
- ' style="'.wppa_wcs('wppa-arrow').'"' .
1298
  ' id="last-film-arrow-'.wppa( 'mocc' ).'"' .
1299
  ' onclick="wppaLast('.wppa( 'mocc' ).');"' .
1300
  ' title="'.__('Last', 'wp-photo-album-plus').'"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 7.2.16
7
  *
8
  */
9
 
232
 
233
  // A single image slideshow needs no navigation
234
  if ( wppa( 'is_single' ) ) return;
235
+ if ( wppa( 'is_filmonly' ) && ! wppa_switch( 'show_startstop_filmonly' ) ) return;
236
+ if ( wppa( 'is_filmonly' ) && wppa_switch( 'show_startstop_filmonly' ) ) {
237
+ $filmonlynav = true;
238
+ }
239
+ else {
240
+ $filmonlynav = false;
241
+ }
242
+ $Filmonlynavcontin = $filmonlynav && wppa_switch ( 'filmonly_continuous' );
243
 
244
  // we always need the js part for the functionality (through filmstrip etc).
245
  // so if not wanted: hide it
246
  $hide = 'display:none; '; // assume hide
247
  if ( $opt != 'optional' ) $hide = ''; // not optional: show
248
  if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
249
+ if ( $filmonlynav ) $hide = '';
250
 
251
  if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
252
  wppa_out( wppa_js( '
262
  wppa_out( '<div' .
263
  ' id="prevnext1-'.wppa( 'mocc' ).'"' .
264
  ' class="wppa-box wppa-nav wppa-nav-text"' .
265
+ ' style="text-align:center;'.wppa_wcs('wppa-box').wppa_wcs('wppa-nav').wppa_wcs('wppa-nav-text').$hide.'line-height:0;"' .
266
  ' >' .
267
  '<span' .
268
  ' id="speed0-'.wppa( 'mocc' ).'"' .
269
  ' class="wppa-nav-text speed0"' .
270
+ ' style="'.wppa_wcs('wppa-nav-text').'display:inline-block;"' .
271
  ' title="' . __('Slower', 'wp-photo-album-plus') . '"' .
272
+ ( $Filmonlynavcontin ?
273
+ ' onclick="wppaAnimationSpeed*=1.25;";' :
274
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"'
275
+ ) .
276
  ' >' .
277
  wppa_get_svghtml( 'Snail', $iconsize ) .
278
  '</span>' .
280
  '<span' .
281
  ' id="startstop-'.wppa( 'mocc' ).'"' .
282
  ' class="wppa-nav-text startstop"' .
283
+ ' style="'.wppa_wcs('wppa-nav-text').'display:inline-block;"' .
284
  ' title="' . __( 'Start / stop slideshow', 'wp-photo-album-plus' ) . '"' .
285
  ' onclick="wppaStartStop(' . wppa( 'mocc' ) . ', -1); return false;"' .
286
  ' >' .
290
  '<span' .
291
  ' id="speed1-'.wppa( 'mocc' ).'"' .
292
  ' class="wppa-nav-text speed1"' .
293
+ ' style="'.wppa_wcs('wppa-nav-text').'display:inline-block;"' .
294
  ' title="' . __('Faster', 'wp-photo-album-plus') . '"' .
295
+ ( $Filmonlynavcontin ?
296
+ ' onclick="wppaAnimationSpeed*=0.8;";' :
297
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;"'
298
+ ) .
299
+ ' >' .
300
  wppa_get_svghtml( 'Eagle-1', $iconsize ) .
301
  '</span>' .
302
  '</div>' );
308
 
309
  // A single image slideshow needs no navigation
310
  if ( wppa( 'is_single' ) ) return;
311
+ if ( wppa( 'is_filmonly' ) && ! wppa_switch( 'show_startstop_filmonly' ) ) return;
312
+ if ( wppa( 'is_filmonly' ) && wppa_switch( 'show_startstop_filmonly' ) ) {
313
+ $filmonlynav = true;
314
+ }
315
+ else {
316
+ $filmonlynav = false;
317
+ }
318
+ $Filmonlynavcontin = $filmonlynav && wppa_switch ( 'filmonly_continuous' );
319
 
320
  // we always need the js part for the functionality (through filmstrip etc).
321
  // so if not wanted: hide it
322
  $hide = 'display:none; '; // assume hide
323
  if ( $opt != 'optional' ) $hide = ''; // not optional: show
324
  if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
325
+ if ( $filmonlynav ) $hide = '';
326
 
327
  if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
328
  wppa_out( wppa_js( '
342
  ' id="speed0-'.wppa( 'mocc' ).'"' .
343
  ' class="wppa-nav-text speed0"' .
344
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
345
+ ( $Filmonlynavcontin ?
346
+ ' onclick="wppaAnimationSpeed*=1.25;";' :
347
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', false); return false;"'
348
+ ) .
349
  ' >' .
350
  __('Slower', 'wp-photo-album-plus') .
351
  '</a>' .
362
  ' id="speed1-'.wppa( 'mocc' ).'"' .
363
  ' class="wppa-nav-text speed1"' .
364
  ' style="'.wppa_wcs('wppa-nav-text').'"' .
365
+ ( $Filmonlynavcontin ?
366
+ ' onclick="wppaAnimationSpeed*=0.8;";' :
367
+ ' onclick="wppaSpeed('.wppa( 'mocc' ).', true); return false;"'
368
+ ) .
369
+ ' >' .
370
  __('Faster', 'wp-photo-album-plus') .
371
  '</a>' .
372
  '</div>' );
1310
  ' >' .
1311
  '<span' .
1312
  ' class="wppa-first-'.wppa( 'mocc' ).' wppa-arrow"' .
1313
+ ' style="'.wppa_wcs('wppa-arrow').'display:inline-block;"' .
1314
  ' id="first-film-arrow-'.wppa( 'mocc' ).'"' .
1315
  ' onclick="wppaFirst('.wppa( 'mocc' ).');"' .
1316
  ' title="'.__('First', 'wp-photo-album-plus').'"' .
1324
  ' >' .
1325
  '<span' .
1326
  ' class="wppa-last-'.wppa( 'mocc' ).' wppa-arrow"' .
1327
+ ' style="'.wppa_wcs('wppa-arrow').'display:inline-block;"' .
1328
  ' id="last-film-arrow-'.wppa( 'mocc' ).'"' .
1329
  ' onclick="wppaLast('.wppa( 'mocc' ).');"' .
1330
  ' title="'.__('Last', 'wp-photo-album-plus').'"' .
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 7.2.07
9
  *
10
  */
11
 
@@ -27,6 +27,7 @@ global $wpdb;
27
 
28
  // Initialize
29
  $result = '';
 
30
 
31
  // Encrypted photo id
32
  $xid = wppa_encrypt_photo( $id );
@@ -54,10 +55,10 @@ global $wpdb;
54
 
55
  // Get class depending of comment alt display
56
  if ( $com_alt ) {
57
- $class = 'thumbnail-frame-comalt thumbnail-frame-comalt-'.wppa( 'mocc' ).' thumbnail-frame-photo-'.$xid;
58
  }
59
  else {
60
- $class = 'thumbnail-frame thumbnail-frame-'.wppa( 'mocc' ).' thumbnail-frame-photo-'.$xid;
61
  }
62
 
63
  // If no image to display, die gracefully
@@ -132,7 +133,7 @@ global $wpdb;
132
 
133
  // Open the thumbframe
134
  $result .= '<div' .
135
- ' id="thumbnail_frame_'.$xid.'_'.wppa( 'mocc' ).'"' .
136
  ' class="'.$class.'"' .
137
  ' style="'.$framestyle.'"' .
138
  ' >';
@@ -212,14 +213,14 @@ global $wpdb;
212
  // The a img ajax
213
  $p = wppa( 'calendar') ? '' : '&amp;wppa-photo=' . $xid;
214
  $onclick = 'wppaDoAjaxRender( ' .
215
- wppa( 'mocc' ) . ', \'' .
216
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( wppa( 'start_album' ), '0' ) ) .
217
  '&amp;wppa-photo=' . $xid .
218
  '\', \'' .
219
  wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( wppa( 'start_album' ), '0' ) . $p ) ) .
220
  '\' )';
221
 
222
- $result .= '<a style="position:static;" class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'">';
223
 
224
  // Video?
225
  if ( $is_video ) {
@@ -231,7 +232,7 @@ global $wpdb;
231
  'controls' => wppa_switch( 'thumb_video' ),
232
  'margin_top' => '0',
233
  'margin_bottom' => '0',
234
- 'tagid' => 'i-'.$id.'-'.wppa( 'mocc' ),
235
  'cursor' => 'cursor:pointer;',
236
  'events' => $events,
237
  'title' => $title,
@@ -247,7 +248,7 @@ global $wpdb;
247
  else {
248
  $result .= '<img' .
249
  ' onclick="' . $onclick . '"' .
250
- ' id="i-' . $xid . '-'.wppa( 'mocc' ) . '"' .
251
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
252
  ' ' . $imgalt .
253
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -267,7 +268,7 @@ global $wpdb;
267
  else {
268
 
269
  // The a img non ajax
270
- $result .= '<a style="position:static;" href="'.$link['url'].'" target="'.$link['target'].'" class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'">';
271
  if ( $is_video ) {
272
  $result .= wppa_get_video_html( array(
273
  'id' => $id,
@@ -276,7 +277,7 @@ global $wpdb;
276
  'controls' => wppa_switch( 'thumb_video' ),
277
  'margin_top' => '0',
278
  'margin_bottom' => '0',
279
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
280
  'cursor' => 'cursor:pointer;',
281
  'events' => $events,
282
  'title' => $title,
@@ -289,7 +290,7 @@ global $wpdb;
289
  }
290
  else {
291
  $result .= '<img' .
292
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
293
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '" ' . $imgalt .
294
  ( $title ? ' title="' . $title . '"' : '' ) .
295
  ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
@@ -317,10 +318,10 @@ global $wpdb;
317
  ' data-videonatheight="'.wppa_get_videoy( $id ) . '"' : '' ) .
318
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
319
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
320
- ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).'[occ'.wppa( 'mocc' ).']"' .
321
  ' ' . wppa( 'lbtitle' ) . '="'.$title.'" ' .
322
  wppa_get_lb_panorama_full_html( $id ) .
323
- ' class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'"' .
324
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
325
  ' onclick="return false;"' .
326
  ' style="cursor:' . wppa_wait() . ';"' .
@@ -333,7 +334,7 @@ global $wpdb;
333
  'controls' => wppa_switch( 'thumb_video' ),
334
  'margin_top' => '0',
335
  'margin_bottom' => '0',
336
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
337
  'cursor' => $cursor,
338
  'events' => $events,
339
  'title' => wppa_zoom_in( $id ),
@@ -347,7 +348,7 @@ global $wpdb;
347
  else {
348
  $title = wppa_zoom_in( $id );
349
  $result .= '<img' .
350
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
351
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
352
  ' ' . $imgalt .
353
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -364,7 +365,7 @@ global $wpdb;
364
  }
365
  else { // is onclick
366
  // The div img
367
- $result .= '<div onclick="'.$link['url'].'" class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'">';
368
  if ( $is_video ) {
369
  $result .= wppa_get_video_html( array(
370
  'id' => $id,
@@ -373,7 +374,7 @@ global $wpdb;
373
  'controls' => wppa_switch( 'thumb_video' ),
374
  'margin_top' => '0',
375
  'margin_bottom' => '0',
376
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
377
  'cursor' => 'cursor:pointer;',
378
  'events' => $events,
379
  'title' => $title,
@@ -386,7 +387,7 @@ global $wpdb;
386
  }
387
  else {
388
  $result .= '<img' .
389
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
390
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
391
  ' ' . $imgalt .
392
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -407,7 +408,7 @@ global $wpdb;
407
  }
408
  else { // no link
409
  if ( wppa_switch( 'use_thumb_popup' ) ) {
410
- $result .= '<div id="x-'.$xid.'-'.wppa( 'mocc' ).'">';
411
  if ( $is_video ) {
412
  $result .= wppa_get_video_html( array(
413
  'id' => $id,
@@ -416,7 +417,7 @@ global $wpdb;
416
  'controls' => false,
417
  'margin_top' => '0',
418
  'margin_bottom' => '0',
419
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
420
  'cursor' => '',
421
  'events' => $events,
422
  'title' => $title,
@@ -450,7 +451,7 @@ global $wpdb;
450
  'controls' => wppa_switch( 'thumb_video' ),
451
  'margin_top' => '0',
452
  'margin_bottom' => '0',
453
- 'tagid' => 'i-'.$id.'-'.wppa( 'mocc' ),
454
  'cursor' => '',
455
  'events' => $events,
456
  'title' => $title,
@@ -485,7 +486,7 @@ global $wpdb;
485
  if ( $com_alt ) {
486
  $comaltwidth = wppa_get_container_width() - $imgwidth - 16 - wppa_get_thumbnail_area_delta();
487
  $result .= '<div' .
488
- ' class="wppa-com-alt wppa-com-alt-' . wppa( 'mocc' ) . '"' .
489
  ' style="' .
490
  'height:' . $imgheight . 'px;' .
491
  'overflow:auto;' .
@@ -562,12 +563,12 @@ global $wpdb;
562
  $lt = wppa_get_like_title_a( $id );
563
  $src = $lt['mine'] ? wppa_get_imgdir() . 'thumbdown.png' : wppa_get_imgdir() . 'thumbup.png';
564
  $result .= '<div' .
565
- ' id="wppa-like-imgdiv-'.wppa( 'mocc' ).'"' .
566
  ' style="display:inline"' .
567
  ' >' .
568
 
569
  '<img' .
570
- ' id="wppa-like-' . $id . '-' . wppa( 'mocc' ) . '"' .
571
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
572
  ' alt="up"' .
573
  ' title="' . esc_attr( $lt['title'] ) . '"' .
@@ -575,14 +576,14 @@ global $wpdb;
575
  ' class="no-shadow ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
576
  ' onmouseover="jQuery(this).stop().fadeTo(100, 1.0);"' .
577
  ' onmouseout="jQuery(this).stop().fadeTo(100, wppaStarOpacity);"' .
578
- ' onclick="wppaOvlRateIt( \'' . wppa_encrypt_photo( $id ) . '\', 1, ' . wppa( 'mocc' ) . ' );' . '"' .
579
  ' onload="jQuery(this).trigger(\'onmouseout\');"' .
580
  ' />';
581
 
582
  if ( wppa_switch( 'show_avg_rating' ) ) {
583
  $result .=
584
  '<span' .
585
- ' id="wppa-liketext-' . $id . '-' . wppa( 'mocc' ) . '"' .
586
  ' class="wppa-thumb-text"' .
587
  ' style="'.wppa_wcs( 'wppa-thumb-text' ).'"' .
588
  '> ' .
@@ -597,11 +598,11 @@ global $wpdb;
597
  else {
598
  $buttext = $mylast ? __( wppa_opt( 'voted_button_text' ) , 'wp-photo-album-plus') : __( wppa_opt( 'vote_button_text' ) , 'wp-photo-album-plus');
599
  $result .= '<input' .
600
- ' id="wppa-vote-button-' . wppa( 'mocc' ) . '-' . $xid . '"' .
601
  ' class="wppa-vote-button-thumb"' .
602
  ' style="margin:0;"' .
603
  ' type="button"' .
604
- ' onclick="wppaVoteThumb( ' . wppa( 'mocc' ) . ', \'' . $xid . '\' )"' .
605
  ' value="'.$buttext.'"' .
606
  ' />';
607
  }
@@ -657,7 +658,7 @@ global $wpdb;
657
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'enable_admins_choice' ) ) {
658
  $result .=
659
  '<span' .
660
- ' id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . wppa( 'mocc' ) . '"' .
661
  ' style="color:gray;"' .
662
  ' >';
663
  if ( ! wppa_is_photo_in_zip( $thumb['id'] ) ) {
@@ -666,7 +667,7 @@ global $wpdb;
666
  ' style="color:blue;cursor:pointer;"' .
667
  ' onclick="' .
668
  esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
669
- 'wppaAjaxAddPhotoToZip( '.wppa( 'mocc' ).', \''.wppa_encrypt_photo($thumb['id']).'\', false ); return false;' ).'"' .
670
  '>' .
671
  __( 'MyChoice' , 'wp-photo-album-plus') .
672
  '</a>';
@@ -684,7 +685,7 @@ global $wpdb;
684
  '<a' .
685
  ' id="wppa-delete-' . wppa_encrypt_photo( $id ) . '"' .
686
  ' style="color:red;cursor:pointer;"' .
687
- ' onclick="'.esc_attr( 'if ( confirm( "'.__( 'Are you sure you want to remove this photo?' , 'wp-photo-album-plus').'" ) ) wppaAjaxRemovePhoto( '.wppa( 'mocc' ).', \''.$xid.'\', false ); return false;' ).'"' .
688
  ' >' .
689
  __( 'Delete' , 'wp-photo-album-plus') .
690
  '</a>' .
@@ -696,7 +697,7 @@ global $wpdb;
696
  $result .=
697
  '<a' .
698
  ' style="color:green;cursor:pointer;"' .
699
- ' onclick="wppaEditPhoto( '.wppa( 'mocc' ).', \''.$xid.'\' ); return false;"' .
700
  ' >' .
701
  __( 'Edit' , 'wp-photo-album-plus') .
702
  '</a>';
@@ -783,6 +784,7 @@ global $thlinkmsggiven;
783
 
784
  // Init
785
  $result = '';
 
786
 
787
  // Encrypted photo id
788
  $xid = wppa_encrypt_photo( $id );
@@ -820,7 +822,7 @@ global $thlinkmsggiven;
820
  $mcr = wppa_opt( 'thumbtype' ) == 'ascovers-mcr' ? 'mcr-' : '';
821
 
822
  $photo_left = wppa_switch( 'thumbphoto_left' );
823
- $class_asym = 'wppa-asym-text-frame-'.$mcr.wppa( 'mocc' );
824
 
825
  $style = wppa_wcs( 'wppa-box' ).wppa_wcs( 'wppa-'.wppa( 'alt' ) );
826
  if ( is_feed() ) $style .= ' padding:7px;';
@@ -839,8 +841,8 @@ global $thlinkmsggiven;
839
  wppa_step_covercount( 'thumb' );
840
 
841
  $result .= "\n" . '<div' .
842
- ' id="thumb-' . $xid . '-' . wppa( 'mocc' ) . '"' .
843
- ' class="thumb wppa-box wppa-cover-box wppa-cover-box-' . $mcr . wppa( 'mocc' ) . ' wppa-' . wppa( 'alt' ) . '"' .
844
  ' style="' . $style . '"' .
845
  ' >';
846
 
@@ -851,8 +853,8 @@ global $thlinkmsggiven;
851
  $textframestyle = wppa_get_text_frame_style( $photo_left, 'thumb' );
852
 
853
  $result .= '<div' .
854
- ' id="thumbtext_frame_' . $id . '_' . wppa( 'mocc' ) . '"' .
855
- ' class="wppa-text-frame-' . wppa( 'mocc' ) . ' wppa-text-frame thumbtext-frame ' . $class_asym . '"' .
856
  ' ' . $textframestyle .
857
  ' >' .
858
  '<h2' .
@@ -930,7 +932,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
930
  }
931
 
932
  $result .= '<div'.
933
- ' id="thumbphoto_frame_' . $xid . '_' . wppa( 'mocc' ) . '"' .
934
  ' class="thumbphoto-frame"' .
935
  ' ' . $photoframestyle .
936
  '>';
@@ -942,7 +944,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
942
  $result .= '<a' .
943
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
944
  ' href="' . $href . '"' .
945
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ). '[occ' . wppa( 'mocc' ) . ']"' .
946
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
947
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
948
  ' onclick="return false;"' .
@@ -956,7 +958,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
956
  'controls' => false,
957
  // 'margin_top' => '0',
958
  // 'margin_bottom' => '0',
959
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
960
  // 'cursor' => '',
961
  'events' => $events,
962
  'title' => $title,
@@ -995,7 +997,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
995
  'controls' => false,
996
  // 'margin_top' => '0',
997
  // 'margin_bottom' => '0',
998
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
999
  // 'cursor' => '',
1000
  'events' => $events,
1001
  'title' => $title,
@@ -1028,7 +1030,7 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
1028
  'controls' => false,
1029
  // 'margin_top' => '0',
1030
  // 'margin_bottom' => '0',
1031
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1032
  // 'cursor' => '',
1033
  'events' => $events,
1034
  'title' => $title,
@@ -1073,6 +1075,7 @@ global $wpdb;
1073
  die( 'Please check your configuration' );
1074
  }
1075
  $result = '';
 
1076
 
1077
  // Encrypted photo id
1078
  $xid = wppa_encrypt_photo( $id );
@@ -1207,8 +1210,8 @@ global $wpdb;
1207
  $is_ie_or_chrome = strpos( $_SERVER["HTTP_USER_AGENT"], 'Trident' ) || strpos( $_SERVER["HTTP_USER_AGENT"], 'Chrome' );
1208
  $result .= '
1209
  <div' .
1210
- ' id="thumbnail_frame_masonry_' . $xid . '_' . wppa( 'mocc' ) . '"' .
1211
- ( $is_ie_or_chrome && wppa_opt( 'thumbtype' ) == 'masonry-h' ? ' class="wppa-mas-h-' . wppa( 'mocc' ) . '"' : '' ) .
1212
  ' style="' .
1213
  $frame_h .
1214
  'position:static;' .
@@ -1246,16 +1249,16 @@ global $wpdb;
1246
  // The a img ajax
1247
  $p = wppa( 'calendar') ? '' : '&amp;wppa-photo=' . $xid;
1248
  $onclick = 'wppaDoAjaxRender( ' .
1249
- wppa( 'mocc' ) . ', \'' .
1250
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( wppa( 'start_album' ), '0' ) ) .
1251
  '&amp;wppa-photo=' . $xid .
1252
  '\', \'' .
1253
  wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( wppa( 'start_album' ), '0' ) . $p ) ) .
1254
  '\' )';
1255
- // old $onclick = "wppaDoAjaxRender( ".wppa( 'mocc' ).", '".wppa_get_slideshow_url_ajax( wppa( 'start_album' ), '0' ).'&amp;wppa-photo='.$id."', '".wppa_convert_to_pretty( wppa_get_slideshow_url( wppa( 'start_album' ), '0' )."&amp;wppa-photo=".$id )."' )";
1256
- $result .= '<a style="position:static;" class="thumb-img" id="x-'.$id.'-'.wppa( 'mocc' ).'">';
1257
  if ( $is_video ) {
1258
- // $result .= '<video preload="metadata" onclick="'.$onclick.'" id="i-'.$id.'-'.wppa( 'mocc' ).'" '.$imgalt.' title="'.$title.'" style="'.$imgstyle.' cursor:pointer;" '.$events.' >'.wppa_get_video_body( $id ).'</video>';
1259
  $result .= wppa_get_video_html( array(
1260
  'id' => $id,
1261
  // 'width' => $imgwidth,
@@ -1263,7 +1266,7 @@ global $wpdb;
1263
  'controls' => wppa_switch( 'thumb_video' ),
1264
  'margin_top' => '0',
1265
  'margin_bottom' => '0',
1266
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1267
  'cursor' => 'cursor:pointer;',
1268
  'events' => $events,
1269
  'title' => $title,
@@ -1278,7 +1281,7 @@ global $wpdb;
1278
  else {
1279
  $result .= '<img' .
1280
  ' onclick="' . $onclick . '"' .
1281
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1282
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1283
  ' ' . $imgalt .
1284
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -1291,9 +1294,9 @@ global $wpdb;
1291
  }
1292
  else { // non ajax
1293
  // The a img non ajax
1294
- $result .= '<a style="position:static;" href="'.$link['url'].'" target="'.$link['target'].'" class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'">';
1295
  if ( $is_video ) {
1296
- // $result .= '<video preload="metadata" id="i-'.$id.'-'.wppa( 'mocc' ).'" '.$imgalt.' title="'.$title.'" width="'.$imgwidth.'" height="'.$imgheight.'" style="'.$imgstyle.' cursor:pointer;" '.$events.' >'.wppa_get_video_body( $id ).'</video>';
1297
  $result .= wppa_get_video_html( array(
1298
  'id' => $id,
1299
  // 'width' => $imgwidth,
@@ -1301,7 +1304,7 @@ global $wpdb;
1301
  'controls' => wppa_switch( 'thumb_video' ),
1302
  'margin_top' => '0',
1303
  'margin_bottom' => '0',
1304
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1305
  'cursor' => 'cursor:pointer;',
1306
  'events' => $events,
1307
  'title' => $title,
@@ -1315,7 +1318,7 @@ global $wpdb;
1315
  }
1316
  else {
1317
  $result .= '<img' .
1318
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1319
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1320
  ' ' . $imgalt .
1321
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -1341,11 +1344,11 @@ global $wpdb;
1341
  ' data-videonatheight="' . wppa_get_videoy( $id ) . '"' : '' ) .
1342
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
1343
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1344
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[occ'.wppa( 'mocc' ) . ']"' .
1345
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1346
  wppa_get_lb_panorama_full_html( $id ) .
1347
  ' class="thumb-img"' .
1348
- ' id="x-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1349
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
1350
  ' >';
1351
 
@@ -1359,7 +1362,7 @@ global $wpdb;
1359
  'controls' => wppa_switch( 'thumb_video' ),
1360
  'margin_top' => '0',
1361
  'margin_bottom' => '0',
1362
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1363
  'cursor' => $cursor,
1364
  'events' => $events,
1365
  'title' => $title,
@@ -1375,7 +1378,7 @@ global $wpdb;
1375
  // Image
1376
  else {
1377
  $result .= '<img' .
1378
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1379
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1380
  ' ' . $imgalt .
1381
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -1391,7 +1394,7 @@ global $wpdb;
1391
  else {
1392
 
1393
  // The div img
1394
- $result .= '<div onclick="'.$link['url'].'" class="thumb-img" id="x-'.$id.'-'.wppa( 'mocc' ).'" style="height:100%;" >';
1395
 
1396
  // Video?
1397
  if ( $is_video ) {
@@ -1402,7 +1405,7 @@ global $wpdb;
1402
  'controls' => wppa_switch( 'thumb_video' ),
1403
  'margin_top' => '0',
1404
  'margin_bottom' => '0',
1405
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1406
  'cursor' => 'cursor:pointer;',
1407
  'events' => $events,
1408
  'title' => $title,
@@ -1418,7 +1421,7 @@ global $wpdb;
1418
  // Image
1419
  else {
1420
  $result .= '<img' .
1421
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1422
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1423
  ' ' . $imgalt .
1424
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -1438,7 +1441,7 @@ global $wpdb;
1438
  }
1439
  else { // no link
1440
  if ( wppa_switch( 'use_thumb_popup' ) ) {
1441
- $result .= '<div id="x-'.$id.'-'.wppa( 'mocc' ).'" style="height:100%" >';
1442
  if ( $is_video ) {
1443
  $result .= wppa_get_video_html( array(
1444
  'id' => $id,
@@ -1447,7 +1450,7 @@ global $wpdb;
1447
  'controls' => false,
1448
  'margin_top' => '0',
1449
  'margin_bottom' => '0',
1450
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1451
  'cursor' => '',
1452
  'events' => $events,
1453
  'title' => $title,
@@ -1461,7 +1464,7 @@ global $wpdb;
1461
  }
1462
  else {
1463
  $result .= '<img' .
1464
- ' id="i-'.$xid.'-'.wppa( 'mocc' ).'"' .
1465
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1466
  ' ' . $imgalt .
1467
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -1484,7 +1487,7 @@ global $wpdb;
1484
  'controls' => false,
1485
  'margin_top' => '0',
1486
  'margin_bottom' => '0',
1487
- 'tagid' => 'i-'.$xid.'-'.wppa( 'mocc' ),
1488
  'cursor' => '',
1489
  'events' => $events,
1490
  'title' => $title,
@@ -1498,7 +1501,7 @@ global $wpdb;
1498
  }
1499
  else {
1500
  $result .= '<img' .
1501
- ' id="i-'.$xid.'-'.wppa( 'mocc' ).'"' .
1502
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1503
  ' ' . $imgalt .
1504
  ( $title ? ' title="' . $title . '"' : '' ) .
@@ -1525,7 +1528,7 @@ global $wpdb;
1525
  // }
1526
  $result .= wppa_get_audio_html( array(
1527
  'id' => $id,
1528
- 'tagid' => 'a-'.$xid.'-'.wppa( 'mocc' ),
1529
  // 'width' => $imgwidth,
1530
  // 'height' => wppa_get_audio_control_height(),
1531
  'style' => 'width:100%;position:absolute;bottom:0;margin:0;padding:'.(wppa_opt( 'tn_margin')/2).'px;left:0;border:none;z-index:10;'
@@ -1589,6 +1592,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1589
 
1590
  // Init
1591
  $result = '';
 
1592
 
1593
  // Get the id
1594
  $id = $image ? $image['id'] : '0';
@@ -1636,7 +1640,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1636
  'controls' => false,
1637
  'margin_top' => $imgstyle_a['margin-top'],
1638
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1639
- 'tagid' => 'i-' . $xid . '-' . wppa( 'mocc' ),
1640
  'cursor' => 'cursor:pointer;',
1641
  'events' => $imgevents,
1642
  'title' => $title,
@@ -1644,7 +1648,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1644
  }
1645
  else {
1646
  $result .= '<img' .
1647
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1648
  ( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
1649
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
1650
  ' width="' . strval( intval( $imgstyle_a['width'] ) ) . '"' .
@@ -1672,7 +1676,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1672
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
1673
  ( $audiohtml ? ' data-audiohtml="' . $audiohtml . '"' : '' ) .
1674
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1675
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[' . $type . '-' . $album . '-' . wppa( 'mocc' ) . ']"' .
1676
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1677
  wppa_get_lb_panorama_full_html( $id ) .
1678
  ' target="' . $link['target'] . '"' .
@@ -1691,7 +1695,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1691
  'controls' => false,
1692
  'margin_top' => $imgstyle_a['margin-top'],
1693
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1694
- 'tagid' => 'i-' . $xid . '-' . wppa( 'mocc' ),
1695
  // 'cursor' => $imgstyle_a['cursor'],
1696
  'events' => $imgevents,
1697
  'title' => $title
@@ -1699,7 +1703,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1699
  }
1700
  else {
1701
  $result .= '<img' .
1702
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1703
  ( $title ? ' title="' . $title . '"' : '' ) .
1704
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1705
  ' width="' . $imgstyle_a['width'] . '"' .
@@ -1727,7 +1731,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1727
  'controls' => false,
1728
  'margin_top' => $imgstyle_a['margin-top'],
1729
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1730
- 'tagid' => 'i-' . $xid . '-' . wppa( 'mocc' ),
1731
  'cursor' => 'cursor:pointer;',
1732
  'events' => $imgevents,
1733
  'title' => $title,
@@ -1736,7 +1740,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1736
  }
1737
  else {
1738
  $result .= '<img' .
1739
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1740
  ( $title ? ' title="' . $title . '"' : '' ) .
1741
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1742
  ' width="' . $imgstyle_a['width'] . '"' .
@@ -1770,7 +1774,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1770
  'controls' => false,
1771
  'margin_top' => $imgstyle_a['margin-top'],
1772
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1773
- 'tagid' => 'i-' . $xid . '-' . wppa( 'mocc' ),
1774
  'cursor' => 'cursor:pointer;',
1775
  'events' => $imgevents,
1776
  'title' => $title
@@ -1778,7 +1782,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1778
  }
1779
  else {
1780
  $result .= '<img' .
1781
- ' id="i-' . $xid . '-' . wppa( 'mocc' ) . '"' .
1782
  ( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
1783
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
1784
  ' width="' . $imgstyle_a['width'] . '"' .
@@ -1815,7 +1819,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1815
  function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1816
 
1817
  $thumb = wppa_cache_thumb( $id );
1818
-
1819
  $result = '';
1820
  $src = wppa_get_thumb_path( $thumb['id'] );
1821
  $max_size = wppa_opt( 'film_thumbsize' );
@@ -1827,9 +1831,8 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1827
  $imgwidth = $imgattr_a['width'];
1828
  $imgheight = $imgattr_a['height'];
1829
  $cursor = $imgattr_a['cursor'];
1830
-
1831
  $url = wppa_get_thumb_url( $thumb['id'], true, '', $imgwidth, $imgheight );
1832
- $furl = str_replace( '/thumbs', '', $url );
1833
  $events = wppa_get_imgevents( 'film', $thumb['id'], 'nopopup', $idx );
1834
  $thumbname = wppa_get_photo_name( $thumb['id'] );
1835
  $target = wppa_switch( 'film_blank' ) || ( $thumb['linktarget'] == '_blank' ) ? 'target="_blank" ' : '';
@@ -1839,8 +1842,14 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1839
  $is_pdf = wppa_is_pdf( $id );
1840
 
1841
  if ( wppa_opt( 'film_linktype' ) != 'lightbox' ) {
1842
- $events .= ' onclick="wppaGotoKeepState( '.wppa( 'mocc' ).', '.$idx.' )"';
1843
- $events .= ' ondblclick="wppaStartStop( '.wppa( 'mocc' ).', -1 )"';
 
 
 
 
 
 
1844
  }
1845
 
1846
  if ( is_feed() ) {
@@ -1862,7 +1871,7 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1862
  $tmp = $do_for_feed ? 'film' : 'pre';
1863
  $style = $glue ? 'style="'.wppa_get_thumb_frame_style( $glue, 'film' ).'"' : 'style="'.wppa_get_thumb_frame_style( false, 'film' ).'"';
1864
  $result .= '<div' .
1865
- ' id="'.$tmp.'_wppatnf_'.wppa_encrypt_photo($thumb['id']).'_'.wppa( 'mocc' ).'"' .
1866
  ' class="thumbnail-frame"' .
1867
  ' ' . $style .
1868
  ' >';
@@ -1881,13 +1890,14 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1881
  ' data-videonatheight="' . wppa_get_videoy( $thumb['id'] ) . '"' : '' ) .
1882
  ( $audiohtml ? ' data-audiohtml="' . $audiohtml . '"' : '' ) .
1883
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1884
- ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[occ'.wppa( 'mocc' ) . ']"' .
1885
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1886
  wppa_get_lb_panorama_full_html( $id ) .
 
1887
  ' >';
1888
  }
1889
 
1890
- if ( $tmp == 'pre' && wppa_opt( 'film_linktype' ) == 'lightbox' ) $cursor = 'cursor:default;';
1891
  // if ( $tmp == 'film' && ! $com_alt && ! wppa_cdn( 'front' ) && ! wppa_switch( 'lazy_or_htmlcomp' ) ) $result .= '<!--';
1892
  if ( wppa_is_video( $thumb['id'] ) ) {
1893
  $result .= wppa_get_video_html( array( 'id' => $thumb['id'],
@@ -1898,14 +1908,14 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1898
  'margin_bottom' => $imgattr_a['margin-bottom'],
1899
  'cursor' => $imgattr_a['cursor'],
1900
  'events' => $events,
1901
- 'tagid' => 'wppa-'.$tmp.'-'.$idx.'-'.wppa( 'mocc' )
1902
  )
1903
  );
1904
  }
1905
  else {
1906
  $result .= '<img' .
1907
- ' id="wppa-' . $tmp . '-' . $idx . '-' . wppa( 'mocc' ) . '"' .
1908
- ' class="wppa-'.$tmp.'-'.wppa( 'mocc' ).' ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
1909
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $url . '"' .
1910
  ' ' . $imgalt .
1911
  ' style="' . $imgstyle . $cursor . '"' .
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 7.2.16
9
  *
10
  */
11
 
27
 
28
  // Initialize
29
  $result = '';
30
+ $mocc = wppa( 'mocc' );
31
 
32
  // Encrypted photo id
33
  $xid = wppa_encrypt_photo( $id );
55
 
56
  // Get class depending of comment alt display
57
  if ( $com_alt ) {
58
+ $class = 'thumbnail-frame-comalt thumbnail-frame-comalt-'.$mocc.' thumbnail-frame-photo-'.$xid;
59
  }
60
  else {
61
+ $class = 'thumbnail-frame thumbnail-frame-'.$mocc.' thumbnail-frame-photo-'.$xid;
62
  }
63
 
64
  // If no image to display, die gracefully
133
 
134
  // Open the thumbframe
135
  $result .= '<div' .
136
+ ' id="thumbnail_frame_'.$xid.'_'.$mocc.'"' .
137
  ' class="'.$class.'"' .
138
  ' style="'.$framestyle.'"' .
139
  ' >';
213
  // The a img ajax
214
  $p = wppa( 'calendar') ? '' : '&amp;wppa-photo=' . $xid;
215
  $onclick = 'wppaDoAjaxRender( ' .
216
+ $mocc . ', \'' .
217
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( wppa( 'start_album' ), '0' ) ) .
218
  '&amp;wppa-photo=' . $xid .
219
  '\', \'' .
220
  wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( wppa( 'start_album' ), '0' ) . $p ) ) .
221
  '\' )';
222
 
223
+ $result .= '<a style="position:static;" class="thumb-img" id="x-'.$xid.'-'.$mocc.'">';
224
 
225
  // Video?
226
  if ( $is_video ) {
232
  'controls' => wppa_switch( 'thumb_video' ),
233
  'margin_top' => '0',
234
  'margin_bottom' => '0',
235
+ 'tagid' => 'i-'.$id.'-'.$mocc,
236
  'cursor' => 'cursor:pointer;',
237
  'events' => $events,
238
  'title' => $title,
248
  else {
249
  $result .= '<img' .
250
  ' onclick="' . $onclick . '"' .
251
+ ' id="i-' . $xid . '-'.$mocc . '"' .
252
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
253
  ' ' . $imgalt .
254
  ( $title ? ' title="' . $title . '"' : '' ) .
268
  else {
269
 
270
  // The a img non ajax
271
+ $result .= '<a style="position:static;" href="'.$link['url'].'" target="'.$link['target'].'" class="thumb-img" id="x-'.$xid.'-'.$mocc.'">';
272
  if ( $is_video ) {
273
  $result .= wppa_get_video_html( array(
274
  'id' => $id,
277
  'controls' => wppa_switch( 'thumb_video' ),
278
  'margin_top' => '0',
279
  'margin_bottom' => '0',
280
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
281
  'cursor' => 'cursor:pointer;',
282
  'events' => $events,
283
  'title' => $title,
290
  }
291
  else {
292
  $result .= '<img' .
293
+ ' id="i-' . $xid . '-' . $mocc . '"' .
294
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '" ' . $imgalt .
295
  ( $title ? ' title="' . $title . '"' : '' ) .
296
  ( wppa_switch( 'lazy' ) ? ' class="wppa-lazy"' : '' ) .
318
  ' data-videonatheight="'.wppa_get_videoy( $id ) . '"' : '' ) .
319
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
320
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
321
+ ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).'[occ'.$mocc.']"' .
322
  ' ' . wppa( 'lbtitle' ) . '="'.$title.'" ' .
323
  wppa_get_lb_panorama_full_html( $id ) .
324
+ ' class="thumb-img" id="x-'.$xid.'-'.$mocc.'"' .
325
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
326
  ' onclick="return false;"' .
327
  ' style="cursor:' . wppa_wait() . ';"' .
334
  'controls' => wppa_switch( 'thumb_video' ),
335
  'margin_top' => '0',
336
  'margin_bottom' => '0',
337
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
338
  'cursor' => $cursor,
339
  'events' => $events,
340
  'title' => wppa_zoom_in( $id ),
348
  else {
349
  $title = wppa_zoom_in( $id );
350
  $result .= '<img' .
351
+ ' id="i-' . $xid . '-' . $mocc . '"' .
352
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
353
  ' ' . $imgalt .
354
  ( $title ? ' title="' . $title . '"' : '' ) .
365
  }
366
  else { // is onclick
367
  // The div img
368
+ $result .= '<div onclick="'.$link['url'].'" class="thumb-img" id="x-'.$xid.'-'.$mocc.'">';
369
  if ( $is_video ) {
370
  $result .= wppa_get_video_html( array(
371
  'id' => $id,
374
  'controls' => wppa_switch( 'thumb_video' ),
375
  'margin_top' => '0',
376
  'margin_bottom' => '0',
377
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
378
  'cursor' => 'cursor:pointer;',
379
  'events' => $events,
380
  'title' => $title,
387
  }
388
  else {
389
  $result .= '<img' .
390
+ ' id="i-' . $xid . '-' . $mocc . '"' .
391
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
392
  ' ' . $imgalt .
393
  ( $title ? ' title="' . $title . '"' : '' ) .
408
  }
409
  else { // no link
410
  if ( wppa_switch( 'use_thumb_popup' ) ) {
411
+ $result .= '<div id="x-'.$xid.'-'.$mocc.'">';
412
  if ( $is_video ) {
413
  $result .= wppa_get_video_html( array(
414
  'id' => $id,
417
  'controls' => false,
418
  'margin_top' => '0',
419
  'margin_bottom' => '0',
420
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
421
  'cursor' => '',
422
  'events' => $events,
423
  'title' => $title,
451
  'controls' => wppa_switch( 'thumb_video' ),
452
  'margin_top' => '0',
453
  'margin_bottom' => '0',
454
+ 'tagid' => 'i-'.$id.'-'.$mocc,
455
  'cursor' => '',
456
  'events' => $events,
457
  'title' => $title,
486
  if ( $com_alt ) {
487
  $comaltwidth = wppa_get_container_width() - $imgwidth - 16 - wppa_get_thumbnail_area_delta();
488
  $result .= '<div' .
489
+ ' class="wppa-com-alt wppa-com-alt-' . $mocc . '"' .
490
  ' style="' .
491
  'height:' . $imgheight . 'px;' .
492
  'overflow:auto;' .
563
  $lt = wppa_get_like_title_a( $id );
564
  $src = $lt['mine'] ? wppa_get_imgdir() . 'thumbdown.png' : wppa_get_imgdir() . 'thumbup.png';
565
  $result .= '<div' .
566
+ ' id="wppa-like-imgdiv-'.$mocc.'"' .
567
  ' style="display:inline"' .
568
  ' >' .
569
 
570
  '<img' .
571
+ ' id="wppa-like-' . $id . '-' . $mocc . '"' .
572
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $src . '"' .
573
  ' alt="up"' .
574
  ' title="' . esc_attr( $lt['title'] ) . '"' .
576
  ' class="no-shadow ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
577
  ' onmouseover="jQuery(this).stop().fadeTo(100, 1.0);"' .
578
  ' onmouseout="jQuery(this).stop().fadeTo(100, wppaStarOpacity);"' .
579
+ ' onclick="wppaOvlRateIt( \'' . wppa_encrypt_photo( $id ) . '\', 1, ' . $mocc . ' );' . '"' .
580
  ' onload="jQuery(this).trigger(\'onmouseout\');"' .
581
  ' />';
582
 
583
  if ( wppa_switch( 'show_avg_rating' ) ) {
584
  $result .=
585
  '<span' .
586
+ ' id="wppa-liketext-' . $id . '-' . $mocc . '"' .
587
  ' class="wppa-thumb-text"' .
588
  ' style="'.wppa_wcs( 'wppa-thumb-text' ).'"' .
589
  '> ' .
598
  else {
599
  $buttext = $mylast ? __( wppa_opt( 'voted_button_text' ) , 'wp-photo-album-plus') : __( wppa_opt( 'vote_button_text' ) , 'wp-photo-album-plus');
600
  $result .= '<input' .
601
+ ' id="wppa-vote-button-' . $mocc . '-' . $xid . '"' .
602
  ' class="wppa-vote-button-thumb"' .
603
  ' style="margin:0;"' .
604
  ' type="button"' .
605
+ ' onclick="wppaVoteThumb( ' . $mocc . ', \'' . $xid . '\' )"' .
606
  ' value="'.$buttext.'"' .
607
  ' />';
608
  }
658
  if ( wppa_user_is( 'administrator' ) && wppa_switch( 'enable_admins_choice' ) ) {
659
  $result .=
660
  '<span' .
661
+ ' id="admin-choice-' . wppa_encrypt_photo($thumb['id']) . '-' . $mocc . '"' .
662
  ' style="color:gray;"' .
663
  ' >';
664
  if ( ! wppa_is_photo_in_zip( $thumb['id'] ) ) {
667
  ' style="color:blue;cursor:pointer;"' .
668
  ' onclick="' .
669
  esc_attr( 'if ( confirm( "' . __( 'Are you sure you want to add this photo to your zip?' , 'wp-photo-album-plus') . '" ) ) ' .
670
+ 'wppaAjaxAddPhotoToZip( '.$mocc.', \''.wppa_encrypt_photo($thumb['id']).'\', false ); return false;' ).'"' .
671
  '>' .
672
  __( 'MyChoice' , 'wp-photo-album-plus') .
673
  '</a>';
685
  '<a' .
686
  ' id="wppa-delete-' . wppa_encrypt_photo( $id ) . '"' .
687
  ' style="color:red;cursor:pointer;"' .
688
+ ' onclick="'.esc_attr( 'if ( confirm( "'.__( 'Are you sure you want to remove this photo?' , 'wp-photo-album-plus').'" ) ) wppaAjaxRemovePhoto( '.$mocc.', \''.$xid.'\', false ); return false;' ).'"' .
689
  ' >' .
690
  __( 'Delete' , 'wp-photo-album-plus') .
691
  '</a>' .
697
  $result .=
698
  '<a' .
699
  ' style="color:green;cursor:pointer;"' .
700
+ ' onclick="wppaEditPhoto( '.$mocc.', \''.$xid.'\' ); return false;"' .
701
  ' >' .
702
  __( 'Edit' , 'wp-photo-album-plus') .
703
  '</a>';
784
 
785
  // Init
786
  $result = '';
787
+ $mocc = wppa( 'mocc' );
788
 
789
  // Encrypted photo id
790
  $xid = wppa_encrypt_photo( $id );
822
  $mcr = wppa_opt( 'thumbtype' ) == 'ascovers-mcr' ? 'mcr-' : '';
823
 
824
  $photo_left = wppa_switch( 'thumbphoto_left' );
825
+ $class_asym = 'wppa-asym-text-frame-'.$mcr.$mocc;
826
 
827
  $style = wppa_wcs( 'wppa-box' ).wppa_wcs( 'wppa-'.wppa( 'alt' ) );
828
  if ( is_feed() ) $style .= ' padding:7px;';
841
  wppa_step_covercount( 'thumb' );
842
 
843
  $result .= "\n" . '<div' .
844
+ ' id="thumb-' . $xid . '-' . $mocc . '"' .
845
+ ' class="thumb wppa-box wppa-cover-box wppa-cover-box-' . $mcr . $mocc . ' wppa-' . wppa( 'alt' ) . '"' .
846
  ' style="' . $style . '"' .
847
  ' >';
848
 
853
  $textframestyle = wppa_get_text_frame_style( $photo_left, 'thumb' );
854
 
855
  $result .= '<div' .
856
+ ' id="thumbtext_frame_' . $id . '_' . $mocc . '"' .
857
+ ' class="wppa-text-frame-' . $mocc . ' wppa-text-frame thumbtext-frame ' . $class_asym . '"' .
858
  ' ' . $textframestyle .
859
  ' >' .
860
  '<h2' .
932
  }
933
 
934
  $result .= '<div'.
935
+ ' id="thumbphoto_frame_' . $xid . '_' . $mocc . '"' .
936
  ' class="thumbphoto-frame"' .
937
  ' ' . $photoframestyle .
938
  '>';
944
  $result .= '<a' .
945
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
946
  ' href="' . $href . '"' .
947
+ ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ). '[occ' . $mocc . ']"' .
948
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
949
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
950
  ' onclick="return false;"' .
958
  'controls' => false,
959
  // 'margin_top' => '0',
960
  // 'margin_bottom' => '0',
961
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
962
  // 'cursor' => '',
963
  'events' => $events,
964
  'title' => $title,
997
  'controls' => false,
998
  // 'margin_top' => '0',
999
  // 'margin_bottom' => '0',
1000
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1001
  // 'cursor' => '',
1002
  'events' => $events,
1003
  'title' => $title,
1030
  'controls' => false,
1031
  // 'margin_top' => '0',
1032
  // 'margin_bottom' => '0',
1033
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1034
  // 'cursor' => '',
1035
  'events' => $events,
1036
  'title' => $title,
1075
  die( 'Please check your configuration' );
1076
  }
1077
  $result = '';
1078
+ $mocc = wppa( 'mocc' );
1079
 
1080
  // Encrypted photo id
1081
  $xid = wppa_encrypt_photo( $id );
1210
  $is_ie_or_chrome = strpos( $_SERVER["HTTP_USER_AGENT"], 'Trident' ) || strpos( $_SERVER["HTTP_USER_AGENT"], 'Chrome' );
1211
  $result .= '
1212
  <div' .
1213
+ ' id="thumbnail_frame_masonry_' . $xid . '_' . $mocc . '"' .
1214
+ ( $is_ie_or_chrome && wppa_opt( 'thumbtype' ) == 'masonry-h' ? ' class="wppa-mas-h-' . $mocc . '"' : '' ) .
1215
  ' style="' .
1216
  $frame_h .
1217
  'position:static;' .
1249
  // The a img ajax
1250
  $p = wppa( 'calendar') ? '' : '&amp;wppa-photo=' . $xid;
1251
  $onclick = 'wppaDoAjaxRender( ' .
1252
+ $mocc . ', \'' .
1253
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( wppa( 'start_album' ), '0' ) ) .
1254
  '&amp;wppa-photo=' . $xid .
1255
  '\', \'' .
1256
  wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( wppa( 'start_album' ), '0' ) . $p ) ) .
1257
  '\' )';
1258
+ // old $onclick = "wppaDoAjaxRender( ".$mocc.", '".wppa_get_slideshow_url_ajax( wppa( 'start_album' ), '0' ).'&amp;wppa-photo='.$id."', '".wppa_convert_to_pretty( wppa_get_slideshow_url( wppa( 'start_album' ), '0' )."&amp;wppa-photo=".$id )."' )";
1259
+ $result .= '<a style="position:static;" class="thumb-img" id="x-'.$id.'-'.$mocc.'">';
1260
  if ( $is_video ) {
1261
+ // $result .= '<video preload="metadata" onclick="'.$onclick.'" id="i-'.$id.'-'.$mocc.'" '.$imgalt.' title="'.$title.'" style="'.$imgstyle.' cursor:pointer;" '.$events.' >'.wppa_get_video_body( $id ).'</video>';
1262
  $result .= wppa_get_video_html( array(
1263
  'id' => $id,
1264
  // 'width' => $imgwidth,
1266
  'controls' => wppa_switch( 'thumb_video' ),
1267
  'margin_top' => '0',
1268
  'margin_bottom' => '0',
1269
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1270
  'cursor' => 'cursor:pointer;',
1271
  'events' => $events,
1272
  'title' => $title,
1281
  else {
1282
  $result .= '<img' .
1283
  ' onclick="' . $onclick . '"' .
1284
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1285
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1286
  ' ' . $imgalt .
1287
  ( $title ? ' title="' . $title . '"' : '' ) .
1294
  }
1295
  else { // non ajax
1296
  // The a img non ajax
1297
+ $result .= '<a style="position:static;" href="'.$link['url'].'" target="'.$link['target'].'" class="thumb-img" id="x-'.$xid.'-'.$mocc.'">';
1298
  if ( $is_video ) {
1299
+ // $result .= '<video preload="metadata" id="i-'.$id.'-'.$mocc.'" '.$imgalt.' title="'.$title.'" width="'.$imgwidth.'" height="'.$imgheight.'" style="'.$imgstyle.' cursor:pointer;" '.$events.' >'.wppa_get_video_body( $id ).'</video>';
1300
  $result .= wppa_get_video_html( array(
1301
  'id' => $id,
1302
  // 'width' => $imgwidth,
1304
  'controls' => wppa_switch( 'thumb_video' ),
1305
  'margin_top' => '0',
1306
  'margin_bottom' => '0',
1307
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1308
  'cursor' => 'cursor:pointer;',
1309
  'events' => $events,
1310
  'title' => $title,
1318
  }
1319
  else {
1320
  $result .= '<img' .
1321
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1322
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1323
  ' ' . $imgalt .
1324
  ( $title ? ' title="' . $title . '"' : '' ) .
1344
  ' data-videonatheight="' . wppa_get_videoy( $id ) . '"' : '' ) .
1345
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
1346
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1347
+ ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[occ'.$mocc . ']"' .
1348
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1349
  wppa_get_lb_panorama_full_html( $id ) .
1350
  ' class="thumb-img"' .
1351
+ ' id="x-' . $xid . '-' . $mocc . '"' .
1352
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
1353
  ' >';
1354
 
1362
  'controls' => wppa_switch( 'thumb_video' ),
1363
  'margin_top' => '0',
1364
  'margin_bottom' => '0',
1365
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1366
  'cursor' => $cursor,
1367
  'events' => $events,
1368
  'title' => $title,
1378
  // Image
1379
  else {
1380
  $result .= '<img' .
1381
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1382
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1383
  ' ' . $imgalt .
1384
  ( $title ? ' title="' . $title . '"' : '' ) .
1394
  else {
1395
 
1396
  // The div img
1397
+ $result .= '<div onclick="'.$link['url'].'" class="thumb-img" id="x-'.$id.'-'.$mocc.'" style="height:100%;" >';
1398
 
1399
  // Video?
1400
  if ( $is_video ) {
1405
  'controls' => wppa_switch( 'thumb_video' ),
1406
  'margin_top' => '0',
1407
  'margin_bottom' => '0',
1408
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1409
  'cursor' => 'cursor:pointer;',
1410
  'events' => $events,
1411
  'title' => $title,
1421
  // Image
1422
  else {
1423
  $result .= '<img' .
1424
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1425
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1426
  ' ' . $imgalt .
1427
  ( $title ? ' title="' . $title . '"' : '' ) .
1441
  }
1442
  else { // no link
1443
  if ( wppa_switch( 'use_thumb_popup' ) ) {
1444
+ $result .= '<div id="x-'.$id.'-'.$mocc.'" style="height:100%" >';
1445
  if ( $is_video ) {
1446
  $result .= wppa_get_video_html( array(
1447
  'id' => $id,
1450
  'controls' => false,
1451
  'margin_top' => '0',
1452
  'margin_bottom' => '0',
1453
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1454
  'cursor' => '',
1455
  'events' => $events,
1456
  'title' => $title,
1464
  }
1465
  else {
1466
  $result .= '<img' .
1467
+ ' id="i-'.$xid.'-'.$mocc.'"' .
1468
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1469
  ' ' . $imgalt .
1470
  ( $title ? ' title="' . $title . '"' : '' ) .
1487
  'controls' => false,
1488
  'margin_top' => '0',
1489
  'margin_bottom' => '0',
1490
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
1491
  'cursor' => '',
1492
  'events' => $events,
1493
  'title' => $title,
1501
  }
1502
  else {
1503
  $result .= '<img' .
1504
+ ' id="i-'.$xid.'-'.$mocc.'"' .
1505
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1506
  ' ' . $imgalt .
1507
  ( $title ? ' title="' . $title . '"' : '' ) .
1528
  // }
1529
  $result .= wppa_get_audio_html( array(
1530
  'id' => $id,
1531
+ 'tagid' => 'a-'.$xid.'-'.$mocc,
1532
  // 'width' => $imgwidth,
1533
  // 'height' => wppa_get_audio_control_height(),
1534
  'style' => 'width:100%;position:absolute;bottom:0;margin:0;padding:'.(wppa_opt( 'tn_margin')/2).'px;left:0;border:none;z-index:10;'
1592
 
1593
  // Init
1594
  $result = '';
1595
+ $mocc = wppa( 'mocc' );
1596
 
1597
  // Get the id
1598
  $id = $image ? $image['id'] : '0';
1640
  'controls' => false,
1641
  'margin_top' => $imgstyle_a['margin-top'],
1642
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1643
+ 'tagid' => 'i-' . $xid . '-' . $mocc,
1644
  'cursor' => 'cursor:pointer;',
1645
  'events' => $imgevents,
1646
  'title' => $title,
1648
  }
1649
  else {
1650
  $result .= '<img' .
1651
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1652
  ( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
1653
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
1654
  ' width="' . strval( intval( $imgstyle_a['width'] ) ) . '"' .
1676
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
1677
  ( $audiohtml ? ' data-audiohtml="' . $audiohtml . '"' : '' ) .
1678
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1679
+ ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[' . $type . '-' . $album . '-' . $mocc . ']"' .
1680
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1681
  wppa_get_lb_panorama_full_html( $id ) .
1682
  ' target="' . $link['target'] . '"' .
1695
  'controls' => false,
1696
  'margin_top' => $imgstyle_a['margin-top'],
1697
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1698
+ 'tagid' => 'i-' . $xid . '-' . $mocc,
1699
  // 'cursor' => $imgstyle_a['cursor'],
1700
  'events' => $imgevents,
1701
  'title' => $title
1703
  }
1704
  else {
1705
  $result .= '<img' .
1706
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1707
  ( $title ? ' title="' . $title . '"' : '' ) .
1708
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1709
  ' width="' . $imgstyle_a['width'] . '"' .
1731
  'controls' => false,
1732
  'margin_top' => $imgstyle_a['margin-top'],
1733
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1734
+ 'tagid' => 'i-' . $xid . '-' . $mocc,
1735
  'cursor' => 'cursor:pointer;',
1736
  'events' => $imgevents,
1737
  'title' => $title,
1740
  }
1741
  else {
1742
  $result .= '<img' .
1743
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1744
  ( $title ? ' title="' . $title . '"' : '' ) .
1745
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $imgurl . '"' .
1746
  ' width="' . $imgstyle_a['width'] . '"' .
1774
  'controls' => false,
1775
  'margin_top' => $imgstyle_a['margin-top'],
1776
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1777
+ 'tagid' => 'i-' . $xid . '-' . $mocc,
1778
  'cursor' => 'cursor:pointer;',
1779
  'events' => $imgevents,
1780
  'title' => $title
1782
  }
1783
  else {
1784
  $result .= '<img' .
1785
+ ' id="i-' . $xid . '-' . $mocc . '"' .
1786
  ( $title ? ' title="' . esc_attr( $title ) . '"' : '' ) .
1787
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . esc_url( $imgurl ) . '"' .
1788
  ' width="' . $imgstyle_a['width'] . '"' .
1819
  function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1820
 
1821
  $thumb = wppa_cache_thumb( $id );
1822
+ $mocc = wppa( 'mocc' );
1823
  $result = '';
1824
  $src = wppa_get_thumb_path( $thumb['id'] );
1825
  $max_size = wppa_opt( 'film_thumbsize' );
1831
  $imgwidth = $imgattr_a['width'];
1832
  $imgheight = $imgattr_a['height'];
1833
  $cursor = $imgattr_a['cursor'];
 
1834
  $url = wppa_get_thumb_url( $thumb['id'], true, '', $imgwidth, $imgheight );
1835
+ $furl = wppa_switch( 'lb_hres' ) ? wppa_get_hires_url( $thumb['id'] ) : wppa_get_photo_url( $thumb['id'] );
1836
  $events = wppa_get_imgevents( 'film', $thumb['id'], 'nopopup', $idx );
1837
  $thumbname = wppa_get_photo_name( $thumb['id'] );
1838
  $target = wppa_switch( 'film_blank' ) || ( $thumb['linktarget'] == '_blank' ) ? 'target="_blank" ' : '';
1842
  $is_pdf = wppa_is_pdf( $id );
1843
 
1844
  if ( wppa_opt( 'film_linktype' ) != 'lightbox' ) {
1845
+ $events .= ' onclick="wppaGotoKeepState( '.$mocc.', '.$idx.' )"';
1846
+ $events .= ' ondblclick="wppaStartStop( '.$mocc.', -1 )"';
1847
+ }
1848
+
1849
+ // pre-ambule images transfer click to their originals on lightbox link
1850
+ elseif ( ! $do_for_feed ) {
1851
+ $events .= ' onclick="jQuery(\'#wppa-film-' . $idx . '-' . $mocc . '\').trigger(\'click\');"';
1852
+ $cursor = ' cursor:url( ' .wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
1853
  }
1854
 
1855
  if ( is_feed() ) {
1871
  $tmp = $do_for_feed ? 'film' : 'pre';
1872
  $style = $glue ? 'style="'.wppa_get_thumb_frame_style( $glue, 'film' ).'"' : 'style="'.wppa_get_thumb_frame_style( false, 'film' ).'"';
1873
  $result .= '<div' .
1874
+ ' id="'.$tmp.'_wppatnf_'.wppa_encrypt_photo($thumb['id']).'_'.$mocc.'"' .
1875
  ' class="thumbnail-frame"' .
1876
  ' ' . $style .
1877
  ' >';
1890
  ' data-videonatheight="' . wppa_get_videoy( $thumb['id'] ) . '"' : '' ) .
1891
  ( $audiohtml ? ' data-audiohtml="' . $audiohtml . '"' : '' ) .
1892
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
1893
+ ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[occ'.$mocc . ']"' .
1894
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1895
  wppa_get_lb_panorama_full_html( $id ) .
1896
+ ' onclick="if(_wppaSSRuns[' . $mocc . ']){wppaStopShow(' . $mocc . ');document.onLbquitMocc=' . $mocc . ';document.onLbquitIdx=' . $idx . ';};return true;"' .
1897
  ' >';
1898
  }
1899
 
1900
+ // if ( $tmp == 'pre' && wppa_opt( 'film_linktype' ) == 'lightbox' ) $cursor = 'cursor:default;';
1901
  // if ( $tmp == 'film' && ! $com_alt && ! wppa_cdn( 'front' ) && ! wppa_switch( 'lazy_or_htmlcomp' ) ) $result .= '<!--';
1902
  if ( wppa_is_video( $thumb['id'] ) ) {
1903
  $result .= wppa_get_video_html( array( 'id' => $thumb['id'],
1908
  'margin_bottom' => $imgattr_a['margin-bottom'],
1909
  'cursor' => $imgattr_a['cursor'],
1910
  'events' => $events,
1911
+ 'tagid' => 'wppa-'.$tmp.'-'.$idx.'-'.$mocc
1912
  )
1913
  );
1914
  }
1915
  else {
1916
  $result .= '<img' .
1917
+ ' id="wppa-' . $tmp . '-' . $idx . '-' . $mocc . '"' .
1918
+ ' class="wppa-'.$tmp.'-'.$mocc.' ' . ( wppa_switch( 'lazy' ) ? 'wppa-lazy' : '' ) . '"' .
1919
  ' ' . ( wppa_switch( 'lazy' ) ? 'data-' : '' ) . 'src="' . $url . '"' .
1920
  ' ' . $imgalt .
1921
  ' style="' . $imgstyle . $cursor . '"' .
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 7.2.15.006
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '7215'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.15.006'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 7.2.16.006
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '7216'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.2.16.006'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';