WP Photo Album Plus - Version 6.8.08

Version Description

  • 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
Download this release

Release Info

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

Code changes from version 6.8.07 to 6.8.08

changelog.txt CHANGED
@@ -1,5 +1,30 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 6.8.07 =
4
 
5
  = Bug Fixes =
1
  WP Photo Album Plus Changelog
2
 
3
+ = 6.8.08 =
4
+
5
+ = Bug Fixes =
6
+
7
+ * The initial display of the fullscreen lightbox on Firefox was incorrect. Fixed.
8
+ * Changing orientation of mobile devices gave wrong initial display of the fullscreen lightbox. Fixed.
9
+ * Interactive maintenance procedures stopped at server errors. Fixed. After 10 server errors there is a confirmationbox asking to continue or not.
10
+ * If a source image file does not exist, a backup of the displayfile int the source folder will be made prior to making an image edit with imagick.
11
+ This enables the undo function for photos that did not have its source file present.
12
+ * (Un)ticking Table I-D5, Table II-J9 and J10 did not work. Fixed.
13
+ * Fixed a layout issue in the album navigator widget.
14
+ * Fixed a lightbox issue resulting in displaying the plain image when the link was clicked before the lightbox was fully initialized.
15
+
16
+ = New Features =
17
+
18
+ * Added Table IV-A31: No rightclick. Disable right mouseclick on all images.
19
+
20
+ = Other Changes =
21
+
22
+ * When using Autoptimize, one can now optimize js with it, it will no longer conflict with wppa.
23
+ You can also optimize html with Autoptimize and remove html comments without affecting the filmstrip speed or functionality.
24
+ * When Defer Javascript is switched on (Table IV-A13), no wppa script files will be loaded if there is no wppa activity on the page. This is now the default.
25
+ * Removed obsolete settings Table IV-A19: Lazy or HTML comp; Table IV-A29: JS and CSS when needed.
26
+ * On the Import page: changing local/remote or the source folder will no longer need a buttonclick; the page will reload automatically.
27
+
28
  = 6.8.07 =
29
 
30
  = Bug Fixes =
js/wppa-admin-scripts.js CHANGED
@@ -1,7 +1,7 @@
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
- /* Version 6.8.07
5
  /* Various js routines used in admin pages
6
  */
7
 
@@ -268,7 +268,7 @@ function wppaToggleTable(table) {
268
  var wppaSubTabOn = new Array();
269
 
270
  function wppaToggleSubTable(table,subtable) {
271
-
272
  // Hide
273
  if (wppaSubTabOn[table+'-'+subtable]) {
274
  jQuery('.wppa-'+table+'-'+subtable).addClass('wppa-none');
@@ -276,7 +276,7 @@ function wppaToggleSubTable(table,subtable) {
276
  wppaSubTabOn[table+'-'+subtable] = false;
277
  wppa_tablecookieoff(table+'-'+subtable);
278
  }
279
-
280
  // Show
281
  else {
282
  jQuery('.wppa-'+table+'-'+subtable).removeClass('wppa-none');
@@ -1805,7 +1805,7 @@ function wppaAjaxUpdateOptionCheckBox(slug, elem) {
1805
  xmlhttp.send();
1806
  }
1807
 
1808
- var wppaAlwaysContinue = 10;
1809
 
1810
  function wppaMaintenanceProc(slug, intern, asCronJob ) {
1811
 
@@ -1896,14 +1896,14 @@ function wppaMaintenanceProc(slug, intern, asCronJob ) {
1896
  },
1897
 
1898
  error: function( xhr, status, error ) {
1899
- wppaConsoleLog( 'wppaMaintenanceProc failed. Slug = ' + $slug + ', Error = ' + error + ', status = ' + status, 'force' );
1900
  jQuery("#"+slug+"_status").html('Server error #'+(11-wppaAlwaysContinue));
1901
  var wppaContinue = false;
1902
  wppaAlwaysContinue--;
1903
  if ( wppaAlwaysContinue < 1 ) {
1904
  wppaContinue = confirm( '10 Server errors happened.\nDo you want to continue?' );
1905
  if ( wppaContinue ) {
1906
- wppaAlwaysContinue = 10;
1907
  }
1908
  }
1909
  if ( wppaContinue || wppaAlwaysContinue > 0 ) {
@@ -2500,4 +2500,68 @@ function wppaIsEmpty( str ) {
2500
  if ( str == 0 ) return true;
2501
 
2502
  return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2503
  }
1
  /* admin-scripts.js */
2
  /* Package: wp-photo-album-plus
3
  /*
4
+ /* Version 6.8.08
5
  /* Various js routines used in admin pages
6
  */
7
 
268
  var wppaSubTabOn = new Array();
269
 
270
  function wppaToggleSubTable(table,subtable) {
271
+
272
  // Hide
273
  if (wppaSubTabOn[table+'-'+subtable]) {
274
  jQuery('.wppa-'+table+'-'+subtable).addClass('wppa-none');
276
  wppaSubTabOn[table+'-'+subtable] = false;
277
  wppa_tablecookieoff(table+'-'+subtable);
278
  }
279
+
280
  // Show
281
  else {
282
  jQuery('.wppa-'+table+'-'+subtable).removeClass('wppa-none');
1805
  xmlhttp.send();
1806
  }
1807
 
1808
+ var wppaAlwaysContinue = 100;
1809
 
1810
  function wppaMaintenanceProc(slug, intern, asCronJob ) {
1811
 
1896
  },
1897
 
1898
  error: function( xhr, status, error ) {
1899
+ wppaConsoleLog( 'wppaMaintenanceProc failed. Slug = ' + slug + ', Error = ' + error + ', status = ' + status, 'force' );
1900
  jQuery("#"+slug+"_status").html('Server error #'+(11-wppaAlwaysContinue));
1901
  var wppaContinue = false;
1902
  wppaAlwaysContinue--;
1903
  if ( wppaAlwaysContinue < 1 ) {
1904
  wppaContinue = confirm( '10 Server errors happened.\nDo you want to continue?' );
1905
  if ( wppaContinue ) {
1906
+ wppaAlwaysContinue = 100;
1907
  }
1908
  }
1909
  if ( wppaContinue || wppaAlwaysContinue > 0 ) {
2500
  if ( str == 0 ) return true;
2501
 
2502
  return false;
2503
+ }
2504
+
2505
+ // Timed confirmationbox
2506
+ function wppaTimedConfirm( text ) {
2507
+ var opt = {
2508
+ modal: true,
2509
+ resizable: false,
2510
+ width: 400,
2511
+ show: {
2512
+ effect: "fadeIn",
2513
+ duration: 800
2514
+ },
2515
+ closeText: 'X',
2516
+
2517
+ buttons: [
2518
+ {
2519
+ text: "NO",
2520
+ // icon: "ui-icon-heart",
2521
+ click: function() {
2522
+ jQuery( this ).dialog( "close" );
2523
+ }
2524
+
2525
+
2526
+ },
2527
+ {
2528
+ text: "YES",
2529
+ // icon: "ui-icon-heart",
2530
+ click: function() {
2531
+ jQuery( this ).dialog( "close" );
2532
+ }
2533
+
2534
+
2535
+ },
2536
+ ]
2537
+ };
2538
+ jQuery( '#wppa-modal-container' ).html( text ).dialog( opt ).dialog( "open" );
2539
+ jQuery( '.ui-dialog' ).css( {
2540
+ boxShadow: '0px 0px 5px 5px #aaaaaa',
2541
+ // borderRadius: wppaBoxRadius+'px',
2542
+ padding: '8px',
2543
+ backgroundColor: '#cccccc',
2544
+ boxSizing: 'content-box',
2545
+ zIndex: '9999',
2546
+ });
2547
+ jQuery( '.ui-dialog-titlebar' ).css(
2548
+ {
2549
+ lineHeight: '0px',
2550
+ height: '32px',
2551
+ }
2552
+ )
2553
+ jQuery( '.ui-button' ).css(
2554
+ {
2555
+ float: 'right',
2556
+ position: 'relative',
2557
+ bottom: '40px',
2558
+ });
2559
+
2560
+ jQuery( '.ui-dialog-titlebar-close' ).css(
2561
+ {
2562
+ display: 'none',
2563
+ });
2564
+
2565
+ jQuery( '.ui-button' ).attr( 'title', wppaCloseText );
2566
+ setTimeout( function(){jQuery('.ui-button').trigger('click');}, 60000 );
2567
  }
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";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),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.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");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.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("#photostatus-"+t).html(e[2]),o.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("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}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");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;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]);p.length>0&&(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))}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(e,t,p){var a="",o="";a=t||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+e;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==n.status){var t=wppaTrim(n.responseText).split("||");"ER"==t[0]?(t[3]&&alert(t[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),0==t[1]?document.getElementById("photostatus-"+e).innerHTML=t[2]:(document.getElementById("photoitem-"+e).innerHTML=a+t[2]+o,wppaProcessFull(t[3],t[4])),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(e){wppaFeAjaxLog("in");var t=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+e;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t.open("GET",p,!0),t.send(),t.onreadystatechange=function(){switch(t.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==t.status){var p=wppaTrim(t.responseText).split("||");"ER"==p[0]?(p[3]&&alert(p[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),0==p[1]?document.getElementById("photostatus-"+e).innerHTML=p[2]:document.getElementById("photoitem-"+e).innerHTML='<div style="padding-left:5px;" >'+p[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=before+'<span style="color:red;" >Comm error '+t.status+": "+t.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(e,t,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+e).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+e;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t&&(o+="&wppa-watermark-file="+t),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=wppaTrim(a.responseText).split("||");switch(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),t[1]){case"0":document.getElementById("photostatus-"+e).innerHTML=t[2];break;default:document.getElementById("photostatus-"+e).innerHTML='<span style="color:red">'+t[2]+"</span>"}jQuery("#wppa-water-spin-"+e).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+e).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}var wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array;function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(e,t,p,a,o,n){o||(o=""),n||(n="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[e]||(wppaAjaxPhotoCount[e]=0),wppaAjaxPhotoCount[e]++,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:6e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")")},success:function(i,s,l){var r=wppaTrim(i).split("||");switch(wppaAjaxPhotoCount[e]--,""!=r[0]&&alert("The server returned unexpected output:\n"+r[0]),r[1]){case"0":var u;if(0==wppaAjaxPhotoCount[e]?jQuery("#photostatus-"+e).html(r[2]):jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")"),r[3])(u=jQuery("#fs-a-"+e).attr("href").split("="))[1]=parseInt(u[1])+1,jQuery("#fs-a-"+e).attr("href",u[0]+"="+u[1]),jQuery("#fs-img-"+e).attr("src",u[0]+"="+u[1]);if(r[4])(u=jQuery("#tnp-"+e).attr("src").split("="))[1]=parseInt(u[1])+1,jQuery("#tnp-"+e).attr("src",u[0]+"="+u[1]);void 0!==r[5]&&(jQuery("#imstack-"+e).html(r[5]),r[5].length>0?jQuery("#imstackbutton-"+e).css("display",""):jQuery("#imstackbutton-"+e).css("display","none")),void 0!==r[6]&&jQuery("#dispfileinfo-"+e).html(r[6]);break;case"99":jQuery("#photoitem-"+e).html(o+'<span style="color:red">'+r[2]+"</span>"+n);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+r[2]+" ("+r[1]+")</span>")}"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"hidden"});var c=0,d=-1;for(count=wppaPhotoUpdateMatrix.length;c<count;)wppaPhotoUpdateMatrix[c][0]==e&&wppaPhotoUpdateMatrix[c][1]==t&&(d=c),c++;if(wppaPhotoUpdateMatrix[d]&&(wppaPhotoUpdateMatrix[d][2]=p||0,wppaPhotoUpdateMatrix[d][4]=!1,wppaPhotoUpdateMatrix[d][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),a&&"0"==r[1])return jQuery("#photostatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+e)},1e3)},error:function(t,p,a){wppaAjaxPhotoCount[e]--,jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none")}})}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 o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}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(e,t,p,a,o){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("album-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:6e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(n,i,s){var l=wppaTrim(n).split("||");switch(wppaAjaxAlbumCount--,""!=l[0]&&alert("The server returned unexpected output:\n"+l[0]),l[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+e).html(l[2]):jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+e).html='<span style="color:red">'+l[2]+" ("+l[1]+")</span>"}if(void 0!==l[3]&&wppaProcessFull(l[3],l[4]),o&&"0"==l[1])return jQuery("#albumstatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==t&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var r=0,u=-1,c=wppaAlbumUpdateMatrix.length;r<c;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=r),r++;wppaAlbumUpdateMatrix[u][2]=p||0,wppaAlbumUpdateMatrix[u][4]=!1,wppaAlbumUpdateMatrix[u][5]=!1,wppaAjaxUpdateAlbumMonitor(a)},error:function(t,p,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+p,"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"),t>0?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(e,t,p){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+e+"&wppa-comment-id="+t+"&wppa-comment-status="+p+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var p=wppaTrim(a.responseText).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"0":jQuery("#photostatus-"+e).html(p[2]);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+p[2]+"</span>")}jQuery("#wppa-comment-spin-"+t).css("visibility","hidden")}else jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(e,t){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+e;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,t.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var t=wppaTrim(p.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=p.status)switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+e).attr("title",t[2]),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Error #"+t[1]+", message: "+t[2]+", status: "+p.status),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=10;function wppaMaintenanceProc(e,t,p){if(p);else if(!t&&"yes"==document.getElementById(e+"_continue").value)return document.getElementById(e+"_continue").value="no",document.getElementById(e+"_button").value="Start!",void(jQuery("#"+e+"_togo").html()>0&&(jQuery("#"+e+"_status").html("Pausing..."),jQuery("#"+e+"_button").css("display","none")));p||(document.getElementById(e+"_continue").value="yes",document.getElementById(e+"_button").value="Stop!",""==jQuery("#"+e+"_status").html()&&jQuery("#"+e+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(p?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var o=e.split("||"),n=o[1],i=!1;return n?(o[0].length>10&&(alert("An error occurred:\n"+o[0]),i=!0),jQuery("#"+n+"_status").html(o[2]),jQuery("#"+n+"_togo").html(o[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==o[3]?"reload"==o[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?p||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(t,p,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+$slug+", Error = "+a+", status = "+p,"force"),jQuery("#"+e+"_status").html("Server error #"+(11-wppaAlwaysContinue));var o=!1;--wppaAlwaysContinue<1&&(o=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=10),(o||wppaAlwaysContinue>0)&&("wppa_remake"==e&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==e&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==e&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+e+"', 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*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).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"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(e,t,p){var a=wppaGetXmlHttp();a.onreadystatechange=function(){if(4!=a.readyState)jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");else{var t=wppaTrim(a.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=a.status){switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),t[3]&&alert(t[3])}if(jQuery("#img_"+e).attr("title",t[2]),t[4])for(var p,o,n,i=t[4].split(";"),s=0;s<i.length;)p=i[s].split(":"),o=jQuery("#"+p[0]).html(),n=p[1],""!=o&&""==n&&(n='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(n),s++}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+e).title="Communication error";wppaCheckInconsistencies()}},eslug=wppaEncode(e);var o="action=wppa&wppa-action=update-option&wppa-option="+eslug;o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,0!=t&&(o+="number"==typeof t?"&value="+t:p?"&value="+wppaGetSelectionEnumByClass("."+e,","):"&value="+wppaEncode(t.value)),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)}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(t.length>1)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--),wppaFeCount>1&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==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=[],o=0,n=0;for(t||(t="."),p=jQuery(e),o=0,n=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;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(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+e,async:!0,type:"GET",timeout:1e5,beforeSend:function(t){jQuery("#"+e+"-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(t,p,a){alert("Export Db Table "+e+" failed. Error = "+a+", status = "+p)},complete:function(t,p,a){jQuery("#"+e+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+e,async:!0,type:"GET",timeout:1e5,beforesend:function(e){},success:function(t,p,a){var o=t.split("|");jQuery("#"+e+"_togo").html(o[0]);var n=jQuery("#"+e+"_status").html(),i=o[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("#"+e+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(e)},5e3)},error:function(e){},complete:function(e){}})}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||0==e)))}
1
+ var wppaImageDirectory,wppaAjaxUrl,wppa_moveup_url="#",wppa_import="Import",wppa_update="Update",wppaUploadToThisAlbum="Upload to this album";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),o=document.getElementById("wppa-re-up-butn-"+t);e.preventDefault();var n=a.files[0];if(n.type.match("image.*")){if(0==p.length)alert("Filename will be set to "+n.name);else if(n.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");o.value="Uploading...",o.style.color="black";var i=new FormData;i.append("photo",n,n.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("#photostatus-"+t).html(e[2]),o.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("photostatus-"+t).innerHTML='<span style="color:red">'+e[2]+" ("+e[1]+")</span>",o.value="Error occured",o.style.color="red"}}else alert("An error occurred!")},s.send(i)}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");for(table=1;table<13;table++){var p=wppa_getCookie("table_"+table);for("on"==p?wppaShowTable(table):wppaHideTable(table),subtab=0;subtab<12;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]);p.length>0&&(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))}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(e,t,p){var a="",o="";a=t||'<div style="padding-left:5px;" >',p?o=p:aftrer="</div>",wppaFeAjaxLog("in");var n=wppaGetXmlHttp(),i=wppaAjaxUrl+"?action=wppa&wppa-action=delete-photo&photo-id="+e;i+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,n.open("GET",i,!0),n.send(),n.onreadystatechange=function(){switch(n.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==n.status){var t=wppaTrim(n.responseText).split("||");"ER"==t[0]?(t[3]&&alert(t[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),0==t[1]?document.getElementById("photostatus-"+e).innerHTML=t[2]:(document.getElementById("photoitem-"+e).innerHTML=a+t[2]+o,wppaProcessFull(t[3],t[4])),wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=a+'<span style="color:red;" >Comm error '+n.status+": "+n.statusText+"</span>"+o}}}function wppaAjaxUndeletePhoto(e){wppaFeAjaxLog("in");var t=wppaGetXmlHttp(),p=wppaAjaxUrl+"?action=wppa&wppa-action=undelete-photo&photo-id="+e;p+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t.open("GET",p,!0),t.send(),t.onreadystatechange=function(){switch(t.readyState){case 1:document.getElementById("photostatus-"+e).innerHTML="server connection established";break;case 2:document.getElementById("photostatus-"+e).innerHTML="request received";break;case 3:document.getElementById("photostatus-"+e).innerHTML="processing request";break;case 4:if(200==t.status){var p=wppaTrim(t.responseText).split("||");"ER"==p[0]?(p[3]&&alert(p[3]),jQuery("#wppa-delete-"+e).css("text-decoration","line-through")):""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),0==p[1]?document.getElementById("photostatus-"+e).innerHTML=p[2]:document.getElementById("photoitem-"+e).innerHTML='<div style="padding-left:5px;" >'+p[2]+"</div>",wppaFeAjaxLog("out")}else document.getElementById("photoitem-"+e).innerHTML=before+'<span style="color:red;" >Comm error '+t.status+": "+t.statusText+"</span>"+after}}}function wppaAjaxApplyWatermark(e,t,p){wppaFeAjaxLog("in");var a=wppaGetXmlHttp();jQuery("#wppa-water-spin-"+e).css({visibility:"visible"});var o="action=wppa&wppa-action=watermark-photo&photo-id="+e;o+="&wppa-nonce="+document.getElementById("photo-nonce-"+e).value,t&&(o+="&wppa-watermark-file="+t),p&&(o+="&wppa-watermark-pos="+p),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=wppaTrim(a.responseText).split("||");switch(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),t[1]){case"0":document.getElementById("photostatus-"+e).innerHTML=t[2];break;default:document.getElementById("photostatus-"+e).innerHTML='<span style="color:red">'+t[2]+"</span>"}jQuery("#wppa-water-spin-"+e).css({visibility:"hidden"}),wppaFeAjaxLog("out")}else document.getElementById("photostatus-"+e).innerHTML='<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>"}}var wppaAjaxPhotoCount=new Array,wppaPhotoUpdateMatrix=new Array;function wppaAjaxUpdatePhoto(e,t,p,a,o){var n=!1;o&&(n=0==jQuery("#wppaphotodesc"+o+":visible").length,jQuery("#wppaphotodesc"+o+"-html").click(),n&&jQuery("#wppaphotodesc"+o+"-tmce").click());for(var i=wppaPhotoUpdateMatrix.length,s=0,l=!1,r=-1;s<i;)wppaPhotoUpdateMatrix[s][0]==e&&wppaPhotoUpdateMatrix[s][1]==t&&(l=!0,r=s),s++;if(!l){wppaPhotoUpdateMatrix[i]=[e,t,"undefined",!1,!1,a],r=i}wppaPhotoUpdateMatrix[r][3]="number"==typeof p?p:p.value,wppaPhotoUpdateMatrix[r][5]=a,wppaAjaxUpdatePhotoMonitor()}function wppaAjaxUpdateDelphoto(e,t,p){wppaAjaxUpdatePhoto(e,"del"+t,p)}function wppaAjaxUpdatePhotoMonitor(){for(var e=wppaPhotoUpdateMatrix.length,t=0;t<e;)wppaPhotoUpdateMatrix[t][2]==wppaPhotoUpdateMatrix[t][3]||wppaPhotoUpdateMatrix[t][4]||(wppaPhotoUpdateMatrix[t][4]=!0,_wppaAjaxUpdatePhoto(wppaPhotoUpdateMatrix[t][0],wppaPhotoUpdateMatrix[t][1],wppaPhotoUpdateMatrix[t][3],wppaPhotoUpdateMatrix[t][5])),t++}function _wppaAjaxUpdatePhoto(e,t,p,a,o,n){o||(o=""),n||(n="");wppaFeAjaxLog("in"),wppaAjaxPhotoCount[e]||(wppaAjaxPhotoCount[e]=0),wppaAjaxPhotoCount[e]++,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-photo&photo-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:6e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")")},success:function(i,s,l){var r=wppaTrim(i).split("||");switch(wppaAjaxPhotoCount[e]--,""!=r[0]&&alert("The server returned unexpected output:\n"+r[0]),r[1]){case"0":var u;if(0==wppaAjaxPhotoCount[e]?jQuery("#photostatus-"+e).html(r[2]):jQuery("#photostatus-"+e).html("Working, please wait... ("+wppaAjaxPhotoCount[e]+")"),r[3])(u=jQuery("#fs-a-"+e).attr("href").split("="))[1]=parseInt(u[1])+1,jQuery("#fs-a-"+e).attr("href",u[0]+"="+u[1]),jQuery("#fs-img-"+e).attr("src",u[0]+"="+u[1]);if(r[4])(u=jQuery("#tnp-"+e).attr("src").split("="))[1]=parseInt(u[1])+1,jQuery("#tnp-"+e).attr("src",u[0]+"="+u[1]);void 0!==r[5]&&(jQuery("#imstack-"+e).html(r[5]),r[5].length>0?jQuery("#imstackbutton-"+e).css("display",""):jQuery("#imstackbutton-"+e).css("display","none")),void 0!==r[6]&&jQuery("#dispfileinfo-"+e).html(r[6]);break;case"99":jQuery("#photoitem-"+e).html(o+'<span style="color:red">'+r[2]+"</span>"+n);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+r[2]+" ("+r[1]+")</span>")}"description"==t&&jQuery("#wppa-photo-spin-"+e).css({visibility:"hidden"});var c=0,d=-1;for(count=wppaPhotoUpdateMatrix.length;c<count;)wppaPhotoUpdateMatrix[c][0]==e&&wppaPhotoUpdateMatrix[c][1]==t&&(d=c),c++;if(wppaPhotoUpdateMatrix[d]&&(wppaPhotoUpdateMatrix[d][2]=p||0,wppaPhotoUpdateMatrix[d][4]=!1,wppaPhotoUpdateMatrix[d][5]=!1),wppaFeAjaxLog("out"),wppaAjaxUpdatePhotoMonitor(),a&&"0"==r[1])return jQuery("#photostatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-photo-spin-"+e).css({visibility:"visible"}),void setTimeout(function(){wppaReload("#photo_"+e)},1e3)},error:function(t,p,a){wppaAjaxPhotoCount[e]--,jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdatePhoto failed. Error = "+a+", status = "+p,"force")},complete:function(e,t,p){jQuery("#wppa-admin-spinner").css("display","none")}})}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 o=0==jQuery("#wppaalbumdesc:visible").length;jQuery("#wppaalbumdesc-html").click();for(var n=wppaAlbumUpdateMatrix.length,i=0,s=!1,l=-1;i<n;)wppaAlbumUpdateMatrix[i][0]==e&&wppaAlbumUpdateMatrix[i][1]==t&&(s=!0,l=i),i++;if(!s){wppaAlbumUpdateMatrix[n]=[e,t,"undefined",!1,!1,a],l=n}wppaAlbumUpdateMatrix[l][3]="number"==typeof p?p:p.value,wppaAlbumUpdateMatrix[l][5]=a,wppaAjaxUpdateAlbumMonitor(o)}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(e,t,p,a,o){wppaAjaxAlbumCount++;jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=update-album&album-id="+e+"&item="+t+"&wppa-nonce="+document.getElementById("album-nonce-"+e).value+"&value="+wppaEncode(p),async:!0,type:"POST",timeout:6e4,beforeSend:function(p){"description"==t&&jQuery("#wppa-album-spin").css({visibility:"visible"}),jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")")},success:function(n,i,s){var l=wppaTrim(n).split("||");switch(wppaAjaxAlbumCount--,""!=l[0]&&alert("The server returned unexpected output:\n"+l[0]),l[1]){case"0":0==wppaAjaxAlbumCount?jQuery("#albumstatus-"+e).html(l[2]):jQuery("#albumstatus-"+e).html("Working, please wait... ("+wppaAjaxAlbumCount+")");break;default:jQuery("#albumstatus-"+e).html='<span style="color:red">'+l[2]+" ("+l[1]+")</span>"}if(void 0!==l[3]&&wppaProcessFull(l[3],l[4]),o&&"0"==l[1])return jQuery("#albumstatus-"+e).after('<span style="color:blue;font-weight:bold;"> Reloading...</span>'),jQuery("#wppa-admin-spinner").fadeIn(),void setTimeout(function(){wppaReload()},100);"description"==t&&jQuery("#wppa-album-spin").css({visibility:"hidden"});for(var r=0,u=-1,c=wppaAlbumUpdateMatrix.length;r<c;)wppaAlbumUpdateMatrix[r][0]==e&&wppaAlbumUpdateMatrix[r][1]==t&&(u=r),r++;wppaAlbumUpdateMatrix[u][2]=p||0,wppaAlbumUpdateMatrix[u][4]=!1,wppaAlbumUpdateMatrix[u][5]=!1,wppaAjaxUpdateAlbumMonitor(a)},error:function(t,p,a){wppaAjaxAlbumCount--,jQuery("#albumstatus-"+e).html('<span style="color:red;" >Comm error '+p+"</span>"),wppaConsoleLog("_wppaAjaxUpdateAlbum failed. Error = "+a+", status = "+p,"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"),t>0?jQuery("#notfull").attr("value",wppaUploadToThisAlbum+" (max "+t+")"):jQuery("#notfull").attr("value",wppaUploadToThisAlbum),jQuery("#notfull").css("display",""))}function wppaAjaxUpdateCommentStatus(e,t,p){var a=wppaGetXmlHttp(),o=wppaAjaxUrl+"?action=wppa&wppa-action=update-comment-status&wppa-photo-id="+e+"&wppa-comment-id="+t+"&wppa-comment-status="+p+"&wppa-nonce="+document.getElementById("photo-nonce-"+e).value;a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var p=wppaTrim(a.responseText).split("||");switch(""!=p[0]&&alert("The server returned unexpected output:\n"+p[0]),p[1]){case"0":jQuery("#photostatus-"+e).html(p[2]);break;default:jQuery("#photostatus-"+e).html('<span style="color:red">'+p[2]+"</span>")}jQuery("#wppa-comment-spin-"+t).css("visibility","hidden")}else jQuery("#photostatus-"+e).html('<span style="color:red;" >Comm error '+a.status+": "+a.statusText+"</span>")},a.open("GET",o,!0),a.send()}function wppaAjaxUpdateOptionCheckBox(e,t){var p=wppaGetXmlHttp(),a=wppaAjaxUrl+"?action=wppa&wppa-action=update-option&wppa-option="+e;a+="&wppa-nonce="+document.getElementById("wppa-nonce").value,t.checked?a+="&value=yes":a+="&value=no",p.onreadystatechange=function(){switch(p.readyState){case 1:case 2:case 3:jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");break;case 4:var t=wppaTrim(p.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=p.status)switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#img_"+e).attr("title",t[2]),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Error #"+t[1]+", message: "+t[2]+", status: "+p.status),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0))}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),jQuery("#img_"+e).attr("title","Communication error, status = "+p.status);wppaCheckInconsistencies()}},p.open("GET",a,!0),p.send()}var wppaAlwaysContinue=100;function wppaMaintenanceProc(e,t,p){if(p);else if(!t&&"yes"==document.getElementById(e+"_continue").value)return document.getElementById(e+"_continue").value="no",document.getElementById(e+"_button").value="Start!",void(jQuery("#"+e+"_togo").html()>0&&(jQuery("#"+e+"_status").html("Pausing..."),jQuery("#"+e+"_button").css("display","none")));p||(document.getElementById(e+"_continue").value="yes",document.getElementById(e+"_button").value="Stop!",""==jQuery("#"+e+"_status").html()&&jQuery("#"+e+"_status").html("Wait...")),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=maintenance&slug="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val()+(p?"&wppa-cron":""),async:!0,type:"POST",timeout:3e5,beforeSend:function(e){},success:function(e,t,a){var o=e.split("||"),n=o[1],i=!1;return n?(o[0].length>10&&(alert("An error occurred:\n"+o[0]),i=!0),jQuery("#"+n+"_status").html(o[2]),jQuery("#"+n+"_togo").html(o[3]),jQuery("#"+n+"_button").css("display",""),i||"0"==o[3]?"reload"==o[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?p||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(t,p,a){wppaConsoleLog("wppaMaintenanceProc failed. Slug = "+e+", Error = "+a+", status = "+p,"force"),jQuery("#"+e+"_status").html("Server error #"+(11-wppaAlwaysContinue));var o=!1;--wppaAlwaysContinue<1&&(o=confirm("10 Server errors happened.\nDo you want to continue?"))&&(wppaAlwaysContinue=100),(o||wppaAlwaysContinue>0)&&("wppa_remake"==e&&wppaAjaxUpdateOptionValue("wppa_remake_skip_one",0),"wppa_regen_thumbs"==e&&wppaAjaxUpdateOptionValue("wppa_regen_thumbs_skip_one",0),"wppa_create_o1_files"==e&&wppaAjaxUpdateOptionValue("wppa_create_o1_files_skip_one",0),setTimeout("wppaMaintenanceProc('"+e+"', 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*jQuery(window).width(),p=wppaGetXmlHttp(),a=wppaAjaxUrl,o="action=wppa&wppa-action=maintenancepopup&slug="+e;if(o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,p.open("POST",a,!1),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(o),4==p.readyState&&200==p.status){var n=p.responseText,i={modal:!0,resizable:!0,width:t,show:{effect:"fadeIn",duration:800},closeText:wppaCloseText};jQuery("#wppa-modal-container").html(n).dialog(i).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"}),jQuery(".ui-button").attr("title",wppaCloseText)}}function wppaAjaxUpdateOptionValue(e,t,p){var a=wppaGetXmlHttp();a.onreadystatechange=function(){if(4!=a.readyState)jQuery("#img_"+e).attr("src",wppaImageDirectory+"spinner.gif");else{var t=wppaTrim(a.responseText).split("||");if(""!=t[0]&&alert("The server returned unexpected output:\n"+t[0]),404!=a.status){switch(t[1]){case"0":jQuery("#img_"+e).attr("src",wppaImageDirectory+"tick.png"),t[3]&&alert(t[3]),_wppaRefreshAfter&&(_wppaRefreshAfter=!1,document.location.reload(!0));break;default:jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),t[3]&&alert(t[3])}if(jQuery("#img_"+e).attr("title",t[2]),t[4])for(var p,o,n,i=t[4].split(";"),s=0;s<i.length;)p=i[s].split(":"),o=jQuery("#"+p[0]).html(),n=p[1],""!=o&&""==n&&(n='<input type="button" class="button-secundary" style="border-radius:3px;font-size:11px;height:18px;margin: 0 4px;padding:0px;color:red;background-color:pink;" onclick="document.location.reload(true)" value="Reload" />'),jQuery("#"+p[0]).html(n),s++}else jQuery("#img_"+e).attr("src",wppaImageDirectory+"cross.png"),document.getElementById("img_"+e).title="Communication error";wppaCheckInconsistencies()}},eslug=wppaEncode(e);var o="action=wppa&wppa-action=update-option&wppa-option="+eslug;o+="&wppa-nonce="+document.getElementById("wppa-nonce").value,0!=t&&(o+="number"==typeof t?"&value="+t:p?"&value="+wppaGetSelectionEnumByClass("."+e,","):"&value="+wppaEncode(t.value)),a.open("POST",wppaAjaxUrl,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)}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(t.length>1)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--),wppaFeCount>1&&(wppaFeCount--,jQuery("#wppa-fe-count").html(wppaFeCount)))}function wppaArrayToEnum(e,t){temp=e.sort(function(e,t){return e-t});for(var p,a="",o=-1,n=-2,i=0,s=!1,l=0;l<e.length;)0!=(p=e[l].valueOf())&&(i=o,p==++i?s=!0:s?(a+=o==n?t+o+t+p:t+t+o+t+p,s=!1):a+=t+p,s||(n=p,n++),o=p),l++;for(s&&(a+=".."+o);"."==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=[],o=0,n=0;for(t||(t="."),p=jQuery(e),o=0,n=0;o<p.length;)p[o].selected&&(a[n]=p[o].value,n++),o++;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(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=export-table&table="+e,async:!0,type:"GET",timeout:1e5,beforeSend:function(t){jQuery("#"+e+"-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(t,p,a){alert("Export Db Table "+e+" failed. Error = "+a+", status = "+p)},complete:function(t,p,a){jQuery("#"+e+"-spin").css("display","none")}})}function wppaDismissAdminNotice(e,t){wppaAjaxUpdateOptionCheckBox(e,t),jQuery("#wppa-wr-").css("display","none")}function wppaAjaxUpdateTogo(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=gettogo&slug="+e,async:!0,type:"GET",timeout:1e5,beforesend:function(e){},success:function(t,p,a){var o=t.split("|");jQuery("#"+e+"_togo").html(o[0]);var n=jQuery("#"+e+"_status").html(),i=o[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("#"+e+"_status").html(i),setTimeout(function(){wppaAjaxUpdateTogo(e)},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)}
js/wppa-ajax-front.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsAjaxVersion = '6.8.05';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
@@ -172,6 +172,9 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
172
 
173
  // Fake resize
174
  setTimeout(function(){jQuery(window).trigger('resize')}, 250);
 
 
 
175
  }
176
  } );
177
  }
3
  // Contains frontend ajax modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsAjaxVersion = '6.8.08';
7
 
8
  var wppaRenderAdd = false;
9
  var wppaWaitForCounter = 0;
172
 
173
  // Fake resize
174
  setTimeout(function(){jQuery(window).trigger('resize')}, 250);
175
+
176
+ // Hide rightclick optionally
177
+ wppaProtect();
178
  }
179
  } );
180
  }
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="6.8.05",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(a,p,e,t,o,r){parseInt(o)>0&&o!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+a+", '"+p+"', '"+e+"', '"+t+"', "+o+" )",100):(wppaRenderAdd=t,""!=wppaLang&&(p+="&lang="+wppaLang),wppaAutoColumnWidth[a]&&(p+="&resp=1"),r&&_wppaCurIdx[a]&&_wppaId[a][_wppaCurIdx[a]]&&(p+="&wppa-hilite="+_wppaId[a][_wppaCurIdx[a]]),wppaCanAjaxRender||!e?jQuery.ajax({url:p,async:!0,type:"GET",timeout:6e4,beforeSend:function(p){_wppaSSRuns[a]&&_wppaStop(a),jQuery("#wppa-ajax-spin-"+a).fadeIn()},success:function(p,t,o){if(wppaRenderAdd)jQuery(wppaRenderAdd+p).insertBefore("#wppa-container-"+a+"-end");else if(wppaRenderModal&&e){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(a)})}else jQuery("#wppa-container-"+a).html(p),jQuery("#wppa-button-hide-"+a).show();if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:a,type:"html",html:p},"",e),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(p){try{history.replaceState({page:wppaHis,occur:a,type:"html"},"",e),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=a)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+e,"force"),wppaQRUpdate(e)),wppaColWidth[a]=0,_wppaDoAutocol(a);var n=p.indexOf("<script"),i=p.lastIndexOf("<script");-1==n?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+n+" last at "+i,"force")},error:function(p,t,o){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+o+", status = "+t,"force"),document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)},complete:function(p,e,t){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+a).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+a).stop().fadeOut(),setTimeout(function(){jQuery(window).trigger("resize")},250)}}):(document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)))}function wppaAjaxApprovePhoto(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){rtxt=t.split("||"),"OK"==rtxt[0]?e?(jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),wppaNext(a)):(jQuery(".wppa-approve-"+p).css("display","none"),jQuery(".thumbnail-frame-photo-"+p).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+p).css("text-decoration","line-through")):alert(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p.split("||")[0]?(jQuery(".wppa-approve-"+a).css("display","none"),jQuery(".wppa-comment-"+a).css("display","none")):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){var n=t.split("||");"OK"==n[0]?(jQuery("#admin-choice-"+p+"-"+a).html(n[1]),jQuery("#admin-choice-"+p+"-"+a).val(n[1]),jQuery("#admin-choice-"+p+"-"+a).prop("disabled",!0)):alert(t),e&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(a,p){var e,t=String(p),o="Edit Photo "+t,r=wppaEditPhotoWidth;screen.availWidth<r&&(r=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(e=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+r+", height=512",!0)).document.write("<! DOCTYPE html>"),e.document.write("<html>"),e.document.write("<head>");var p='<meta name="viewport" content="width='+r+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><title>'+o+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';e.document.write(p),e.document.write("</head>"),e.document.write("<body>")}},success:function(p,t,o){if("classic"==wppaUploadEdit&&e.document.write(p),"new"==wppaUploadEdit){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}},error:function(a,p,t){"classic"==wppaUploadEdit&&e.document.write(p+" "+t),wppaConsoleLog("wppaEditPhoto failed. Error = "+t+", status = "+p,"force")},complete:function(a,p,o){"classic"==wppaUploadEdit&&(e.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),e.document.write("</body>"),e.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),u=0,s=0;u<n.length;)n[u].selected&&(i[s]=n[u].value,s++),u++;""!=(o=jQuery("#"+p).val())&&(i[s]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(a){wppaBumpViewCount&&(wppaPhotoView[a]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(p,e,t){wppaPhotoView[a]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+p+"&wppa-occur="+a+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(e,t,o){jQuery("#wppa-vote-button-"+a+"-"+p).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(a,p){if(0!=p&&!_wppaSSRuns[a]){var e=_wppaId[a][_wppaCurIdx[a]],t=_wppaMyr[a][_wppaCurIdx[a]],o=_wppaWaitTexts[a][_wppaCurIdx[a]];o.length>0?alert(o):0!=t&&wppaRatingOnce||t<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+e+"&wppa-occur="+a+"&wppa-index="+_wppaCurIdx[a]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#wppa-rate-"+a+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+a+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"spinner.gif")},success:function(p,e,t){var o=p.split("||");if(0==o[0])900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(a)):alert("Error Code="+o[1]+"\n\n"+o[2]);else{if(o[7]&&"likes"==o[7]){var r=o[4].split("|");jQuery("#wppa-like-"+a).attr("title",r[0]),jQuery("#wppa-liketext-"+a).html(r[1]),"1"==o[3]?jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]}else _wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(a),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7]);wppaNextOnCallback&&_wppaNextOnCallback(a)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(a,p,e,t){0!=p&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(t){jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+e+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(o,r,n){wppaConsoleLog(o,"force");var i=o.split("||");if(0==i[0])900==i[1]?alert(i[2]):alert("Error Code="+i[1]+"\n\n"+i[2]),jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"cross.png");else{if(i[7]&&"likes"==i[7]){var c=i[4].split("|");return jQuery("#wppa-like-0").attr("title",c[0]),jQuery("#wppa-liketext-0").html(c[1]),"1"==i[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+a+"-"+e).attr("title",c[0]),jQuery("#wppa-liketext-"+a+"-"+e).html(c[1]),void("1"==i[3]?jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(e,i[4],".wppa-avg-"),_wppaSetRd(e,i[3],".wppa-rate-"),t)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?wppaIsSafari?("file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):("file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#dwnspin-"+a+"-"+p).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(e,t,o){jQuery("#dwnspin-"+a+"-"+p).css("display","none")}})}function wppaAjaxComment(a,p){if(_wppaValidateComment(a,p)){var e="action=wppa&wppa-action=do-comment&photo-id="+p+"&comname="+jQuery("#wppa-comname-"+a).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+a).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+a).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val()+"&moccur="+a;void 0!==jQuery("#wppa-comemail-"+a).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+a).val()),void 0!==jQuery("#wppa-comment-edit-"+a).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+a).val()),void 0!==jQuery("#wppa-returnurl-"+a).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+a).val())),jQuery("#db-agree-"+a).prop("checked")&&(e+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(p){jQuery("#wppa-comment-spin-"+a).css("display","inline")},success:function(p,e,t){p=p.replace(/\\/g,""),jQuery("#wppa-comments-"+a).html(p),_wppaCurIdx[a]&&(_wppaCommentHtml[a][_wppaCurIdx[a]]=p),wppaOpenComments(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(p,e,t){jQuery("#wppa-comment-spin-"+a).css("display","none")}})}}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){a.length>0&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,p){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var e="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:1e4,success:function(a,e,t){document.getElementById(p).src=a,wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
1
+ var wppaJsAjaxVersion="6.8.08",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(a,p,e,t,o,r){parseInt(o)>0&&o!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+a+", '"+p+"', '"+e+"', '"+t+"', "+o+" )",100):(wppaRenderAdd=t,""!=wppaLang&&(p+="&lang="+wppaLang),wppaAutoColumnWidth[a]&&(p+="&resp=1"),r&&_wppaCurIdx[a]&&_wppaId[a][_wppaCurIdx[a]]&&(p+="&wppa-hilite="+_wppaId[a][_wppaCurIdx[a]]),wppaCanAjaxRender||!e?jQuery.ajax({url:p,async:!0,type:"GET",timeout:6e4,beforeSend:function(p){_wppaSSRuns[a]&&_wppaStop(a),jQuery("#wppa-ajax-spin-"+a).fadeIn()},success:function(p,t,o){if(wppaRenderAdd)jQuery(wppaRenderAdd+p).insertBefore("#wppa-container-"+a+"-end");else if(wppaRenderModal&&e){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(a)})}else jQuery("#wppa-container-"+a).html(p),jQuery("#wppa-button-hide-"+a).show();if(wppaCanPushState&&wppaUpdateAddressLine){wppaHis++;try{history.pushState({page:wppaHis,occur:a,type:"html",html:p},"",e),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(p){try{history.replaceState({page:wppaHis,occur:a,type:"html"},"",e),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=a)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+e,"force"),wppaQRUpdate(e)),wppaColWidth[a]=0,_wppaDoAutocol(a);var n=p.indexOf("<script"),i=p.lastIndexOf("<script");-1==n?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+n+" last at "+i,"force")},error:function(p,t,o){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+o+", status = "+t,"force"),document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)},complete:function(p,e,t){wppaWaitForCounter++,wppaRenderModal||jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+a).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+a).stop().fadeOut(),setTimeout(function(){jQuery(window).trigger("resize")},250),wppaProtect()}}):(document.location.href=e,wppaColWidth[a]=0,_wppaDoAutocol(a)))}function wppaAjaxApprovePhoto(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemovePhoto(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){rtxt=t.split("||"),"OK"==rtxt[0]?e?(jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[a]+"-"+a).attr("alt","removed"),wppaNext(a)):(jQuery(".wppa-approve-"+p).css("display","none"),jQuery(".thumbnail-frame-photo-"+p).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+p).css("text-decoration","line-through")):alert(t)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxApproveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p?jQuery(".wppa-approve-"+a).css("display","none"):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxRemoveComment(a){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+a,async:!0,type:"GET",timeout:6e4,success:function(p,e,t){"OK"==p.split("||")[0]?(jQuery(".wppa-approve-"+a).css("display","none"),jQuery(".wppa-comment-"+a).css("display","none")):alert(p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxAddPhotoToZip(a,p,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+p,async:!0,type:"GET",timeout:6e4,success:function(t,o,r){var n=t.split("||");"OK"==n[0]?(jQuery("#admin-choice-"+p+"-"+a).html(n[1]),jQuery("#admin-choice-"+p+"-"+a).val(n[1]),jQuery("#admin-choice-"+p+"-"+a).prop("disabled",!0)):alert(t),e&&document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,p,e){document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+e+", status = "+p,"force")}})}function wppaEditPhoto(a,p){var e,t=String(p),o="Edit Photo "+t,r=wppaEditPhotoWidth;screen.availWidth<r&&(r=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){if("classic"==wppaUploadEdit){(e=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+r+", height=512",!0)).document.write("<! DOCTYPE html>"),e.document.write("<html>"),e.document.write("<head>");var p='<meta name="viewport" content="width='+r+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><title>'+o+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>';e.document.write(p),e.document.write("</head>"),e.document.write("<body>")}},success:function(p,t,o){if("classic"==wppaUploadEdit&&e.document.write(p),"new"==wppaUploadEdit){var r={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(p).dialog(r).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}},error:function(a,p,t){"classic"==wppaUploadEdit&&e.document.write(p+" "+t),wppaConsoleLog("wppaEditPhoto failed. Error = "+t+", status = "+p,"force")},complete:function(a,p,o){"classic"==wppaUploadEdit&&(e.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),e.document.write("</body>"),e.document.write("</html>"))}})}function wppaPrevTags(a,p,e,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+e).val(),u=0,s=0;u<n.length;)n[u].selected&&(i[s]=n[u].value,s++),u++;""!=(o=jQuery("#"+p).val())&&(i[s]=o),r=i.join(),""==o&&""==e||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+r+"&album="+c,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,p,e){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,p,e){jQuery("#"+t).html('<span style="color:red" >'+e+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxDestroyAlbum(a,p){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+p,async:!0,type:"GET",timeout:6e4,success:function(a,p,e){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,p,e){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+e+", status = "+p,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,p,e){wppaConsoleLog("_bumpClickCount success.")},error:function(a,p,e){wppaConsoleLog("_bumpClickCount failed. Error = "+e+", status = "+p,"force")}})}function _bumpViewCount(a){wppaBumpViewCount&&(wppaPhotoView[a]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(p,e,t){wppaPhotoView[a]=!0},error:function(a,p,e){wppaConsoleLog("_bumpViewCount failed. Error = "+e+", status = "+p,"force")}}))}function wppaVoteThumb(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+p+"&wppa-occur="+a+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(e,t,o){jQuery("#wppa-vote-button-"+a+"-"+p).val(wppaVotedForMe)},error:function(a,p,e){wppaConsoleLog("wppaVoteThumb failed. Error = "+e+", status = "+p,"force")}})}function _wppaRateIt(a,p){if(0!=p&&!_wppaSSRuns[a]){var e=_wppaId[a][_wppaCurIdx[a]],t=_wppaMyr[a][_wppaCurIdx[a]],o=_wppaWaitTexts[a][_wppaCurIdx[a]];o.length>0?alert(o):0!=t&&wppaRatingOnce||t<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+e+"&wppa-occur="+a+"&wppa-index="+_wppaCurIdx[a]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#wppa-rate-"+a+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+a+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"spinner.gif")},success:function(p,e,t){var o=p.split("||");if(0==o[0])900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(a)):alert("Error Code="+o[1]+"\n\n"+o[2]);else{if(o[7]&&"likes"==o[7]){var r=o[4].split("|");jQuery("#wppa-like-"+a).attr("title",r[0]),jQuery("#wppa-liketext-"+a).html(r[1]),"1"==o[3]?jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]}else _wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(a),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7]);wppaNextOnCallback&&_wppaNextOnCallback(a)}},error:function(a,p,e){wppaConsoleLog("_wppaRateIt failed. Error = "+e+", status = "+p,"force")}}))}}function _wppaOvlRateIt(a,p,e,t){0!=p&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+p+"&wppa-rating-id="+a+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(t){jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+e+"-"+p).stop().fadeTo(100,1),jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(o,r,n){wppaConsoleLog(o,"force");var i=o.split("||");if(0==i[0])900==i[1]?alert(i[2]):alert("Error Code="+i[1]+"\n\n"+i[2]),jQuery(".wppa-rate-"+e+"-"+p).attr("src",wppaImageDirectory+"cross.png");else{if(i[7]&&"likes"==i[7]){var c=i[4].split("|");return jQuery("#wppa-like-0").attr("title",c[0]),jQuery("#wppa-liketext-0").html(c[1]),"1"==i[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+a+"-"+e).attr("title",c[0]),jQuery("#wppa-liketext-"+a+"-"+e).html(c[1]),void("1"==i[3]?jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+a+"-"+e).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(e,i[4],".wppa-avg-"),_wppaSetRd(e,i[3],".wppa-rate-"),t)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,p,e){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+e+", status = "+p,"force")}})}function wppaAjaxMakeOrigName(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+p+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,p,e){var t=a.split("||");"0"==t[1]?wppaIsSafari?("file"==wppaArtMonkyLink&&(wppaWindowReference.location=t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):("file"==wppaArtMonkyLink&&window.open(t[2]),"zip"==wppaArtMonkyLink&&(document.location=t[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+t[1]+"\n\n"+t[2]))},error:function(a,p,e){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}function wppaAjaxDownloadAlbum(a,p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){jQuery("#dwnspin-"+a+"-"+p).css("display","")},success:function(a,p,e){var t=a.split("||"),o=t[0],r=t[1],n=t[2];3==t.length&&""!=n&&alert("Attention:\n\n"+n),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,p,e){alert("An error occurred:\n"+e+"\nPlease try again")},complete:function(e,t,o){jQuery("#dwnspin-"+a+"-"+p).css("display","none")}})}function wppaAjaxComment(a,p){if(_wppaValidateComment(a,p)){var e="action=wppa&wppa-action=do-comment&photo-id="+p+"&comname="+jQuery("#wppa-comname-"+a).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+a).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+a).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val()+"&moccur="+a;void 0!==jQuery("#wppa-comemail-"+a).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+a).val()),void 0!==jQuery("#wppa-comment-edit-"+a).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+a).val()),void 0!==jQuery("#wppa-returnurl-"+a).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+a).val())),jQuery("#db-agree-"+a).prop("checked")&&(e+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(p){jQuery("#wppa-comment-spin-"+a).css("display","inline")},success:function(p,e,t){p=p.replace(/\\/g,""),jQuery("#wppa-comments-"+a).html(p),_wppaCurIdx[a]&&(_wppaCommentHtml[a][_wppaCurIdx[a]]=p),wppaOpenComments(a)},error:function(a,p,e){wppaConsoleLog("wppaAjaxComment failed. Error = "+e+", status = "+p,"force")},complete:function(p,e,t){jQuery("#wppa-comment-spin-"+a).css("display","none")}})}}function wppaUpdatePhotoNew(a){for(var p=["name","description","tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],e="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<p.length;)void 0!==jQuery("#"+p[t]).val()&&(e+="&"+p[t]+"="+jQuery("#"+p[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:e,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,p,e){a.length>0&&alert(a)},error:function(a,p,e){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+e+", status = "+p,"force")},complete:function(a,p,e){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,p){if(wppaLastQrcodeUrl!=a){wppaLastQrcodeUrl=a;var e="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a);jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:1e4,success:function(a,e,t){document.getElementById(p).src=a,wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+p)},error:function(a,p,e){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+e+", status = "+p,"force")}})}}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
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 = '6.8.05';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
@@ -265,6 +265,7 @@ wppaConsoleLog( 'wppaOvlShow arg=' + arg );
265
  else {
266
  temp = false;
267
  }
 
268
  if ( temp.length > 1 ) {
269
  if ( temp[0] == 'wppa' && temp[1] == setname ) { // Same set
270
  wppaOvlUrls[j] = anchor.href;
@@ -394,7 +395,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
394
  // Fullsize Video
395
  if ( wppaIsVideo ) {
396
  html =
397
- '<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery( window ).width()+'px; height:'+jQuery( window ).height()+'px; left:0px; top:0px; text-align:center;" >'+
398
  '<video id="wppa-overlay-img" controls preload="metadata"' +
399
  ( wppaOvlVideoStart ? ' autoplay' : '' ) +
400
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
@@ -403,7 +404,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
403
  ' ontouchcancel="wppaTouchCancel( event );"' +
404
  ' onpause="wppaOvlVideoPlaying = false;"' +
405
  ' onplay="wppaOvlVideoPlaying = true;"' +
406
- ' style="border:none; width:'+jQuery( window ).width()+'px; box-shadow:none; position:absolute;"' +
407
  ' alt="'+wppaOvlAlts[idx]+'"' +
408
  ' >'+
409
  wppaOvlVideoHtmls[idx]+
@@ -423,14 +424,14 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
423
  // Fullsize Photo
424
  else {
425
  html =
426
- '<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery( window ).width()+'px; height:'+jQuery( window ).height()+'px; left:0px; top:0px; text-align:center;" >'+
427
  '<img id="wppa-overlay-img"'+
428
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+
429
  ' ontouchend="wppaTouchEnd( event );"'+
430
  ' ontouchmove="wppaTouchMove( event );"'+
431
  ' ontouchcancel="wppaTouchCancel( event );"'+
432
  ' src="'+wppaOvlUrls[idx]+'"'+
433
- ' style="border:none; width:'+jQuery( window ).width()+'px; visibility:hidden; box-shadow:none; position:absolute;"'+
434
  ' alt="'+wppaOvlAlts[idx]+'"'+
435
  ' />';
436
  if ( wppaHasAudio ) {
@@ -503,10 +504,11 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
503
  jQuery( '#wppa-overlay-ic' ).html( html );
504
  }
505
 
506
- // Disable right mouse button
507
- jQuery( '#wppa-overlay-img' ).bind( 'contextmenu', function(e) {
508
- return false;
509
- });
 
510
 
511
  // Replace svg img src to html
512
  // wppaReplaceSvg();
@@ -520,10 +522,10 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
520
  wppaOvlFsPhotoId = 0;
521
  }
522
  wppaOvlFirst = false;
523
-
524
  // Record we are in
525
  wppaOvlOpen = true;
526
-
527
  return false;
528
  }
529
 
@@ -782,7 +784,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
782
  if ( wppaOvlFirst ) {
783
  wppaShowFsButtons();
784
  }
785
-
786
  // Record we are in
787
  wppaOvlOpen = true;
788
 
@@ -888,20 +890,20 @@ wppaConsoleLog( 'wppaOvlSize' );
888
  wppaSavedMarginTop = - parseInt( wppaSavedContainerHeight / 2 );
889
 
890
  // Go to final size
891
- jQuery( '#wppa-overlay-img' ).animate( {
892
- width:wppaSavedImageWidth,
893
- height:wppaSavedImageHeight,
894
- },
895
- speed
896
- );
897
-
898
- jQuery( '#wppa-overlay-ic' ).animate( {
899
- width:wppaSavedContainerWidth,
900
- marginLeft:wppaSavedMarginLeft,
901
- marginTop:wppaSavedMarginTop,
902
- },
903
- speed
904
- );
905
 
906
 
907
  // Done?
@@ -946,7 +948,7 @@ wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
946
  natHeight = img.naturalHeight;
947
  }
948
 
949
- var screenRatio = jQuery( window ).width() / jQuery( window ).height();
950
  var imageRatio = natWidth / natHeight;
951
  var margLeft = 0;
952
  var margTop = 0;
@@ -959,45 +961,45 @@ wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
959
  switch ( wppaOvlMode ) {
960
  case 'padded':
961
  if ( screenRatio > imageRatio ) { // Picture is more portrait
962
- margLeft = ( jQuery( window ).width() - jQuery( window ).height() * imageRatio ) / 2;
963
  margTop = 0;
964
- imgHeight = jQuery( window ).height();
965
- imgWidth = jQuery( window ).height() * imageRatio;
966
  }
967
  else {
968
  margLeft = 0;
969
- margTop = ( jQuery( window ).height() - jQuery( window ).width() / imageRatio ) / 2;
970
- imgHeight = jQuery( window ).width() / imageRatio;
971
- imgWidth = jQuery( window ).width();
972
  }
973
  break;
974
  case 'stretched':
975
  margLeft = 0;
976
  margTop = 0;
977
- imgHeight = jQuery( window ).height();
978
- imgWidth = jQuery( window ).width();
979
  break;
980
  case 'clipped':
981
  if ( screenRatio > imageRatio ) { // Picture is more portrait
982
  margLeft = 0;
983
- margTop = ( jQuery( window ).height() - jQuery( window ).width() / imageRatio ) / 2;
984
- imgHeight = jQuery( window ).width() / imageRatio;
985
- imgWidth = jQuery( window ).width();
986
  }
987
  else {
988
- margLeft = ( jQuery( window ).width() - jQuery( window ).height() * imageRatio ) / 2;
989
  margTop = 0;
990
- imgHeight = jQuery( window ).height();
991
- imgWidth = jQuery( window ).height() * imageRatio;
992
  }
993
  break;
994
  case 'realsize':
995
- margLeft = ( jQuery( window ).width() - natWidth ) / 2;
996
  if ( margLeft < 0 ) {
997
  scrollLeft = parseInt( - margLeft );
998
  margLeft = 0;
999
  }
1000
- margTop = ( jQuery( window ).height() - natHeight ) / 2;
1001
  if ( margTop < 0 ) {
1002
  scrollTop = parseInt( - margTop );
1003
  margTop = 0;
@@ -1115,7 +1117,7 @@ wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1115
  return;
1116
  }
1117
 
1118
- // If the current image is not yet complete, try again after 500 ms
1119
  if ( ! wppaIsVideo ) {
1120
  var elm = document.getElementById( 'wppa-overlay-img' );
1121
  if ( elm ) {
@@ -1187,7 +1189,7 @@ wppaConsoleLog( 'wppaOvlHide' );
1187
 
1188
  // Remove background
1189
  jQuery( '#wppa-overlay-bg' ).fadeOut( 300 );
1190
-
1191
  // Remove kb handler
1192
  jQuery( document ).off( 'keydown', wppaOvlKeyboardHandler );
1193
  wppaKbHandlerInstalled = false;
@@ -1223,7 +1225,7 @@ wppaConsoleLog( 'wppaOvlOnClick' );
1223
  var x = event.screenX - window.screenX;
1224
  var y = event.clientY;
1225
  if ( y > 48 ) {
1226
- if ( x < jQuery( window ).width() / 2 ) wppaOvlShowPrev();
1227
  else wppaOvlShowNext();
1228
  }
1229
  break;
@@ -1239,17 +1241,17 @@ function wppaInitOverlay() {
1239
  wppaConsoleLog( 'wppaInitOverlay' );
1240
 
1241
  // First find subtitles for non-wppa images
1242
- jQuery( '.wp-caption' ).each( function() {
1243
  var div = jQuery( this );
1244
  var title = div.find( 'IMG[alt]' ).attr( 'alt' ) || '';
1245
- var description = div.find( '.wp-caption-text' ).html() || '';
1246
  var a = div.find( 'a' );
1247
  var lbtitle = title + '<br>' + description;
1248
  if ( ! a.attr( 'data-lbtitle' ) ) {
1249
- a.attr( 'data-lbtitle', lbtitle );
1250
  }
1251
  });
1252
-
1253
  if ( wppaOvlMode == '' ) {
1254
  wppaOvlMode = wppaOvlModeInitial;
1255
  }
@@ -1290,7 +1292,7 @@ wppaConsoleLog( 'wppaInitOverlay' );
1290
 
1291
  // found one
1292
  wppaWppaOverlayActivated = true;
1293
-
1294
  // Install handler
1295
  if ( wppaIsMobile ) {
1296
 
@@ -1310,20 +1312,31 @@ wppaConsoleLog( 'wppaInitOverlay' );
1310
 
1311
  }
1312
  else {
1313
-
1314
  // Install onclick handler
1315
  jQuery( anchor ).on( 'click', function( event ) {
1316
  wppaOvlShow( this );
1317
  event.preventDefault();
1318
  });
 
1319
  }
1320
-
1321
- // Install orientationchange handler if mobile
1322
- if ( wppaIsMobile ) {
1323
- window.addEventListener( 'orientationchange', wppaDoOnOrientationChange);
1324
- }
 
 
 
 
1325
  }
1326
  }
 
 
 
 
 
 
1327
  }
1328
 
1329
  // This module is intented to be used in any onclick definition that opens or closes a part of the photo description.
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaLightboxVersion = '6.8.08';
7
 
8
  // Global inits
9
  var wppaNormsBtnOpac = 0.75;
265
  else {
266
  temp = false;
267
  }
268
+
269
  if ( temp.length > 1 ) {
270
  if ( temp[0] == 'wppa' && temp[1] == setname ) { // Same set
271
  wppaOvlUrls[j] = anchor.href;
395
  // Fullsize Video
396
  if ( wppaIsVideo ) {
397
  html =
398
+ '<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+'px; height:'+screen.height+'px; left:0px; top:0px; text-align:center;" >'+
399
  '<video id="wppa-overlay-img" controls preload="metadata"' +
400
  ( wppaOvlVideoStart ? ' autoplay' : '' ) +
401
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
404
  ' ontouchcancel="wppaTouchCancel( event );"' +
405
  ' onpause="wppaOvlVideoPlaying = false;"' +
406
  ' onplay="wppaOvlVideoPlaying = true;"' +
407
+ ' style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;"' +
408
  ' alt="'+wppaOvlAlts[idx]+'"' +
409
  ' >'+
410
  wppaOvlVideoHtmls[idx]+
424
  // Fullsize Photo
425
  else {
426
  html =
427
+ '<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+'px; height:'+screen.height+'px; left:0px; top:0px; text-align:center;" >'+
428
  '<img id="wppa-overlay-img"'+
429
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"'+
430
  ' ontouchend="wppaTouchEnd( event );"'+
431
  ' ontouchmove="wppaTouchMove( event );"'+
432
  ' ontouchcancel="wppaTouchCancel( event );"'+
433
  ' src="'+wppaOvlUrls[idx]+'"'+
434
+ ' style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;"'+
435
  ' alt="'+wppaOvlAlts[idx]+'"'+
436
  ' />';
437
  if ( wppaHasAudio ) {
504
  jQuery( '#wppa-overlay-ic' ).html( html );
505
  }
506
 
507
+ // Disable right mouse button optionally
508
+ wppaProtect();
509
+ // jQuery( '#wppa-overlay-img' ).bind( 'contextmenu', function(e) {
510
+ // return false;
511
+ // });
512
 
513
  // Replace svg img src to html
514
  // wppaReplaceSvg();
522
  wppaOvlFsPhotoId = 0;
523
  }
524
  wppaOvlFirst = false;
525
+
526
  // Record we are in
527
  wppaOvlOpen = true;
528
+
529
  return false;
530
  }
531
 
784
  if ( wppaOvlFirst ) {
785
  wppaShowFsButtons();
786
  }
787
+
788
  // Record we are in
789
  wppaOvlOpen = true;
790
 
890
  wppaSavedMarginTop = - parseInt( wppaSavedContainerHeight / 2 );
891
 
892
  // Go to final size
893
+ jQuery( '#wppa-overlay-img' ).stop().animate( {
894
+ width:wppaSavedImageWidth,
895
+ height:wppaSavedImageHeight,
896
+ },
897
+ speed
898
+ );
899
+
900
+ jQuery( '#wppa-overlay-ic' ).stop().animate( {
901
+ width:wppaSavedContainerWidth,
902
+ marginLeft:wppaSavedMarginLeft,
903
+ marginTop:wppaSavedMarginTop,
904
+ },
905
+ speed
906
+ );
907
 
908
 
909
  // Done?
948
  natHeight = img.naturalHeight;
949
  }
950
 
951
+ var screenRatio = screen.width / screen.height;
952
  var imageRatio = natWidth / natHeight;
953
  var margLeft = 0;
954
  var margTop = 0;
961
  switch ( wppaOvlMode ) {
962
  case 'padded':
963
  if ( screenRatio > imageRatio ) { // Picture is more portrait
964
+ margLeft = ( screen.width - screen.height * imageRatio ) / 2;
965
  margTop = 0;
966
+ imgHeight = screen.height;
967
+ imgWidth = screen.height * imageRatio;
968
  }
969
  else {
970
  margLeft = 0;
971
+ margTop = ( screen.height - screen.width / imageRatio ) / 2;
972
+ imgHeight = screen.width / imageRatio;
973
+ imgWidth = screen.width;
974
  }
975
  break;
976
  case 'stretched':
977
  margLeft = 0;
978
  margTop = 0;
979
+ imgHeight = screen.height;
980
+ imgWidth = screen.width;
981
  break;
982
  case 'clipped':
983
  if ( screenRatio > imageRatio ) { // Picture is more portrait
984
  margLeft = 0;
985
+ margTop = ( screen.height - screen.width / imageRatio ) / 2;
986
+ imgHeight = screen.width / imageRatio;
987
+ imgWidth = screen.width;
988
  }
989
  else {
990
+ margLeft = ( screen.width - screen.height * imageRatio ) / 2;
991
  margTop = 0;
992
+ imgHeight = screen.height;
993
+ imgWidth = screen.height * imageRatio;
994
  }
995
  break;
996
  case 'realsize':
997
+ margLeft = ( screen.width - natWidth ) / 2;
998
  if ( margLeft < 0 ) {
999
  scrollLeft = parseInt( - margLeft );
1000
  margLeft = 0;
1001
  }
1002
+ margTop = ( screen.height - natHeight ) / 2;
1003
  if ( margTop < 0 ) {
1004
  scrollTop = parseInt( - margTop );
1005
  margTop = 0;
1117
  return;
1118
  }
1119
 
1120
+ // If the current image is not yet complete, try again after 50 ms
1121
  if ( ! wppaIsVideo ) {
1122
  var elm = document.getElementById( 'wppa-overlay-img' );
1123
  if ( elm ) {
1189
 
1190
  // Remove background
1191
  jQuery( '#wppa-overlay-bg' ).fadeOut( 300 );
1192
+
1193
  // Remove kb handler
1194
  jQuery( document ).off( 'keydown', wppaOvlKeyboardHandler );
1195
  wppaKbHandlerInstalled = false;
1225
  var x = event.screenX - window.screenX;
1226
  var y = event.clientY;
1227
  if ( y > 48 ) {
1228
+ if ( x < screen.width / 2 ) wppaOvlShowPrev();
1229
  else wppaOvlShowNext();
1230
  }
1231
  break;
1241
  wppaConsoleLog( 'wppaInitOverlay' );
1242
 
1243
  // First find subtitles for non-wppa images
1244
+ jQuery( '.wp-caption' ).each( function() {
1245
  var div = jQuery( this );
1246
  var title = div.find( 'IMG[alt]' ).attr( 'alt' ) || '';
1247
+ var description = div.find( '.wp-caption-text' ).html() || '';
1248
  var a = div.find( 'a' );
1249
  var lbtitle = title + '<br>' + description;
1250
  if ( ! a.attr( 'data-lbtitle' ) ) {
1251
+ a.attr( 'data-lbtitle', lbtitle );
1252
  }
1253
  });
1254
+
1255
  if ( wppaOvlMode == '' ) {
1256
  wppaOvlMode = wppaOvlModeInitial;
1257
  }
1292
 
1293
  // found one
1294
  wppaWppaOverlayActivated = true;
1295
+ /*
1296
  // Install handler
1297
  if ( wppaIsMobile ) {
1298
 
1312
 
1313
  }
1314
  else {
1315
+ */
1316
  // Install onclick handler
1317
  jQuery( anchor ).on( 'click', function( event ) {
1318
  wppaOvlShow( this );
1319
  event.preventDefault();
1320
  });
1321
+ /*
1322
  }
1323
+ */
1324
+ // Set cursor to magnifier
1325
+ jQuery( anchor ).css( 'cursor', 'url( ' + wppaImageDirectory + wppaMagnifierCursor + ' ),auto' );
1326
+ //alert( 'url( wppaImageDirectory + wppaMagnifierCursor ),auto' );
1327
+
1328
+ // // Install orientationchange handler if mobile
1329
+ // if ( wppaIsMobile ) {
1330
+ // window.addEventListener( 'orientationchange', wppaDoOnOrientationChange);
1331
+ // }
1332
  }
1333
  }
1334
+
1335
+ // Install orientationchange handler if mobile
1336
+ if ( wppaIsMobile ) {
1337
+ window.addEventListener( 'orientationchange', wppaDoOnOrientationChange);
1338
+ }
1339
+
1340
  }
1341
 
1342
  // This module is intented to be used in any onclick definition that opens or closes a part of the photo description.
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaLightboxVersion="6.8.05",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=p.keyCode,e=27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"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(mocc),"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(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"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){if(wppaConsoleLog("wppaOvlShow arg="+p),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){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0;var a=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(a[1]){var e,t,o=a[1],l=jQuery("a"),i=0;for(t=0;t<l.length;t++)e=l[t],(a=!!jQuery(e).attr("data-rel")&&jQuery(e).attr("data-rel").split("[")).length>1&&"wppa"==a[0]&&a[1]==o&&(wppaOvlUrls[i]=e.href,jQuery(e).attr("data-lbtitle")?wppaOvlTitles[i]=wppaRepairScriptTags(jQuery(e).attr("data-lbtitle")):wppaOvlTitles[i]=wppaRepairScriptTags(e.title),wppaOvlAlts[i]=jQuery(e).attr("data-alt")?jQuery(e).attr("data-alt"):"",wppaOvlVideoHtmls[i]=jQuery(e).attr("data-videohtml")?decodeURI(jQuery(e).attr("data-videohtml")):"",wppaOvlAudioHtmls[i]=jQuery(e).attr("data-audiohtml")?decodeURI(jQuery(e).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[i]=jQuery(e).attr("data-videonatwidth")?jQuery(e).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[i]=jQuery(e).attr("data-videonatheight")?jQuery(e).attr("data-videonatheight"):"",e.href==p.href&&(wppaOvlIdx=i),i++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),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")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",10);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,"normal"!=wppaOvlMode){wppaIsVideo?(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).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 );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+jQuery(window).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';\" >",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>"):(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+jQuery(window).width()+"px; height:"+jQuery(window).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 );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+jQuery(window).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>",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)),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",1),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!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 );" 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):(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 );" 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||(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","48px",!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","48px",!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","48px",!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),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");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,w,n,d,r=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(n=(i=(r-3*wppaOvlBorderWidth)/o)<(w=v/l)?i:w)<1&&(o=parseInt(o*n),l=parseInt(l*n));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),d=v-s-20-2*wppaOvlBorderWidth):d=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(d*o/l),h=(wppaOvlPadTop,parseInt((r-u)/2),u);l<d&&(wppaOvlPadTop+(d-l)/2,parseInt((r-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),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").animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").stop().fadeOut(),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")}function wppaOvlFormatFull(){var p,a,e;if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];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=jQuery(window).width()/jQuery(window).height(),o=a/e,l=0,i=0,w=0,n=0,d=0,r=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o):(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width());break;case"stretched":l=0,i=0,w=jQuery(window).height(),n=jQuery(window).width();break;case"clipped":t>o?(l=0,i=(jQuery(window).height()-jQuery(window).width()/o)/2,w=jQuery(window).width()/o,n=jQuery(window).width()):(l=(jQuery(window).width()-jQuery(window).height()*o)/2,i=0,w=jQuery(window).height(),n=jQuery(window).height()*o);break;case"realsize":(l=(jQuery(window).width()-a)/2)<0&&(r=parseInt(-l),l=0),(i=(jQuery(window).height()-e)/2)<0&&(d=parseInt(-i),i=0),w=e,n=a,v="auto"}return l=parseInt(l),i=parseInt(i),w=parseInt(w),n=parseInt(n),jQuery(p).css({height:w,width:n,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(d),jQuery("#wppa-ovl-full-bg").scrollLeft(r),jQuery("#wppa-ovl-spin").stop().fadeOut(),!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","48px",!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"),"48px",!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"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1),!1)}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(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),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),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;p.clientY>48&&(a<jQuery(window).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,wppaOvlCurIdx=0,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++)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]&&(wppaWppaOverlayActivated=!0,wppaIsMobile?(jQuery(p).on("touchstart",function(p){wppaStartTime()}),jQuery(p).on("touchend",function(p){wppaInTime()&&wppaOvlShow(this),p.preventDefault()})):jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),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)}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,wppaLightboxVersion="6.8.08",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;null==p?(a=event.keyCode,e=27):(a=p.keyCode,e=27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"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(mocc),"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(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"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){if(wppaConsoleLog("wppaOvlShow arg="+p),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){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0;var a=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(a[1]){var e,t,o=a[1],l=jQuery("a"),i=0;for(t=0;t<l.length;t++)e=l[t],(a=!!jQuery(e).attr("data-rel")&&jQuery(e).attr("data-rel").split("[")).length>1&&"wppa"==a[0]&&a[1]==o&&(wppaOvlUrls[i]=e.href,jQuery(e).attr("data-lbtitle")?wppaOvlTitles[i]=wppaRepairScriptTags(jQuery(e).attr("data-lbtitle")):wppaOvlTitles[i]=wppaRepairScriptTags(e.title),wppaOvlAlts[i]=jQuery(e).attr("data-alt")?jQuery(e).attr("data-alt"):"",wppaOvlVideoHtmls[i]=jQuery(e).attr("data-videohtml")?decodeURI(jQuery(e).attr("data-videohtml")):"",wppaOvlAudioHtmls[i]=jQuery(e).attr("data-audiohtml")?decodeURI(jQuery(e).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[i]=jQuery(e).attr("data-videonatwidth")?jQuery(e).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[i]=jQuery(e).attr("data-videonatheight")?jQuery(e).attr("data-videonatheight"):"",e.href==p.href&&(wppaOvlIdx=i),i++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),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")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",wppaOvlIdx=0}else wppaOvlIdx=p;setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlUrls[p].length>0&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",10);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),wppaOvlRunning||(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),wppaOvlIsSingle=1==wppaOvlUrls.length,"normal"!=wppaOvlMode){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 );" 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';\" >",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>"):(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 );" 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>",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)),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",1),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaOvlOpen=!0,!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 );" 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):(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 );" 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||(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","48px",!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","48px",!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","48px",!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),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),wppaOvlOpen=!0,!1}function wppaOvlSize(p){wppaConsoleLog("wppaOvlSize");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,w,r,d=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(w=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*w),l=parseInt(l*w));var s=jQuery("#wppa-overlay-txt").height();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),r=v-s-20-2*wppaOvlBorderWidth):r=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(r*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<r&&(wppaOvlPadTop+(r-l)/2,parseInt((d-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(h=240,l=180,o=240,O=!1),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").stop().fadeOut(),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")}function wppaOvlFormatFull(){var p,a,e;if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];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,w=0,r=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":t>o?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,w=screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,w=screen.width);break;case"stretched":l=0,i=0,n=screen.height,w=screen.width;break;case"clipped":t>o?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,w=screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,w=screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(r=parseInt(-i),i=0),n=e,w=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),w=parseInt(w),jQuery(p).css({height:n,width:w,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(r),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").stop().fadeOut(),!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","48px",!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"),"48px",!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"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1),!1)}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,!wppaOvlIsSingle&&(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),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),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;p.clientY>48&&(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,wppaOvlCurIdx=0,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++)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]&&(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto"));wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),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)}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-popup.js CHANGED
@@ -2,20 +2,20 @@
2
  //
3
  // Contains popup modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
- //
6
- var wppaJsPopupVersion = '6.1.9';
7
 
8
- // Popup of thumbnail images
9
  function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex, maxsizey ) {
10
 
11
  var topDivBig, topDivSmall, leftDivBig, leftDivSmall;
12
  var heightImgBig, heightImgSmall, widthImgBig, widthImgSmall, widthImgBigSpace;
13
  var puImg;
14
  var imghtml;
15
-
16
  // Give this' occurrances popup its content
17
  if ( document.getElementById( 'x-'+id+'-'+mocc ) ) {
18
-
19
  var namediv = name ? '<div id="wppa-name-'+mocc+'" style="display:none; padding:1px;" class="wppa_pu_info">'+name+'</div>' : '';
20
  var descdiv = desc ? '<div id="wppa-desc-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+desc+'</div>' : '';
21
  var ratediv = rating ? '<div id="wppa-rat-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+rating+'</div>' : '';
@@ -47,42 +47,42 @@ function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex
47
  }
48
  }
49
  }
50
-
51
- // Find handle to the popup image
52
  puImg = document.getElementById( 'wppa-img-'+mocc );
53
 
54
  // Compute ending sizes
55
  widthImgBig = parseInt(maxsizex);
56
  heightImgBig = parseInt(maxsizey);
57
-
58
- // Set width of text fields to width of a landscape image
59
  if ( puImg ) jQuery( ".wppa_pu_info" ).css( 'width', ( ( widthImgBig > heightImgBig ? widthImgBig : heightImgBig ) - 8 )+'px' );
60
-
61
  // Compute starting coords
62
  leftDivSmall = parseInt( elm.offsetLeft ) - 7 - 5 - 1; // thumbnail_area:padding, wppa-img:padding, wppa-border; jQuery().css( "padding" ) does not work for padding in css file, only when litaral in the tag
63
  topDivSmall = parseInt( elm.offsetTop ) - 7 - 1;
64
-
65
  // Compute starting sizes
66
  widthImgSmall = parseInt( elm.clientWidth );
67
  heightImgSmall = parseInt( elm.clientHeight );
68
 
69
  // The hor space for a portrait image is the height of the image to create room for the text on very portrait images
70
  widthImgBigSpace = widthImgBig > heightImgBig ? widthImgBig : heightImgBig;
71
-
72
  // Compute ending coords
73
  leftDivBig = leftDivSmall - parseInt( ( widthImgBigSpace - widthImgSmall ) / 2 );
74
  topDivBig = topDivSmall - parseInt( ( heightImgBig - heightImgSmall ) / 2 );
75
-
76
  // Margin for portrait images
77
  var lrMarg = parseInt( ( widthImgBigSpace - widthImgBig ) / 2 );
78
-
79
  // To fix a Chrome bug where a theme class effect is: max-width:100% causing the width not being animated:
80
  jQuery( '#wppa-img-'+mocc ).css( {"maxWidth":widthImgBig+"px" } );
81
-
82
  // Setup starting properties
83
  jQuery( '#wppa-popup-'+mocc ).css( {"marginLeft":leftDivSmall+"px","marginTop":topDivSmall+"px"} );
84
  jQuery( '#wppa-img-'+mocc ).css( {"marginLeft":0,"marginRight":0,"width":widthImgSmall+"px","height":heightImgSmall+"px"} );
85
-
86
  // Do the animation
87
  jQuery( '#wppa-popup-'+mocc ).stop().animate( {"marginLeft":leftDivBig+"px","marginTop":topDivBig+"px"}, 400 );
88
  jQuery( '#wppa-img-'+mocc ).stop().animate( {"marginLeft":lrMarg+"px","marginRight":lrMarg+"px","width":widthImgBig+"px","height":heightImgBig+"px"}, 400 );
@@ -95,10 +95,13 @@ function wppaPopReady( mocc ) {
95
  jQuery( "#wppa-desc-"+mocc ).show();
96
  jQuery( "#wppa-rat-"+mocc ).show();
97
  jQuery( "#wppa-ncom-"+mocc ).show();
 
 
 
98
  }
99
 
100
  // Dismiss popup
101
- function wppaPopDown( mocc ) {
102
  jQuery( '#wppa-popup-'+mocc ).html( "" );
103
  return;
104
  }
@@ -114,20 +117,20 @@ function wppaFullPopUp( mocc, id, url, xwidth, xheight ) {
114
  if ( elm ) {
115
  name = elm.alt;
116
  desc = elm.title;
117
- }
118
-
119
  // Open new browser window
120
  var wnd = window.open( '', 'Print', 'width='+width+', height='+height+', location=no, resizable=no, menubar=yes ' );
121
-
122
  // Fill it in with the html
123
  wnd.document.write( '<html>' );
124
- wnd.document.write( '<head>' );
125
  wnd.document.write( '<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+'; text-align:center;}</style>' );
126
  wnd.document.write( '<title>'+name+'</title>' );
127
- wnd.document.write(
128
  '<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ></script>' +
129
  '<script type="text/javascript">function wppa_downl() {'+
130
- 'jQuery.ajax( { url: \'' + wppaAjaxUrl + '\',' +
131
  'data: \'action=wppa' +
132
  '&wppa-action=makeorigname' +
133
  '&photo-id=' + id +
@@ -136,7 +139,7 @@ function wppaFullPopUp( mocc, id, url, xwidth, xheight ) {
136
  'type: \'GET\',' +
137
  'timeout: 10000,' +
138
  'beforeSend: function( xhr ) {' +
139
-
140
  '},' +
141
  'success: function( result, status, xhr ) {' +
142
  'result = result.split( "||" );'+
@@ -153,9 +156,9 @@ function wppaFullPopUp( mocc, id, url, xwidth, xheight ) {
153
  'error: function( xhr, status, error ) {' +
154
  'wppaConsoleLog( \'wppaFullPopUp failed. Error = \' + error + \', status = \' + status, \'force\' );' +
155
  '},' +
156
- '} );' +
157
  '}</script>' );
158
- wnd.document.write(
159
  '<script type="text/javascript">function wppa_print() {'+
160
  'document.getElementById( "wppa_printer" ).style.visibility="hidden"; '+
161
  'document.getElementById( "wppa_download" ).style.visibility="hidden"; '+
@@ -173,6 +176,9 @@ function wppaFullPopUp( mocc, id, url, xwidth, xheight ) {
173
  wnd.document.write( '</div>' );
174
  wnd.document.write( '</body>' );
175
  wnd.document.write( '</html>' );
 
 
 
176
  }
177
 
178
  // Say we're in
2
  //
3
  // Contains popup modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
+ //
6
+ var wppaJsPopupVersion = '6.8.08';
7
 
8
+ // Popup of thumbnail images
9
  function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex, maxsizey ) {
10
 
11
  var topDivBig, topDivSmall, leftDivBig, leftDivSmall;
12
  var heightImgBig, heightImgSmall, widthImgBig, widthImgSmall, widthImgBigSpace;
13
  var puImg;
14
  var imghtml;
15
+
16
  // Give this' occurrances popup its content
17
  if ( document.getElementById( 'x-'+id+'-'+mocc ) ) {
18
+
19
  var namediv = name ? '<div id="wppa-name-'+mocc+'" style="display:none; padding:1px;" class="wppa_pu_info">'+name+'</div>' : '';
20
  var descdiv = desc ? '<div id="wppa-desc-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+desc+'</div>' : '';
21
  var ratediv = rating ? '<div id="wppa-rat-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+rating+'</div>' : '';
47
  }
48
  }
49
  }
50
+
51
+ // Find handle to the popup image
52
  puImg = document.getElementById( 'wppa-img-'+mocc );
53
 
54
  // Compute ending sizes
55
  widthImgBig = parseInt(maxsizex);
56
  heightImgBig = parseInt(maxsizey);
57
+
58
+ // Set width of text fields to width of a landscape image
59
  if ( puImg ) jQuery( ".wppa_pu_info" ).css( 'width', ( ( widthImgBig > heightImgBig ? widthImgBig : heightImgBig ) - 8 )+'px' );
60
+
61
  // Compute starting coords
62
  leftDivSmall = parseInt( elm.offsetLeft ) - 7 - 5 - 1; // thumbnail_area:padding, wppa-img:padding, wppa-border; jQuery().css( "padding" ) does not work for padding in css file, only when litaral in the tag
63
  topDivSmall = parseInt( elm.offsetTop ) - 7 - 1;
64
+
65
  // Compute starting sizes
66
  widthImgSmall = parseInt( elm.clientWidth );
67
  heightImgSmall = parseInt( elm.clientHeight );
68
 
69
  // The hor space for a portrait image is the height of the image to create room for the text on very portrait images
70
  widthImgBigSpace = widthImgBig > heightImgBig ? widthImgBig : heightImgBig;
71
+
72
  // Compute ending coords
73
  leftDivBig = leftDivSmall - parseInt( ( widthImgBigSpace - widthImgSmall ) / 2 );
74
  topDivBig = topDivSmall - parseInt( ( heightImgBig - heightImgSmall ) / 2 );
75
+
76
  // Margin for portrait images
77
  var lrMarg = parseInt( ( widthImgBigSpace - widthImgBig ) / 2 );
78
+
79
  // To fix a Chrome bug where a theme class effect is: max-width:100% causing the width not being animated:
80
  jQuery( '#wppa-img-'+mocc ).css( {"maxWidth":widthImgBig+"px" } );
81
+
82
  // Setup starting properties
83
  jQuery( '#wppa-popup-'+mocc ).css( {"marginLeft":leftDivSmall+"px","marginTop":topDivSmall+"px"} );
84
  jQuery( '#wppa-img-'+mocc ).css( {"marginLeft":0,"marginRight":0,"width":widthImgSmall+"px","height":heightImgSmall+"px"} );
85
+
86
  // Do the animation
87
  jQuery( '#wppa-popup-'+mocc ).stop().animate( {"marginLeft":leftDivBig+"px","marginTop":topDivBig+"px"}, 400 );
88
  jQuery( '#wppa-img-'+mocc ).stop().animate( {"marginLeft":lrMarg+"px","marginRight":lrMarg+"px","width":widthImgBig+"px","height":heightImgBig+"px"}, 400 );
95
  jQuery( "#wppa-desc-"+mocc ).show();
96
  jQuery( "#wppa-rat-"+mocc ).show();
97
  jQuery( "#wppa-ncom-"+mocc ).show();
98
+
99
+ // Hide rightclick optionally
100
+ wppaProtect();
101
  }
102
 
103
  // Dismiss popup
104
+ function wppaPopDown( mocc ) {
105
  jQuery( '#wppa-popup-'+mocc ).html( "" );
106
  return;
107
  }
117
  if ( elm ) {
118
  name = elm.alt;
119
  desc = elm.title;
120
+ }
121
+
122
  // Open new browser window
123
  var wnd = window.open( '', 'Print', 'width='+width+', height='+height+', location=no, resizable=no, menubar=yes ' );
124
+
125
  // Fill it in with the html
126
  wnd.document.write( '<html>' );
127
+ wnd.document.write( '<head>' );
128
  wnd.document.write( '<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+'; text-align:center;}</style>' );
129
  wnd.document.write( '<title>'+name+'</title>' );
130
+ wnd.document.write(
131
  '<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ></script>' +
132
  '<script type="text/javascript">function wppa_downl() {'+
133
+ 'jQuery.ajax( { url: \'' + wppaAjaxUrl + '\',' +
134
  'data: \'action=wppa' +
135
  '&wppa-action=makeorigname' +
136
  '&photo-id=' + id +
139
  'type: \'GET\',' +
140
  'timeout: 10000,' +
141
  'beforeSend: function( xhr ) {' +
142
+
143
  '},' +
144
  'success: function( result, status, xhr ) {' +
145
  'result = result.split( "||" );'+
156
  'error: function( xhr, status, error ) {' +
157
  'wppaConsoleLog( \'wppaFullPopUp failed. Error = \' + error + \', status = \' + status, \'force\' );' +
158
  '},' +
159
+ '} );' +
160
  '}</script>' );
161
+ wnd.document.write(
162
  '<script type="text/javascript">function wppa_print() {'+
163
  'document.getElementById( "wppa_printer" ).style.visibility="hidden"; '+
164
  'document.getElementById( "wppa_download" ).style.visibility="hidden"; '+
176
  wnd.document.write( '</div>' );
177
  wnd.document.write( '</body>' );
178
  wnd.document.write( '</html>' );
179
+
180
+ // Hide rightclick optionally
181
+ wppaProtect();
182
  }
183
 
184
  // Say we're in
js/wppa-popup.min.js CHANGED
@@ -1,15 +1 @@
1
- // wppa-popup.js
2
- //
3
- // Contains popup modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaJsPopupVersion='6.1.9';function wppaPopUp(mocc,elm,id,name,desc,rating,ncom,videohtml,maxsizex,maxsizey){var topDivBig,topDivSmall,leftDivBig,leftDivSmall;var heightImgBig,heightImgSmall,widthImgBig,widthImgSmall,widthImgBigSpace;var puImg;var imghtml;if(document.getElementById('x-'+id+'-'+mocc)){var namediv=name?'<div id="wppa-name-'+mocc+'" style="display:none; padding:1px;" class="wppa_pu_info">'+name+'</div>':'';var descdiv=desc?'<div id="wppa-desc-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+desc+'</div>':'';var ratediv=rating?'<div id="wppa-rat-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+rating+'</div>':'';var ncomdiv=ncom?'<div id="wppa-ncom-'+mocc+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+ncom+'</div>':'';var popuptext=namediv+descdiv+ratediv+ncomdiv;var target='';if(wppaThumbTargetBlank){target='target="_blank"';}
8
- switch(wppaPopupLinkType){case'none':imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');break;case'fullpopup':imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[id]+'" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');break;default:if(elm.onclick){imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+imghtml+popuptext+'</div>');document.getElementById('wppa-img-'+mocc).onclick=elm.onclick;}
9
- else{imghtml=videohtml!=''?videohtml:'<img id="wppa-img-'+mocc+'" src="'+elm.src+'" title="" style="border-width: 0px;" />';jQuery('#wppa-popup-'+mocc).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById('x-'+id+'-'+mocc).href+'" '+target+' style="line-height:1px;" >'+imghtml+'</a>'+popuptext+'</div>');}}}
10
- puImg=document.getElementById('wppa-img-'+mocc);widthImgBig=parseInt(maxsizex);heightImgBig=parseInt(maxsizey);if(puImg)jQuery(".wppa_pu_info").css('width',((widthImgBig>heightImgBig?widthImgBig:heightImgBig)-8)+'px');leftDivSmall=parseInt(elm.offsetLeft)-7-5-1;topDivSmall=parseInt(elm.offsetTop)-7-1;widthImgSmall=parseInt(elm.clientWidth);heightImgSmall=parseInt(elm.clientHeight);widthImgBigSpace=widthImgBig>heightImgBig?widthImgBig:heightImgBig;leftDivBig=leftDivSmall-parseInt((widthImgBigSpace-widthImgSmall)/2);topDivBig=topDivSmall-parseInt((heightImgBig-heightImgSmall)/2);var lrMarg=parseInt((widthImgBigSpace-widthImgBig)/2);jQuery('#wppa-img-'+mocc).css({"maxWidth":widthImgBig+"px"});jQuery('#wppa-popup-'+mocc).css({"marginLeft":leftDivSmall+"px","marginTop":topDivSmall+"px"});jQuery('#wppa-img-'+mocc).css({"marginLeft":0,"marginRight":0,"width":widthImgSmall+"px","height":heightImgSmall+"px"});jQuery('#wppa-popup-'+mocc).stop().animate({"marginLeft":leftDivBig+"px","marginTop":topDivBig+"px"},400);jQuery('#wppa-img-'+mocc).stop().animate({"marginLeft":lrMarg+"px","marginRight":lrMarg+"px","width":widthImgBig+"px","height":heightImgBig+"px"},400);setTimeout('wppaPopReady( '+mocc+' )',400);}
11
- function wppaPopReady(mocc){jQuery("#wppa-name-"+mocc).show();jQuery("#wppa-desc-"+mocc).show();jQuery("#wppa-rat-"+mocc).show();jQuery("#wppa-ncom-"+mocc).show();}
12
- function wppaPopDown(mocc){jQuery('#wppa-popup-'+mocc).html("");return;}
13
- function wppaFullPopUp(mocc,id,url,xwidth,xheight){var height=xheight+50;var width=xwidth+14;var name='';var desc='';var elm=document.getElementById('i-'+id+'-'+mocc);if(elm){name=elm.alt;desc=elm.title;}
14
- var wnd=window.open('','Print','width='+width+', height='+height+', location=no, resizable=no, menubar=yes ');wnd.document.write('<html>');wnd.document.write('<head>');wnd.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+'; text-align:center;}</style>');wnd.document.write('<title>'+name+'</title>');wnd.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ></script>'+'<script type="text/javascript">function wppa_downl() {'+'jQuery.ajax( { url: \''+wppaAjaxUrl+'\','+'data: \'action=wppa'+'&wppa-action=makeorigname'+'&photo-id='+id+'&from=popup'+'\','+'async: true,'+'type: \'GET\','+'timeout: 10000,'+'beforeSend: function( xhr ) {'+'},'+'success: function( result, status, xhr ) {'+'result = result.split( "||" );'+'if ( result[1] == "0" ) {'+'window.open( result[2] );'+'return true;'+'}'+'else {'+'alert( "Error: "+result[1]+" "+result[2] );'+'return false;'+'}'+'},'+'error: function( xhr, status, error ) {'+'wppaConsoleLog( \'wppaFullPopUp failed. Error = \' + error + \', status = \' + status, \'force\' );'+'},'+'} );'+'}</script>');wnd.document.write('<script type="text/javascript">function wppa_print() {'+'document.getElementById( "wppa_printer" ).style.visibility="hidden"; '+'document.getElementById( "wppa_download" ).style.visibility="hidden"; '+'window.print();'+'}</script>');wnd.document.write('</head>');wnd.document.write('<body>');wnd.document.write('<div style="width:'+xwidth+'px;">');wnd.document.write('<img src="'+url+'" style="padding-bottom:6px;" /><br/>');wnd.document.write('<div style="text-align:center">'+desc+'</div>');var left=xwidth-66;wnd.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+left+'px; background-color:'+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />');left=xwidth-30;wnd.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+left+'px; background-color:'+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />');wnd.document.write('</div>');wnd.document.write('</body>');wnd.document.write('</html>');}
15
- wppaConsoleLog('wppa-popup.js version '+wppaJsPopupVersion+' loaded.','force');
1
+ var wppaJsPopupVersion="6.8.08";function wppaPopUp(p,t,e,a,o,r,i,n,d,s){var c,l,u,w,m,g,y,h,x,f,v;if(document.getElementById("x-"+e+"-"+p)){var b=(a?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":"")+(r?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":v=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+v+b+"</div>");break;case"fullpopup":v=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+v+b+"</div>");break;default:t.onclick?(v=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+v+b+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(v=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+v+"</a>"+b+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(y>m?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=y>m?y:m,u=w-parseInt((x-h)/2),c=l-parseInt((m-g)/2);var j=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:j+"px",marginRight:j+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,a,o){var r=o+50,i=a+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c=window.open("","Print","width="+i+", height="+r+", location=no, resizable=no, menubar=yes ");c.document.write("<html>"),c.document.write("<head>"),c.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),c.document.write("<title>"+n+"</title>"),c.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),c.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),c.document.write("</head>"),c.document.write("<body>"),c.document.write('<div style="width:'+a+'px;">'),c.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br/>'),c.document.write('<div style="text-align:center">'+d+"</div>");var l=a-66;c.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+l+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),l=a-30,c.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+l+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />'),c.document.write("</div>"),c.document.write("</body>"),c.document.write("</html>"),wppaProtect()}wppaConsoleLog("wppa-popup.js version "+wppaJsPopupVersion+" 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 = '6.7.09';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -836,6 +836,9 @@ function _wppaNextSlide_5( mocc ) {
836
  }
837
  }
838
 
 
 
 
839
  jQuery( window ).trigger( 'resize' );
840
  }
841
 
@@ -1109,7 +1112,8 @@ function wppaMakeTheSlideHtml( mocc, bgfg, idx ) {
1109
  }
1110
 
1111
  html += '<a href="'+url+'"' +
1112
- ' onclick="wppaStopAudio();wppaStopShow('+mocc+');"' +
 
1113
  ' target="'+_wppaLinkTarget[mocc][idx]+'"' +
1114
  ( ( _wppaIsVideo[mocc][i] ) ?
1115
  ' data-videonatwidth="'+_wppaVideoNatWidth[mocc][idx]+'"' +
@@ -1208,13 +1212,22 @@ function _wppaAdjustFilmstrip( mocc ) {
1208
 
1209
  if ( html ) {
1210
 
1211
- // Remove comment-outs
1212
  if ( from <= index <= to ) {
 
 
 
 
 
 
 
 
1213
  if ( html.search( '<!--' ) != -1 ) {
1214
  html = html.replace( '<!--', '' );
1215
  html = html.replace( '-->', '' );
1216
  jQuery( '#film_wppatnf_'+_wppaId[mocc][index]+'_'+mocc ).html( html );
1217
  }
 
1218
  }
1219
 
1220
  // Fit title in
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '6.8.08';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
836
  }
837
  }
838
 
839
+ // Hide rightclick optionally
840
+ wppaProtect();
841
+
842
  jQuery( window ).trigger( 'resize' );
843
  }
844
 
1112
  }
1113
 
1114
  html += '<a href="'+url+'"' +
1115
+ ' onclick="wppaStopAudio();wppaStopShow('+mocc+');return false;"' +
1116
+ ' style="cursor:pointer;"' +
1117
  ' target="'+_wppaLinkTarget[mocc][idx]+'"' +
1118
  ( ( _wppaIsVideo[mocc][i] ) ?
1119
  ' data-videonatwidth="'+_wppaVideoNatWidth[mocc][idx]+'"' +
1212
 
1213
  if ( html ) {
1214
 
1215
+ // Change data-src="..." into src="..."
1216
  if ( from <= index <= to ) {
1217
+
1218
+ var src = jQuery( '#wppa-film-'+index+'-'+mocc ).attr( 'data-src' );
1219
+
1220
+ if ( src ) {
1221
+ jQuery( '#wppa-film-'+index+'-'+mocc ).attr( 'src', src );
1222
+ jQuery( '#wppa-film-'+index+'-'+mocc ).removeAttr( 'data-src' );
1223
+ }
1224
+ /*
1225
  if ( html.search( '<!--' ) != -1 ) {
1226
  html = html.replace( '<!--', '' );
1227
  html = html.replace( '-->', '' );
1228
  jQuery( '#film_wppatnf_'+_wppaId[mocc][index]+'_'+mocc ).html( html );
1229
  }
1230
+ */
1231
  }
1232
 
1233
  // Fit title in
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,d,s,u,_,m,c,y,h,S,x,f,g,I,j,Q,b,v,N,T,C,k){var R;if(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":parseInt(h)>0?_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 "),k.length>0&&(_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]){var L;L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none;" '+L+">"+v+"</video>"}else _wppaSlides[p][a]+='style="'+t+"; cursor:"+R+'; display:none; vertical-align:middle;">';_wppaFullNames[p][a]=r,_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=l,_wppaAvg[p][a]=d,_wppaDisc[p][a]=s,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=c,""!=y?_wppaLinkTarget[p][a]=y: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]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_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","48px",!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button","48px",!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");(_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(_wppaSlides[p].length<2&&!_wppaFirst[p]||(_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&&(jQuery("[id^=wppa-numbar-"+p+"-]").html(" . "),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).html(" "+(_wppaNxtIdx[p]+1)+" ")),_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),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?(jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button","1.5em",!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button","1.5em",!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,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,l=parseInt(jQuery(w).css("width")),d="nil";switch(t==i&&(d="none"),t==i-1&&(d="left"),t==i+1&&(d="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(d="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(d="right"),"nil"==d&&(d=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),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(d){case"left":jQuery(w).animate({marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"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(d){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:l+"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:-l+"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(d){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-l+"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:l+"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(d){case"left":case"right":var s=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:l},wppaAnimationSpeed,"swing"),jQuery(n).animate({maxWidth:s,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"+(1-a)+"-"+p,t="#theslide"+a+"-"+p;jQuery(e).css({zIndex:80}),jQuery(t).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=wppaGetCurrentFullUrl(p,_wppaCurIdx[p]);""==i&&(i=_wppaShareUrl[p][_wppaCurIdx[p]]),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),_wppaSlides[p].length>1&&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(w.length>0){var r=w[w.length-1];r&&(wppaAudioPlaying[p]||r.play())}}jQuery(window).trigger("resize")}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e="theslide"+_wppaFg[p]+"-"+p,t="slide_frame-"+p,i=wppaColWidth[p],w=document.getElementById(a),r=jQuery(".wppa-audio-"+p);if(w){void 0!==i&&0!=i||(i=wppaGetContainerWidth(p),wppaColWidth[p]=i);var o=w.naturalWidth;void 0===o&&(o=parseInt(w.style.maxWidth));var n=w.naturalHeight;void 0===n&&(n=parseInt(w.style.maxHeight));var l=wppaAspectRatio[p],d=wppaFullSize[p],s=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,x,f,g,I,j=wppaStretch;if(u)c=i-s,h=0,S=0,x=i,g=i,I=f=(y=parseInt(c*n/o))+s,jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y});else{if(g=i,d<i&&(g=d),I=parseInt(g*l),x=g,f=I,j||o>=g-s||n>=I-s?(n+s)/(o+s)>l?(y=I-s,c=parseInt(y*o/n)):(c=g-s,y=parseInt(c*n/o)):(c=o,y=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(y+s))/2);break;case"bottom":S=I-(y+s);break;case"fit":S=0,I=y+s,f=y+s}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((i-g)/2);break;case"right":h=i-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+t).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-c)/2;Q&&Q>0&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v,N=parseInt(g/3),T=2*N;v=r.length>0?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,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=_wppaIsVideo[p][e]?"video":"img",w="title";"wppa"==wppaLightBox[p]&&(w="data-lbtitle");var r=""==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]+'"><'+i+r+' 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]+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+i+r+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var o="",n=0,l=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";n<e;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;for(o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]))+'" onclick="wppaStopAudio();wppaStopShow('+p+');" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+w+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>",n=e+1;n<_wppaUrl[p].length;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;t=o}""!=_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;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;){var w=jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html();w&&(e<=i<=t&&-1!=w.search("\x3c!--")&&(w=(w=w.replace("\x3c!--","")).replace("--\x3e",""),jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html(w)),""!=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++}a>-1?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button","1.5em",!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","1.5em",!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++}a>-1?(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","1.5em",!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?_wppaTimeOut[p]>500&&(_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]||a>=(wppaFilmStripLength[p]/wppaThumbnailPitch[p]+1)/2&&(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){if(document.getElementById("wppa-rating-"+p)){var a,e,t,w,r;if(void 0!==(a=_wppaAvg[p][_wppaCurIdx[p]])){if("likes"==wppaRatingDisplayType){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(e=a.split("|"),a=e[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+" ) "),wppaRatingOnce&&r>0)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=a-t,r=wppaStarOpacity+w*(1-wppaStarOpacity),o=wppaRatingMax;for(idx=1;idx<=o;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,r):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}var wppaJsSlideshowVersion="6.7.09";wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
1
+ var wppaJsSlideshowVersion="6.8.08";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,y,h,S,x,f,g,I,j,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":parseInt(h)>0?_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 "),k.length>0&&(_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]=r,_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=Q,_wppaId[p][a]=l,_wppaAvg[p][a]=s,_wppaDisc[p][a]=d,_wppaMyr[p][a]=u,_wppaVRU[p][a]=_,_wppaLinkUrl[p][a]=m,_wppaLinkTitle[p][a]=c,""!=y?_wppaLinkTarget[p][a]=y: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]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(j),_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","48px",!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button","48px",!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");(_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(_wppaSlides[p].length<2&&!_wppaFirst[p]||(_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&&(jQuery("[id^=wppa-numbar-"+p+"-]").html(" . "),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).html(" "+(_wppaNxtIdx[p]+1)+" ")),_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),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?(jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button","1.5em",!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button","1.5em",!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPrevP),jQuery("#next-arrow-"+p).html(wppaNextP+"&nbsp;&raquo;")):(jQuery("#prev-arrow-"+p).html("&laquo;&nbsp;"+wppaPreviousPhoto),jQuery("#next-arrow-"+p).html(wppaNextPhoto+"&nbsp;&raquo;")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating))):wppaMakeTheSlideHtml(p,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,l=parseInt(jQuery(w).css("width")),s="nil";switch(t==i&&(s="none"),t==i-1&&(s="left"),t==i+1&&(s="right"),t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"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(s){case"left":jQuery(w).animate({marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),jQuery(n).fadeIn(10),jQuery(r).animate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).animate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"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(s){case"left":jQuery(w).css({zIndex:80}),jQuery(r).css({marginLeft:l+"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:-l+"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(s){case"left":jQuery(w).css({marginLeft:0,zIndex:81}),jQuery(w).animate({marginLeft:-l+"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:l+"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(s){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:l},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=wppaGetCurrentFullUrl(p,_wppaCurIdx[p]);""==i&&(i=_wppaShareUrl[p][_wppaCurIdx[p]]),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),_wppaSlides[p].length>1&&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(w.length>0){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="theslide"+_wppaFg[p]+"-"+p,t="slide_frame-"+p,i=wppaColWidth[p],w=document.getElementById(a),r=jQuery(".wppa-audio-"+p);if(w){void 0!==i&&0!=i||(i=wppaGetContainerWidth(p),wppaColWidth[p]=i);var o=w.naturalWidth;void 0===o&&(o=parseInt(w.style.maxWidth));var n=w.naturalHeight;void 0===n&&(n=parseInt(w.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,y,h,S,x,f,g,I,j=wppaStretch;if(u)c=i-d,h=0,S=0,x=i,g=i,I=f=(y=parseInt(c*n/o))+d,jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y});else{if(g=i,s<i&&(g=s),x=g,f=I=parseInt(g*l),j||o>=g-d||n>=I-d?(n+d)/(o+d)>l?(y=I-d,c=parseInt(y*o/n)):(c=g-d,y=parseInt(c*n/o)):(c=o,y=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(y+d))/2);break;case"bottom":S=I-(y+d);break;case"fit":S=0,I=y+d,f=y+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+t).css({width:g,height:I}),jQuery("#"+e).css({width:x,height:f}),jQuery("#"+a).css({width:c,height:y}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":h=0;break;case"center":h=parseInt((i-g)/2);break;case"right":h=i-g}h<0&&(h=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+t).css({marginLeft:h})}var Q=jQuery(r).height(),b=(g-c)/2;Q&&Q>0&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v,N=parseInt(g/3),T=2*N;v=r.length>0?I-wppaAudioHeight-wppaSlideBorderWidth-S:I,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=_wppaIsVideo[p][e]?"video":"img",w="title";"wppa"==wppaLightBox[p]&&(w="data-lbtitle");var r=""==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]+'"><'+i+r+' 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]+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+i+r+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var o="",n=0,l=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";n<e;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;for(o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]))+'" onclick="wppaStopAudio();wppaStopShow('+p+');return false;" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+w+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"><'+i+r+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>",n=e+1;n<_wppaUrl[p].length;)o+='<a href="'+(wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][n]:wppaMakeFullsizeUrl(_wppaUrl[p][n]))+'"'+(_wppaIsVideo[p][n]?' data-videonatwidth="'+_wppaVideoNatWidth[p][n]+'" data-videonatheight="'+_wppaVideoNatHeight[p][n]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][n])+'"':"")+(""!=_wppaAudioHtml[p][n]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][n])+'"':"")+" "+w+'="'+_wppaLbTitle[p][n]+'" '+wppaRel+'="'+wppaLightBox[p]+l+'"></a>',n++;t=o}""!=_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;){if(jQuery("#film_wppatnf_"+_wppaId[p][i]+"_"+p).html()){if(e<=i<=t){var w=jQuery("#wppa-film-"+i+"-"+p).attr("data-src");w&&(jQuery("#wppa-film-"+i+"-"+p).attr("src",w),jQuery("#wppa-film-"+i+"-"+p).removeAttr("data-src"))}""!=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++}a>-1?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button","1.5em",!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","1.5em",!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++}a>-1?(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","1.5em",!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?_wppaTimeOut[p]>500&&(_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]||a>=(wppaFilmStripLength[p]/wppaThumbnailPitch[p]+1)/2&&(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){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+" ) "),wppaRatingOnce&&r>0)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;for(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
  // conatins common vars and functions
4
  //
5
- var wppaJsVersion = '6.8.02';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
@@ -150,6 +150,11 @@ var wppaSlideshowNavigationType = 'icons';
150
  var wppaCoverImageResponsive = [];
151
  var wppaSearchBoxSelItems = [];
152
  var wppaSlideWrap = [];
 
 
 
 
 
153
 
154
  // 'Internal' variables ( private )
155
  var _wppaId = [];
@@ -299,15 +304,29 @@ function wppaDoInit( autoOnly ) {
299
 
300
  // Fade ubbs out
301
  setTimeout( function() {
302
- var i = 1;
303
- while( i < wppaTopMoc ) {
304
- if ( jQuery( 'ubb-'+i+'-l' ) ) {
305
- wppaUbb(i,'l','hide');
306
- wppaUbb(i,'r','hide');
307
- }
308
- i++;
309
  }
310
- }, 3000 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  }
312
 
313
  // Initialize Ajax render partial page content with history update
@@ -612,7 +631,7 @@ function _wppaDoAutocol( mocc ) {
612
  jQuery( ".wppa-searchsel-item-"+mocc ).css( 'width', ( 100 / wppaSearchBoxSelItems[mocc] ) + '%' );
613
  }
614
  }
615
-
616
  // Upload dialog album selectionbox
617
  jQuery( ".wppa-upload-album-"+mocc ).css( 'maxWidth', 0.6 * w );
618
 
@@ -1335,5 +1354,52 @@ function wppaIsEmpty( str ) {
1335
  if ( str == 0 ) return true;
1336
  }
1337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1338
  // Say we're in
1339
  wppaConsoleLog( 'wppa.js version '+wppaJsVersion+' loaded.', 'force' );
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsVersion = '6.8.08';
6
 
7
  // Important notice:
8
  // All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
150
  var wppaCoverImageResponsive = [];
151
  var wppaSearchBoxSelItems = [];
152
  var wppaSlideWrap = [];
153
+ var wppaHideRightClick = false;
154
+ var wppaProcessing = 'Processing...';
155
+ var wppaDone = 'Done!';
156
+ var wppaUploadFailed = 'Upload failed';
157
+ var wppaServerError = 'Server error';
158
 
159
  // 'Internal' variables ( private )
160
  var _wppaId = [];
304
 
305
  // Fade ubbs out
306
  setTimeout( function() {
307
+ var i = 1;
308
+ while( i < wppaTopMoc ) {
309
+ if ( jQuery( 'ubb-'+i+'-l' ) ) {
310
+ wppaUbb(i,'l','hide');
311
+ wppaUbb(i,'r','hide');
 
 
312
  }
313
+ i++;
314
+ }
315
+ }, 3000 );
316
+
317
+ wppaProtect();
318
+ }
319
+
320
+ // If disable right mouseclick
321
+ function wppaProtect() {
322
+ if ( wppaHideRightClick ) {
323
+ jQuery( 'img' ).bind( 'contextmenu', function(e) {
324
+ return false;
325
+ });
326
+ jQuery( 'video' ).bind( 'contextmenu', function(e) {
327
+ return false;
328
+ });
329
+ }
330
  }
331
 
332
  // Initialize Ajax render partial page content with history update
631
  jQuery( ".wppa-searchsel-item-"+mocc ).css( 'width', ( 100 / wppaSearchBoxSelItems[mocc] ) + '%' );
632
  }
633
  }
634
+
635
  // Upload dialog album selectionbox
636
  jQuery( ".wppa-upload-album-"+mocc ).css( 'maxWidth', 0.6 * w );
637
 
1354
  if ( str == 0 ) return true;
1355
  }
1356
 
1357
+ function wppaGetUploadOptions( yalb, mocc, where, onComplete ) {
1358
+
1359
+ var options = {
1360
+ beforeSend: function() {
1361
+ jQuery('#progress-'+yalb+'-'+mocc).show();
1362
+ jQuery('#bar-'+yalb+'-'+mocc).width('0%');
1363
+ jQuery('#message-'+yalb+'-'+mocc).html('');
1364
+ jQuery('#percent-'+yalb+'-'+mocc).html('');
1365
+ },
1366
+ uploadProgress: function(event, position, total, percentComplete) {
1367
+ jQuery('#bar-'+yalb+'-'+mocc).css('backgroundColor','#7F7');
1368
+ jQuery('#bar-'+yalb+'-'+mocc).width(percentComplete+'%');
1369
+ if ( percentComplete < 95 ) {
1370
+ jQuery('#percent-'+yalb+'-'+mocc).html(percentComplete+'%');
1371
+ }
1372
+ else {
1373
+ jQuery('#percent-'+yalb+'-'+mocc).html(wppaProcessing);
1374
+ }
1375
+ },
1376
+ success: function() {
1377
+ jQuery('#bar-'+yalb+'-'+mocc).width('100%');
1378
+ jQuery('#percent-'+yalb+'-'+mocc).html(wppaDone);
1379
+ jQuery('.wppa-upload-button').val(wppaUploadButtonText);
1380
+ },
1381
+ complete: function(response) {
1382
+ if (response.responseText.indexOf(wppaUploadFailed)!=-1) {
1383
+ jQuery('#bar-'+yalb+'-'+mocc).css('backgroundColor','#F77');
1384
+ jQuery('#percent-'+yalb+'-'+mocc).html(wppaUploadFailed);
1385
+ jQuery('#message-'+yalb+'-'+mocc).html( '<span style="font-size: 10px;" >'+response.responseText+'</span>' );
1386
+ }
1387
+ else {
1388
+ jQuery('#message-'+yalb+'-'+mocc).html( '<span style="font-size: 10px;" >'+response.responseText+'</span>' );
1389
+ if ( where == 'thumb' || where == 'cover' ) {
1390
+ eval(onComplete);
1391
+ }
1392
+ }
1393
+ },
1394
+ error: function() {
1395
+ jQuery('#message-'+yalb+'-'+mocc).html( '<span style="color: red;" >'+wppaServerError+'</span>' );
1396
+ jQuery('#bar-'+yalb+'-'+mocc).css('backgroundColor','#F77');
1397
+ jQuery('#percent-'+yalb+'-'+mocc).html(wppaUploadFailed);
1398
+ }
1399
+ };
1400
+
1401
+ return options;
1402
+ }
1403
+
1404
  // Say we're in
1405
  wppaConsoleLog( 'wppa.js version '+wppaJsVersion+' loaded.', 'force' );
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug,wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaModalQuitImg,_wppaTextDelay,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIsSingle,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaJsVersion="6.8.02",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],_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,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlRunning=!1,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";function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3)}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(a.length>0)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");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){var a;if(wppaAutoColumnWidth[p]&&(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a)){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(t.length>1){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,s=o-1;e=parseInt((a+8)/o-8);for(var r=0;r<t.length;){switch(r%o){case 0:jQuery(t[r]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[r]).css({marginLeft:"8px",clear:"none",float:"left"})}r++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var i=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(i){var n=a-wppaThumbnailAreaDelta-7,w=parseInt(n/(i+wppaMinThumbSpace)),l=parseInt(.5+(n-w*i)/(w+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:l})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");d;)u=d*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+p).css("height",u),c++,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-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",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),wppaSearchBoxSelItems[p]>0&&(a/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*a)}}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 s=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:s})}}}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(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),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 wppaGetCurrentFullUrl(p,a){var e,t,o,s=document.location.href.split("?"),r="nil",i=0,n=!0;o=wppaShortQargs?"":"wppa-",s[1]&&(r=s[1].split("&"));var w=!1;if(e=s[0],"nil"!=r&&r.length>0)for(;i<r.length;)(t=r[i].split("="))[0]==o+"album"&&(w=!0),t[0]!=o+"photo"&&(e+=n?"?":"&",n=!1,e+=r[i]),i++;return w?(e+=n?"?":"&",e+=wppaUsePhotoNamesInUrls?o+"photo="+encodeURIComponent(_wppaNames[p][a]):o+"photo="+_wppaId[p][a]):""}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 />")}function wppaTrimAlt(p){return void 0===p?"":p.length>13?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,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(t>0){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:10,center:t},s=new google.maps.Map(document.getElementById("map-canvas-"+p),o),r=new google.maps.Marker({position:t,map:s,title:""});google.maps.event.addListener(s,"center_changed",function(){window.setTimeout(function(){s.panTo(r.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=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="",s="";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 r=jQuery(".wppa-ss-albumcat-"+p);for(s="",i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");r=jQuery(".wppa-ss-albumtext-"+p);for(s="",i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.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!=(s=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(s=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");r=jQuery(".wppa-ss-phototag-"+p);for(s="",i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;r=jQuery(".wppa-ss-phototext-"+p);for(s="",i=0;i<r.length;i++)"selected"==jQuery(r[i]).attr("selected")&&(s+="."+jQuery(r[i]).val());""!=(s=s.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())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(s=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=s&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(o.length>2&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(s=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=s&&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+","+s,document.location.href=n}}function wppaAjaxGetSsIptcList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaAjaxGetSsExifList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;e>6&&(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]).removeAttr("checked"),jQuery(e[t]).removeAttr("disabled")):(jQuery(e[t]).attr("checked","checked"),jQuery(e[t]).attr("disabled","disabled")),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){if("checked"==jQuery(p).attr("checked"))for(var a=jQuery(".wppa-rootbox"),e=0;e<a.length;)jQuery(a[e]).attr("checked","checked"),e++}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))))}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="6.8.08",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],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,wppaProcessing="Processing...",wppaDone="Done!",wppaUploadFailed="Upload failed",wppaServerError="Server error",_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,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,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";function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),wppaProtect()}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(a.length>0)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");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){var a;if(wppaAutoColumnWidth[p]&&(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a)){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(t.length>1){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,r=o-1;e=parseInt((a+8)/o-8);for(var s=0;s<t.length;){switch(s%o){case 0:jQuery(t[s]).css({marginLeft:"0px",clear:"both",float:"left"});break;case r:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"left"})}s++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var i=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(i){var n=a-wppaThumbnailAreaDelta-7,l=parseInt(n/(i+wppaMinThumbSpace)),w=parseInt(.5+(n-l*i)/(l+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:w})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");d;)u=d*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+p).css("height",u),c++,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-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",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),wppaSearchBoxSelItems[p]>0&&(a/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*a)}}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(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),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 wppaGetCurrentFullUrl(p,a){var e,t,o,r=document.location.href.split("?"),s="nil",i=0,n=!0;o=wppaShortQargs?"":"wppa-",r[1]&&(s=r[1].split("&"));var l=!1;if(e=r[0],"nil"!=s&&s.length>0)for(;i<s.length;)(t=s[i].split("="))[0]==o+"album"&&(l=!0),t[0]!=o+"photo"&&(e+=n?"?":"&",n=!1,e+=s[i]),i++;return l?(e+=n?"?":"&",e+=wppaUsePhotoNamesInUrls?o+"photo="+encodeURIComponent(_wppaNames[p][a]):o+"photo="+_wppaId[p][a]):""}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 />")}function wppaTrimAlt(p){return void 0===p?"":p.length>13?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,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(t>0){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:10,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=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())&&(o.length>2&&(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())&&(o.length>2&&(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(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaAjaxGetSsExifList(p,a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+a+"&moccur="+p,async:!0,type:"GET",timeout:1e4,beforeSend:function(a){jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(a,t,o){jQuery("#"+e).html(a),jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+p+'", "#'+e+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(a,e,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;e>6&&(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]).removeAttr("checked"),jQuery(e[t]).removeAttr("disabled")):(jQuery(e[t]).attr("checked","checked"),jQuery(e[t]).attr("disabled","disabled")),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){if("checked"==jQuery(p).attr("checked"))for(var a=jQuery(".wppa-rootbox"),e=0;e<a.length;)jQuery(a[e]).attr("checked","checked"),e++}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: 6.8.07
6
- Stable tag: 6.8.06
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -128,6 +128,13 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
128
 
129
  == Upgrade Notice ==
130
 
 
 
 
 
 
 
 
131
  = 6.8.07 =
132
 
133
  * This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.
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: 6.8.08
6
+ Stable tag: 6.8.07
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
128
 
129
  == Upgrade Notice ==
130
 
131
+ = 6.8.08 =
132
+
133
+ * This version addresses various minor bug fixes and feature requests.
134
+ * This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked.
135
+ This setting is now recommended and set ticked as the default.
136
+ * For more info on performance improvements and compatibility with optimizers: see the changelog.txt
137
+
138
  = 6.8.07 =
139
 
140
  * This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.
wppa-admin-functions.php CHANGED
@@ -423,13 +423,13 @@ global $wpdb;
423
  break;
424
  case 'flip':
425
  if ( ! imageflip( $source, IMG_FLIP_VERTICAL ) ) {
426
- return $err;;
427
  }
428
  $rotate = $source;
429
  break;
430
  case 'flop':
431
  if ( ! imageflip( $source, IMG_FLIP_HORIZONTAL ) ) {
432
- return $err;;
433
  }
434
  $rotate = $source;
435
  break;
423
  break;
424
  case 'flip':
425
  if ( ! imageflip( $source, IMG_FLIP_VERTICAL ) ) {
426
+ return $err;
427
  }
428
  $rotate = $source;
429
  break;
430
  case 'flop':
431
  if ( ! imageflip( $source, IMG_FLIP_HORIZONTAL ) ) {
432
+ return $err;
433
  }
434
  $rotate = $source;
435
  break;
wppa-admin.php CHANGED
@@ -134,7 +134,7 @@ function wppa_page_import() {
134
  if ( wppa_is_user_blacklisted() ) wp_die(__( 'Importing is temporary disabled for you' , 'wp-photo-album-plus') );
135
  wppa_grant_albums();
136
  require_once 'wppa-import.php';
137
- echo '<script type="text/javascript">/* <![CDATA[ */wppa_import = "'.__('Import', 'wp-photo-album-plus').'"; wppa_update = "'.__('Update', 'wp-photo-album-plus').'";/* ]]> */</script>';
138
  _wppa_page_import();
139
  }
140
  // Moderate admin page
134
  if ( wppa_is_user_blacklisted() ) wp_die(__( 'Importing is temporary disabled for you' , 'wp-photo-album-plus') );
135
  wppa_grant_albums();
136
  require_once 'wppa-import.php';
137
+ echo '<script type="text/javascript" >/* <![CDATA[ */wppa_import = "'.__('Import', 'wp-photo-album-plus').'"; wppa_update = "'.__('Update', 'wp-photo-album-plus').'";/* ]]> */</script>';
138
  _wppa_page_import();
139
  }
140
  // Moderate admin page
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 6.8.05
6
  *
7
  */
8
 
@@ -363,7 +363,7 @@ global $wppa_log_file;
363
  if ( wppa_switch( 'comment_need_db_agree' ) ) {
364
  if ( ! isset( $_REQUEST['db-agree'] ) ) {
365
  echo
366
- '<script type="text/javascript">' .
367
  'alert( "' . esc_js( __( 'Your comment needs your agreement for database storage', 'wp-photo-album-plus' ) ) . '" )' .
368
  '</script>';
369
  $doit = false;
@@ -499,9 +499,6 @@ global $wppa_log_file;
499
  wppa_exit();
500
  }
501
 
502
- // Remove obsolete files
503
- wppa_delete_obsolete_tempfiles();
504
-
505
  // Open zipfile
506
  if ( ! class_exists( 'ZipArchive' ) ) {
507
  echo '||ER||'.__( 'Unable to create zip archive' , 'wp-photo-album-plus');
@@ -694,9 +691,6 @@ global $wppa_log_file;
694
  wppa_exit();
695
  }
696
 
697
- // Remove obsolete files
698
- wppa_delete_obsolete_tempfiles();
699
-
700
  // Make the files
701
  if ( $type == 'file' ) {
702
  copy( $source, $dest );
@@ -1092,7 +1086,7 @@ global $wppa_log_file;
1092
  $mem = memory_get_peak_usage( true ) / 1024 / 1024;
1093
 
1094
  $msg = sprintf( 'WPPA Ajax render: db queries: WP:%d, WPPA+: %d in %4.2f seconds, using %4.2f MB memory max', $nq_1, $nq_2 - $nq_1, $tim_2 - $tim_1, $mem );
1095
- echo '<script type="text/javascript">wppaConsoleLog( \''.$msg.'\', \'force\' )</script>';
1096
  break;
1097
 
1098
  case 'delete-photo':
@@ -1670,7 +1664,25 @@ global $wppa_log_file;
1670
  case 'sepia':
1671
  case 'skyleft':
1672
  case 'skyright':
1673
- $path = wppa_get_photo_path( $photo );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1674
  switch ( $item ) {
1675
  case 'magickrotleft':
1676
  $command = '-rotate -90';
@@ -1740,6 +1752,8 @@ global $wppa_log_file;
1740
  break;
1741
  }
1742
 
 
 
1743
  // If jpg, apply jpeg quality
1744
  $q = wppa_opt( 'jpeg_quality' );
1745
  $quality = '';
@@ -1752,7 +1766,7 @@ global $wppa_log_file;
1752
 
1753
  // Error?
1754
  if ( $err ) {
1755
- echo '||'.$err.'||'.sprintf( __( 'An error occurred while trying to process photo %s' , 'wp-photo-album-plus' ), $photo );
1756
  }
1757
 
1758
  // Housekeeping
@@ -1760,26 +1774,26 @@ global $wppa_log_file;
1760
 
1761
  // Horizon correction shaves size.
1762
  if ( $item = 'skyleft' || $item = 'skyright' ) {
1763
- wppa_get_photox( $photo, true );
1764
  }
1765
 
1766
  wppa_bump_photo_rev();
1767
- wppa_create_thumbnail( $photo, false );
1768
- $stack = wppa_get_photo_item( $photo, 'magickstack' );
1769
  if ( ! $stack ) {
1770
  $stack = $command;
1771
  }
1772
  else {
1773
  $stack .= ' | ' . $command;
1774
  }
1775
- wppa_update_photo( array( 'id' => $photo, 'magickstack' => $stack ) );
1776
 
1777
  // Update CDN
1778
  $cdn = wppa_cdn( 'admin' );
1779
  if ( $cdn ) {
1780
  switch ( $cdn ) {
1781
  case 'cloudinary':
1782
- wppa_upload_to_cloudinary( $photo );
1783
  break;
1784
  default:
1785
  wppa_dbg_msg( 'Missing upload instructions for '.$cdn, 'red', 'force' );
@@ -1788,9 +1802,9 @@ global $wppa_log_file;
1788
 
1789
  echo
1790
  '||0||' .
1791
- sprintf( __( 'Command %s magically executed on photo %s', 'wp-photo-album-plus' ), '<span style="color:blue;" ><i>'.$command.'</i></span>', $photo ) .
1792
  '||' . get_option( 'wppa_photo_version' ) . '||' . get_option( 'wppa_thumb_version' ) . '||' . $stack .
1793
- '||' . floor( wppa_get_photox( $photo ) ) . ' x ' . floor( wppa_get_photoy( $photo ) ).' px, ' . wppa_get_filesize( wppa_get_photo_path( $photo ) ) . '.';
1794
  }
1795
 
1796
  // Done
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 6.8.08
6
  *
7
  */
8
 
363
  if ( wppa_switch( 'comment_need_db_agree' ) ) {
364
  if ( ! isset( $_REQUEST['db-agree'] ) ) {
365
  echo
366
+ '<script type="text/javascript" >' .
367
  'alert( "' . esc_js( __( 'Your comment needs your agreement for database storage', 'wp-photo-album-plus' ) ) . '" )' .
368
  '</script>';
369
  $doit = false;
499
  wppa_exit();
500
  }
501
 
 
 
 
502
  // Open zipfile
503
  if ( ! class_exists( 'ZipArchive' ) ) {
504
  echo '||ER||'.__( 'Unable to create zip archive' , 'wp-photo-album-plus');
691
  wppa_exit();
692
  }
693
 
 
 
 
694
  // Make the files
695
  if ( $type == 'file' ) {
696
  copy( $source, $dest );
1086
  $mem = memory_get_peak_usage( true ) / 1024 / 1024;
1087
 
1088
  $msg = sprintf( 'WPPA Ajax render: db queries: WP:%d, WPPA+: %d in %4.2f seconds, using %4.2f MB memory max', $nq_1, $nq_2 - $nq_1, $tim_2 - $tim_1, $mem );
1089
+ echo '<script type="text/javascript" >wppaConsoleLog( \''.$msg.'\', \'force\' )</script>';
1090
  break;
1091
 
1092
  case 'delete-photo':
1664
  case 'sepia':
1665
  case 'skyleft':
1666
  case 'skyright':
1667
+ $id = $photo;
1668
+ $src_o1_path = wppa_get_o1_source_path( $id );
1669
+ $src_path = wppa_get_source_path( $id );
1670
+ if ( ! is_file( $src_o1_path ) && ! is_file( $src_path ) ) {
1671
+
1672
+ // Make a backup
1673
+ $src_alb_dir = dirname( $src_path );
1674
+ //$src_alb_dir = $src_dir . '/album-' . wppa_get_photo_item( $id, 'album' );
1675
+ if ( ! is_dir( $src_alb_dir ) ) {
1676
+
1677
+ // Make source album folder
1678
+ wppa_mktree( $src_alb_dir );
1679
+ }
1680
+ $filename = wppa_get_photo_item( $id, 'filename' );
1681
+ $filename = wppa_strip_ext( $filename ) . '.' . wppa_get_photo_item( $id, 'ext' );
1682
+ $path = wppa_get_photo_path( $id );
1683
+ copy( $path, $src_alb_dir . '/' . $filename );
1684
+ wppa_log( 'fso', 'Backup created for magic: ' . $src_alb_dir . '/' . $filename );
1685
+ }
1686
  switch ( $item ) {
1687
  case 'magickrotleft':
1688
  $command = '-rotate -90';
1752
  break;
1753
  }
1754
 
1755
+ $path = wppa_get_photo_path( $id );
1756
+
1757
  // If jpg, apply jpeg quality
1758
  $q = wppa_opt( 'jpeg_quality' );
1759
  $quality = '';
1766
 
1767
  // Error?
1768
  if ( $err ) {
1769
+ echo '||'.$err.'||'.sprintf( __( 'An error occurred while trying to process photo %s' , 'wp-photo-album-plus' ), $id );
1770
  }
1771
 
1772
  // Housekeeping
1774
 
1775
  // Horizon correction shaves size.
1776
  if ( $item = 'skyleft' || $item = 'skyright' ) {
1777
+ wppa_get_photox( $id, true );
1778
  }
1779
 
1780
  wppa_bump_photo_rev();
1781
+ wppa_create_thumbnail( $id, false );
1782
+ $stack = wppa_get_photo_item( $id, 'magickstack' );
1783
  if ( ! $stack ) {
1784
  $stack = $command;
1785
  }
1786
  else {
1787
  $stack .= ' | ' . $command;
1788
  }
1789
+ wppa_update_photo( array( 'id' => $id, 'magickstack' => $stack ) );
1790
 
1791
  // Update CDN
1792
  $cdn = wppa_cdn( 'admin' );
1793
  if ( $cdn ) {
1794
  switch ( $cdn ) {
1795
  case 'cloudinary':
1796
+ wppa_upload_to_cloudinary( $id );
1797
  break;
1798
  default:
1799
  wppa_dbg_msg( 'Missing upload instructions for '.$cdn, 'red', 'force' );
1802
 
1803
  echo
1804
  '||0||' .
1805
+ sprintf( __( 'Command %s magically executed on photo %s', 'wp-photo-album-plus' ), '<span style="color:blue;" ><i>'.$command.'</i></span>', $id ) .
1806
  '||' . get_option( 'wppa_photo_version' ) . '||' . get_option( 'wppa_thumb_version' ) . '||' . $stack .
1807
+ '||' . floor( wppa_get_photox( $id ) ) . ' x ' . floor( wppa_get_photoy( $id ) ).' px, ' . wppa_get_filesize( wppa_get_photo_path( $id ) ) . '.';
1808
  }
1809
 
1810
  // Done
wppa-album-admin-autosave.php CHANGED
@@ -17,7 +17,7 @@ function _wppa_admin() {
17
  if ( get_option('wppa_revision') != $wppa_revno ) wppa_check_database(true);
18
 
19
  echo '
20
- <script type="text/javascript">
21
  /* <![CDATA[ */
22
  wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";
23
  wppaUploadToThisAlbum = "'.__('Upload to this album', 'wp-photo-album-plus').'";
17
  if ( get_option('wppa_revision') != $wppa_revno ) wppa_check_database(true);
18
 
19
  echo '
20
+ <script type="text/javascript" >
21
  /* <![CDATA[ */
22
  wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";
23
  wppaUploadToThisAlbum = "'.__('Upload to this album', 'wp-photo-album-plus').'";
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -917,6 +917,8 @@ global $wpdb;
917
  ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $albumid . ']"' .
918
  ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' .
919
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
 
 
920
  ' >' );
921
 
922
  // the cover image
@@ -926,7 +928,7 @@ global $wpdb;
926
  '<video preload="metadata" class="image wppa-img" id="i-' . $image['id'] . '-' .
927
  wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
928
  '" style="' .
929
- wppa_wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '" ' .
930
  $events . ' >' .
931
  wppa_get_video_body( $image['id'] ) . '</video>'
932
  );
@@ -936,7 +938,7 @@ global $wpdb;
936
  '<img class="image wppa-img" id="i-' . $image['id'] . '-' .
937
  wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
938
  '" src="' . $src . '" style="' .
939
- wppa_wcs( 'wppa-img' ) . $imgattr . $imgattr_a['cursor'] . '" ' .
940
  $events . ' ' . wppa_get_imgalt( $image['id'] ) . ' />'
941
  );
942
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 6.8.08
7
  *
8
  */
9
 
917
  ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $albumid . ']"' .
918
  ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' .
919
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
920
+ ' style="cursor:' . wppa_wait() . ';"' .
921
+ ' onclick="return false;"' .
922
  ' >' );
923
 
924
  // the cover image
928
  '<video preload="metadata" class="image wppa-img" id="i-' . $image['id'] . '-' .
929
  wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
930
  '" style="' .
931
+ wppa_wcs( 'wppa-img' ) . $imgattr . '" ' .
932
  $events . ' >' .
933
  wppa_get_video_body( $image['id'] ) . '</video>'
934
  );
938
  '<img class="image wppa-img" id="i-' . $image['id'] . '-' .
939
  wppa( 'mocc' ) . '" title="' . wppa_zoom_in( $image['id'] ) .
940
  '" src="' . $src . '" style="' .
941
+ wppa_wcs( 'wppa-img' ) . $imgattr . '" ' .
942
  $events . ' ' . wppa_get_imgalt( $image['id'] ) . ' />'
943
  );
944
  }
wppa-album-navigator-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
- * Version 6.8.07
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
@@ -210,17 +210,17 @@ class AlbumNavigatorWidget extends WP_Widget {
210
  '"' .
211
  ' >';
212
  if ( $has_children ) $result .= '
213
- <div' .
214
- ' style="cursor:default;width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;"' .
215
  ' class="anw-'.$w.'-'.$a.'-"' .
216
  ' onclick="' .
217
  'jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');' .
218
  'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');' .
219
  '" >' .
220
  ( $a == $ca ? '&raquo;' : '+') .
221
- '</div>
222
- <div' .
223
- ' style="cursor:default;width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;display:none;"' .
224
  ' class="anw-'.$w.'-'.$a.'"' .
225
  ' onclick="' .
226
  'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');' .
@@ -228,13 +228,15 @@ class AlbumNavigatorWidget extends WP_Widget {
228
  'jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');' .
229
  '" >' .
230
  ( $a == $ca ? '&raquo;' : '-') .
231
- '</div>';
232
  else $result .= '
233
- <div style="width:8px;float:left;position:relative;left:-8px;text-align:center;font-weight:bold;" >' . ( $a == $ca ? '&raquo;' : '&nbsp;' ) . '</div>';
 
 
234
  $result .= '
235
  <a' .
236
  ' href="'.wppa_encrypt_url(wppa_get_permalink( $page ).'&amp;wppa-album='.$a.'&amp;wppa-cover=0&amp;wppa-occur=1'.$slide).'"' .
237
- ' style="position:relative;left:-8px;"' .
238
  ' >' .
239
  wppa_get_album_name( $a ) .
240
  '</a>
3
  * Package: wp-photo-album-plus
4
  *
5
  * display album names linking to content
6
+ * Version 6.8.08
7
  */
8
 
9
  class AlbumNavigatorWidget extends WP_Widget {
210
  '"' .
211
  ' >';
212
  if ( $has_children ) $result .= '
213
+ <span' .
214
+ ' style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;"' .
215
  ' class="anw-'.$w.'-'.$a.'-"' .
216
  ' onclick="' .
217
  'jQuery(\'.anw-'.$w.'-'.$a.'\').css(\'display\',\'\');' .
218
  'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'none\');' .
219
  '" >' .
220
  ( $a == $ca ? '&raquo;' : '+') .
221
+ '</span>
222
+ <span' .
223
+ ' style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;display:none;"' .
224
  ' class="anw-'.$w.'-'.$a.'"' .
225
  ' onclick="' .
226
  'jQuery(\'.anw-'.$w.'-'.$a.'-\').css(\'display\',\'\');' .
228
  'jQuery(\'.p-'.$w.'-'.$a.'\').css(\'display\',\'none\');' .
229
  '" >' .
230
  ( $a == $ca ? '&raquo;' : '-') .
231
+ '</span>';
232
  else $result .= '
233
+ <span style="padding:0;margin:0 2px 0 -4px;cursor:default;font-weight:bold;" >' .
234
+ ( $a == $ca ? '&raquo;' : '&nbsp;' ) .
235
+ '</span>';
236
  $result .= '
237
  <a' .
238
  ' href="'.wppa_encrypt_url(wppa_get_permalink( $page ).'&amp;wppa-album='.$a.'&amp;wppa-cover=0&amp;wppa-occur=1'.$slide).'"' .
239
+ ' style=""' .
240
  ' >' .
241
  wppa_get_album_name( $a ) .
242
  '</a>
wppa-album-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
- * Version 6.8.07
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -194,6 +194,8 @@ class AlbumWidget extends WP_Widget {
194
  ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).'[alw-'.wppa( 'mocc' ).'-'.$album['id'].']"' .
195
  ' ' . wppa( 'lbtitle' ) . '="'.$title.'"' .
196
  ' data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"' .
 
 
197
  ' >';
198
  if ( $thumb['id'] == $image['id'] ) { // the cover image
199
  if ( wppa_is_video( $image['id'] ) ) {
@@ -203,7 +205,7 @@ class AlbumWidget extends WP_Widget {
203
  'controls' => false,
204
  'margin_top' => $imgstyle_a['margin-top'],
205
  'margin_bottom' => $imgstyle_a['margin-bottom'],
206
- 'cursor' => $cursor,
207
  'events' => $imgevents,
208
  'tagid' => 'i-'.$image['id'].'-'.wppa( 'mocc' ),
209
  'title' => wppa_zoom_in( $image['id'] ),
@@ -218,7 +220,7 @@ class AlbumWidget extends WP_Widget {
218
  ' src="'.$imgurl.'"' .
219
  ' width="'.$width.'"' .
220
  ' height="'.$height.'"' .
221
- ' style="'.$imgstyle.$cursor.'" ' .
222
  $imgevents . ' ' .
223
  wppa_get_imgalt( $image['id'] ) .
224
  ' >';
3
  * Package: wp-photo-album-plus
4
  *
5
  * display thumbnail albums
6
+ * Version 6.8.08
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
194
  ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).'[alw-'.wppa( 'mocc' ).'-'.$album['id'].']"' .
195
  ' ' . wppa( 'lbtitle' ) . '="'.$title.'"' .
196
  ' data-alt="' . esc_attr( wppa_get_imgalt( $thumb['id'], true ) ) . '"' .
197
+ ' style="cursor:' . wppa_wait() . ';"' .
198
+ ' onclick="return false;"' .
199
  ' >';
200
  if ( $thumb['id'] == $image['id'] ) { // the cover image
201
  if ( wppa_is_video( $image['id'] ) ) {
205
  'controls' => false,
206
  'margin_top' => $imgstyle_a['margin-top'],
207
  'margin_bottom' => $imgstyle_a['margin-bottom'],
208
+ // 'cursor' => $cursor,
209
  'events' => $imgevents,
210
  'tagid' => 'i-'.$image['id'].'-'.wppa( 'mocc' ),
211
  'title' => wppa_zoom_in( $image['id'] ),
220
  ' src="'.$imgurl.'"' .
221
  ' width="'.$width.'"' .
222
  ' height="'.$height.'"' .
223
+ ' style="'.$imgstyle.'" ' .
224
  $imgevents . ' ' .
225
  wppa_get_imgalt( $image['id'] ) .
226
  ' >';
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -1291,7 +1291,7 @@ function wppa_get_multitag_html( $nperline = '2', $seltags = '' ) {
1291
  $tags = wppa_get_taglist();
1292
 
1293
  $result .= '
1294
- <script type="text/javascript">
1295
  function wppaProcessMultiTagRequest() {
1296
  var any = false;
1297
  var url="' . wppa_encrypt_url( $hr ) . '";';
@@ -3159,7 +3159,7 @@ static $albums_granted;
3159
 
3160
  $head = '';
3161
  $body =
3162
- '<div style="height:6px;;clear:both;" ></div>' .
3163
  '<input' .
3164
  ' type="submit"' .
3165
  ' id="wppa-user-submit-' . $yalb . '-' . $mocc . '"' .
@@ -3203,7 +3203,7 @@ static $albums_granted;
3203
  if ( $where == 'cover' || $where == 'thumb' ) {
3204
  $url_after_ajax_upload = wppa_get_permalink() . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3205
  $ajax_url_after_upload = str_replace( '&amp;', '&', wppa_get_ajaxlink() ) . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3206
- $on_complete = 'wppaDoAjaxRender( ' . $occur . ', \'' . $ajax_url_after_upload . '\', \'' . $url_after_ajax_upload . '\' );';
3207
  }
3208
  else {
3209
  $url_after_ajax_upload = '';
@@ -3214,51 +3214,9 @@ static $albums_granted;
3214
  // Ajax upload script
3215
  if ( $ajax_upload ) {
3216
  $result .=
3217
- '<script>' .
3218
- 'jQuery(document).ready(function() {
3219
-
3220
- var options = {
3221
- beforeSend: function() {
3222
- jQuery("#progress-'.$yalb.'-'.$mocc.'").show();
3223
- //clear everything
3224
- jQuery("#bar-'.$yalb.'-'.$mocc.'").width(\'0%\');
3225
- jQuery("#message-'.$yalb.'-'.$mocc.'").html("");
3226
- jQuery("#percent-'.$yalb.'-'.$mocc.'").html("");
3227
- },
3228
- uploadProgress: function(event, position, total, percentComplete) {
3229
- jQuery("#bar-'.$yalb.'-'.$mocc.'").css(\'backgroundColor\',\'#7F7\');
3230
- jQuery("#bar-'.$yalb.'-'.$mocc.'").width(percentComplete+\'%\');
3231
- if ( percentComplete < 95 ) {
3232
- jQuery("#percent-'.$yalb.'-'.$mocc.'").html(percentComplete+\'%\');
3233
- }
3234
- else {
3235
- jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\'' . __( 'Processing...', 'wp-photo-album-plus' ) . '\');
3236
- }
3237
- },
3238
- success: function() {
3239
- jQuery("#bar-'.$yalb.'-'.$mocc.'").width(\'100%\');
3240
- jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\'' . __( 'Done!', 'wp-photo-album-plus' ) . '\');
3241
- jQuery(".wppa-upload-button").val(wppaUploadButtonText);
3242
- },
3243
- complete: function(response) {
3244
- if (response.responseText.indexOf(\''.__( 'Upload failed', 'wp-photo-album-plus' ).'\')!=-1) {
3245
- jQuery("#bar-'.$yalb.'-'.$mocc.'").css(\'backgroundColor\',\'#F77\');
3246
- jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\''.__('Failed!', 'wp-photo-album-plus').'\');
3247
- jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );
3248
- }
3249
- else {
3250
- jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="font-size: 10px;" >\'+response.responseText+\'</span>\' );' .
3251
- ( $where == 'thumb' || $where == 'cover' ? $on_complete : '' ) . '
3252
- }
3253
- },
3254
- error: function() {
3255
- jQuery("#message-'.$yalb.'-'.$mocc.'").html( \'<span style="color: red;" >'.__( 'Server error.', 'wp-photo-album-plus' ).'</span>\' );
3256
- jQuery("#bar-'.$yalb.'-'.$mocc.'").css(\'backgroundColor\',\'#F77\');
3257
- jQuery("#percent-'.$yalb.'-'.$mocc.'").html(\''.__('Failed!', 'wp-photo-album-plus').'\');
3258
- }
3259
- };
3260
-
3261
- jQuery("#wppa-uplform-'.$yalb.'-'.$mocc.'").ajaxForm(options);
3262
  });
3263
  </script>';
3264
  }
@@ -4385,8 +4343,9 @@ function wppa_bestof_html( $args, $widget = true ) {
4385
  ' class="thumb-img"' .
4386
  ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
4387
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
4388
- ' style="cursor:url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;"' .
4389
  ' title="' . wppa_zoom_in( $id ) . '"' .
 
4390
  ' >';
4391
  }
4392
  elseif ( $linktype != 'none' ) {
@@ -4933,7 +4892,7 @@ function wppa_is_exif_date( $date ) {
4933
  function wppa_get_responsive_widget_js_html( $mocc ) {
4934
 
4935
  $result =
4936
- '<script type="text/javascript">' .
4937
  'wppaAutoColumnWidth['.$mocc.'] = true;' .
4938
  'wppaAutoColumnFrac['.$mocc.'] = 1.0;' .
4939
  'wppaColWidth['.$mocc.'] = 0;' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 6.8.08
7
  *
8
  */
9
 
1291
  $tags = wppa_get_taglist();
1292
 
1293
  $result .= '
1294
+ <script type="text/javascript" >
1295
  function wppaProcessMultiTagRequest() {
1296
  var any = false;
1297
  var url="' . wppa_encrypt_url( $hr ) . '";';
3159
 
3160
  $head = '';
3161
  $body =
3162
+ '<div style="height:6px;clear:both;" ></div>' .
3163
  '<input' .
3164
  ' type="submit"' .
3165
  ' id="wppa-user-submit-' . $yalb . '-' . $mocc . '"' .
3203
  if ( $where == 'cover' || $where == 'thumb' ) {
3204
  $url_after_ajax_upload = wppa_get_permalink() . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3205
  $ajax_url_after_upload = str_replace( '&amp;', '&', wppa_get_ajaxlink() ) . 'wppa-occur=' . wppa( 'occur' ) . '&wppa-cover=0&wppa-album=' . ( is_array( $alb ) ? implode( '.', $alb ) : $alb );
3206
+ $on_complete = 'wppaDoAjaxRender( ' . $occur . ', \'' . $ajax_url_after_upload . '\', \'' . $url_after_ajax_upload . '\' )';
3207
  }
3208
  else {
3209
  $url_after_ajax_upload = '';
3214
  // Ajax upload script
3215
  if ( $ajax_upload ) {
3216
  $result .=
3217
+ '<script>
3218
+ jQuery(document).ready(function() {
3219
+ jQuery("#wppa-uplform-'.$yalb.'-'.$mocc.'").ajaxForm(wppaGetUploadOptions( '.$yalb.', '.$mocc.', "'.$where.'", "'.$on_complete.'" ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3220
  });
3221
  </script>';
3222
  }
4343
  ' class="thumb-img"' .
4344
  ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
4345
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
4346
+ ' style="cursor:' . wppa_wait() . ';"' . // url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;"' .
4347
  ' title="' . wppa_zoom_in( $id ) . '"' .
4348
+ ' onclick="return false;"' .
4349
  ' >';
4350
  }
4351
  elseif ( $linktype != 'none' ) {
4892
  function wppa_get_responsive_widget_js_html( $mocc ) {
4893
 
4894
  $result =
4895
+ '<script type="text/javascript" >' .
4896
  'wppaAutoColumnWidth['.$mocc.'] = true;' .
4897
  'wppaAutoColumnFrac['.$mocc.'] = 1.0;' .
4898
  'wppaColWidth['.$mocc.'] = 0;' .
wppa-common-functions.php CHANGED
@@ -74,11 +74,13 @@ global $thumbs;
74
  wppa_cache_thumb( 'invalidate' );
75
  wppa_cache_album( 'invalidate' );
76
 
77
- $mocc = isset( $wppa['mocc'] ) ? $wppa['mocc'] : '0';
78
- $occ = isset( $wppa['occur'] ) ? $wppa['occur'] : '0';
79
- $wocc = isset( $wppa['widget_occur'] ) ? $wppa['widget_occur'] : '0';
80
- $rend = isset( $wppa['rendering_enabled'] ) ? $wppa['rendering_enabled'] : false;
81
- $debug = isset( $wppa['debug'] ) ? $wppa['debug'] : false;
 
 
82
 
83
  $wppa = array (
84
  'debug' => $debug,
@@ -130,7 +132,7 @@ global $thumbs;
130
  'searchstring' => wppa_test_for_search(),
131
  'searchresults' => '',
132
  'any' => false,
133
- 'ajax' => false,
134
  'error' => false,
135
  'iptc' => false,
136
  'exif' => false,
@@ -216,6 +218,7 @@ global $thumbs;
216
  'is_button' => '',
217
  'max_slides_in_ss_widget' => '',
218
  'is_random' => false,
 
219
 
220
  );
221
  }
@@ -962,6 +965,9 @@ global $cache_path;
962
  wppa_log('obs', 'Generic cache cleared');
963
  }
964
  }
 
 
 
965
  }
966
 
967
  // Removes the content of $dir, ignore errors
@@ -986,7 +992,7 @@ global $wppa;
986
  }
987
 
988
  if ( ! $reload && $msg ) {
989
- wppa_add_js_page_data( '<script type="text/javascript">alert( \'' . $msg . '\' );jQuery( "#wppaer" ).html( "" );</script>' );
990
  }
991
  elseif ( $reload == 'home' ) {
992
  echo '<script id="wppaer" type="text/javascript" >' .
@@ -1771,22 +1777,33 @@ global $wpdb;
1771
  }
1772
  }
1773
 
1774
- function wppa_delete_obsolete_tempfiles() {
1775
 
1776
  // To prevent filling up diskspace, divide lifetime by 2 and repeat removing obsolete files until count <= 10
1777
- $filecount = 101;
1778
- $lifetime = 3600;
1779
- while ( $filecount > 100 ) {
 
 
 
1780
  $files = glob( WPPA_UPLOAD_PATH.'/temp/*' );
1781
  $filecount = 0;
 
1782
  if ( $files ) {
 
1783
  $timnow = time();
1784
  $expired = $timnow - $lifetime;
 
1785
  foreach ( $files as $file ) {
1786
- if ( is_file( $file ) && basename( $file ) != 'index.php' ) {
 
1787
  $modified = filemtime( $file );
1788
- if ( $modified < $expired ) @ unlink( $file );
1789
- else $filecount++;
 
 
 
 
1790
  }
1791
  }
1792
  }
@@ -1826,7 +1843,7 @@ global $wpdb;
1826
  }
1827
  }
1828
 
1829
- function wppa_add_js_page_data( $txt ) {
1830
  global $wppa_js_page_data_file;
1831
  global $wppa;
1832
 
@@ -1843,14 +1860,17 @@ global $wppa;
1843
  }
1844
 
1845
  if ( $handle ) {
1846
- $txt = str_replace( '<script type="text/javascript">', '', $txt );
1847
  $txt = str_replace( '</script>', '', $txt );
1848
  $txt = str_replace( "\t", '', $txt );
1849
- $txt = str_replace( "\n", '', $txt );
1850
  $txt = trim( $txt );
1851
  if ( $txt ) fwrite( $handle, "\n".$txt );
1852
  fclose( $handle );
1853
  }
 
 
 
1854
  else {
1855
  $wppa['out'] .= $txt;
1856
  }
74
  wppa_cache_thumb( 'invalidate' );
75
  wppa_cache_album( 'invalidate' );
76
 
77
+ $mocc = isset( $wppa['mocc'] ) ? $wppa['mocc'] : '0';
78
+ $occ = isset( $wppa['occur'] ) ? $wppa['occur'] : '0';
79
+ $wocc = isset( $wppa['widget_occur'] ) ? $wppa['widget_occur'] : '0';
80
+ $rend = isset( $wppa['rendering_enabled'] ) ? $wppa['rendering_enabled'] : false;
81
+ $debug = isset( $wppa['debug'] ) ? $wppa['debug'] : false;
82
+ $ajax = defined( 'DOING_AJAX' ) ? true : false;
83
+ $cron = wppa_is_cron();
84
 
85
  $wppa = array (
86
  'debug' => $debug,
132
  'searchstring' => wppa_test_for_search(),
133
  'searchresults' => '',
134
  'any' => false,
135
+ 'ajax' => $ajax,
136
  'error' => false,
137
  'iptc' => false,
138
  'exif' => false,
218
  'is_button' => '',
219
  'max_slides_in_ss_widget' => '',
220
  'is_random' => false,
221
+ 'cron' => $cron,
222
 
223
  );
224
  }
965
  wppa_log('obs', 'Generic cache cleared');
966
  }
967
  }
968
+
969
+ // Remove tempfiles
970
+ wppa_delete_obsolete_tempfiles( true );
971
  }
972
 
973
  // Removes the content of $dir, ignore errors
992
  }
993
 
994
  if ( ! $reload && $msg ) {
995
+ wppa_add_js_page_data( '<script type="text/javascript" >alert( \'' . $msg . '\' );jQuery( "#wppaer" ).html( "" );</script>' );
996
  }
997
  elseif ( $reload == 'home' ) {
998
  echo '<script id="wppaer" type="text/javascript" >' .
1777
  }
1778
  }
1779
 
1780
+ function wppa_delete_obsolete_tempfiles( $force = false ) {
1781
 
1782
  // To prevent filling up diskspace, divide lifetime by 2 and repeat removing obsolete files until count <= 10
1783
+ $filecount = 101;
1784
+ $lifetime = 3600;
1785
+ $max = $force ? 1 : 100;
1786
+
1787
+ while ( $filecount > $max ) {
1788
+
1789
  $files = glob( WPPA_UPLOAD_PATH.'/temp/*' );
1790
  $filecount = 0;
1791
+
1792
  if ( $files ) {
1793
+
1794
  $timnow = time();
1795
  $expired = $timnow - $lifetime;
1796
+
1797
  foreach ( $files as $file ) {
1798
+
1799
+ if ( is_file( $file ) && basename( $file ) != 'index.php' && basename( $file ) != 'wmfdummy.png' ) {
1800
  $modified = filemtime( $file );
1801
+ if ( $modified < $expired || $force ) {
1802
+ @ unlink( $file );
1803
+ }
1804
+ else {
1805
+ $filecount++;
1806
+ }
1807
  }
1808
  }
1809
  }
1843
  }
1844
  }
1845
 
1846
+ function wppa_add_js_page_data( $txt, $echo_if_no_file = false ) {
1847
  global $wppa_js_page_data_file;
1848
  global $wppa;
1849
 
1860
  }
1861
 
1862
  if ( $handle ) {
1863
+ $txt = str_replace( '<script type="text/javascript" >', '', $txt );
1864
  $txt = str_replace( '</script>', '', $txt );
1865
  $txt = str_replace( "\t", '', $txt );
1866
+ // $txt = str_replace( "\n", '', $txt );
1867
  $txt = trim( $txt );
1868
  if ( $txt ) fwrite( $handle, "\n".$txt );
1869
  fclose( $handle );
1870
  }
1871
+ elseif ( $echo_if_no_file ) {
1872
+ echo $txt;
1873
+ }
1874
  else {
1875
  $wppa['out'] .= $txt;
1876
  }
wppa-cron.php CHANGED
@@ -352,6 +352,9 @@ function _wppa_do_clear_cache( $dir ) {
352
  }
353
  }
354
  }
 
 
 
355
  }
356
 
357
  // Activate treecount update proc
352
  }
353
  }
354
  }
355
+
356
+ // Also delete tempfiles
357
+ wppa_delete_obsolete_tempfiles();
358
  }
359
 
360
  // Activate treecount update proc
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -486,12 +486,14 @@ function wppa_lightbox_global( $content ) {
486
  if ( wppa_opt( 'lightbox_name' ) == 'wppa' ) { // Our lightbox
487
  if ( wppa_switch( 'lightbox_global_set' ) ) { // A set
488
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
489
- $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa[single]" style="'.' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier' ).'),pointer;'.'"$6>';
 
490
  $content = preg_replace($pattern, $replacement, $content);
491
  }
492
  else { // Not a set
493
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
494
- $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa" style="'.' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier' ).'),pointer;'.'"$6>';
 
495
  $content = preg_replace($pattern, $replacement, $content);
496
  }
497
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 6.8.08
7
  *
8
  */
9
 
486
  if ( wppa_opt( 'lightbox_name' ) == 'wppa' ) { // Our lightbox
487
  if ( wppa_switch( 'lightbox_global_set' ) ) { // A set
488
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
489
+ // $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa[single]" style="'.' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier' ).'),pointer;'.'"$6>';
490
+ $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa[single]" style="cursor:' . wppa_wait() . ';" onclick="return false;" $6>';
491
  $content = preg_replace($pattern, $replacement, $content);
492
  }
493
  else { // Not a set
494
  $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
495
+ // $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa" style="'.' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier' ).'),pointer;'.'"$6>';
496
+ $replacement = '<a$1href=$2$3.$4$5 data-rel="wppa" style="cursor:' . wppa_wait() . ';" onclick="return false;" $6>';
497
  $content = preg_replace($pattern, $replacement, $content);
498
  }
499
  }
wppa-functions.php CHANGED
@@ -19,8 +19,6 @@ global $wpdb;
19
  global $thumbs;
20
  global $wppa_session;
21
 
22
- wppa_add_wppa_on_page();
23
-
24
  // Diagnostics
25
  wppa_dbg_msg( 'Entering wppa_albums' );
26
  wppa_dbg_msg( 'Lang=' . $wppa_lang . ', Locale=' . $wppa_locale . ', Ajax=' . wppa( 'ajax' ) );
@@ -2455,7 +2453,7 @@ global $wppa_done;
2455
  $old_entry = $wpdb->prepare( 'SELECT * FROM `'.WPPA_COMMENTS.'` WHERE `photo` = %s AND `user` = %s AND `comment` = %s LIMIT 1', $photo, $user, $save_comment );
2456
  $iret = $wpdb->query( $old_entry );
2457
  if ( $iret ) {
2458
- if ( wppa( 'debug' ) ) echo( '<script type="text/javascript">alert( "Duplicate comment ignored" )</script>' );
2459
  return;
2460
  }
2461
  $key = wppa_create_comments_entry( array( 'photo' => $photo, 'user' => $user, 'email' => $email, 'comment' => $save_comment, 'status' => $status ) );
@@ -2481,13 +2479,13 @@ global $wppa_done;
2481
  if ( $status == 'spam' ) {
2482
  if ( $wrong_captcha ) {
2483
  echo
2484
- '<script type="text/javascript">' .
2485
  'alert( "'.__( 'Sorry, you gave a wrong answer.\n\nPlease try again to solve the computation.' , 'wp-photo-album-plus').'" )' .
2486
  '</script>';
2487
  }
2488
  else {
2489
  echo
2490
- '<script type="text/javascript">' .
2491
  'alert( "'.__( 'Sorry, your comment is not accepted.' , 'wp-photo-album-plus').'" )' .
2492
  '</script>';
2493
  }
@@ -2661,7 +2659,7 @@ global $wppa_done;
2661
  wppa_clear_cache();
2662
  }
2663
  else {
2664
- echo( '<script type="text/javascript">alert( "'.__( 'Could not process comment.\nProbably timed out.' , 'wp-photo-album-plus').'" )</script>' );
2665
  }
2666
  }
2667
  else { // Empty comment
@@ -3300,7 +3298,7 @@ global $blog_id;
3300
 
3301
  /* Check if wppa.js and jQuery are present */
3302
  if ( ! $wppa_err_displayed && ( WPPA_DEBUG || wppa_get_get( 'debug' ) || WP_DEBUG ) && ! wppa_switch( 'defer_javascript' ) ) {
3303
- wppa_out( '<script type="text/javascript">/* <![CDATA[ */' );
3304
  wppa_out( "if ( typeof( _wppaSlides ) == 'undefined' ) " .
3305
  "alert( 'There is a problem with your theme. The file wppa.js is not loaded when it is expected ( Errloc = wppa_container ).' );" );
3306
  wppa_out( "if ( typeof( jQuery ) == 'undefined' ) " .
@@ -3311,7 +3309,7 @@ global $blog_id;
3311
 
3312
  /* Check if init is properly done */
3313
  if ( ! wppa_opt( 'fullsize' ) ) {
3314
- wppa_out( '<script type="text/javascript">/* <![CDATA[ */' );
3315
  wppa_out( "alert( 'The initialisation of wppa+ is not complete yet. " .
3316
  "You will probably see division by zero errors. " .
3317
  "Please run Photo Albums -> Settings admin page Table VIII-A1. ( Errloc = wppa_container ).' );" );
@@ -3350,7 +3348,8 @@ global $blog_id;
3350
  wppa( 'alt', 'alt' );
3351
 
3352
  // Javascript occurrence dependant stuff
3353
- wppa_add_js_page_data( "\n" . '<script type="text/javascript">' );
 
3354
  // wppa( 'auto_colwidth' ) is set by the filter or by wppa_albums in case called directly
3355
  // wppa_opt( 'colwidth' ) is the option setting
3356
  // script or call has precedence over option setting
@@ -3697,7 +3696,7 @@ global $thumbs;
3697
  $index = 0;
3698
  if ( $thumbs ) {
3699
  $t = -microtime( true );
3700
- wppa_add_js_page_data( "\n" . '<script type="text/javascript">' );
3701
 
3702
  foreach ( $thumbs as $thumb ) {
3703
  if ( wppa_switch( 'next_on_callback' ) ) {
@@ -3715,7 +3714,7 @@ global $thumbs;
3715
  wppa_dbg_msg( 'SlideInfo took ' . $t . ' seconds.' );
3716
  }
3717
 
3718
- wppa_add_js_page_data( "\n" . '<script type="text/javascript">' );
3719
 
3720
  // How to start if slideonly
3721
  if ( wppa( 'is_slideonly' ) ) {
@@ -4100,12 +4099,12 @@ function wppa_is_photo_modified( $id ) {
4100
 
4101
  $cretime = $thumb['timestamp'];
4102
  $modtime = $thumb['modified'];
4103
-
4104
  // A photo is regarded NOT to be modified if the datetime modified is within 2 seconds after creation
4105
  if ( $modtime <= ( $cretime + 2 ) ) {
4106
  return false;
4107
  }
4108
-
4109
  $timnow = time();
4110
  $isnew = ( ( $timnow - $modtime ) < wppa_opt( 'max_photo_modtime' ) );
4111
 
19
  global $thumbs;
20
  global $wppa_session;
21
 
 
 
22
  // Diagnostics
23
  wppa_dbg_msg( 'Entering wppa_albums' );
24
  wppa_dbg_msg( 'Lang=' . $wppa_lang . ', Locale=' . $wppa_locale . ', Ajax=' . wppa( 'ajax' ) );
2453
  $old_entry = $wpdb->prepare( 'SELECT * FROM `'.WPPA_COMMENTS.'` WHERE `photo` = %s AND `user` = %s AND `comment` = %s LIMIT 1', $photo, $user, $save_comment );
2454
  $iret = $wpdb->query( $old_entry );
2455
  if ( $iret ) {
2456
+ if ( wppa( 'debug' ) ) echo( '<script type="text/javascript" >alert( "Duplicate comment ignored" )</script>' );
2457
  return;
2458
  }
2459
  $key = wppa_create_comments_entry( array( 'photo' => $photo, 'user' => $user, 'email' => $email, 'comment' => $save_comment, 'status' => $status ) );
2479
  if ( $status == 'spam' ) {
2480
  if ( $wrong_captcha ) {
2481
  echo
2482
+ '<script type="text/javascript" >' .
2483
  'alert( "'.__( 'Sorry, you gave a wrong answer.\n\nPlease try again to solve the computation.' , 'wp-photo-album-plus').'" )' .
2484
  '</script>';
2485
  }
2486
  else {
2487
  echo
2488
+ '<script type="text/javascript" >' .
2489
  'alert( "'.__( 'Sorry, your comment is not accepted.' , 'wp-photo-album-plus').'" )' .
2490
  '</script>';
2491
  }
2659
  wppa_clear_cache();
2660
  }
2661
  else {
2662
+ echo( '<script type="text/javascript" >alert( "'.__( 'Could not process comment.\nProbably timed out.' , 'wp-photo-album-plus').'" )</script>' );
2663
  }
2664
  }
2665
  else { // Empty comment
3298
 
3299
  /* Check if wppa.js and jQuery are present */
3300
  if ( ! $wppa_err_displayed && ( WPPA_DEBUG || wppa_get_get( 'debug' ) || WP_DEBUG ) && ! wppa_switch( 'defer_javascript' ) ) {
3301
+ wppa_out( '<script type="text/javascript" >/* <![CDATA[ */' );
3302
  wppa_out( "if ( typeof( _wppaSlides ) == 'undefined' ) " .
3303
  "alert( 'There is a problem with your theme. The file wppa.js is not loaded when it is expected ( Errloc = wppa_container ).' );" );
3304
  wppa_out( "if ( typeof( jQuery ) == 'undefined' ) " .
3309
 
3310
  /* Check if init is properly done */
3311
  if ( ! wppa_opt( 'fullsize' ) ) {
3312
+ wppa_out( '<script type="text/javascript" >/* <![CDATA[ */' );
3313
  wppa_out( "alert( 'The initialisation of wppa+ is not complete yet. " .
3314
  "You will probably see division by zero errors. " .
3315
  "Please run Photo Albums -> Settings admin page Table VIII-A1. ( Errloc = wppa_container ).' );" );
3348
  wppa( 'alt', 'alt' );
3349
 
3350
  // Javascript occurrence dependant stuff
3351
+ wppa_add_js_page_data( "\n" . '<script type="text/javascript" >' );
3352
+ wppa_add_js_page_data( "\n /* START OCCURRANCE " . wppa( 'mocc' ) . " */" );
3353
  // wppa( 'auto_colwidth' ) is set by the filter or by wppa_albums in case called directly
3354
  // wppa_opt( 'colwidth' ) is the option setting
3355
  // script or call has precedence over option setting
3696
  $index = 0;
3697
  if ( $thumbs ) {
3698
  $t = -microtime( true );
3699
+ wppa_add_js_page_data( "\n" . '<script type="text/javascript" >' );
3700
 
3701
  foreach ( $thumbs as $thumb ) {
3702
  if ( wppa_switch( 'next_on_callback' ) ) {
3714
  wppa_dbg_msg( 'SlideInfo took ' . $t . ' seconds.' );
3715
  }
3716
 
3717
+ wppa_add_js_page_data( "\n" . '<script type="text/javascript" >' );
3718
 
3719
  // How to start if slideonly
3720
  if ( wppa( 'is_slideonly' ) ) {
4099
 
4100
  $cretime = $thumb['timestamp'];
4101
  $modtime = $thumb['modified'];
4102
+
4103
  // A photo is regarded NOT to be modified if the datetime modified is within 2 seconds after creation
4104
  if ( $modtime <= ( $cretime + 2 ) ) {
4105
  return false;
4106
  }
4107
+
4108
  $timnow = time();
4109
  $isnew = ( ( $timnow - $modtime ) < wppa_opt( 'max_photo_modtime' ) );
4110
 
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 6.8.02
7
  *
8
  */
9
 
@@ -244,6 +244,7 @@ global $wppa_session;
244
  // The form
245
  echo
246
  '<form' .
 
247
  ' action="' . wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_import_photos' ) . '"' .
248
  ' method="post"' .
249
  ' >';
@@ -257,18 +258,30 @@ global $wppa_session;
257
  wp_nonce_field( '$wppa_nonce', WPPA_NONCE, true, false ) .
258
  __( 'Select Local or Remote', 'wp-photo-album-plus' ) .
259
  ( $disabled = $can_remote ? '' : 'disabled="disabled"' ) .
260
- '<select name="wppa-local-remote" >' .
 
 
 
261
  '<option value="local" ' . ( $source_type == 'local' ? 'selected="selected"' : '' ) . '>' . __( 'Local', 'wp-photo-album-plus') . '</option>' .
262
  '<option value="remote" ' . $disabled . ( $source_type == 'remote' ? 'selected="selected"' : '' ) . '>' . __( 'Remote' ,'wp-photo-album-plus' ) . '</option>' .
263
- '</select>';
 
 
 
 
 
264
  if ( $can_remote ) {
 
265
  echo
266
  '<input' .
 
267
  ' type="submit"' .
268
  ' class="button-secundary"' .
269
  ' name="wppa-import-set-source"' .
270
- ' value="' . __( 'Set Local/Remote' ,'wp-photo-album-plus') . '"' .
 
271
  '/>';
 
272
  }
273
  else {
274
  if ( ! ini_get( 'allow_url_fopen' ) ) {
@@ -291,15 +304,25 @@ global $wppa_session;
291
  if ( $source_type == 'local' ) {
292
  wppa_update_option( 'wppa_import_root', ABSPATH . basename( content_url() ) ); // Provider may have changed disk
293
  echo
294
- '<select name="wppa-source" >' .
 
 
 
295
  wppa_abs_walktree( wppa_opt( 'import_root' ), $source ) .
296
  '</select>' .
 
297
  '<input' .
 
298
  ' type="submit"' .
299
  ' class="button-secundary"' .
300
  ' name="wppa-import-set-source-dir"' .
301
- ' value="' . __( 'Set source directory', 'wp-photo-album-plus') . '"' .
302
- ' />';
 
 
 
 
 
303
  }
304
 
305
  // Remote: url
@@ -312,6 +335,7 @@ global $wppa_session;
312
  ' style="width:100%"' .
313
  ' name="wppa-source-remote"' .
314
  ' value="' . $source . '"' .
 
315
  ' />' .
316
  '<br />';
317
  }
@@ -322,6 +346,7 @@ global $wppa_session;
322
  ' style="width:50%"' .
323
  ' name="wppa-source-remote"' .
324
  ' value="' . $source . '"' .
 
325
  ' />';
326
  }
327
  echo
@@ -331,17 +356,22 @@ global $wppa_session;
331
  ' style="width:50px;"' .
332
  ' name="wppa-import-remote-max"' .
333
  ' value="' . $remote_max . '"' .
 
334
  ' />' .
 
335
  '<input' .
 
336
  ' type="submit"' .
337
  ' onclick="jQuery( \'#rem-rem\' ).css( \'display\',\'inline\' ); return true;"' .
338
  ' class="button-secundary"' .
339
  ' name="wppa-import-set-source-url"' .
340
- ' value="' . __( 'Find remote photos', 'wp-photo-album-plus' ) . '"' .
 
341
  ' />' .
342
  '<span id="rem-rem" style="display:none;" >' .
343
- __( 'Working, please wait...', 'wp-photo-album-plus') .
344
  '</span>' .
 
345
  '<br />' .
346
  __( 'You can enter either a web page address like <i>http://mysite.com/mypage/</i> or a full url to an image file like <i>http://mysite.com/wp-content/uploads/wppa/4711.jpg</i>', 'wp-photo-album-plus' );
347
  }
@@ -748,7 +778,7 @@ global $wppa_session;
748
  '&nbsp;&nbsp;' .
749
  __( 'Zoom previews', 'wp-photo-album-plus' ) .
750
  '</b>' .
751
- '<script type="text/javascript">if ( wppa_getCookie(\'zoompreview\') == true ) { jQuery(\'#wppa-zoom\').attr(\'checked\', \'checked\') }</script>' .
752
  '</td>';
753
  }
754
  echo
@@ -1233,7 +1263,7 @@ global $wppa_session;
1233
  // The submit button
1234
  ?>
1235
  <p>
1236
- <script type="text/javascript">
1237
  function wppaVfyAlbum() {
1238
  var csvs = jQuery( '.wppa-csv' );
1239
  if ( jQuery( '#wppa-update' ).attr( 'checked' ) != 'checked' ) {
@@ -1284,7 +1314,9 @@ global $wppa_session;
1284
  return true;
1285
  }
1286
  </script>
 
1287
  <input type="submit" onclick="return wppaCheckInputVars()" class="button-primary" id="submit" name="wppa-import-submit" value="<?php _e( 'Import', 'wp-photo-album-plus' ); ?>" />
 
1288
  <script type="text/javascript" >
1289
  var wppaImportRuns = false;
1290
  var wppaTimer;
@@ -1381,8 +1413,8 @@ global $wppa_session;
1381
  }
1382
  </script>
1383
  <?php if ( ( $photocount || $videocount || $audiocount ) && ! $albumcount && ! $dircount && ! $zipcount ) { ?>
1384
- <input id="wppa-start-ajax" type="button" onclick="if ( wppaVfyAlbum() ) { wppaImportRuns = true;wppaDoAjaxImport() }" class="button-secundary" value="<?php esc_attr( _e( 'Start Ajax Import', 'wp-photo-album-plus' ) ) ?>" />
1385
- <input id="wppa-stop-ajax" style="display:none;" type="button" onclick="wppaStopAjaxImport()" class="button-secundary" value="<?php esc_attr( _e( 'Stop Ajax Import', 'wp-photo-album-plus' ) ) ?>" />
1386
  <?php } ?>
1387
  </p>
1388
  </form>
@@ -1436,7 +1468,7 @@ global $wppa_session;
1436
 
1437
  if ( wppa( 'continue' ) ) {
1438
  wppa_warning_message( __( 'Trying to continue...', 'wp-photo-album-plus') );
1439
- echo '<script type="text/javascript">document.location=\''.get_admin_url().'admin.php?page=wppa_import_photos&continue&nonce='.wp_create_nonce( 'dirimport' ).'\';</script>';
1440
  }
1441
 
1442
  echo '<br /><br />';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 6.8.08
7
  *
8
  */
9
 
244
  // The form
245
  echo
246
  '<form' .
247
+ ' id="wppa-import-form"' .
248
  ' action="' . wppa_dbg_url( get_admin_url() . 'admin.php?page=wppa_import_photos' ) . '"' .
249
  ' method="post"' .
250
  ' >';
258
  wp_nonce_field( '$wppa_nonce', WPPA_NONCE, true, false ) .
259
  __( 'Select Local or Remote', 'wp-photo-album-plus' ) .
260
  ( $disabled = $can_remote ? '' : 'disabled="disabled"' ) .
261
+ '<select' .
262
+ ' name="wppa-local-remote"' .
263
+ ' onchange="jQuery(\'#rem-rem-0\').show();jQuery(\'#wppa-import-set-source\').trigger(\'click\');"' .
264
+ ' >' .
265
  '<option value="local" ' . ( $source_type == 'local' ? 'selected="selected"' : '' ) . '>' . __( 'Local', 'wp-photo-album-plus') . '</option>' .
266
  '<option value="remote" ' . $disabled . ( $source_type == 'remote' ? 'selected="selected"' : '' ) . '>' . __( 'Remote' ,'wp-photo-album-plus' ) . '</option>' .
267
+ '</select>' .
268
+ '<span id="rem-rem-0" style="display:none;" >' .
269
+ ' ' . __( 'Working, please wait...', 'wp-photo-album-plus') .
270
+ '</span>';
271
+ ;
272
+
273
  if ( $can_remote ) {
274
+
275
  echo
276
  '<input' .
277
+ ' id="wppa-import-set-source"' .
278
  ' type="submit"' .
279
  ' class="button-secundary"' .
280
  ' name="wppa-import-set-source"' .
281
+ // ' value="' . __( 'Set Local/Remote' ,'wp-photo-album-plus') . '"' .
282
+ ' style="display:none;"' .
283
  '/>';
284
+
285
  }
286
  else {
287
  if ( ! ini_get( 'allow_url_fopen' ) ) {
304
  if ( $source_type == 'local' ) {
305
  wppa_update_option( 'wppa_import_root', ABSPATH . basename( content_url() ) ); // Provider may have changed disk
306
  echo
307
+ '<select' .
308
+ ' name="wppa-source"' .
309
+ ' onchange="jQuery(\'#rem-rem\').show();jQuery(\'#wppa-import-set-source-dir\').trigger(\'click\');"' .
310
+ ' >' .
311
  wppa_abs_walktree( wppa_opt( 'import_root' ), $source ) .
312
  '</select>' .
313
+
314
  '<input' .
315
+ ' id="wppa-import-set-source-dir"' .
316
  ' type="submit"' .
317
  ' class="button-secundary"' .
318
  ' name="wppa-import-set-source-dir"' .
319
+ // ' value="' . __( 'Set source directory', 'wp-photo-album-plus') . '"' .
320
+ ' style="display:none;"' .
321
+ ' />' .
322
+ '<span id="rem-rem" style="display:none;" >' .
323
+ ' ' . __( 'Working, please wait...', 'wp-photo-album-plus') .
324
+ '</span>';
325
+
326
  }
327
 
328
  // Remote: url
335
  ' style="width:100%"' .
336
  ' name="wppa-source-remote"' .
337
  ' value="' . $source . '"' .
338
+ ' onchange="jQuery(\'#wppa-import-set-source-url\').trigger(\'click\');"' .
339
  ' />' .
340
  '<br />';
341
  }
346
  ' style="width:50%"' .
347
  ' name="wppa-source-remote"' .
348
  ' value="' . $source . '"' .
349
+ ' onchange="jQuery(\'#wppa-import-set-source-url\').trigger(\'click\');"' .
350
  ' />';
351
  }
352
  echo
356
  ' style="width:50px;"' .
357
  ' name="wppa-import-remote-max"' .
358
  ' value="' . $remote_max . '"' .
359
+ ' onchange="jQuery(\'#wppa-import-set-source-url\').trigger(\'click\');"' .
360
  ' />' .
361
+
362
  '<input' .
363
+ ' id="wppa-import-set-source-url"' .
364
  ' type="submit"' .
365
  ' onclick="jQuery( \'#rem-rem\' ).css( \'display\',\'inline\' ); return true;"' .
366
  ' class="button-secundary"' .
367
  ' name="wppa-import-set-source-url"' .
368
+ // ' value="' . __( 'Find remote photos', 'wp-photo-album-plus' ) . '"' .
369
+ ' style="display:none;"' .
370
  ' />' .
371
  '<span id="rem-rem" style="display:none;" >' .
372
+ ' ' . __( 'Working, please wait...', 'wp-photo-album-plus') .
373
  '</span>' .
374
+
375
  '<br />' .
376
  __( 'You can enter either a web page address like <i>http://mysite.com/mypage/</i> or a full url to an image file like <i>http://mysite.com/wp-content/uploads/wppa/4711.jpg</i>', 'wp-photo-album-plus' );
377
  }
778
  '&nbsp;&nbsp;' .
779
  __( 'Zoom previews', 'wp-photo-album-plus' ) .
780
  '</b>' .
781
+ '<script type="text/javascript" >if ( wppa_getCookie(\'zoompreview\') == true ) { jQuery(\'#wppa-zoom\').attr(\'checked\', \'checked\') }</script>' .
782
  '</td>';
783
  }
784
  echo
1263
  // The submit button
1264
  ?>
1265
  <p>
1266
+ <script type="text/javascript" >
1267
  function wppaVfyAlbum() {
1268
  var csvs = jQuery( '.wppa-csv' );
1269
  if ( jQuery( '#wppa-update' ).attr( 'checked' ) != 'checked' ) {
1314
  return true;
1315
  }
1316
  </script>
1317
+ <?php if ( $albumcount || $dircount || $zipcount ) { ?>
1318
  <input type="submit" onclick="return wppaCheckInputVars()" class="button-primary" id="submit" name="wppa-import-submit" value="<?php _e( 'Import', 'wp-photo-album-plus' ); ?>" />
1319
+ <?php } ?>
1320
  <script type="text/javascript" >
1321
  var wppaImportRuns = false;
1322
  var wppaTimer;
1413
  }
1414
  </script>
1415
  <?php if ( ( $photocount || $videocount || $audiocount ) && ! $albumcount && ! $dircount && ! $zipcount ) { ?>
1416
+ <input id="wppa-start-ajax" type="button" onclick="if ( wppaVfyAlbum() ) { wppaImportRuns = true;wppaDoAjaxImport() }" class="button-primary" value="<?php esc_attr( _e( 'Start Import', 'wp-photo-album-plus' ) ) ?>" />
1417
+ <input id="wppa-stop-ajax" style="display:none;" type="button" onclick="wppaStopAjaxImport()" class="button-primary" value="<?php esc_attr( _e( 'Stop Import', 'wp-photo-album-plus' ) ) ?>" />
1418
  <?php } ?>
1419
  </p>
1420
  </form>
1468
 
1469
  if ( wppa( 'continue' ) ) {
1470
  wppa_warning_message( __( 'Trying to continue...', 'wp-photo-album-plus') );
1471
+ echo '<script type="text/javascript" >document.location=\''.get_admin_url().'admin.php?page=wppa_import_photos&continue&nonce='.wp_create_nonce( 'dirimport' ).'\';</script>';
1472
  }
1473
 
1474
  echo '<br /><br />';
wppa-init.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
- * Version 6.8.07
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
@@ -249,7 +249,7 @@ global $pagenow;
249
 
250
  // Cron jobs postponed?
251
  if ( get_option( 'wppa_maint_ignore_cron' ) == 'yes' ) {
252
- wppa_warning_message( __( 'Please do not forget to re-enable cron jobs for wppa when you are ready doing your bulk actions. See <i>Table VIII-A0.2</i>', 'wp-photo-album-plus') );
253
  }
254
 
255
  // Finish setup
4
  *
5
  * This file loads required php files and contains all functions used in init actions.
6
  *
7
+ * Version 6.8.08
8
  */
9
 
10
  /* LOAD SIDEBAR WIDGETS */
249
 
250
  // Cron jobs postponed?
251
  if ( get_option( 'wppa_maint_ignore_cron' ) == 'yes' ) {
252
+ wppa_warning_message( __( 'Please do not forget to re-enable cron jobs for wppa when you are ready doing your bulk actions. See <i>Table VIII-A0</i>', 'wp-photo-album-plus') );
253
  }
254
 
255
  // Finish setup
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -1547,7 +1547,6 @@ global $wpdb;
1547
  $result['title'] = $title;
1548
  $result['is_url'] = false;
1549
  $result['is_lightbox'] = true;
1550
- wppa_add_wppa_on_page(); // Make sure wppa js files are loaded
1551
  $result['url'] = wppa_fix_poster_ext( $result['url'], $id );
1552
  return $result;
1553
  case 'widget': // Defined at widget activation
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 6.8.08
7
  *
8
  */
9
 
1547
  $result['title'] = $title;
1548
  $result['is_url'] = false;
1549
  $result['is_lightbox'] = true;
 
1550
  $result['url'] = wppa_fix_poster_ext( $result['url'], $id );
1551
  return $result;
1552
  case 'widget': // Defined at widget activation
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 6.8.06
7
  *
8
  */
9
 
@@ -23,9 +23,6 @@ add_action('wp_enqueue_scripts', 'wppa_add_style');
23
  function wppa_add_style() {
24
  global $wppa_api_version;
25
 
26
- // Do they need us anyway?
27
- if ( ! wppa_wppa_on_page() ) return;
28
-
29
  // Are we allowed to look in theme?
30
  if ( wppa_switch( 'use_custom_style_file' ) ) {
31
 
@@ -276,28 +273,25 @@ echo '
276
  }
277
  }
278
 
279
- /* LOAD SLIDESHOW, THEME, AJAX and LIGHTBOX js, all in one file nowadays */
280
- add_action('wp_enqueue_scripts', 'wppa_add_javascripts');
281
-
282
- function wppa_add_javascripts() {
283
- global $wppa_api_version;
284
- global $wppa_lang;
285
  global $wppa_js_page_data_file;
286
- global $wppa_opt;
287
 
288
- // Do they need us anyway?
289
- if ( ! wppa_wppa_on_page() ) return;
 
 
290
 
291
- $footer = ( wppa_switch( 'defer_javascript' ) );
 
 
 
 
292
 
293
- // If the user wants the js in the footer, try to open a tempfile to collect the js data during processing the page
294
- // If opening a tempfile fails, revert to js in the header.
295
- if ( $footer ) {
296
  $tempdir = WPPA_UPLOAD_PATH.'/temp';
297
  if ( ! is_dir( $tempdir ) ) @ wppa_mktree( $tempdir );
298
- wppa_delete_obsolete_tempfiles();
299
 
300
- $wppa_js_page_data_file = WPPA_UPLOAD_PATH . '/temp/wppa.' . sanitize_file_name( $_SERVER['REMOTE_ADDR'] ) . '.js';
301
  $handle = fopen ( $wppa_js_page_data_file, 'wb' );
302
 
303
  if ( $handle ) {
@@ -310,6 +304,30 @@ global $wppa_opt;
310
  }
311
  }
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  // WPPA+ Javascript files.
314
  // All wppa+ js files come in 2 flavours: the normal version and a minified version.
315
  // If the minified version is available, it will be loaded, else the normal version.
@@ -350,7 +368,7 @@ global $wppa_opt;
350
  true,
351
  $any_lightbox,
352
  true,
353
- wppa_switch( 'slide_swipe') || $any_lightbox,
354
  true,
355
  );
356
 
@@ -389,23 +407,23 @@ global $wppa_opt;
389
  update_option( 'wppa_ini_js_version_'.$wppa_lang, get_option( 'wppa_ini_js_version_'.$wppa_lang, '0' ) + '1' );
390
  }
391
  if ( file_exists( WPPA_PATH.'/wppa-init.'.$wppa_lang.'.js' ) ) {
392
- wp_enqueue_script( 'wppa-init', WPPA_URL.'/wppa-init.'.$wppa_lang.'.js', array('wppa'), get_option( 'wppa_ini_js_version_'.$wppa_lang, $footer ) );
393
  }
394
  // wppa.pagedata
395
  if ( $footer ) {
396
- wp_enqueue_script( 'wppa-pagedata', WPPA_UPLOAD_URL.'/temp/wppa.'.$_SERVER['REMOTE_ADDR'].'.js', array('wppa-init'), rand(0,4711), $footer );
397
  }
398
  }
399
 
400
  /* LOAD WPPA+ THEME */
401
- add_action('init', 'wppa_load_theme', 100);
402
 
403
  function wppa_load_theme() {
404
 
405
  // Are we allowed to look in theme?
406
  if ( wppa_switch( 'use_custom_theme_file' ) ) {
407
 
408
- $usertheme = get_theme_root() . '/' . get_option('template') . '/wppa-theme.php';
409
  if ( is_file( $usertheme ) ) {
410
  require_once $usertheme;
411
  return;
@@ -420,6 +438,12 @@ add_action('wp_footer', 'wppa_load_footer');
420
  function wppa_load_footer() {
421
  global $wpdb;
422
  global $wppa_session;
 
 
 
 
 
 
423
 
424
  echo '
425
  <!-- start WPPA+ Footer data -->
@@ -595,52 +619,56 @@ global $wppa_session;
595
  }
596
 
597
  // The init vars
598
- echo '
599
- <script type="text/javascript">
600
- jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
601
- wppaOvlModeInitial = "'.( wppa( 'is_mobile' ) ? wppa_opt( 'ovl_mode_initial_mob' ) : wppa_opt( 'ovl_mode_initial' ) ).'";
602
- wppaOvlTxtHeight = "'.$ovlh.'";
603
- wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
604
- wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
605
- wppaOvlTheme = "'.wppa_opt( 'ovl_theme' ).'";
606
- wppaOvlAnimSpeed = '.wppa_opt( 'ovl_anim' ).';
607
- wppaOvlSlideSpeed = '.wppa_opt( 'ovl_slide' ).';
608
- wppaVer4WindowWidth = 800;
609
- wppaVer4WindowHeight = 600;
610
- wppaOvlShowCounter = '.( wppa_switch( 'ovl_show_counter') ? 'true' : 'false' ).';
611
- '.( wppa_opt( 'fontfamily_lightbox' ) ? 'wppaOvlFontFamily = "'.wppa_opt( 'fontfamily_lightbox' ).'"' : '').'
612
- wppaOvlFontSize = "'.$fontsize_lightbox.'";
613
- '.( wppa_opt( 'fontcolor_lightbox' ) ? 'wppaOvlFontColor = "'.wppa_opt( 'fontcolor_lightbox' ).'"' : '').'
614
- '.( wppa_opt( 'fontweight_lightbox' ) ? 'wppaOvlFontWeight = "'.wppa_opt( 'fontweight_lightbox' ).'"' : '').'
615
- '.( wppa_opt( 'fontsize_lightbox' ) ? 'wppaOvlLineHeight = "'.(wppa_opt( 'fontsize_lightbox' ) + '2').'"' : '').'
616
- wppaOvlFullLegenda = "'.__('Keys: f = next mode; q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
617
- wppaOvlFullLegendaSingle = "'.__('Keys: f = next mode; q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
618
- wppaOvlVideoStart = '.( wppa_switch( 'ovl_video_start' ) ? 'true' : 'false' ).';
619
- wppaOvlAudioStart = '.( wppa_switch( 'ovl_audio_start' ) ? 'true' : 'false' ).';
620
- wppaOvlShowLegenda = '.( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ? 'true' : 'false' ).';
621
- wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
622
- wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
623
- wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
624
- wppaOvlFsExitBtnSize = "'.wppa_opt( 'ovl_fsx_btn_size' ).'";
625
- </script>
626
- ';
 
 
 
 
627
  }
628
 
629
  // The photo views cache
630
- echo '
631
- <script type="text/javascript" >';
 
 
632
  if ( isset( $wppa_session['photo'] ) ) {
633
  foreach ( array_keys( $wppa_session['photo'] ) as $p ) {
634
- echo '
635
- wppaPhotoView['.$p.'] = true;';
636
  }
637
  }
638
- echo '
639
- </script>';
640
-
641
- echo '
642
- <!-- end WPPA+ Footer data -->
643
- ';
644
 
645
  // Debugging, show queries
646
  wppa_dbg_cachecounts('print');
@@ -672,7 +700,7 @@ global $wppa_session;
672
  }
673
 
674
  /* FACEBOOK COMMENTS */
675
- add_action('wp_footer', 'wppa_fbc_setup', 100);
676
 
677
  function wppa_fbc_setup() {
678
  global $wppa_locale;
@@ -746,28 +774,38 @@ function wppa_redirect() {
746
  add_action( 'wp_head', 'wppa_add_page_specific_urls', '99' );
747
 
748
  function wppa_add_page_specific_urls() {
 
749
 
750
  $result = '
751
- <!-- WPPA+ BEGIN Page specific urls and device specific data -->
752
- <script type="text/javascript">
753
- wppaImageDirectory = "' . wppa_get_imgdir() . '";
754
- wppaWppaUrl = "' . wppa_get_wppa_url() . '";
755
- wppaIncludeUrl = "' . trim( includes_url(), '/' ) . '";
756
- wppaAjaxUrl = "' . ( wppa_switch( 'ajax_non_admin' ) ? wppa_url( 'wppa-ajax-front.php' ) : admin_url( 'admin-ajax.php' ) ) . '";
757
- wppaUploadUrl = "' . WPPA_UPLOAD_URL . '";
758
- wppaIsIe = ' . ( wppa_is_ie() ? 'true' : 'false' ) . ';
759
- wppaIsSafari = ' . ( wppa_is_safari() ? 'true' : 'false' ) . ';
760
- wppaUseSvg = ' . ( wppa_use_svg() ? 'true' : 'false' ) . ';
761
- wppaSlideshowNavigationType = "' . wppa_get_navigation_type() . '";
762
- wppaAudioHeight = '.wppa_get_audio_control_height().';
763
- </script>
764
- <!-- WPPA+ END Page specific urls -->';
765
 
766
  // Relative urls?
767
  $result = wppa_make_relative( $result );
768
 
769
- echo $result;
770
-
 
 
 
 
 
 
 
 
 
 
 
 
 
771
  }
772
 
773
  /* ENABLE RENDERING */
@@ -1013,6 +1051,11 @@ global $wppa_init_js_data;
1013
  wppaOvlSvgFillcolor = "' . wppa_opt( 'ovl_svg_color' ) . '";
1014
  wppaOvlSvgBgcolor = "' . wppa_opt( 'ovl_svg_bg_color' ) . '";
1015
  wppaSvgCornerStyle = "' . wppa_opt( 'icon_corner_style' ) . '";
 
 
 
 
 
1016
  ';
1017
 
1018
  // Open file
@@ -1026,7 +1069,7 @@ global $wppa_init_js_data;
1026
  }
1027
  else {
1028
  $wppa_init_js_data =
1029
- '<script type="text/javascript">
1030
  /* Warning: file wppa-init.'.$wppa_lang.'.js could not be created */
1031
  /* The content is therefor output here */
1032
 
@@ -1086,7 +1129,39 @@ function wppa_enable_shortcodes_in_bbpress( $content ) {
1086
  add_filter( 'bbp_get_topic_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
1087
  add_filter( 'bbp_get_reply_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
1088
 
 
 
 
 
 
 
 
 
 
 
1089
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1090
  // This function contains strings for i18n from files not included
1091
  // in the search for frontend required translatable strings
1092
  // Mainly from widgets
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 6.8.08
7
  *
8
  */
9
 
23
  function wppa_add_style() {
24
  global $wppa_api_version;
25
 
 
 
 
26
  // Are we allowed to look in theme?
27
  if ( wppa_switch( 'use_custom_style_file' ) ) {
28
 
273
  }
274
  }
275
 
276
+ /* LOAD JAVASCRIPT */
277
+ add_action( 'init', 'wppa_add_js', 12 );
278
+ function wppa_add_js() {
 
 
 
279
  global $wppa_js_page_data_file;
 
280
 
281
+ $in_footer = wppa_switch( 'defer_javascript' ) && ! wppa( 'ajax' );
282
+ if ( wppa( 'ajax' ) || wppa( 'cron' ) ) {
283
+ $in_footer = false;
284
+ }
285
 
286
+ if ( $in_footer ) {
287
+
288
+ // If the user wants the js in the footer, try to open a tempfile to collect the js data during processing the page
289
+ // If opening a tempfile fails, revert to js in the header.
290
+ $wppa_js_page_data_file = WPPA_UPLOAD_PATH . '/temp/wppa.' . md5( $_SERVER['REMOTE_ADDR'] . time() ) . '.js';
291
 
 
 
 
292
  $tempdir = WPPA_UPLOAD_PATH.'/temp';
293
  if ( ! is_dir( $tempdir ) ) @ wppa_mktree( $tempdir );
 
294
 
 
295
  $handle = fopen ( $wppa_js_page_data_file, 'wb' );
296
 
297
  if ( $handle ) {
304
  }
305
  }
306
 
307
+ // If still in footer...
308
+ if ( $in_footer ) {
309
+ add_action( 'wp_footer', 'wppa_add_javascripts' );
310
+ }
311
+ else {
312
+ add_action( 'wp_enqueue_scripts', 'wppa_add_javascripts' );
313
+ $wppa_js_page_data_file = '';
314
+ }
315
+ }
316
+
317
+ // This function does the actual js enqueueing
318
+ function wppa_add_javascripts() {
319
+ global $wppa_api_version;
320
+ global $wppa_lang;
321
+ global $wppa_js_page_data_file;
322
+ global $wppa_opt;
323
+
324
+ $footer = $wppa_js_page_data_file !== '';
325
+
326
+ // If in footer and no wppa on the page found? Quit
327
+ if ( $footer && ! wppa( 'mocc' ) ) {
328
+ return;
329
+ }
330
+
331
  // WPPA+ Javascript files.
332
  // All wppa+ js files come in 2 flavours: the normal version and a minified version.
333
  // If the minified version is available, it will be loaded, else the normal version.
368
  true,
369
  $any_lightbox,
370
  true,
371
+ wppa_switch( 'slide_swipe' ) || $any_lightbox,
372
  true,
373
  );
374
 
407
  update_option( 'wppa_ini_js_version_'.$wppa_lang, get_option( 'wppa_ini_js_version_'.$wppa_lang, '0' ) + '1' );
408
  }
409
  if ( file_exists( WPPA_PATH.'/wppa-init.'.$wppa_lang.'.js' ) ) {
410
+ wp_enqueue_script( 'wppa-init', WPPA_URL.'/wppa-init.'.$wppa_lang.'.js', array( 'wppa' ), get_option( 'wppa_ini_js_version_'.$wppa_lang, $footer ) );
411
  }
412
  // wppa.pagedata
413
  if ( $footer ) {
414
+ wp_enqueue_script( 'wppa-pagedata', str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $wppa_js_page_data_file ), array( 'wppa-init' ), rand( 0,4711 ), $footer );
415
  }
416
  }
417
 
418
  /* LOAD WPPA+ THEME */
419
+ add_action( 'init', 'wppa_load_theme', 100 );
420
 
421
  function wppa_load_theme() {
422
 
423
  // Are we allowed to look in theme?
424
  if ( wppa_switch( 'use_custom_theme_file' ) ) {
425
 
426
+ $usertheme = get_theme_root() . '/' . get_option( 'template' ) . '/wppa-theme.php';
427
  if ( is_file( $usertheme ) ) {
428
  require_once $usertheme;
429
  return;
438
  function wppa_load_footer() {
439
  global $wpdb;
440
  global $wppa_session;
441
+ global $wppa_js_page_data_file;
442
+
443
+ // If no wppa on the page, quit
444
+ if ( ! wppa( 'mocc' ) ) {
445
+ return;
446
+ }
447
 
448
  echo '
449
  <!-- start WPPA+ Footer data -->
619
  }
620
 
621
  // The init vars
622
+ $data = '
623
+ <script type="text/javascript" >
624
+
625
+ /* START Lightbox vars */
626
+ jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
627
+ wppaOvlModeInitial = "'.( wppa( 'is_mobile' ) ? wppa_opt( 'ovl_mode_initial_mob' ) : wppa_opt( 'ovl_mode_initial' ) ).'";
628
+ wppaOvlTxtHeight = "'.$ovlh.'";
629
+ wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
630
+ wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
631
+ wppaOvlTheme = "'.wppa_opt( 'ovl_theme' ).'";
632
+ wppaOvlAnimSpeed = '.wppa_opt( 'ovl_anim' ).';
633
+ wppaOvlSlideSpeed = '.wppa_opt( 'ovl_slide' ).';
634
+ wppaVer4WindowWidth = 800;
635
+ wppaVer4WindowHeight = 600;
636
+ wppaOvlShowCounter = '.( wppa_switch( 'ovl_show_counter') ? 'true' : 'false' ).';
637
+ '.( wppa_opt( 'fontfamily_lightbox' ) ? 'wppaOvlFontFamily = "'.wppa_opt( 'fontfamily_lightbox' ).'"' : '').'
638
+ wppaOvlFontSize = "'.$fontsize_lightbox.'";
639
+ '.( wppa_opt( 'fontcolor_lightbox' ) ? 'wppaOvlFontColor = "'.wppa_opt( 'fontcolor_lightbox' ).'"' : '').'
640
+ '.( wppa_opt( 'fontweight_lightbox' ) ? 'wppaOvlFontWeight = "'.wppa_opt( 'fontweight_lightbox' ).'"' : '').'
641
+ '.( wppa_opt( 'fontsize_lightbox' ) ? 'wppaOvlLineHeight = "'.(wppa_opt( 'fontsize_lightbox' ) + '2').'"' : '').'
642
+ wppaOvlFullLegenda = "'.__('Keys: f = next mode; q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
643
+ wppaOvlFullLegendaSingle = "'.__('Keys: f = next mode; q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
644
+ wppaOvlVideoStart = '.( wppa_switch( 'ovl_video_start' ) ? 'true' : 'false' ).';
645
+ wppaOvlAudioStart = '.( wppa_switch( 'ovl_audio_start' ) ? 'true' : 'false' ).';
646
+ wppaOvlShowLegenda = '.( wppa_switch( 'ovl_show_legenda' ) && ! wppa( 'is_mobile' ) ? 'true' : 'false' ).';
647
+ wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
648
+ wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
649
+ wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
650
+ wppaOvlFsExitBtnSize = "'.wppa_opt( 'ovl_fsx_btn_size' ).'";
651
+ /* END Lightbox vars */
652
+ </script>
653
+ ';
654
+ wppa_add_js_page_data( $data, 'echo_when_no_file' );
655
  }
656
 
657
  // The photo views cache
658
+ $data = '
659
+ <script type="text/javascript" >
660
+
661
+ /* START Viewcounts */';
662
  if ( isset( $wppa_session['photo'] ) ) {
663
  foreach ( array_keys( $wppa_session['photo'] ) as $p ) {
664
+ $data .= '
665
+ wppaPhotoView[' . $p . '] = true;';
666
  }
667
  }
668
+ $data .= '
669
+ /* END Vieuwcounts */
670
+ </script>';
671
+ wppa_add_js_page_data( $data, 'echo_when_no_file' );
 
 
672
 
673
  // Debugging, show queries
674
  wppa_dbg_cachecounts('print');
700
  }
701
 
702
  /* FACEBOOK COMMENTS */
703
+ add_action( 'wp_footer', 'wppa_fbc_setup', 100 );
704
 
705
  function wppa_fbc_setup() {
706
  global $wppa_locale;
774
  add_action( 'wp_head', 'wppa_add_page_specific_urls', '99' );
775
 
776
  function wppa_add_page_specific_urls() {
777
+ global $wppa_js_page_data_file;
778
 
779
  $result = '
780
+ wppaImageDirectory = "' . wppa_get_imgdir() . '";
781
+ wppaWppaUrl = "' . wppa_get_wppa_url() . '";
782
+ wppaIncludeUrl = "' . trim( includes_url(), '/' ) . '";
783
+ wppaAjaxUrl = "' . ( wppa_switch( 'ajax_non_admin' ) ? wppa_url( 'wppa-ajax-front.php' ) : admin_url( 'admin-ajax.php' ) ) . '";
784
+ wppaUploadUrl = "' . WPPA_UPLOAD_URL . '";
785
+ wppaIsIe = ' . ( wppa_is_ie() ? 'true' : 'false' ) . ';
786
+ wppaIsSafari = ' . ( wppa_is_safari() ? 'true' : 'false' ) . ';
787
+ wppaUseSvg = ' . ( wppa_use_svg() ? 'true' : 'false' ) . ';
788
+ wppaSlideshowNavigationType = "' . wppa_get_navigation_type() . '";
789
+ wppaAudioHeight = '.wppa_get_audio_control_height().';';
 
 
 
 
790
 
791
  // Relative urls?
792
  $result = wppa_make_relative( $result );
793
 
794
+ if ( $wppa_js_page_data_file ) {
795
+ $handle = @ fopen( $wppa_js_page_data_file, 'ab' );
796
+ if ( $handle ) {
797
+ fwrite( $handle, "\n/* START Page specific urls and browser dependant data */" . $result . "\n/* END Page specific urls and browser dependant data */\n" );
798
+ fclose( $handle );
799
+ }
800
+ }
801
+ else {
802
+ echo '
803
+ <!-- WPPA+ START Page specific urls and browser dependant data -->
804
+ <script type="text/javascript" >
805
+ ' . $result . '
806
+ </script>
807
+ <!-- WPPA+ END Page specific urls -->';
808
+ }
809
  }
810
 
811
  /* ENABLE RENDERING */
1051
  wppaOvlSvgFillcolor = "' . wppa_opt( 'ovl_svg_color' ) . '";
1052
  wppaOvlSvgBgcolor = "' . wppa_opt( 'ovl_svg_bg_color' ) . '";
1053
  wppaSvgCornerStyle = "' . wppa_opt( 'icon_corner_style' ) . '";
1054
+ wppaHideRightClick = ' . ( wppa_switch( 'no_rightclick' ) ? 'true' : 'false' ) . ';
1055
+ wppaProcessing = "' . __( 'Processing...', 'wp-photo-album-plus' ) . '";
1056
+ wppaDone = "' . __( 'Done!', 'wp-photo-album-plus' ) . '";
1057
+ wppaUploadFailed = "' . __( 'Upload failed', 'wp-photo-album-plus' ) . '";
1058
+ wppaServerError = "' . __( 'Server error.', 'wp-photo-album-plus' ) . '";
1059
  ';
1060
 
1061
  // Open file
1069
  }
1070
  else {
1071
  $wppa_init_js_data =
1072
+ '<script type="text/javascript" >
1073
  /* Warning: file wppa-init.'.$wppa_lang.'.js could not be created */
1074
  /* The content is therefor output here */
1075
 
1129
  add_filter( 'bbp_get_topic_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
1130
  add_filter( 'bbp_get_reply_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
1131
 
1132
+ // Disable Autoptimize from optimizing our javascript
1133
+ add_filter( 'autoptimize_filter_js_noptimize', 'wppa_nopti_js', 10, 2 );
1134
+ function wppa_nopti_js( $nopt_in, $html_in ) {
1135
+ if ( strpos( $html_in, 'data-wppa="yes"' ) !== false ) {
1136
+ return true;
1137
+ }
1138
+ else {
1139
+ return false;
1140
+ }
1141
+ }
1142
 
1143
+ /*
1144
+ // If no wppa code on the page, remove enqueued scripts if in the footer
1145
+ add_action( 'wp_footer', 'wppa_remove_js', 1 );
1146
+ function wppa_remove_js() {
1147
+ if ( ! wppa( 'mocc' ) ) {
1148
+ $js_files = array (
1149
+ 'wppa',
1150
+ 'wppa-slideshow',
1151
+ 'wppa-ajax-front',
1152
+ 'wppa-lightbox',
1153
+ 'wppa-popup',
1154
+ 'wppa-touch',
1155
+ 'wppa-utils',
1156
+ 'wppa-init',
1157
+ 'wppa-pagedata',
1158
+ );
1159
+ foreach( $js_files as $script ) {
1160
+ wp_dequeue_script( $script );
1161
+ }
1162
+ }
1163
+ }
1164
+ */
1165
  // This function contains strings for i18n from files not included
1166
  // in the search for frontend required translatable strings
1167
  // Mainly from widgets
wppa-photo-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
- * Version 6.8.02
7
  *
8
  */
9
 
@@ -53,11 +53,11 @@ function _wppa_moderate_photos() {
53
  $photo = $_GET['photo'];
54
  }
55
  else $photo = '';
56
-
57
  $just_edit = isset( $_GET['just-edit'] );
58
 
59
  if ( $photo && $just_edit && wppa_user_is( 'administrator' ) ) {
60
- echo
61
  '<div class="wrap">' .
62
  '<h2>' . __( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>';
63
  wppa_album_photos( '', $photo, '', false );
@@ -2813,7 +2813,7 @@ function wppaSetConfirmMove( id ) {
2813
  <!-- Remark -->
2814
  <td id="photostatus-<?php echo $photo['id'] ?>" style="width:25%;" >
2815
  <?php _e( 'Not modified' , 'wp-photo-album-plus') ?>
2816
- <script type="text/javascript">wppaPhotoStatusChange( <?php echo $photo['id'] ?> )</script>
2817
  </td>
2818
  </tr>
2819
  <?php } ?>
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 6.8.08
7
  *
8
  */
9
 
53
  $photo = $_GET['photo'];
54
  }
55
  else $photo = '';
56
+
57
  $just_edit = isset( $_GET['just-edit'] );
58
 
59
  if ( $photo && $just_edit && wppa_user_is( 'administrator' ) ) {
60
+ echo
61
  '<div class="wrap">' .
62
  '<h2>' . __( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>';
63
  wppa_album_photos( '', $photo, '', false );
2813
  <!-- Remark -->
2814
  <td id="photostatus-<?php echo $photo['id'] ?>" style="width:25%;" >
2815
  <?php _e( 'Not modified' , 'wp-photo-album-plus') ?>
2816
+ <script type="text/javascript" >wppaPhotoStatusChange( <?php echo $photo['id'] ?> )</script>
2817
  </td>
2818
  </tr>
2819
  <?php } ?>
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 6.8.05
7
  *
8
  */
9
 
@@ -118,7 +118,7 @@ function wppa_get_picture_html( $args ) {
118
 
119
  }
120
  if ( $link['is_lightbox'] ) {
121
- $style .= 'cursor:url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
122
  $title = wppa_zoom_in( $id );
123
  }
124
 
@@ -149,6 +149,8 @@ function wppa_get_picture_html( $args ) {
149
  ' class="thumb-img"' .
150
  ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
151
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
 
 
152
  ' >';
153
  }
154
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 6.8.08
7
  *
8
  */
9
 
118
 
119
  }
120
  if ( $link['is_lightbox'] ) {
121
+ // $style .= 'cursor:' . wppa_wait() . ';'; //url( ' . wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
122
  $title = wppa_zoom_in( $id );
123
  }
124
 
149
  ' class="thumb-img"' .
150
  ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
151
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
152
+ ' style="cursor:' . wppa_wait() . ';"' .
153
+ ' onclick="return false;"' .
154
  ' >';
155
  }
156
 
wppa-potd-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
- * Version 6.8.07
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -77,7 +77,9 @@ class PhotoOfTheDay extends WP_Widget {
77
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
78
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
79
  ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '"' .
80
- ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"';
 
 
81
  }
82
  else {
83
  $lightbox = '';
@@ -85,7 +87,7 @@ class PhotoOfTheDay extends WP_Widget {
85
 
86
  if ( $link ) {
87
  if ( $link['is_lightbox'] ) {
88
- $cursor = ' cursor:url('.wppa_get_imgdir().wppa_opt( 'magnifier').'),pointer;';
89
  $title = wppa_zoom_in( $id );
90
  $ltitle = wppa_get_lbtitle('potd', $id);
91
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * display the widget
6
+ * Version 6.8.08
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
77
  ' data-videonatheight="'.wppa_get_videoy( $id ).'"' : '' ) .
78
  ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
79
  ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '"' .
80
+ ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
81
+ ' onclick="return false;"' .
82
+ ' style="cursor:' . wppa_wait() . ';"';
83
  }
84
  else {
85
  $lightbox = '';
87
 
88
  if ( $link ) {
89
  if ( $link['is_lightbox'] ) {
90
+ $cursor = '';//' cursor:' . wppa_wait() . ';'; //url('.wppa_get_imgdir().wppa_opt( 'magnifier').'),pointer;';
91
  $title = wppa_zoom_in( $id );
92
  $ltitle = wppa_get_lbtitle('potd', $id);
93
  }
wppa-qr-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
- * Version 6.8.07
7
  */
8
 
9
 
@@ -50,7 +50,7 @@ class wppaQRWidget extends WP_Widget {
50
  '<div style="clear:both" ></div>';
51
 
52
  $widget_content .=
53
- '<script type="text/javascript">
54
  /*[CDATA[*/
55
  var wppaQRUrl = document.location.href;
56
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * display qr code
6
+ * Version 6.8.08
7
  */
8
 
9
 
50
  '<div style="clear:both" ></div>';
51
 
52
  $widget_content .=
53
+ '<script type="text/javascript" >
54
  /*[CDATA[*/
55
  var wppaQRUrl = document.location.href;
56
 
wppa-session.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all session routines
6
- * Version 6.8.02
7
  *
8
  * Firefox modifies data in the superglobal $_SESSION.
9
  * See https://bugzilla.mozilla.org/show_bug.cgi?id=991019
@@ -80,6 +80,7 @@ global $wppa_session;
80
  $wppa_session['id'] = $iret;
81
  $wppa_session['user'] = wppa_get_user();
82
  $wppa_session['wfcart'] = null;
 
83
  }
84
 
85
  // Session exists, Update counter
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all session routines
6
+ * Version 6.8.08
7
  *
8
  * Firefox modifies data in the superglobal $_SESSION.
9
  * See https://bugzilla.mozilla.org/show_bug.cgi?id=991019
80
  $wppa_session['id'] = $iret;
81
  $wppa_session['user'] = wppa_get_user();
82
  $wppa_session['wfcart'] = null;
83
+ $wppa_session['photo'] = array();
84
  }
85
 
86
  // Session exists, Update counter
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 6.8.07
7
  *
8
  */
9
 
@@ -27,7 +27,9 @@ global $wp_version;
27
  global $wppa_supported_camara_brands;
28
 
29
  // Start test area
30
-
 
 
31
  // End test area
32
 
33
  // Initialize
@@ -45,7 +47,7 @@ global $wppa_supported_camara_brands;
45
  delete_option( 'wppa_watermark_pos_'.wppa_get_user() );
46
 
47
  // Things that wppa-admin-scripts.js needs to know
48
- echo('<script type="text/javascript">'."\n");
49
  echo('/* <![CDATA[ */'."\n");
50
  echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
51
  echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
@@ -210,7 +212,7 @@ global $wppa_supported_camara_brands;
210
  wppa_ok_message('Not yet Done! wppa_delete_all_from_cloudinary' .
211
  '<br />Trying to continue...');
212
  echo
213
- '<script type="text/javascript">' .
214
  'document.location=' .
215
  'document.location+"&' .
216
  'wppa_settings_submit=Doit&' .
@@ -231,7 +233,7 @@ global $wppa_supported_camara_brands;
231
  wppa_ok_message('Not yet Done! wppa_delete_derived_from_cloudinary' .
232
  '<br />Trying to continue...');
233
  echo
234
- '<script type="text/javascript">' .
235
  'document.location=' .
236
  'document.location+"&' .
237
  'wppa_settings_submit=Doit&' .
@@ -616,7 +618,7 @@ global $wppa_supported_camara_brands;
616
  wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
617
 
618
  $name = __('Do you want the social media share buttons displayed?', 'wp-photo-album-plus');
619
- $desc = __('Display the social media buttons in the slideshow', 'wp-photo-album-plus');;
620
  $help = esc_js(__('These buttons share the specific photo rather than the page where it is displayed on', 'wp-photo-album-plus'));
621
  $slug = 'wppa_i_share';
622
  $opts = array('', __('yes', 'wp-photo-album-plus'), __('no', 'wp-photo-album-plus'));
@@ -1189,7 +1191,7 @@ global $wppa_supported_camara_brands;
1189
  $help = '';
1190
  $slug = 'wppa_coverphoto_responsive';
1191
  $clas = 'cvpr';
1192
- $onch = 'wppaCheckCheck(\'coverphoto_responsive\',\''.$clas.'\')';
1193
  $html = wppa_checkbox($slug, $onch);
1194
  $clas = '';
1195
  $tags = 'cover,album,thumb,size';
@@ -3069,7 +3071,7 @@ global $wppa_supported_camara_brands;
3069
  $desc = __('Define up to 10 custom data fields for albums.', 'wp-photo-album-plus');
3070
  $help = '';
3071
  $slug = 'wppa_album_custom_fields';
3072
- $onch = 'wppaCheckCheck(\'album_custom_fields\', \'albumcustfields\' )';
3073
  $html = wppa_checkbox($slug, $onch);
3074
  $clas = '';
3075
  $tags = 'meta';
@@ -3095,7 +3097,7 @@ global $wppa_supported_camara_brands;
3095
  $desc = __('Define up to 10 custom data fields for photos.', 'wp-photo-album-plus');
3096
  $help = '';
3097
  $slug = 'wppa_custom_fields';
3098
- $onch = 'wppaCheckCheck(\'custom_fields\', \'custfields\' )';
3099
  $html = wppa_checkbox($slug, $onch);
3100
  $clas = '';
3101
  $tags = 'meta';
@@ -3855,7 +3857,7 @@ global $wppa_supported_camara_brands;
3855
  $clas = '';
3856
  $tags = 'system,access';
3857
  wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
3858
-
3859
  $name = __('Lazy or HTML comp', 'wp-photo-album-plus');
3860
  $desc = __('Tick this box when you use lazy load or html compression.', 'wp-photo-album-plus');
3861
  $help = esc_js(__('If the filmstrip images do not show up and you have a lazy load or html optimizing plugin active: Check this box', 'wp-photo-album-plus'));
@@ -3864,7 +3866,7 @@ global $wppa_supported_camara_brands;
3864
  $clas = '';
3865
  $tags = 'system,layout';
3866
  wppa_setting($slug, '19', $name, $desc, $html, $help, $clas, $tags);
3867
-
3868
  $name = __('Thumbs first', 'wp-photo-album-plus');
3869
  $desc = __('When displaying album content: thumbnails before subalbums.', 'wp-photo-album-plus');
3870
  $help = '';
@@ -3946,7 +3948,7 @@ global $wppa_supported_camara_brands;
3946
  $clas = '';
3947
  $tags = 'system';
3948
  wppa_setting($slug, '28', $name, $desc, $html, $help, $clas, $tags);
3949
-
3950
  $name = __('JS and CSS when needed', 'wp-photo-album-plus');
3951
  $desc = __('Loads .js and .css files only when they are used on the page.', 'wp-photo-album-plus');
3952
  $help = esc_js(__('This is a self learning system. The first time a page is loaded that requires wppa .css or .js files, the page will reload.', 'wp-photo-album-plus'));
@@ -3955,7 +3957,7 @@ global $wppa_supported_camara_brands;
3955
  $clas = '';
3956
  $tags = 'system';
3957
  wppa_setting($slug, '29', $name, $desc, $html, $help, $clas, $tags);
3958
-
3959
  $name = __('Enable pdf', 'wp-photo-album-plus');
3960
  $desc = __('Enable the support of pdf files', 'wp-photo-album-plus');
3961
  $help = esc_js(__('This feature requires the activation of ImageMagick. See Table IX-K7', 'wp-photo-album-plus'));
@@ -3965,6 +3967,15 @@ global $wppa_supported_camara_brands;
3965
  $tags = 'system';
3966
  wppa_setting($slug, '30', $name, $desc, $html, $help, $clas, $tags);
3967
 
 
 
 
 
 
 
 
 
 
3968
  }
3969
  wppa_setting_subheader( 'B', '1', __( 'Slideshow related settings' , 'wp-photo-album-plus') );
3970
  {
@@ -4379,7 +4390,7 @@ global $wppa_supported_camara_brands;
4379
 
4380
  $name = __('Cover type', 'wp-photo-album-plus');
4381
  $desc = __('Select the default cover type.', 'wp-photo-album-plus');
4382
- $help = esc_js(__('Types with the addition mcr are suitable for Multi Column in a Responsive theme', 'wp-photo-album-plus'));;
4383
  $slug = 'wppa_cover_type';
4384
  $options = array( __('Standard', 'wp-photo-album-plus'),
4385
  __('Long Descriptions', 'wp-photo-album-plus'),
@@ -7150,6 +7161,7 @@ global $wppa_supported_camara_brands;
7150
  $clas = '';
7151
  $tags = 'access,system';
7152
  wppa_setting(false, '12', $name, $desc, $html, $help, $clas, $tags);
 
7153
  ?>
7154
 
7155
  </tbody>
@@ -8273,7 +8285,7 @@ global $wppa_supported_camara_brands;
8273
  $name = __('Minimum tags', 'wp-photo-album-plus');
8274
  $desc = __('These tags exist even when they do not occur in any photo.', 'wp-photo-album-plus');
8275
  $help = esc_js(__('Enter tags, separated by comma\'s (,)', 'wp-photo-album-plus'));
8276
- $help .= '\n\n'.esc_js(__('Tags exist when they appear on any photo, and vanish when they do no longer appear. Except the tags you list here; they exist always.', 'wp-photo-album-plus'));;
8277
  $slug = 'wppa_minimum_tags';
8278
  $html = wppa_input($slug, '300px');
8279
  $clas = '';
@@ -10664,7 +10676,7 @@ global $wppa_supported_camara_brands;
10664
  </div>
10665
 
10666
  </form>
10667
- <script type="text/javascript">wppaInitSettings();wppaCheckInconsistencies();</script>
10668
  <?php echo sprintf(__('<br />Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus'), memory_get_peak_usage(true)/(1024*1024)); ?>
10669
  <?php echo sprintf(__('<br />There are %d settings and %d runtime parameters.', 'wp-photo-album-plus'), count($wppa_opt), count($wppa)); ?>
10670
  <input type="hidden" id="wppa-heartbeat" value="0" />
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 6.8.08
7
  *
8
  */
9
 
27
  global $wppa_supported_camara_brands;
28
 
29
  // Start test area
30
+ /*
31
+ echo '<input type="button" vaue="Click me" onclick="wppaTimedConfirm( \'My Text\' )" />';
32
+ */
33
  // End test area
34
 
35
  // Initialize
47
  delete_option( 'wppa_watermark_pos_'.wppa_get_user() );
48
 
49
  // Things that wppa-admin-scripts.js needs to know
50
+ echo('<script type="text/javascript" >'."\n");
51
  echo('/* <![CDATA[ */'."\n");
52
  echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
53
  echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
212
  wppa_ok_message('Not yet Done! wppa_delete_all_from_cloudinary' .
213
  '<br />Trying to continue...');
214
  echo
215
+ '<script type="text/javascript" >' .
216
  'document.location=' .
217
  'document.location+"&' .
218
  'wppa_settings_submit=Doit&' .
233
  wppa_ok_message('Not yet Done! wppa_delete_derived_from_cloudinary' .
234
  '<br />Trying to continue...');
235
  echo
236
+ '<script type="text/javascript" >' .
237
  'document.location=' .
238
  'document.location+"&' .
239
  'wppa_settings_submit=Doit&' .
618
  wppa_setting($slug, '6', $name, $desc, $html, $help, $clas, $tags);
619
 
620
  $name = __('Do you want the social media share buttons displayed?', 'wp-photo-album-plus');
621
+ $desc = __('Display the social media buttons in the slideshow', 'wp-photo-album-plus');
622
  $help = esc_js(__('These buttons share the specific photo rather than the page where it is displayed on', 'wp-photo-album-plus'));
623
  $slug = 'wppa_i_share';
624
  $opts = array('', __('yes', 'wp-photo-album-plus'), __('no', 'wp-photo-album-plus'));
1191
  $help = '';
1192
  $slug = 'wppa_coverphoto_responsive';
1193
  $clas = 'cvpr';
1194
+ $onch = 'wppaCheckCheck(\''.$slug.'\',\''.$clas.'\')';
1195
  $html = wppa_checkbox($slug, $onch);
1196
  $clas = '';
1197
  $tags = 'cover,album,thumb,size';
3071
  $desc = __('Define up to 10 custom data fields for albums.', 'wp-photo-album-plus');
3072
  $help = '';
3073
  $slug = 'wppa_album_custom_fields';
3074
+ $onch = 'wppaCheckCheck(\''.$slug.'\', \'albumcustfields\' )';
3075
  $html = wppa_checkbox($slug, $onch);
3076
  $clas = '';
3077
  $tags = 'meta';
3097
  $desc = __('Define up to 10 custom data fields for photos.', 'wp-photo-album-plus');
3098
  $help = '';
3099
  $slug = 'wppa_custom_fields';
3100
+ $onch = 'wppaCheckCheck(\''.$slug.'\', \'custfields\' )';
3101
  $html = wppa_checkbox($slug, $onch);
3102
  $clas = '';
3103
  $tags = 'meta';
3857
  $clas = '';
3858
  $tags = 'system,access';
3859
  wppa_setting($slug, '18', $name, $desc, $html, $help, $clas, $tags);
3860
+ /*
3861
  $name = __('Lazy or HTML comp', 'wp-photo-album-plus');
3862
  $desc = __('Tick this box when you use lazy load or html compression.', 'wp-photo-album-plus');
3863
  $help = esc_js(__('If the filmstrip images do not show up and you have a lazy load or html optimizing plugin active: Check this box', 'wp-photo-album-plus'));
3866
  $clas = '';
3867
  $tags = 'system,layout';
3868
  wppa_setting($slug, '19', $name, $desc, $html, $help, $clas, $tags);
3869
+ */
3870
  $name = __('Thumbs first', 'wp-photo-album-plus');
3871
  $desc = __('When displaying album content: thumbnails before subalbums.', 'wp-photo-album-plus');
3872
  $help = '';
3948
  $clas = '';
3949
  $tags = 'system';
3950
  wppa_setting($slug, '28', $name, $desc, $html, $help, $clas, $tags);
3951
+ /*
3952
  $name = __('JS and CSS when needed', 'wp-photo-album-plus');
3953
  $desc = __('Loads .js and .css files only when they are used on the page.', 'wp-photo-album-plus');
3954
  $help = esc_js(__('This is a self learning system. The first time a page is loaded that requires wppa .css or .js files, the page will reload.', 'wp-photo-album-plus'));
3957
  $clas = '';
3958
  $tags = 'system';
3959
  wppa_setting($slug, '29', $name, $desc, $html, $help, $clas, $tags);
3960
+ */
3961
  $name = __('Enable pdf', 'wp-photo-album-plus');
3962
  $desc = __('Enable the support of pdf files', 'wp-photo-album-plus');
3963
  $help = esc_js(__('This feature requires the activation of ImageMagick. See Table IX-K7', 'wp-photo-album-plus'));
3967
  $tags = 'system';
3968
  wppa_setting($slug, '30', $name, $desc, $html, $help, $clas, $tags);
3969
 
3970
+ $name = __('No rightclick', 'wp-photo-album-plus');
3971
+ $desc = __('Disable right mouseclick on all images', 'wp-photo-album-plus');
3972
+ $help = '';
3973
+ $slug = 'wppa_no_rightclick';
3974
+ $html = wppa_checkbox( $slug );
3975
+ $clas = '';
3976
+ $tags = 'system';
3977
+ wppa_setting($slug, '31', $name, $desc, $html, $help, $clas, $tags);
3978
+
3979
  }
3980
  wppa_setting_subheader( 'B', '1', __( 'Slideshow related settings' , 'wp-photo-album-plus') );
3981
  {
4390
 
4391
  $name = __('Cover type', 'wp-photo-album-plus');
4392
  $desc = __('Select the default cover type.', 'wp-photo-album-plus');
4393
+ $help = esc_js(__('Types with the addition mcr are suitable for Multi Column in a Responsive theme', 'wp-photo-album-plus'));
4394
  $slug = 'wppa_cover_type';
4395
  $options = array( __('Standard', 'wp-photo-album-plus'),
4396
  __('Long Descriptions', 'wp-photo-album-plus'),
7161
  $clas = '';
7162
  $tags = 'access,system';
7163
  wppa_setting(false, '12', $name, $desc, $html, $help, $clas, $tags);
7164
+
7165
  ?>
7166
 
7167
  </tbody>
8285
  $name = __('Minimum tags', 'wp-photo-album-plus');
8286
  $desc = __('These tags exist even when they do not occur in any photo.', 'wp-photo-album-plus');
8287
  $help = esc_js(__('Enter tags, separated by comma\'s (,)', 'wp-photo-album-plus'));
8288
+ $help .= '\n\n'.esc_js(__('Tags exist when they appear on any photo, and vanish when they do no longer appear. Except the tags you list here; they exist always.', 'wp-photo-album-plus'));
8289
  $slug = 'wppa_minimum_tags';
8290
  $html = wppa_input($slug, '300px');
8291
  $clas = '';
10676
  </div>
10677
 
10678
  </form>
10679
+ <script type="text/javascript" >wppaInitSettings();wppaCheckInconsistencies();</script>
10680
  <?php echo sprintf(__('<br />Memory used on this page: %6.2f Mb.', 'wp-photo-album-plus'), memory_get_peak_usage(true)/(1024*1024)); ?>
10681
  <?php echo sprintf(__('<br />There are %d settings and %d runtime parameters.', 'wp-photo-album-plus'), count($wppa_opt), count($wppa)); ?>
10682
  <input type="hidden" id="wppa-heartbeat" value="0" />
wppa-setup.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
- * Version 6.8.06
7
  *
8
  */
9
 
@@ -38,12 +38,12 @@ global $silent;
38
 
39
  // If not a new install, remove obsolete tempfiles
40
  if ( $old_rev > '100' ) {
41
- wppa_delete_obsolete_tempfiles();
42
  }
43
 
44
  if ( $old_rev == $wppa_revno && ! $force ) return; // Nothing to do here
45
 
46
- wppa_clear_cache(true); // Clear cache
47
  delete_option( 'wppa_dismiss_admin_notice_scripts_are_obsolete' );
48
 
49
  $wppa_error = false; // Init no error
@@ -1170,7 +1170,7 @@ Hide Camera info
1170
  'wppa_auto_page' => 'no',
1171
  'wppa_auto_page_type' => 'photo',
1172
  'wppa_auto_page_links' => 'bottom',
1173
- 'wppa_defer_javascript' => 'no',
1174
  'wppa_inline_css' => 'yes',
1175
  'wppa_custom_style' => '',
1176
  'wppa_custom_style_chrome' => '',
@@ -1180,12 +1180,12 @@ Hide Camera info
1180
  'wppa_custom_style_ie' => '',
1181
  'wppa_custom_style_opera' => '',
1182
  'wppa_use_custom_style_file' => 'no',
1183
- 'wppa_js_css_optional' => 'no',
1184
  'wppa_enable_pdf' => 'no', // IV-A30
1185
  'wppa_use_custom_theme_file' => 'no',
1186
  'wppa_cre_uploads_htaccess' => 'remove',
1187
  'wppa_debug_trace_on' => 'no',
1188
- 'wppa_lazy_or_htmlcomp' => 'no',
1189
  'wppa_relative_urls' => 'no',
1190
 
1191
  'wppa_thumbs_first' => 'no',
@@ -1502,6 +1502,7 @@ Hide Camera info
1502
  'wppa_photo_owner_change' => 'no',
1503
  'wppa_superuser_user' => '',
1504
  'wppa_un_superuser_user' => '',
 
1505
 
1506
  // Table VIII: Actions
1507
  // A Harmless
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the setup stuff
6
+ * Version 6.8.08
7
  *
8
  */
9
 
38
 
39
  // If not a new install, remove obsolete tempfiles
40
  if ( $old_rev > '100' ) {
41
+ wppa_clear_cache($force); // Clear cache
42
  }
43
 
44
  if ( $old_rev == $wppa_revno && ! $force ) return; // Nothing to do here
45
 
46
+
47
  delete_option( 'wppa_dismiss_admin_notice_scripts_are_obsolete' );
48
 
49
  $wppa_error = false; // Init no error
1170
  'wppa_auto_page' => 'no',
1171
  'wppa_auto_page_type' => 'photo',
1172
  'wppa_auto_page_links' => 'bottom',
1173
+ 'wppa_defer_javascript' => 'yes',
1174
  'wppa_inline_css' => 'yes',
1175
  'wppa_custom_style' => '',
1176
  'wppa_custom_style_chrome' => '',
1180
  'wppa_custom_style_ie' => '',
1181
  'wppa_custom_style_opera' => '',
1182
  'wppa_use_custom_style_file' => 'no',
1183
+ // 'wppa_js_css_optional' => 'no',
1184
  'wppa_enable_pdf' => 'no', // IV-A30
1185
  'wppa_use_custom_theme_file' => 'no',
1186
  'wppa_cre_uploads_htaccess' => 'remove',
1187
  'wppa_debug_trace_on' => 'no',
1188
+ // 'wppa_lazy_or_htmlcomp' => 'no',
1189
  'wppa_relative_urls' => 'no',
1190
 
1191
  'wppa_thumbs_first' => 'no',
1502
  'wppa_photo_owner_change' => 'no',
1503
  'wppa_superuser_user' => '',
1504
  'wppa_un_superuser_user' => '',
1505
+ 'wppa_no_rightclick' => 'no',
1506
 
1507
  // Table VIII: Actions
1508
  // A Harmless
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 6.7.10
7
  *
8
  */
9
 
@@ -241,7 +241,7 @@ function wppa_start_stop_icons( $opt = '' ) {
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_add_js_page_data( "\n" . '<script type="text/javascript">' );
245
  wppa_add_js_page_data( "\n" . 'wppaSlideInitRunning['.wppa( 'mocc' ).'] = true;' );
246
  wppa_add_js_page_data( "\n" . 'wppaMaxOccur = '.wppa( 'mocc' ).';' );
247
  wppa_add_js_page_data( "\n" . '</script>' );
@@ -299,7 +299,7 @@ function wppa_start_stop_text( $opt = '' ) {
299
  if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
300
 
301
  if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
302
- wppa_add_js_page_data( "\n" . '<script type="text/javascript">' );
303
  wppa_add_js_page_data( "\n" . 'wppaSlideInitRunning['.wppa( 'mocc' ).'] = true;' );
304
  wppa_add_js_page_data( "\n" . 'wppaMaxOccur = '.wppa( 'mocc' ).';' );
305
  wppa_add_js_page_data( "\n" . '</script>' );
@@ -1319,7 +1319,7 @@ function wppa_slide_filmstrip( $opt = '' ) {
1319
  $pagsiz = round( $w / ( wppa_opt( 'film_thumbsize' ) + wppa_opt( 'tn_margin' ) ) );
1320
  if ( wppa_in_widget() ) $pagsiz = round( $w / ( wppa_opt( 'film_thumbsize' ) / 2 + wppa_opt( 'tn_margin' ) / 2 ) );
1321
 
1322
- wppa_add_js_page_data( '<script type="text/javascript">' );
1323
  wppa_add_js_page_data( 'wppaFilmPageSize['.wppa( 'mocc' ).'] = '.$pagsiz.';' );
1324
  wppa_add_js_page_data( '</script>' );
1325
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 6.8.08
7
  *
8
  */
9
 
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_add_js_page_data( "\n" . '<script type="text/javascript" >' );
245
  wppa_add_js_page_data( "\n" . 'wppaSlideInitRunning['.wppa( 'mocc' ).'] = true;' );
246
  wppa_add_js_page_data( "\n" . 'wppaMaxOccur = '.wppa( 'mocc' ).';' );
247
  wppa_add_js_page_data( "\n" . '</script>' );
299
  if ( wppa_switch( 'show_startstop_navigation' ) && ! wppa( 'is_slideonly' ) ) $hide = ''; // we want it
300
 
301
  if ( wppa_opt( 'start_slide' ) || wppa_in_widget() ) {
302
+ wppa_add_js_page_data( "\n" . '<script type="text/javascript" >' );
303
  wppa_add_js_page_data( "\n" . 'wppaSlideInitRunning['.wppa( 'mocc' ).'] = true;' );
304
  wppa_add_js_page_data( "\n" . 'wppaMaxOccur = '.wppa( 'mocc' ).';' );
305
  wppa_add_js_page_data( "\n" . '</script>' );
1319
  $pagsiz = round( $w / ( wppa_opt( 'film_thumbsize' ) + wppa_opt( 'tn_margin' ) ) );
1320
  if ( wppa_in_widget() ) $pagsiz = round( $w / ( wppa_opt( 'film_thumbsize' ) / 2 + wppa_opt( 'tn_margin' ) / 2 ) );
1321
 
1322
+ wppa_add_js_page_data( '<script type="text/javascript" >' );
1323
  wppa_add_js_page_data( 'wppaFilmPageSize['.wppa( 'mocc' ).'] = '.$pagsiz.';' );
1324
  wppa_add_js_page_data( '</script>' );
1325
 
wppa-styles.php CHANGED
@@ -3,7 +3,7 @@
3
  /* Package: wp-photo-album-plus
4
  /*
5
  /* Various style computation routines
6
- /* Version 6.8.02
7
  /*
8
  */
9
 
@@ -450,7 +450,7 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
450
  }
451
  if ( wppa_opt( 'coverimg_linktype' ) == 'lightbox' ) {
452
  $result['cursor'] =
453
- ' cursor:url( ' .wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
454
  }
455
 
456
  $result['style'] .= 'display:inline;';
@@ -548,8 +548,9 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
548
  $result['cursor'] = ' cursor:default;';
549
  }
550
  elseif ( $linktyp == 'lightbox' ) {
551
- $result['cursor'] = ' cursor:url(' . wppa_get_imgdir() .
552
- wppa_opt( 'magnifier' ) . '),pointer;';
 
553
  }
554
  else {
555
  $result['cursor'] = ' cursor:pointer;';
3
  /* Package: wp-photo-album-plus
4
  /*
5
  /* Various style computation routines
6
+ /* Version 6.8.08
7
  /*
8
  */
9
 
450
  }
451
  if ( wppa_opt( 'coverimg_linktype' ) == 'lightbox' ) {
452
  $result['cursor'] =
453
+ ' cursor:' . wppa_wait() . ';';//url( ' .wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
454
  }
455
 
456
  $result['style'] .= 'display:inline;';
548
  $result['cursor'] = ' cursor:default;';
549
  }
550
  elseif ( $linktyp == 'lightbox' ) {
551
+ $result['cursor'] = ' curor:wait;';
552
+ // ' cursor:url(' . wppa_get_imgdir() .
553
+ // wppa_opt( 'magnifier' ) . '),pointer;';
554
  }
555
  else {
556
  $result['cursor'] = ' cursor:pointer;';
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 6.8.04
9
  *
10
  */
11
 
@@ -314,6 +314,8 @@ global $wpdb;
314
  ' ' . wppa( 'lbtitle' ) . '="'.$title.'" ' .
315
  ' class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'"' .
316
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
 
 
317
  ' >';
318
  if ( $is_video ) {
319
  $result .= wppa_get_video_html( array(
@@ -386,7 +388,7 @@ global $wpdb;
386
  ' />';
387
  }
388
  $result .= '</div>';
389
- $result .= '<script type="text/javascript">';
390
  $result .= '/* <![CDATA[ */';
391
  $result .= 'wppaPopupOnclick['.$id.'] = "'.$link['url'].'";';
392
  $result .= '/* ]]> */';
@@ -923,13 +925,14 @@ function wppa_the_thumbascoverphoto( $id, $src, $photo_left, $link, $imgattr_a,
923
 
924
  if ( $link['is_lightbox'] ) {
925
  $href = wppa_get_hires_url( $id );
926
- $cursor = ' cursor:url( ' .wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
927
 
928
  $result .= '<a' .
929
  ' href="' . $href . '"' .
930
  ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ). '[occ' . wppa( 'mocc' ) . ']"' .
931
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
932
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
 
933
  ' >';
934
 
935
  if ( wppa_is_video( $id ) ) {
@@ -1404,7 +1407,7 @@ global $wpdb;
1404
  }
1405
 
1406
  $result .= '</div>';
1407
- $result .= '<script type="text/javascript">';
1408
  $result .= '/* <![CDATA[ */';
1409
  $result .= 'wppaPopupOnclick['.$id.'] = "'.$link['url'].'";';
1410
  $result .= '/* ]]> */';
@@ -1645,6 +1648,8 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1645
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1646
  ' target="' . $link['target'] . '"' .
1647
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
 
 
1648
  ' >';
1649
  $result .= "\n\t\t";
1650
  if ( $display == 'thumbs' ) {
@@ -1658,7 +1663,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1658
  'margin_top' => $imgstyle_a['margin-top'],
1659
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1660
  'tagid' => 'i-' . $xid . '-' . wppa( 'mocc' ),
1661
- 'cursor' => $imgstyle_a['cursor'],
1662
  'events' => $imgevents,
1663
  'title' => $title
1664
  ) );
@@ -1670,7 +1675,7 @@ function wppa_get_the_widget_thumb( $type, $image, $album, $display, $link, $tit
1670
  ' src="' . $imgurl . '"' .
1671
  ' width="' . $imgstyle_a['width'] . '"' .
1672
  ' height="' . $imgstyle_a['height'] . '"' .
1673
- ' style="' . $imgstyle_a['style'] . $imgstyle_a['cursor'] . '"' .
1674
  ' ' . $imgevents .
1675
  ' ' . wppa_get_imgalt( $id ) .
1676
  ' />';
@@ -1850,7 +1855,7 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1850
  }
1851
 
1852
  if ( $tmp == 'pre' && wppa_opt( 'film_linktype' ) == 'lightbox' ) $cursor = 'cursor:default;';
1853
- if ( $tmp == 'film' && ! $com_alt && ! wppa_cdn( 'front' ) && ! wppa_switch( 'lazy_or_htmlcomp' ) ) $result .= '<!--';
1854
  if ( wppa_is_video( $thumb['id'] ) ) {
1855
  $result .= wppa_get_video_html( array( 'id' => $thumb['id'],
1856
  'width' => $imgattr_a['width'],
@@ -1868,14 +1873,14 @@ function wppa_do_filmthumb( $id, $idx, $do_for_feed = false, $glue = false ) {
1868
  $result .= '<img' .
1869
  ' id="wppa-' . $tmp . '-' . $idx . '-' . wppa( 'mocc' ) . '"' .
1870
  ' class="wppa-'.$tmp.'-'.wppa( 'mocc' ).'"' .
1871
- ' src="' . $url . '"' .
1872
  ' ' . $imgalt .
1873
  ' style="' . $imgstyle . $cursor . '"' .
1874
  ' ' . $events .
1875
  ' data-title="' . ( $psourl ? esc_attr( $thumb['linktitle'] ) : '' ) . '"' .
1876
  ' />';
1877
  }
1878
- if ( $tmp == 'film' && ! $com_alt && ! wppa_cdn( 'front' ) && ! wppa_switch( 'lazy_or_htmlcomp' ) ) $result .= '-->';
1879
 
1880
  if ( $psourl ) { // True only when pso activated and data present
1881
  $result .= '</a>'; // $psourl contains url, target and title
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 6.8.08
9
  *
10
  */
11
 
314
  ' ' . wppa( 'lbtitle' ) . '="'.$title.'" ' .
315
  ' class="thumb-img" id="x-'.$xid.'-'.wppa( 'mocc' ).'"' .
316
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
317
+ ' onclick="return false;"' .
318
+ ' style="cursor:' . wppa_wait() . ';"' .
319
  ' >';
320
  if ( $is_video ) {
321
  $result .= wppa_get_video_html( array(
388
  ' />';
389
  }
390
  $result .= '</div>';
391
+ $result .= '<script type="text/javascript" >';
392
  $result .= '/* <![CDATA[ */';
393
  $result .= 'wppaPopupOnclick['.$id.'] = "'.$link['url'].'";';
394
  $result .= '/* ]]> */';
925
 
926
  if ( $link['is_lightbox'] ) {
927
  $href = wppa_get_hires_url( $id );
928
+ $cursor = ' cursor:' . wppa_wait() . ';'; //url( ' .wppa_get_imgdir() . wppa_opt( 'magnifier' ) . ' ),pointer;';
929
 
930
  $result .= '<a' .
931
  ' href="' . $href . '"' .
932
  ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ). '[occ' . wppa( 'mocc' ) . ']"' .
933
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
934
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
935
+ ' onclick="return false;"' .
936
  ' >';
937
 
938
  if ( wppa_is_video( $id ) ) {
1407
  }
1408
 
1409
  $result .= '</div>';
1410
+ $result .= '<script type="text/javascript" >';
1411
  $result .= '/* <![CDATA[ */';
1412
  $result .= 'wppaPopupOnclick['.$id.'] = "'.$link['url'].'";';
1413
  $result .= '/* ]]> */';
1648
  ( $title ? ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' : '' ) .
1649
  ' target="' . $link['target'] . '"' .
1650
  ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
1651
+ ' style="cursor:' . wppa_wait() . ';"' .
1652
+ ' onclick="return false;"' .
1653
  ' >';
1654
  $result .= "\n\t\t";
1655
  if ( $display == 'thumbs' ) {
1663
  'margin_top' => $imgstyle_a['margin-top'],
1664
  'margin_bottom' => $imgstyle_a['margin-bottom'],
1665
  'tagid' => 'i-' . $xid . '-' . wppa( 'mocc' ),
1666
+ // 'cursor' => $imgstyle_a['cursor'],
1667
  'events' => $imgevents,
1668
  'title' => $title
1669
  ) );
1675
  ' src="' . $imgurl . '"' .
1676
  ' width="' . $imgstyle_a['width'] . '"' .
1677
  ' height="' . $imgstyle_a['height'] . '"' .
1678
+ ' style="' . $imgstyle_a['style'] . '"' .
1679
  ' ' . $imgevents .
1680
  ' ' . wppa_get_imgalt( $id ) .
1681
  ' />';
1855
  }
1856
 
1857
  if ( $tmp == 'pre' && wppa_opt( 'film_linktype' ) == 'lightbox' ) $cursor = 'cursor:default;';
1858
+ // if ( $tmp == 'film' && ! $com_alt && ! wppa_cdn( 'front' ) && ! wppa_switch( 'lazy_or_htmlcomp' ) ) $result .= '<!--';
1859
  if ( wppa_is_video( $thumb['id'] ) ) {
1860
  $result .= wppa_get_video_html( array( 'id' => $thumb['id'],
1861
  'width' => $imgattr_a['width'],
1873
  $result .= '<img' .
1874
  ' id="wppa-' . $tmp . '-' . $idx . '-' . wppa( 'mocc' ) . '"' .
1875
  ' class="wppa-'.$tmp.'-'.wppa( 'mocc' ).'"' .
1876
+ ( $tmp == 'film' ? ' data-src' : ' src' ) . '="' . $url . '"' .
1877
  ' ' . $imgalt .
1878
  ' style="' . $imgstyle . $cursor . '"' .
1879
  ' ' . $events .
1880
  ' data-title="' . ( $psourl ? esc_attr( $thumb['linktitle'] ) : '' ) . '"' .
1881
  ' />';
1882
  }
1883
+ // if ( $tmp == 'film' && ! $com_alt && ! wppa_cdn( 'front' ) && ! wppa_switch( 'lazy_or_htmlcomp' ) ) $result .= '-->';
1884
 
1885
  if ( $psourl ) { // True only when pso activated and data present
1886
  $result .= '</a>'; // $psourl contains url, target and title
wppa-tinymce-photo-front.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-photo-front.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 6.8.00
6
  *
7
  */
8
 
@@ -46,6 +46,8 @@ function wppa_inject_3_js() {
46
  global $wppa_api_version;
47
  static $done;
48
  global $wpdb;
 
 
49
 
50
  if ( wppa_switch( 'photo_shortcode_enabled' ) && ! $done ) {
51
 
@@ -56,21 +58,31 @@ global $wpdb;
56
  wppa( 'in_widget', true );
57
 
58
  // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
59
- echo
60
- '<script type="text/javascript">
61
- /* <![CDATA[ */
62
- wppaImageDirectory = "' . wppa_get_imgdir() . '";
63
- wppaAjaxUrl = "' . admin_url( 'admin-ajax.php' ) . '";
64
- wppaPhotoDirectory = "' . WPPA_UPLOAD_URL . '/";
65
- wppaNoPreview = "' . __( 'No Preview available', 'wp-photo-album-plus' ) . '";
66
- wppaTxtProcessing = "' . __( 'Processing...', 'wp-photo-album-plus' ) . '";
67
- wppaTxtDone = "' . __( 'Done!', 'wp-photo-album-plus' ) . '";
68
- wppaTxtErrUnable = "' . __( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ) . '";
69
- wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";
70
- wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
71
- wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";
72
- /* ]]> */
73
- </script>';
 
 
 
 
 
 
 
 
 
 
74
 
75
  // Reset faked widget
76
  wppa( 'in_widget', false );
2
  /* wppa-tinymce-photo-front.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 6.8.08
6
  *
7
  */
8
 
46
  global $wppa_api_version;
47
  static $done;
48
  global $wpdb;
49
+ global $wppa_js_page_data_file;
50
+
51
 
52
  if ( wppa_switch( 'photo_shortcode_enabled' ) && ! $done ) {
53
 
58
  wppa( 'in_widget', true );
59
 
60
  // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
61
+ $body = '
62
+ wppaImageDirectory = "' . wppa_get_imgdir() . '";
63
+ wppaPhotoDirectory = "' . WPPA_UPLOAD_URL . '/";
64
+ wppaNoPreview = "' . __( 'No Preview available', 'wp-photo-album-plus' ) . '";
65
+ wppaTxtProcessing = "' . __( 'Processing...', 'wp-photo-album-plus' ) . '";
66
+ wppaTxtDone = "' . __( 'Done!', 'wp-photo-album-plus' ) . '";
67
+ wppaTxtErrUnable = "' . __( 'ERROR: unable to upload files.', 'wp-photo-album-plus' ) . '";
68
+ wppaOutputType = "' . wppa_opt( 'photo_shortcode_fe_type' ) . '";
69
+ wppaShortcodeTemplate = "' . esc_js( wppa_get_picture_html( array( 'id' => $id, 'type' => 'sphoto' ) ) ) . '";
70
+ wppaShortcodeTemplateId = "' . $id . '.' . wppa_get_photo_item( $id, 'ext' ) . '";
71
+ ';
72
+
73
+ if ( $wppa_js_page_data_file ) {
74
+ $handle = @ fopen( $wppa_js_page_data_file, 'ab' );
75
+ if ( $handle ) {
76
+ fwrite( $handle, "\n/* START PHOTO sc and TynyMce fe vars */" . $body . "/* END PHOTO and TynMce */\n" );
77
+ fclose( $handle );
78
+ }
79
+ }
80
+ else {
81
+ echo '
82
+ <script type="text/javascript" >' .
83
+ $body . '
84
+ </script>';
85
+ }
86
 
87
  // Reset faked widget
88
  wppa( 'in_widget', false );
wppa-tinymce-photo.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-tinymce-photo.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
- * Version 6.7.10
6
  *
7
  */
8
 
@@ -49,7 +49,7 @@ static $done;
49
  if ( wppa_switch( 'photo_shortcode_enabled' ) && ! $done ) {
50
 
51
  // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
52
- echo('<script type="text/javascript">'."\n");
53
  echo('/* <![CDATA[ */'."\n");
54
  echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
55
  echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
2
  /* wppa-tinymce-photo.php
3
  * Pachkage: wp-photo-album-plus
4
  *
5
+ * Version 6.8.08
6
  *
7
  */
8
 
49
  if ( wppa_switch( 'photo_shortcode_enabled' ) && ! $done ) {
50
 
51
  // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
52
+ echo('<script type="text/javascript" >'."\n");
53
  echo('/* <![CDATA[ */'."\n");
54
  echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
55
  echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
wppa-tinymce-shortcodes.php CHANGED
@@ -3,7 +3,7 @@
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  *
6
- * Version 6.8.06
7
  *
8
  */
9
 
@@ -48,7 +48,7 @@ function wppa_inject_js() {
48
  global $wppa_api_version;
49
 
50
  // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
51
- echo('<script type="text/javascript">'."\n");
52
  echo('/* <![CDATA[ */'."\n");
53
  echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
54
  echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
@@ -535,7 +535,7 @@ global $wpdb;
535
  '<tr id="wppagallery-phototags-tr" style="display:none;" >'.
536
  '<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
537
  '<td>'.
538
- '<select id="wppagallery-phototags" style="color:#700 !important;;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
539
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >'.__('--- please select tag(s) ---', 'wp-photo-album-plus').'</option>';
540
  if ( $tags ) foreach ( array_keys($tags) as $tag ) {
541
  $result .= '<option class="wppagallery-phototags" value="'.$tag.'" >'.$tag.'</option>';
3
  * Pachkage: wp-photo-album-plus
4
  *
5
  *
6
+ * Version 6.8.08
7
  *
8
  */
9
 
48
  global $wppa_api_version;
49
 
50
  // Things that wppa-tinymce.js AND OTHER MODULES!!! need to know
51
+ echo('<script type="text/javascript" >'."\n");
52
  echo('/* <![CDATA[ */'."\n");
53
  echo("\t".'wppaImageDirectory = "'.wppa_get_imgdir().'";'."\n");
54
  echo("\t".'wppaAjaxUrl = "'.admin_url('admin-ajax.php').'";'."\n");
535
  '<tr id="wppagallery-phototags-tr" style="display:none;" >'.
536
  '<th><label for="wppagallery-phototags">'.__('The photo tag(s):', 'wp-photo-album-plus').'</label></th>'.
537
  '<td>'.
538
+ '<select id="wppagallery-phototags" style="color:#700 !important;" multiple="multiple" onchange="wppaGalleryEvaluate()">'.
539
  '<option value="" disabled="disabled" selected="selected" style="color:#700 !important;" >'.__('--- please select tag(s) ---', 'wp-photo-album-plus').'</option>';
540
  if ( $tags ) foreach ( array_keys($tags) as $tag ) {
541
  $result .= '<option class="wppagallery-phototags" value="'.$tag.'" >'.$tag.'</option>';
wppa-upload.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
- * Version 6.8.00
7
  *
8
  */
9
 
@@ -78,13 +78,13 @@ global $upload_album;
78
  if ( isset( $_POST['wppa-go-edit-multiple'] ) ) {
79
  if ( current_user_can( 'wppa_admin' ) ) {
80
  wppa_ok_message( __( 'Connecting to edit album...' , 'wp-photo-album-plus' ) ); ?>
81
- <script type="text/javascript">
82
  document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id=' . $upload_album . '&wppa_nonce=' . wp_create_nonce( 'wppa_nonce', 'wppa_nonce' ), 'js' ) ) ?>';
83
  </script>
84
  <?php }
85
  elseif ( wppa_opt( 'upload_edit' ) != '-none-' ) {
86
  wppa_ok_message( __( 'Connecting to edit photos...' , 'wp-photo-album-plus' ) ); ?>
87
- <script type="text/javascript">document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_edit_photo', 'js' ) ) ?>';</script>
88
  <?php }
89
  }
90
  }
@@ -95,13 +95,13 @@ global $upload_album;
95
  if ( isset( $_POST['wppa-go-edit-single'] ) ) {
96
  if ( current_user_can( 'wppa_admin' ) ) {
97
  wppa_ok_message( __( 'Connecting to edit album...' , 'wp-photo-album-plus' ) ); ?>
98
- <script type="text/javascript">
99
  document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id=' . $upload_album . '&wppa_nonce=' . wp_create_nonce( 'wppa_nonce', 'wppa_nonce' ), 'js' ) ) ?>';
100
  </script>
101
  <?php }
102
  elseif ( wppa_opt( 'upload_edit' ) != '-none-' ) {
103
  wppa_ok_message( __( 'Connecting to edit photos...' , 'wp-photo-album-plus' ) ); ?>
104
- <script type="text/javascript">document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_edit_photo', 'js' ) ) ?>';</script>
105
  <?php }
106
  }
107
  }
@@ -112,7 +112,7 @@ global $upload_album;
112
  if ( isset( $_POST['wppa-go-import'] ) && $err == '0' ) {
113
  wppa_ok_message( __( 'Connecting to your depot...' , 'wp-photo-album-plus' ) );
114
  update_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH ); ?>
115
- <script type="text/javascript">document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_import_photos&zip='.$target, 'js' ) ) ?>';</script>
116
  <?php }
117
  }
118
 
@@ -289,7 +289,7 @@ global $upload_album;
289
  __( 'Selected Files:' , 'wp-photo-album-plus' ) .
290
  '</h3>' .
291
  '</div>' .
292
- '<script type="text/javascript">' .
293
  'function showit() {' .
294
  'var maxsize = parseInt( \'' . $max_tot_size_mbytes . '\' ) * 1024 * 1024;' .
295
  'var maxcount = parseInt( \'' . $max_files_txt . '\' );' .
@@ -479,7 +479,7 @@ global $upload_album;
479
  }
480
  echo
481
  '</form>' .
482
- '<script type="text/javascript">' .
483
  // '<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->' .
484
  'var multi_selector = new MultiSelector( document.getElementById( \'files_list\' ), ' . $max_files . ');' .
485
  // '<!-- Pass in the file element -->' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the upload pages and functions
6
+ * Version 6.8.08
7
  *
8
  */
9
 
78
  if ( isset( $_POST['wppa-go-edit-multiple'] ) ) {
79
  if ( current_user_can( 'wppa_admin' ) ) {
80
  wppa_ok_message( __( 'Connecting to edit album...' , 'wp-photo-album-plus' ) ); ?>
81
+ <script type="text/javascript" >
82
  document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id=' . $upload_album . '&wppa_nonce=' . wp_create_nonce( 'wppa_nonce', 'wppa_nonce' ), 'js' ) ) ?>';
83
  </script>
84
  <?php }
85
  elseif ( wppa_opt( 'upload_edit' ) != '-none-' ) {
86
  wppa_ok_message( __( 'Connecting to edit photos...' , 'wp-photo-album-plus' ) ); ?>
87
+ <script type="text/javascript" >document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_edit_photo', 'js' ) ) ?>';</script>
88
  <?php }
89
  }
90
  }
95
  if ( isset( $_POST['wppa-go-edit-single'] ) ) {
96
  if ( current_user_can( 'wppa_admin' ) ) {
97
  wppa_ok_message( __( 'Connecting to edit album...' , 'wp-photo-album-plus' ) ); ?>
98
+ <script type="text/javascript" >
99
  document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_admin_menu&tab=edit&edit_id=' . $upload_album . '&wppa_nonce=' . wp_create_nonce( 'wppa_nonce', 'wppa_nonce' ), 'js' ) ) ?>';
100
  </script>
101
  <?php }
102
  elseif ( wppa_opt( 'upload_edit' ) != '-none-' ) {
103
  wppa_ok_message( __( 'Connecting to edit photos...' , 'wp-photo-album-plus' ) ); ?>
104
+ <script type="text/javascript" >document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_edit_photo', 'js' ) ) ?>';</script>
105
  <?php }
106
  }
107
  }
112
  if ( isset( $_POST['wppa-go-import'] ) && $err == '0' ) {
113
  wppa_ok_message( __( 'Connecting to your depot...' , 'wp-photo-album-plus' ) );
114
  update_option( 'wppa_import_source_'.$user, WPPA_DEPOT_PATH ); ?>
115
+ <script type="text/javascript" >document.location = '<?php echo( wppa_dbg_url( get_admin_url().'admin.php?page=wppa_import_photos&zip='.$target, 'js' ) ) ?>';</script>
116
  <?php }
117
  }
118
 
289
  __( 'Selected Files:' , 'wp-photo-album-plus' ) .
290
  '</h3>' .
291
  '</div>' .
292
+ '<script type="text/javascript" >' .
293
  'function showit() {' .
294
  'var maxsize = parseInt( \'' . $max_tot_size_mbytes . '\' ) * 1024 * 1024;' .
295
  'var maxcount = parseInt( \'' . $max_files_txt . '\' );' .
479
  }
480
  echo
481
  '</form>' .
482
+ '<script type="text/javascript" >' .
483
  // '<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->' .
484
  'var multi_selector = new MultiSelector( document.getElementById( \'files_list\' ), ' . $max_files . ');' .
485
  // '<!-- Pass in the file element -->' .
wppa-utils.php CHANGED
@@ -272,7 +272,7 @@ global $wppa;
272
  </script>';
273
  } // End first
274
  $wppa['geo'] .= '
275
- <script type="text/javascript">_wppaLat[' . wppa( 'mocc' ) . '][' . $id . '] = ' . $lat.'; _wppaLon[' . wppa( 'mocc' ) . '][' . $id.'] = ' . $lon . ';</script>';
276
  break; // End native
277
  }
278
  }
@@ -3315,7 +3315,7 @@ global $wpdb;
3315
  return $result;
3316
  }
3317
 
3318
- // Add page id to list of pages that need css and js
3319
  function wppa_add_wppa_on_page() {
3320
  global $wppa_first_id;
3321
 
@@ -3377,7 +3377,7 @@ global $wppa_first_id;
3377
 
3378
  return $result;
3379
  }
3380
-
3381
  // Get an svg image html
3382
  // @1: string: Name of the .svg file without extension
3383
  // @2: string: CSS height or empty, no ; required
@@ -4220,4 +4220,10 @@ function wppa_dump( $txt = '' ) {
4220
 
4221
  function wppa_is_pdf( $id ) {
4222
  return ( strtolower( wppa_get_ext( wppa_get_photo_item( $id, 'filename' ) ) ) == 'pdf' );
 
 
 
 
 
 
4223
  }
272
  </script>';
273
  } // End first
274
  $wppa['geo'] .= '
275
+ <script type="text/javascript" >_wppaLat[' . wppa( 'mocc' ) . '][' . $id . '] = ' . $lat.'; _wppaLon[' . wppa( 'mocc' ) . '][' . $id.'] = ' . $lon . ';</script>';
276
  break; // End native
277
  }
278
  }
3315
  return $result;
3316
  }
3317
 
3318
+ /* Add page id to list of pages that need css and js
3319
  function wppa_add_wppa_on_page() {
3320
  global $wppa_first_id;
3321
 
3377
 
3378
  return $result;
3379
  }
3380
+ */
3381
  // Get an svg image html
3382
  // @1: string: Name of the .svg file without extension
3383
  // @2: string: CSS height or empty, no ; required
4220
 
4221
  function wppa_is_pdf( $id ) {
4222
  return ( strtolower( wppa_get_ext( wppa_get_photo_item( $id, 'filename' ) ) ) == 'pdf' );
4223
+ }
4224
+
4225
+ // If wppa embedded lightbox, show wait cursor prior to lightbox init. when generic lightbox, show pointer cursor
4226
+ function wppa_wait() {
4227
+ $result = wppa_opt( 'lightbox_name' ) == 'wppa' ? 'wait' : 'pointer';
4228
+ return $result;
4229
  }
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: 6.8.07.003
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 = '6807'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-8-07-003'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
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: 6.8.08.011
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 = '6808'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-8-08-011'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );